backIndex

Xelagot action script

Events: Server handlers

Script statements are subject to change while the Server/Client is in beta testing

Refer to Events for general information on events, and to Server and action script for specific information on how to use a the Server in connection to scripts.

ClientConnect is not used. ClientLogin is triggered when a client logs into to the server, and is sent to all bots in the program. ClientRead envents occur after ClientLogin, when the server receives messages from the client. It is only sent to bots which have captured the client with ClientCapture $n. ClientDisconnect is triggered when a client disconnects from the server, either due to its own request to disconnect, or due to other factors, including being disconnected forcefully by the server. It is sent to all bots in the program.

Installer: OnClientConnectEvent <eventlabel> not used
Event type: 10100

Installer: OnClientLoginEvent <eventlabel>
Event type: 10103
In this event handler, use GetEventLogin $n to get the login name of the client, and ClientCapture $n to allow communication from this client.

Installer: OnClientReadEvent <eventlabel>
Event type: 10102
In this event, use GetEventLogin $n to get the login name of the client, and GetMessage $m to get the message sent by this client. You can reply to this client using ClientWriteLogin $n $a, where $n is the login name of the client, and $a is your message. See here for more possibilities.

Installer: OnClientDisconnectEvent <eventlabel>
Event type: 10101

Specific statements (must be inside these event handlers):

GetEventType %a stores the event type code in variable %a
GetEventResult %a stores the event result code in variable %a. 0 means success, other positive codes are equivalent to the rc codes of the SDK and the Windows codes. See SDK Error Codes.
GetEventID $a
stores a string containing the known data if the client. This string is split up in address, host etc... $a. Useless :)
GetEventAddress $i
stores the client's IP Address in $i.
GetEventHost $h
stores the client's Host Address in $h.
GetEventPort %p
stores the client's Port number in %p.
GetEventLogin $n
stores the client's Login name in $n.
GetMessage $m
stores the text of the message sent to the server by the client. Used maily by event ClientRead
Comments:


backIndex