Triggers
Triggers are a feature that has been offered by MUD Clients for some time. BlowTorch gives a feature rich implementation of triggers.
Contents:
Create New Trigger
Selecting MENU->Triggers will launch the trigger selection dialog. Click the "New Trigger" button to launch the trigger editor for a new trigger.
Modify/Delete Trigger
Clicking a trigger in the trigger list will launch the editor for that trigger. Long pressing the trigger in the list will give the option for deleting it.
Trigger Options
- Name - This is the name displayed in the trigger selection dialog.
- Pattern - The pattern to trigger off of. When this pattern is matched by data from the server, the appropriate responders will fire.
- Interpret as literal - Interpret this pattern as plain text. Turning off this option will cause the pattern to be processed as a regular expression, and can be written as such.
- Only fire once? - Checking this box will make it so that this trigger only fires one time per session.
Action Responses
Triggers can have as many responders as you wish. Each responder may be fired when the window is open, closed or always. There are three kinds of responders, Notification, Toast Message and Ack With. Adding a new responder by clicking the "Add new responder" button. Responders may be modified by clicking the text displayed in the "Type" column. Window firing behavior is operated by modifying the checkboxes in the "Window Open" and "Window Closed" columns. Responders may be deleted by clicking the red "X" in the "Delete" column.
Notification Response
The notification responder launches a notification in your notification bar. The following options are configurable for the notification.
- Play Sound - Unchecking and rechecking this box will launch the (my crappy hax) sound picker dialog that will allow you to pick which sound file this will play. This will be revamped soon, hopefully allowing a smoother sound selection process.
- Vibrate? - This allows control over the vibrate pattern that will happen when this notification is launched. Currently there are a few to play with, unfortunately at this time there is no way to preview/test a vibrate pattern other than triggering the trigger that will launch this responder.
- Show lights? - This allows control over what color light will blink when this notification is received.
- Spawn New? - If this is checked, a new notification will be launched each time the responder is fired. If not, it will recycle the same notification and re-post it with the new time stamp.
- Use On-Going? - This will replace the default on-going notification with this notification. Currently does nothing as the on-going notification is under construction.
Toast Message Responder
The toast responder will put up a small grey floating dialog over the top of all windows for the specified amount of seconds when fired.
Ack With Responder
The ack with responder sends a specified command to the server when fired.
Capture Group Replacement
Trigger Responders can use the captured text from regex triggers by using the text $1,$2,$3 etc, where the number following the $ is the captured group.
- Currently there is no method for "discovering" what groups captured what text. So trial and error must be used. A $X wont be replaced if there is no group or the group did not match any text.
Example
A regex trigger with the pattern "^(.+) has sent you a tell.$" will match text like "Foobar has sent you a tell." and if the message in a notification response is "$1 WANTS TO TALK TO YOU!" the notification that will be put into the bar when this trigger fires would be "Foobar WANTS TO TALK TO YOU!"