|
|
|
Online Scripting Reference
|
|
setEventTrigger
|
Purpose
|
Creates a trigger that will activate on a certain program event.
|
|
Syntax
|
setEventTrigger {name} {label} {event} [{parameter}]
{name}: The name of the trigger to create. This name is used for later references to the trigger.
{label}: A label within the script to jump to when the trigger is activated.
{event}: The name of the program event to attach the trigger to (see below).
[{parameter}]: Some (but not all) program events require parameters. These are specified here.
|
|
Notes
|
Triggers mark the way in which TWX Scripts interact with their environment (Trade Wars).
The event trigger will automatically jump to a label within the script and start executing as soon as a program event occurs matching its specification.
Currently, TWX Proxy supports the following program events and their parameters:
SCRIPT LOADED : Activates when a script is loaded. Its parameter is the name of the script loaded.
SCRIPT STOPPED : Activates when a script is terminated. Its parameter is the name of the script terminated.
CONNECTION ACCEPTED : Activates when TWX Proxy connects to the remote server (no parameters).
CONNECTION LOST : Activates when TWX Proxy disconnects from the remote server (no parameters).
CLIENT CONNECTED : Activates when a telnet client connects to TWX Proxy (no parameters).
CLIENT DISCONNECTED : Activates when a telnet client disconnects from TWX Proxy (no parameters).
TIME HIT : Activates when the click hits a certain time. Its parameter is the specified time in system format.
Note that no triggers will activate unless the script has been paused with a "pause", "waitFor" or "waitOn" command.
|
|
Example
|
|
Return to item listing |
|
|