TinTin++ Mud Client Manual  
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
Action
space
Syntax: #action {message} {commands} {priority}
space
The #action command can be used to respond with one or several commands to a specific message send by the mud. The %1-99 variables are substituted from the message and can be used in the command part of the action. The priority part is optional and determines the priority of the action, it defaults to 5.
space
If the message starts with ~ color codes must be matched. You can turn on #config convert to display meta characters in order to make color triggers.
space
If the message starts with ^ the beginning of the action message and mud message must match. If the message ends with a $ the end of the action message and mud message must match.
space
The following support is available for regular expressions.

Using %1, %2 up to %99 can be used in the message to capture text using a lazy match, the matched
text is stored and can be used in the command section of the trigger using the corresponding %1
to %99 variable. By default %0 contains the entire match, though this can be overwritten by using
%0 in the message part of the trigger.

Using { } will embed a Perl Compatible Regular Expression, available at the next available numeric
variable, starting out at %1.

[ ] . + | ( ) ? * are treated as normal text unlessed used within braces. Keep in mind that { } is
replaced with ( ).

Of the following arguments the (lazy) match is available at the next numeric variable.

  %w match zero to any number of letters.
  %W match zero to any number of non letters.
  %d match zero to any number of digits.
  %D match zero to any number of non digits.
  %s match zero to any number of spaces.
  %S match zero to any number of non spaces.

  %? match zero or one character.
  %. match one character.
  %+ match one to any number of characters.
  %* match zero to any number of characters.

  %i match becomes case insensitive.
  %I match becomes case sensitive (default).
space
Example: #action {%1 tells you '%2'} {tell %1 I'm afk.}
When using non numeric variables, the matched text is available at the last used numeric variable + 1.
space
Example: #action {%w tells you '%*'} {tell %1 I'm afk.;say %1 told me: %2}
Example: #action {%3 tells you '%*'} {tell %3 I'm afk.;say %3 told me: %4}
Using a tilda you can create color triggers to capture otherwise difficult to trigger text, to see color codes use: #config convert on.
space
Example: #action {~^\e[1;37m%1} {#showme {--Shown in bold white: %1}}
Actions can be triggered by the showme command.
space
Notice: You can remove actions with the #unaction command.
space
To remove action with %* as message, use #unaction {%%*}. Yet, better method would be wrapping the action inside class, and then kill that class when you no longer need the action. That way you prevent wiping all actions in case you haven't set action with %* as message.
space