Auto rescue triggers
Posted: Tue Feb 08, 2011 8:16 pm
Hi, i'm trying to make a trigger that excludes certain words
An example of the line it is in response to: A Sel'juk murlock's slash *** DEVASTATES *** Dvick!
This trigger is for tanking and auto rescuing players that are attacked in the middle of battle primarily.
I first tried using perl regex: \*\*\* DEVASTATES \*\*\* (\w+)! with.. send("res " .. matches[2])
Which works, only a bit too well because there are other lines in the game that create unwanted rescues:
Dvick's slice injures a Sel'juk murlock. (a Sel) becomes the match.
Dvick's punch *** DEVASTATES *** a woodwose! (a woodwose) becomes the match.
a woodwose's claw DISMEMBERS you! (you) becomes the match
I was looking through the manual and found what looked like a solution - to exclude certain words from triggers.
so then I tried: \*\*\* DEVASTATES \*\*\* (a|an|you|A|An) (\w+)! with.. send("res " .. matches[3]) I tried [1] [2] [4] as well
although now I get mixed results where it still matches with words like (a) or (an) but wont match with just a players name like: A woodwose's claw wounds Dvick.
Any suggestion on how I can make this trigger auto rescue any players name without all these unwanted matches?
Thanks, Peko (Alter Aeon)
An example of the line it is in response to: A Sel'juk murlock's slash *** DEVASTATES *** Dvick!
This trigger is for tanking and auto rescuing players that are attacked in the middle of battle primarily.
I first tried using perl regex: \*\*\* DEVASTATES \*\*\* (\w+)! with.. send("res " .. matches[2])
Which works, only a bit too well because there are other lines in the game that create unwanted rescues:
Dvick's slice injures a Sel'juk murlock. (a Sel) becomes the match.
Dvick's punch *** DEVASTATES *** a woodwose! (a woodwose) becomes the match.
a woodwose's claw DISMEMBERS you! (you) becomes the match
I was looking through the manual and found what looked like a solution - to exclude certain words from triggers.
so then I tried: \*\*\* DEVASTATES \*\*\* (a|an|you|A|An) (\w+)! with.. send("res " .. matches[3]) I tried [1] [2] [4] as well
although now I get mixed results where it still matches with words like (a) or (an) but wont match with just a players name like: A woodwose's claw wounds Dvick.
Any suggestion on how I can make this trigger auto rescue any players name without all these unwanted matches?
Thanks, Peko (Alter Aeon)