Meditate()
set category="Train"
if(usr.meditating == 1)
usr.medtime = 5
spawn(50)
usr.medtime = 0
usr.icon_state = ""
usr << "You stop meditating."
usr.meditating = 0
return
if(usr.meditating == 0)
if(usr.medtime == 0)
if(usr.energy > 2)
usr.meditating = 1
usr.icon_state = "meditate"
usr << "You begin to meditate."
spawn(30)
meditation(src)
return
if(usr.energy < 2)
usr.meditating = 0
usr.icon_state = ""
usr << "You need to rest!"
if(usr.medtime == 5)
usr << "You must wait before meditating again."
Problem description:
Everything works except after you stop meditating the stats keep going up anyway. How do I stop this from happening?
-Ryan