G G M u d

...a new powerful, opensource and multiplatform MUD client.


What's a trigger?

Trigger windowA trigger is an action that is performed by the client automatically every time a certain pattern of characters is matched. The pattern may contains one or more special variables (more on these later) and the action may be composed by an arbitrary number of commmands.

GGMud triggers

GGMud trigger implementation is based on the tintin++ trigger implementation with a few addictions: Triggers in GGMud can be defined through the GUI with the Triggers menu item or through command line, in this second case there are two commands to create a trigger with the same syntax #trigger and #action. The second one is mostly for tintin compatibility. The syntax of the command invocation is:

#trigger {match string} {command list} {classname}

This is the same in the graphical interface, except for the fact you can choose also classname from the list of available classes instead of type it yourself for every trigger.

Trigger classes window The command line #trigger command can also be used without parameters to list ALL your user defined triggers, also the scripting ones will be shown in this way. If you use the command with only the match string as parameter GGMud will show you in the main window the command list associated with that string if a trigger exists. To remove a trigger through command line use the command #unaction, to remove a trigger through the GUI interface simply select it and click on Delete (this is the preferred method to do it). Remember to SAVE your triggers to disk once you feel confortable with them otherwise you'll lost them as soon as you quit GGMud.

NOTE: If you define a trigger with the same match string of an existing one the existing trigger will be REPLACED with the new one. This is a good mode to change trigger classes, click on it in the trigger list, change the class, then click Add.

Trigger classes

Every trigger has a class, you can change it through the Trigger classes menu item in the Tools menu.

A green ball means that the trigger class is enabled, a red ball means that the class is disabled. It's very important to divide your trigger in classes, to have a better control over them. Trigger classes are available since GGMud 0.5 and partially break the compatibility with tintin++ command files, since, if you were a former tintin user, you'll need to convert priorities to classes if you don't want to see strange numbers in the priority list.

You can enable/disable trigger classes from command line (or inside your trigger/aliases) with the commands #T+ classname and #T- classname, this can be very useful in complex scripts.

File structure

Triggers are saved in an ASCII file called triggers in your $HOME/.ggmud directory (on win32 the path is INSTALLATIONDIR/bin/), you can edit them by hand, as you can see a trigger list is a simple list of GGMud commands (one per line). Edit the trigger list by hand maybe the faster method to update your triggers to the GGMud 0.5+ trigger class system that replaced the old and not very useful tintin++ trigger priority system.

Return to index