Xelagot action script

Events: ObjectCreate, ObjectResult

Refer to Events for general information.

These events are triggered when the bot creates, modifies or deletes an object in the world. ObjectCreate is not very usefull to us: it registers the moment when the request is sent to the server and, in the case of a modification or addition, assigns a number to the new object. The object variable's ObjectNumber is automatically updated in cases of additions or modifications, even without ObjectCreate installed, but ObjectCreate marks the moment when that happens. ObjectResult is triggered when the bot receives an answer from the world server. This is the moment when the object is modified in the ActiveWorlds browsers, or failure to do so is announced by the world server.

These events do not require a property query. See Object operations


OnObjectCreateEvent <eventlabel>
Event type: 1000

OnObjectResultEvent <eventlabel>
Event type: 1100

Specific statements (must be inside the event handler):

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.
GetActionCode $a stores the code of the sort of action variable $a. The codes are "NA" not available, "ADD" object add, "DEL" object delete, "CHA" object change.
GetTargetObject ~t If the target object is defined (see IfTargetDefined), the data of the object in question are stored in object variable ~t. In the case of an object being changed (modified), the new object is stored here.
GetTargetObject2 ~t In the case of an object being changed (modified), the deleted object is stored here.
IfTargetDefined statement1
[Else statement2]
tests whether the target object sent to the server, created, modified or deleted in the world, has been recognised by the bot i.e. if GetTargetObject retrieved a valid object. If defined, executes statement1. Otherwise, optionally, executes statement2
IfTargetUndefined statement1
[Else statement2]
Opposite to previous statement: GetTargetObject is undefined. If not defined, executes statement1. Otherwise, optionally, executes statement2