Register to post in forums, or Log in to your existing account
 

 Related 
Contents
Triggers
  #ACTION
  #ALARM
  #CONDITION
  #EVENT
  #FIRE
  #MXPTRIG
  #NOINPUT
  #ONINPUT
  #RAISEEVENT
  #REGEX
  #SENDSB
  #SETPROMPT
  #TEMP
  #TRIGGER
  %alarm
  %state
  Create/Modify Settings
  Introduction to Triggers
  Multistate triggers
  Pattern Matching
  Trigger Tester
  Triggers
  Triggers
Triggers
  Pattern Matching
  Auto Login
  Trigger Types
  Trigger Tester
  Multistate triggers
Related Links:
  Editing Triggers
  ATCP
  Multistate triggers
Trigger Types [[cmud_triggertype]] 
Triggers can actually be nested within each other to form multiple trigger "substates". Each trigger substate can have a different type.

Some types can only be used for substates and never for the first state of a trigger or for a trigger with no substates - these types are marked with a star. For more information on trigger states, see the main multistate trigger help file.

The types are:
Alarm
The Pattern field specifies an alarm time pattern. Used to create your own tick timers. See the #ALARM command for more details.
Command Input
The Pattern field is tested against text entered in the command line. See the #ONINPUT command for more details.
*Duration
A parameter will be shown to set the number of milliseconds for this option. The trigger will fire if the Pattern field matches text from the MUD within the number of milliseconds of the previous trigger condition. If the time runs out without the trigger matching, the trigger moves on to the next state without running its code.
Expression
The Pattern field is an Expression. When this Expression evaluates to True, then the trigger fires. The trigger is only tested when variables used in the expression change their values.
GSL
The Pattern field is the single letter of a GSL code sent from a Simutronics (or other GSL-enabled) MUD.
Loop Expression
The Pattern field is an Expression and the parameter specifies the maximum number of times to fire the trigger. Unlike the normal Expression type, the expression is tested only when new line is received from the MUD (and once when the state first becomes active). As long as the expression evaluates true, the script will execute once per line until the maximum number of matches is met, at which point the trigger will move to the next state. If the expression evaluates false when a line's received, the trigger will move immediately to the next state even if that means the script never runs at all.
*Loop Lines
The parameter will be shown to sets the number of lines to test this trigger. The trigger will be tested each time a line is received from the MUD until the specified number of lines have arrived. The state will change when the specified number is reached, regardless of the number of times the trigger has matched in that time.
*Loop Pattern
Similar to loop lines. The parameter sets the number of times to match this pattern. The state will only change once the pattern has successfully matched that number of times, unlike looplines, which will move on once the number of lines has been received, regardless of the number of matches.
MCP
Pattern is an MCP (MUD Client Protocol) command string.
MXP
Pattern is the name of an MXP tag
*Manual
The trigger condition is set manually using the #SET command. The trigger will never change state on its own. See the main multistate trigger help for more info.
Pattern
The Pattern field is used to match text received from the MUD
*ReParse
The current line from the MUD is re-tested against a new Pattern. If the pattern matches, the script is executed and the state changes as normal. If the current line doesn't match the reparse pattern, the state moves on but no script is run.
*Skip Lines
The number of lines specified must be received from the MUD before the pattern is tested.
Telnet
Fires when specified Telnet Option subchannel text is received. When IAC SB OptionNumber Text IAC SE is received from the server, a Telnet trigger that matches the OptionNumber will fire and will compare the Text sent from the MUD with the pattern of the trigger state. (Added in v2.0)
*Wait
The specified number of milliseconds must have passed before the line of text is received from the MUD that matches the pattern field. This type is different to the #wait command and the alarm type because it will still only fire when a line is received that matches the pattern - the pattern will simply not be tested until the specified number of milliseconds has passed.
*Within Lines
The Pattern field must be matched by a line from the MUD within the specified number of lines received. If a matching line is recieved, the script is run and the state is changed, else the state changes when the specified number of lines has been recieved.

 User comments 
calesta: Sun Jan 11, 2009 6:45 am    

The Wait type has an asterisk next to it which indicates that it is only valid as a sub-state of a multi-state trigger. This doesn't seem to be true as it appears to work when used in a single-state trigger as well.
Progonoi: Sun Jan 11, 2009 3:16 pm    

To be honest, I can't confirm it on my end. Just tried it as a single state in untitled session and it didn't work.
Viewer Comments [2 - Post your comments]

Jump to:  

© 2009 Zugg Software. Hosted by Wolfpaw.net