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.

Generated on 11/04/2018
©2016 - Eluna Lua Engine