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


Joined: 13 Feb 2010
Posts: 3

PostPosted: Sat Feb 13, 2010 1:39 am   

Simple Healing Trigger help
 
The following is my combat prompt:

HPS: 67% CPS: 100% ER: 25 Eaten: 0% Power: 16455

I'm trying to capture my HPS and CPS as variables so that I could eat food whenever they get below 50%....I'm failing miserably at this task - I would appreciate any help you guys could give.
Reply with quote
bebamedo
Novice


Joined: 02 Aug 2006
Posts: 32

PostPosted: Sat Feb 13, 2010 9:55 pm   
 
try this:
#TRIGGER {HPS: (%d)~% CPS: 100(%d)~% ER: (%d) Eaten: (%d)~% Power: (%d)} {#VAR HPS %1;#VAR CPS %2;#IF (CPS < 50) {bla bla}......}

if ~ doesn't do the trick, try \
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Sun Feb 14, 2010 12:56 am   
 
More effective way to do that (so you don't spam yourself) is like this:

#TRIGGER {^HPS: (%d)~% CPS: (%d)~%} {#IF (%1<50 AND %2<50 AND !@antispam) {eat food;antispam=1}}

Then make a trigger for when you eat the food:

#TRIGGER {^You eat some food!} {antispam=0} // note that you need to change it to whatever the message is for you when you eat food.

Keep in mind that the first trigger only fires when both HPS and CPS are below 50. If you want to eat when either one are below 50, but not necessarily both, then change the first AND to OR.

Charneus
Reply with quote
Toadslime
Newbie


Joined: 13 Feb 2010
Posts: 3

PostPosted: Sun Feb 14, 2010 8:45 am   
 
many many thanks - was pulling my hair out with this!
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