my code to increase PL doesn't work.
here's the proc
------------------------------------------------------------
mob
proc
MEDITATE()
if(usr.MEDITATING == "false")
usr.PL += 0
if(usr.MEDITATING == "true")
usr.STM -= rand(1,7)
usr.MPL += rand(1,10)
usr.LEARNFLY()
usr.LEARNPOWERCHARGE()
usr.MEDITATE()
if(usr.STM <= 0)
usr << "You need to rest!"
MEDITATING = "false"
sleep(50)
------------------------------------------------------------
here's the verb
------------------------------------------------------------
mob
verb
Meditate()
set category = "Training"
if(usr.FLYING == "true")
usr << "Not while flying."
if(usr.FLYING == "false")
if(usr.MEDITATING == "false")
usr << "You begin meditating."
usr.icon_state = "meditate"
usr.MEDITATING = "true"
usr.MEDITATE()
if(usr.MEDITATING == "true")
usr << "You stop meditating."
usr.icon_state = ""
sleep(100)
usr.MEDITATING = "false"
------------------------------------------------------------
ID:147920
![]() Sep 28 2003, 7:42 am
|
|
I'm going assume you mean the Meditate keeps happening in quick succession even though you have that sleep(50) in there.
If you notice, you recall the procedure before the call to sleep, so it doesn't wait first.