|
BillyWiz Newbie
Joined: 06 Feb 2006 Posts: 8
|
Posted: Thu Apr 20, 2006 12:51 pm
Triggers |
The Mud i play gives the following messages when you do a special attack
Moving swiftly,
Moving quickly,
Catching (him|her|it) off-balance,
Catching (him|her|it) by surprise,
there is a few more but you get the idea.....
what i want to do is set a single sound trigger for all of these messages, i know i could do a tigger for each message but there must me a easier way. |
|
|
|
Vodoc Apprentice
Joined: 11 Apr 2003 Posts: 119 Location: Sweden
|
Posted: Thu Apr 20, 2006 1:48 pm |
Code: |
#REGEX {^(?:Moving (?:quickly|swiftly)|Catching (?:it|him|her) (?:off-balance|by surprise)),} {#beep} |
That should do what you want.
Now to explain what it is so that you learn something from this...
We are creating a trigger but using regular expressions to do the pattern matching instead of Zugg's own invention which can be quite limited when doing more advanced pattern matchings.
^ = Start of line as usual
(?:a|b|c) = Match a, b or c and don't store it in variables (such as %1, %2 etc)
You can read more about it here. |
|
|
|
BillyWiz Newbie
Joined: 06 Feb 2006 Posts: 8
|
Posted: Thu Apr 20, 2006 3:23 pm |
Thats got it
Cheers thanks alot |
|
|
|
|
|