 |
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Sat Sep 06, 2008 8:29 am
%match broken? |
This trigger...
Code: |
<trigger name="affParalysis" priority="7910" regex="true" id="35">
<pattern>^</pattern>
<value>#if (%len(%line) == 66) {
#if (%match("A prickly stinging overcomes your body, fading away into numbness.",%line)) {paralysis=1}
}</value>
</trigger>
|
Fires on every line that is 66 characters. |
|
|
 |
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Sat Sep 06, 2008 9:40 am |
Well never mind. It just so happens the lines it was firing on started and ended with [ and ] and were 66 characters. The [ and ] in regex caused anything to match starting and ending with them.
|
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5187
|
Posted: Sat Sep 06, 2008 12:14 pm |
Try this, it uses the pattern to control what lines are initially matched.
Code: |
<trigger name="affParalysis" priority="7910" regex="true" id="35">
<pattern>^[abcdefgiklmnoprstuvwy*,. ]{66}$</pattern>
<value>#if (%match("A prickly stinging overcomes your body, fading away into numbness.",%line)) {paralysis=1}</value>
</trigger> |
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
 |
|
|