Callbacks

List of every callback with examples (from game_bot/functions/callbacks.lua)

onKeyDown

Getting triggered once when keyboard key is down accepts key combos. (NOTE: triggered once even i...

onKeyPress

Getting triggered as long as the keyboard key is pressed. Prototypes onKeyPress(callback) -- ca...

onKeyUp

Getting triggered once when keyboard key is up accepts key combos. (NOTE: triggered once even if ...

onTalk

Getting triggered when the client received a chat message. Prototypes onTalk(callback) -- callb...

onTextMessage

Getting triggered when the client receives a game server message example: Server Log messages. P...

onPlayerPositionChange

Getting triggered when the player position changes Prototypes onPlayerPositionChange(callback) ...

onUse

Getting triggered when player uses an item. Prototypes onUse(callback) -- callback = function(p...

onUseWith

Getting triggered when player uses an item on target. Prototypes onUseWith(callback) -- callbac...

onContainerOpen

Getting triggered when player opens a new container. Prototypes onContainerOpen(callback) -- ca...

onPlayerHealthChange

Getting triggered when player health changes Prototypes onPlayerHealthChange(callback) -- callb...

listen

Getting triggered when received a chat message from a certain player. Prototypes listen(name, c...

onContainerClose

Getting triggered when player closes a container. onContainerClose(callback) -- callback = funct...

onAddThing

Getting triggered a thing is added to the tile. Prototypes onAddThing(callback) -- callback = f...

onRemoveThing

Getting triggered a thing is remove from the tile. Prototypes onRemoveThing(callback) -- callba...

onMissle

Description Callback function getting triggered when the client received missile attac...

onCreatureAppear

Triggered when a new creature added to Battle List. Prototypes onCreatureAppear(callback) -- ca...

onCreatureDisappear

Triggered when creature removed from Battle List. Prototypes onCreatureDisappear(callback) -- c...

onChannelList

Triggered when player logs in. Parameters channels: array contains channel id and channel...

onOpenChannel

Triggered when player or server opens a new channel. Prototypes onOpenChannel(callback) -- call...

onCloseChannel

Triggered when player or server closes a channel. Prototypes onCloseChannel(callback) -- callba...

onChannelEvent

Triggered when a channel event occurs can be someone joined or left the channel. Prototypes onC...

onContainerUpdateItem

Getting triggered when an item in container updates Prototypes onContainerUpdateItem(callback) ...

Search Results