Why won't this trigger work?

Posted by Hanaisse on Tue 05 May 2009 11:04 PM — 6 posts, 24,537 views.

Canada #0
I can't figure out why this simple enough trigger won't fire. I use quite a few triggers during battles but this is the only one that won't work.

If I fall down while trying to bash a mob, I want to stand up.

<trigger
   enabled="y"
   match="As * avoids your bash, you topple over and fall to the ground!"
   sequence="100"
  >
  <send>stand</send>
  </trigger>


This is the debug I did during one fight.

Sent  packet: 702 (6 bytes) at Tuesday, May 05, 2009, 6:50:01 PM

bash..             62 61 73 68 0d 0a

Incoming packet: 2028 (109 bytes) at Tuesday, May 05, 2009, 6:50:01 PM

.[0;36m.[0m[0] [   1b 5b 30 3b 33 36 6d 1b 5b 30 6d 5b 30 5d 20 5b
592/783H  777/84   35 39 32 2f 37 38 33 48 20 20 37 37 37 2f 38 34
4M  233/587V] MP   34 4d 20 20 32 33 33 2f 35 38 37 56 5d 20 4d 50
P: 0 Gold: 8421    50 3a 20 30 20 47 6f 6c 64 3a 20 38 34 32 31 20
(130000)..<<smal   28 31 33 30 30 30 30 29 0d 0a 3c 3c 73 6d 61 6c
l wounds:a cryin   6c 20 77 6f 75 6e 64 73 3a 61 20 63 72 79 69 6e
g woman>>.[0m      67 20 77 6f 6d 61 6e 3e 3e 1b 5b 30 6d

Incoming packet: 2029 (191 bytes) at Tuesday, May 05, 2009, 6:50:01 PM

..As a crying wo   0d 0a 41 73 20 61 20 63 72 79 69 6e 67 20 77 6f
man avoids your    6d 61 6e 20 61 76 6f 69 64 73 20 79 6f 75 72 20
bash, you topple   62 61 73 68 2c 20 79 6f 75 20 74 6f 70 70 6c 65
 over and fall t   20 6f 76 65 72 20 61 6e 64 20 66 61 6c 6c 20 74
o the ground! ..   6f 20 74 68 65 20 67 72 6f 75 6e 64 21 20 0d 0a
...[0;36m.[0m[0]   0d 0a 1b 5b 30 3b 33 36 6d 1b 5b 30 6d 5b 30 5d
 [592/783H  777/   20 5b 35 39 32 2f 37 38 33 48 20 20 37 37 37 2f
844M  233/587V]    38 34 34 4d 20 20 32 33 33 2f 35 38 37 56 5d 20
MPP: 0 Gold: 842   4d 50 50 3a 20 30 20 47 6f 6c 64 3a 20 38 34 32
1 (130000)..<<sm   31 20 28 31 33 30 30 30 30 29 0d 0a 3c 3c 73 6d
all wounds:a cry   61 6c 6c 20 77 6f 75 6e 64 73 3a 61 20 63 72 79
ing woman>>.[0m    69 6e 67 20 77 6f 6d 61 6e 3e 3e 1b 5b 30 6d


I don't see any colour codes or anything so I'm at a loss. It's not that the mud won't let me stand up during a fight, I can, I have to manually do it. I have another trigger that makes me stand after I've been bashed that works fine, it's just this one that doesn't fire.
#1
try...
<triggers>
  <trigger
   enabled="y"
   match="^As (.+) avoids your bash\, you topple over and fall to the ground\!$"
   regexp="y"
   sequence="100"
  >
  <send>stand</send>
  </trigger>
</triggers>
Amended on Tue 05 May 2009 11:23 PM by LupusFatalis
#2
As an aside... color codes won't come into play here unless you are trying to match on a specific color.

I also took the liberty of putting in some regular expressions so as to not allow other players to screw with you...
^ marks the beginning of a line
$ marks the end of a line
\ is the escape character

(.+) will match on one or more of any character.
Amended on Tue 05 May 2009 11:23 PM by LupusFatalis
Canada #3
Hmm, tried it, trigger still won't fire.
Australia Forum Administrator #4
Quote:

o the ground! .. 6f 20 74 68 65 20 67 72 6f 75 6e 64 21 20 0d 0a


There is a space after "ground!" - see the hex 20 in the packet debug before the carriage return. That is a space.
Canada #5
Wow, good eye.

I added a space between ! and $ and it works perfectly.

As Awolyn the tavernkeeper avoids your bash, you topple over and fall to the ground! 

[0] [1087/1087H  917/935M  697/715V] MPP: 0 Gold: 2990 (137000)
<<big nasty wounds:Awolyn the tavernkeeper>>
You stand up.


Thanks everyone.