Multi-line trigger sending to script

Posted by Madrox on Tue 17 Oct 2006 05:21 AM — 3 posts, 18,475 views.

#0
What i'm trying to capture is this

Taking a step back, you lunge forward with a hooking cut across * left leg.
* parries the attack with a deft maneuver.

which will then make a variable plleg true and i won't add an int to the var lleg.

I also need the same with rleg. I've tried with regexperessions, but I think I need to start smaller with them. So any advice would be great!
#1
Oh, the script will look something like this

dim plleg
dim lleg

world.getvariable ("plleg")

if plleg = ("y") then
world.note ("Feint QUICK!")
else
setvariable "lleg", CInt(getvariable("lleg"))+1
world.note ("Fired LLEG")
end if

But I just need to get that to match first
Russia #2
This should work:


^Taking a step back, you lunge forward with a hooking cut across [A-Z][a-z]+\'s (left|right) (leg|arm)\.\n[A-Z][a-z]+ parries the attack with a deft maneuver\.\Z


This is for a multiline trigger, matching on two lines. It gives the side in wildcard 1 and the limb in wildcard 2, so you can set four different variables from one trigger.