Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: 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.
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: 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.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: 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
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net