Avorion Script API Documentation

Server Callbacks

Note: Callbacks have to be buffered in certain situations and won't happen immediately. When unregistering a callback during a callback, all callbacks that were buffered during the last tick may still be sent, even though they were unregistered.

callback onChatMessage(playerIndex, text, channel)

Executed whenever the player sent a chat message to the server. Only called if the chat message is valid and the player doesn't have a chat ban.

Parameters

playerIndex Index of the player
text The text content of the chat message
channel The channel the message was sent to. 0 = All, 1 = Sector, 2 = Group, 3 = Alliance

callback onPlayerLogIn(playerIndex)

Executed whenever a player was logged in

Parameters

playerIndex The index of the player who logged in

callback onPlayerLogOff(playerIndex)

Executed whenever a player was logged off

Parameters

playerIndex The index of the player who logged off

Overview
Home Functions Search
Search:

This is the official documentation for the scripting API of Avorion. This documentation is automatically generated and not necessarily complete. Depending on the context in which functions exist, some documentation such as descriptions, return values or variable names or types may be missing.

Work in Progress. Documentation of Avorion Version: 2.5.7 c8e4beec84f7