# Method Global:RegisterGuildEvent [-] [+]

Registers a Guild event handler.

    enum GuildEvents
    {
        // Guild
        GUILD_EVENT_ON_ADD_MEMBER               =     1,       // (event, guild, player, rank)
        GUILD_EVENT_ON_REMOVE_MEMBER            =     2,       // (event, guild, player, isDisbanding)
        GUILD_EVENT_ON_MOTD_CHANGE              =     3,       // (event, guild, newMotd)
        GUILD_EVENT_ON_INFO_CHANGE              =     4,       // (event, guild, newInfo)
        GUILD_EVENT_ON_CREATE                   =     5,       // (event, guild, leader, name)  // Not on TC
        GUILD_EVENT_ON_DISBAND                  =     6,       // (event, guild)
        GUILD_EVENT_ON_MONEY_WITHDRAW           =     7,       // (event, guild, player, amount, isRepair) - Can return new money amount
        GUILD_EVENT_ON_MONEY_DEPOSIT            =     8,       // (event, guild, player, amount) - Can return new money amount
        GUILD_EVENT_ON_ITEM_MOVE                =     9,       // (event, guild, player, item, isSrcBank, srcContainer, srcSlotId, isDestBank, destContainer, destSlotId)   // TODO
        GUILD_EVENT_ON_EVENT                    =     10,      // (event, guild, eventType, plrGUIDLow1, plrGUIDLow2, newRank)  // TODO
        GUILD_EVENT_ON_BANK_EVENT               =     11,      // (event, guild, eventType, tabId, playerGUIDLow, itemOrMoney, itemStackCount, destTabId)

        GUILD_EVENT_COUNT
    };

## Synopsis

`cancel = RegisterGuildEvent( event, function )`

`cancel = RegisterGuildEvent( event, function, shots )`

## Arguments

`number event`

  Guild event Id, refer to GuildEvents above.

  Valid numbers: integers from 0 to 4,294,967,295.

`function function`

  Function to register.

`number shots (0)`

  The number of times the function will be called, 0 means "always call this function".

  Valid numbers: integers from 0 to 4,294,967,295.

## Returns

`function cancel`

  A function that cancels the binding when called.

# Keyboard shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result

# Search tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct` (or `str`), `enum`, `trait`, `typedef` (or `tdef`).

Generated on
© 2010 - 2024 Eluna Lua Engine