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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
kilion
Newbie


Joined: 31 Jan 2002
Posts: 5

PostPosted: Wed Feb 13, 2002 2:23 pm   

IF
 
currently, my prompt looks something like this

<9999hp 999mv align(-1000)>

align is there 'cos i'm using some eq that requires evil align n i'd wanna know when it gets above a certain value(370) so i've set up this trig to prevent myself from losing my eq....

Pattern: align(%1)
Trigger:
#IF (%1>-370) {
#Beep
rem skull
rem skull
rem shield
#t- alignalert2
}

i keep having problems with the > sign. i always hit the true case no matter what the value of %1 is. am i using it wrongly?
Reply with quote
Darker
GURU


Joined: 24 Sep 2000
Posts: 1237
Location: USA

PostPosted: Wed Feb 13, 2002 3:13 pm   
 
zMUD supports the %1 patterns in triggers to lend a little support to old tintin scripts, but it has other patterns that are far more specific and useful.

Check out
http://www.zuggsoft.com/zmud/help6/Pattern_.htm for better patterns to use. Otherwise, your script looks ok to me (I haven't had my coffee yet today, so take this with a grain of salt ).



zMUD 6 Online Help: All the power you'll ever need.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Feb 13, 2002 3:56 pm   
 
zMUD use parentheses in trigger patterns to indicate parameters which may be used in the trigger commands. You'll need to use the tilde ~ since you need to match them in the pattern. The wildcard for signed numbers is %n. The modified pattern would be:
Pattern: align~((%n)~)

LightBulb
All scripts untested unless otherwise noted
Reply with quote
Darker
GURU


Joined: 24 Sep 2000
Posts: 1237
Location: USA

PostPosted: Wed Feb 13, 2002 7:23 pm   
 
See, I knew it was too good to be true. I should drink my coffee before I answer these questions.



zMUD 6 Online Help: All the power you'll ever need.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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