Predefined Variables

[Command Reference] [Function Reference] [Predefined Variables] [Expressions]

The system maintained several predefined variables for you to use:

 

%action      the action executed from the last trigger

%caption      returns menu caption for speedmenus created by list format

%char      the name of your MUD character

%class      name of current default class

%cr      a carrige return character

%crlf      a carrige return and a linefeed character, together they are called newline

%lf      a linefeed character

%ctime      the number of seconds you have been connected to the MUD

%curwin      the name of the active MUD window

%def      current list of special characters

%host      the host name of the current MUD

%i            same as %repeatnum

%ioresult      the result of the last I/O command, 0 if it was successful

%ip      the current IP address of your computer

%key      the current key value of a record variable within the #LOOPDB command

%lastcom      the last command executed

%lastcom2      the command before the last command executed

%lastcom3      the command before %lastcom2

%lastinput      the last line of commands executed

%lastin2            the line before the last line of commands executed

%line      the last line received from the MUD

%line2      the line before the last line received

%line3      the line before the line before the last line received

%linecol      color attribute of the first character in the current line

%mud      retrieve an MXP entity (variable). For example %mud.hp would retrieve the entity called "hp"

%mxp      retrieve arguments from MXP tag within an MXP Trigger. For example, <COLOR red> results in %mxp.fore="red"

%names      returns a string list of all open window names

%null      an empty variable value

%param1      the first parameter from the last trigger match

%param2..%param99      the parameters from the last trigger match

%port      the current port connected to

%random      a random number from 0 to 99

%rec      the current database record

%repeatnum      the current index during repeating commands, or loop command

%secs      the number of milliseconds since midnight

%selected      returns the text currently selected in the output or command buffer

%selline      returns line that was right-clicked on

%selpos      returns column number that was right-clicked on

%selword      returns word that was right-clicked on

%session      the current zMUDSession COM object for the current window

%tick      returns the number of seconds on the tick timer

%title      the title of the current MUD

%trigger      the line that caused the last trigger

%val      the current value of a record variable key within the #LOOPDB command

%version      current version of zMUD. For example, v5.30 is returned as 530

%window      the name of the current window

%zmap      returns whether the zMapper program is active as a plugin

%zmud      the global zMUDApplication COM object

%1..%99      the patterns enclosed in () saved by the trigger or parameters passed to an alias

%%1..%%99      used to keep %nn from being expanded when creating a setting and with =~

%t1..%t99      the patterns enclosed in () from any trigger state saved by the trigger

%x1..%x99      the XStart and XEnd positions of patterns matched in the trigger



Contents Function Reference Pattern Matching