EVENT
Command: #event {event type}
Events allow you to create triggers for predetermined client events.
Use #event without an argument to see a list of possible events with
a brief description. Use #event %* to see the current list of defined
events. Use #info {events} {on} to see events get thrown.
Events, like triggers in general, are case sensitive and event names
must be defined using all upper case letters.
To enable mouse events use #config mouse_tracking on, to see mouse
events use #config mouse_tracking info.
CATCH EVENTS
CATCH <EVENT>
Some events can be prefixed with CATCH to interrupt default
behavior.
CLASS EVENTS
CLASS ACTIVATED [CLASS], CLASS_CLEAR [CLASS], CLASS CREATED [CLASS],
CLASS DEACTIVATED [CLASS], CLASS DESTROYED [CLASS],
CLASS_LOAD [CLASS]
%0 class name
GAG EVENTS
GAG <EVENT>
Some events can be prefixed with GAG to gag default system
messages.
INPUT EVENTS
EDIT STARTED, EDIT FINISHED
%0 name %1 lines %2 size %3 data
RECEIVED KEYPRESS, PROCESSED KEYPRESS
%0 character %1 unicode index %2 edit row %3 edit column
RECEIVED INPUT [NAME]
%0 raw text
SEND OUTPUT %0 raw text %1 size
SENT OUTPUT %0 raw text %1 size
MAP EVENTS
END OF PATH, END OF RUN, MAP UPDATED VTMAP
These events have no additional arguments.
MAP CREATE EXIT, MAP DELETE EXIT
%0 vnum %1 exit name %2 exit cmd %3 exit vnum
MAP CREATE ROOM, MAP DELETE ROOM
%0 vnum %1 name
MAP ENTER MAP, MAP EXIT MAP
%0 vnum
MAP ENTER ROOM [VNUM]
%0 new vnum %1 old vnum %2 direction
MAP EXIT ROOM [VNUM]
%0 old vnum %1 new vnum %2 direction
MAP FOLLOW MAP
%0 old vnum %1 new vnum %2 exit name
MAP REGION <MOUSE>, MAP ROOM <MOUSE>
%0 row %1 col %2 -row %3 -col %5 vnum %6 info
MOUSE EVENTS
DOUBLE-CLICKED <MOUSE> %0 row %1 col %2 -row %3 -col %4 word %5 line
LONG-CLICKED <MOUSE> %0 row %1 col %2 -row %3 -col %4 word %5 line
MOVED <MOUSE> %0 row %1 col %2 -row %3 -col %4 word %5 line
PRESSED <MOUSE> %0 row %1 col %2 -row %3 -col %4 word %5 line
SHORT-CLICKED <MOUSE> %0 row %1 col %2 -row %3 -col %4 word %5 line
RELEASED <MOUSE> %0 row %1 col %2 -row %3 -col %4 word %5 line
SCROLLED <MOUSE> %0 row %1 col %2 -row %3 -col %4 word %5 line
TRIPLE-CLICKED <MOUSE> %0 row %1 col %2 -row %3 -col %4 word %5 line
MAP <MOUSE EVENT>
Mouse events can be prefixed with MAP to only trigger when the mouse
event occurs inside the VT100 map region.
SWIPED [DIR]
%0 dir %1 button %2 row %3 col %4 -row %5 -col
%6 row %7 col %8 -row %9 -col %10 rows %11 cols
OUTPUT EVENTS
BUFFER UPDATE, DISPLAY UPDATE
These events have no additional arguments.
RECEIVED LINE %0 raw text %1 plain text
RECEIVED OUTPUT %0 raw text
RECEIVED PROMPT %0 raw text %1 plain text
PORT EVENTS
CHAT MESSAGE, PORT MESSAGE
%0 raw text %1 plain text
PORT CONNECTION %0 name %1 ip %2 port
PORT DISCONNECTION %0 name %1 ip %2 port
PORT LOG MESSAGE %0 name %1 ip %2 port %3 data %4 plain data
PORT RECEIVED MESSAGE %0 name %1 ip %2 port %3 data %4 plain data
SYSTEM EVENTS
DAEMON ATTACHED %0 file %1 pid
DAEMON DETACHED %0 file %1 pid
PROGRAM START %0 startup arguments
PROGRAM TERMINATION %0 goodbye message
READ ERROR %0 filename %1 error message
READ FILE %0 filename
WRITE ERROR %0 filename %1 error message
WRITE FILE %0 filename
SYSTEM CRASH %0 message
SYSTEM ERROR %0 name %1 system msg %2 error %3 error msg
UNKNOWN COMMAND %0 raw text
TELNET EVENTS
IAC <EVENT>
IAC TELNET events are made visable using #config telnet info.
IAC SB GMCP [MODULE] %0 module %1 data %1 plain data
IAC SB MSSP %0 variable %1 data
IAC SB MSDP %0 variable %1 data %2 plain data
IAC SB MSDP [VAR] %0 variable %1 data %2 plain data
IAC SB NEW-ENVIRON %0 variable %1 data %2 plain data
IAC SB ZMP <VAR> %0 variable %1 data
IAC SB <VAR> %0 variable %1 raw data %2 plain data
TIME EVENTS
DATE <MONTH-DAY OF MONTH> [HOUR:MINUTE], DAY [DAY OF MONTH],
HOUR [HOUR], MONTH [DAY OF MONTH], TIME <HOUR:MINUTE>[:SECOND],
WEEK [DAY OF WEEK], YEAR [YEAR]
%0 year %1 month %2 day of week %3 day of month %4 hour
%5 minute %6 second
SCAN EVENTS
SCAN CSV HEADER %0 all args %1 arg1 %2 arg2 .. %99 arg99
SCAN CSV LINE %0 all args %1 arg1 %2 arg3 .. %99 arg99
SCAN TSV HEADER %0 all args %1 arg1 %2 arg3 .. %99 arg99
SCAN TSV LINE %0 all args %1 arg1 %2 arg3 .. %99 arg99
SCREEN EVENTS
SCREEN FOCUS %0 focus (0 or 1)
SCREEN LOCATION %0 rows %1 cols %2 height %3 width
SCREEN MOUSE LOCATION
%0 row %1 col %2 -row %3 -col %4 pix row %5 pix col
%6 -pix row %7 -pix col %8 location
SCREEN RESIZE %0 rows %1 cols %2 height %3 width
SCREEN SPLIT %0 top row %1 top col %2 bot row %3 bot col
SCREEN UNSPLIT %0 top row %1 top col %2 bot row %3 bot col
SESSION EVENTS
SESSION ACTIVATED %0 name
SESSION CONNECTED %0 name %1 host %2 ip %3 port
SESSION CREATED %0 name %1 host %2 ip %3 port
SESSION DEACTIVATED %0 name
SESSION DISCONNECTED %0 name %1 host %2 ip %3 port
SESSION TIMED OUT %0 name %1 host %2 ip %3 port
VARIABLE EVENTS
VARIABLE UPDATE [VAR] %0 name %1 new value
VARIABLE UPDATED [VAR] %0 name %1 new value
VT100 EVENTS
VT100 SCROLL REGION %0 top row %1 bot row %2 rows %3 cols %4 wrap
To see all events trigger use #event info on. Since this can get
rather spammy it's possible to gag event info messages.
Example: #event {SESSION CONNECTED} {#read mychar.tin}
Comment: You can remove an event with the #unevent command.
Related: button, delay and ticker.
|