Method Global:RegisterInstanceEvent [-] [+]
Registers a Map event handler for one instance of a Map.
enum InstanceEvents { INSTANCE_EVENT_ON_INITIALIZE = 1, // (event, instance_data, map) INSTANCE_EVENT_ON_LOAD = 2, // (event, instance_data, map) INSTANCE_EVENT_ON_UPDATE = 3, // (event, instance_data, map, diff) INSTANCE_EVENT_ON_PLAYER_ENTER = 4, // (event, instance_data, map, player) INSTANCE_EVENT_ON_CREATURE_CREATE = 5, // (event, instance_data, map, creature) INSTANCE_EVENT_ON_GAMEOBJECT_CREATE = 6, // (event, instance_data, map, go) INSTANCE_EVENT_ON_CHECK_ENCOUNTER_IN_PROGRESS = 7, // (event, instance_data, map) INSTANCE_EVENT_COUNT };
Synopsis
RegisterInstanceEvent( instance_id, event, function )
RegisterInstanceEvent( instance_id, event, function, shots )
Arguments
number event
Map event ID, refer to MapEvents 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
Nothing.