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
Keth
Newbie


Joined: 01 Nov 2003
Posts: 2
Location: Italy

PostPosted: Sat Nov 01, 2003 3:22 pm   

Triggers below a certain number
 
A noobish question...but I can't figure it out..

I use this trigger to autoheal me when my hps drop below a certain number:
#TRIGGER {Health (%d)} {#IF (%1 < 900) {quaff heal;#T- autoheal}} {autoheal}
#TRIGGER {A warm feeling fills your body.} {#T+ autoheal}

Now...the problem is that I need it to work with a number superior to 1k...and I can't make the trigger work with a number like this "1,900"...I think because of the comma...how can I solve it?
Reply with quote
bluedragon
Novice


Joined: 01 Jul 2003
Posts: 30
Location: USA

PostPosted: Sat Nov 01, 2003 6:47 pm   
 
i'm not positive, but i would imagine you could do something like this:

#TR {Health (%x)} {#var health %remove(",", "%1") {_nodef} {autoheal}; #IF (@health < 1900) {quaff heal; #T- autoheal}} {autoheal}
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Nov 01, 2003 9:10 pm   
 
Replace %d with %n.
Reply with quote
Keth
Newbie


Joined: 01 Nov 2003
Posts: 2
Location: Italy

PostPosted: Sun Nov 02, 2003 12:10 pm   
 
quote:
Originally posted by bluedragon

i'm not positive, but i would imagine you could do something like this:

#TR {Health (%x)} {#var health %remove(",", "%1") {_nodef} {autoheal}; #IF (@health < 1900) {quaff heal; #T- autoheal}} {autoheal}


It worked great...thank u
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