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
MyMiasma
Wanderer


Joined: 26 Oct 2012
Posts: 56

PostPosted: Sat Jan 05, 2013 12:13 pm   

help me heal :)
 
** HP: 220/220 SP: 210/220

** HP: */220 SP: */220

Ok. I am running a bot but I just can't seem to get an efficient healing system.

Can zmud use percentages? Can I have it so that:

Example: */200hp + */220sp :

if * are within 10% of each other = buy mixed healing meal
if *hp is bigger by more than 10%= buy hphealing meal until within 10% of *sp
(and vice versa )
when *'s are both 95%+ = @healdone
(and can zmud remember these numbers or would I have to type score before each heal?)

OR if I am overthinking this or way overcomplicating this if you have any hints or
ideas to help me heal more efficiently that would be greatly appreciated :)
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4662
Location: Pensacola, FL, USA

PostPosted: Sat Jan 05, 2013 9:23 pm   
 
you need to wrap the parts you want to capture in (parenthesis) if you want to test thier value

and you mean the current values within 10% of each other, or of thier max?
10% of 10 is only 1, not much room to match on low current values

#TR {HP: (%d)/(%d) SP: (%d)/(%d)} {
hpPerc=%eval((%float(%1)/%2)*100)
spPerc=%eval((%float(%3)/%4)*100)
#SAY {HP is at @hpPerc of max}
#SAY {SP is at @spPerc of max}
}

From there you can can further test off the current percentiles
_________________
Discord: Shalimarwildcat
Reply with quote
MyMiasma
Wanderer


Joined: 26 Oct 2012
Posts: 56

PostPosted: Sun Jan 06, 2013 4:28 pm   
 
thank you :)
_________________
It is better to die on your feet than to live on your knees.
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