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

 Related 
Contents
See also:
  Triggers
  Trigger Tester
Package Editor
  Editing Aliases
  Editing Macros
  Editing Variables
  Editing Functions
  Editing Classes
  Editing Triggers
  Editing Buttons
  Editing Paths
  Editing Menus
  Editing Events
  Editing Gauges
  Editing Status items
  Terminology
Related Links:
  #CONDITION
  #TRIGGER
  Introduction to Triggers
  Simutronics Support
  ATCP
  Trigger Tester
  Multistate triggers
Editing Triggers [[cmud_triggers_edit]] 
When you select a Trigger setting and open the advanced options panel at the bottom, you will get an editor panel like this:

Enabled
Determines if this alias is enabled or disabled.
Pattern
This is the pattern for the trigger to match text sent by the MUD. Clicking the down-arrow at the right of the pattern will open a multiline edit box for editing very long trigger patterns.
Script
This is the script executed when the trigger pattern matches text send by the MUD. See the Scripting topic for more information.
Language
Select the scripting language used for this trigger. Built-in languages include: zScript, Lua, VBScript, and JavaScript. But any other scripting language installed into the Windows Scripting Host can also be used.
Script Text / XML / Compiled Code / Compiled Pattern / Test Pattern
Selecting the Compiled Code tab will show the low-level code generated by this trigger. The Compiled Pattern tab will show the low-level code generated by the trigger pattern. These are for internal testing purposes and is not documented further. Selecting the XML tab will allow you to edit the raw XML data used for copy/paste and import/export. Selecting the Test Pattern tab will open the Trigger Tester panel.
Type
Sets the Trigger Type of the trigger.
Priority
This is the order in which triggers are executed. The smaller priority numbers are executed first. CMUD automatically adds space between priority numbers to make adding new triggers more efficient. So you shouldn't normally care about the exact priority numeric value. It's usually easier to drag/drop triggers in the main settings tree view to change priorities relative to other triggers.
ID
This is the shortcut name for the trigger. This name can be used in commands such as #T+, #T-, #COND, etc to reference the trigger without using the full pattern name.
Notes
Used to store comments with the trigger. You might use this to remind yourself what the trigger is used for.
Case Sensitive
If checked, then the pattern must match the proper case (upper/lower) of text from the MUD.
ANSI Trigger
If checked, then ANSI color codes from the MUD are added to the text, so the pattern can contain the %e escape character, followed by ANSI color codes to match an exact color line from the MUD. To match a single line color, see the Line Color option below. Using the ANSI Trigger option requires that you have knowledge of the low-level ANSI color codes being sent by the MUD
Verbatim
The trigger pattern is matched exactly and no special characters are parsed. This is quicker than matching text that contains wildcard characters.
Trigger on Trigger
When checked, other triggers are enabled during the processing of the script for the current trigger (allowing other triggers to fire on the results of the script). When unchecked, all other triggers are disabled while this trigger is running. Note that if you uncheck this option and then use a command like #WAIT in your trigger, other triggers will be disabled during the #WAIT time, but text from the MUD will still be received. This might cause some other triggers to not fire normally.
Stop further processing
When this option is checked, no other triggers will be tested if this trigger fires. This option should be used with care since it can prevent triggers loaded in other packages from firing on the same text from the MUD.
Repeat within line
When enabled, the trigger pattern is tested more than once on a single line and will fire for every match of the pattern on the line. (Added in v2.0)
Regular Expression
Normally the trigger Pattern field uses pattern matching characters optimized for CMUD (See the Pattern Matching topic). If you prefer to use standard Perl Regular Expression syntax, check this option.
Trigger on Newline
Only tests the trigger on entire lines of text received from the MUD (ending in a newline character).
Trigger on Prompt
Only tests the trigger on text from the MUD that doesn't end in a newline (such as the MUD prompt).
Line Color
If enabled, the starting color of the line of text from the MUD must match the color indicated in the color box. Click on the color box to change this color.

To add additional trigger states, use the New/Trigger State menu command.
Viewer Comments [0 - Post your comments]

Jump to:  

© 2009 Zugg Software. Hosted by Wolfpaw.net