Trigger Bug (?)

Posted by Shadoweave on Wed 12 Dec 2007 04:20 PM — 3 posts, 14,365 views.

#0
Triggers:

<trigger
   enabled="y"
   group="Warrior"
   lines_to_match="2"
   keep_evaluating="y"
   match="^[A-Z][a-z]+ swings (.*) at you(?:.*)?\."
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>EnableTriggerGroup ("Poisons")
if (string.find("%1", "rapier")) or (string.find("%1", "scimitar")) or (string.find("%1", "broadsword")) or (string.find("%1", "longsword")) then
EnableTriggerGroup ("BM")
end </send>
 </trigger>

<trigger
   group="BM"
   lines_to_match="2"
   match="[A-Z][a-z]+ \w+ your (right|left) (arm|leg)\, striking a major artery that splurts blood in all directions\.$"
   multi_line="y"
   name="bm_aff_artery"
   regexp="y"
   script="add_artery"
   send_to="12"
   sequence="50"
  >
  </trigger>

And at the next prompt I do this:

<trigger
   keep_evaluating="y"
   match="^(\d+)h\, (\d+)m\, (\d+)e\, (\d+)p\, (\d+)en\, (\d+)w (\w+)\-$"
   name="cond_prompt"
   regexp="y"
   send_to="12"
   sequence="50"
  >
<send>EnableTriggerGroup ("Poisons", false)
EnableTriggerGroup ("BM", false)</send>
  </trigger>

Why do I get this when the three triggers hit? Note that I don't get it sometimes.

Razeal swings a spider-hilted rapier at you. Razeal cuts your right leg, striking a major artery that splurts blood in all directions.
** ARTERY_RIGHTLEG **
2300h, 2790m, 3000e, 10p, 21007en, 13018w ek-
** ARTERY_RIGHTLEG **

And my regular prompt trigger doesn't fire also, the usual prompt trigger is set to modify the prompt.
Any ideas why this is happening?
Amended on Wed 12 Dec 2007 04:21 PM by Shadoweave
Australia Forum Administrator #1
Lower sequence triggers are evaluated first.

My first reaction on looking at this is your trigger with sequence 100 enables a trigger group BM which has sequence 50. Is this intentional? It will be too late this time around, as trigger with sequence 50 is tested first, and will not be enabled yet.

I would try to combine the matching for everything that might occur in one line, into one trigger.
#2
Fixed through trial and error, the second trigger should have been keep evaluating too. And the sequence is right, I tried with sequence 100 and it didn't work.