mob
Move()
if(src.Meditate) return
else ..()
mob
verb
Meditate()
set category="Training"
if(usr.Meditate)
usr.Meditate = 1
usr << "You Start Meditating"
usr.maxpowerlevel+=rand(0.80,0.85)
usr.stamina-=5
return
while(usr.Meditate)
usr.Meditate = 0
return
Thanks alot
Nexus6669 wrote:
From this I gather that you don't want a mob to move whilst meditating. Fair enough, good job.
At this point, what branches from if(usr.Meditate) is what happens if the usr is meditating at the time. The way you handle this from this point fully contradicts this concept:
If they are already meditating, why would you set Meditate to 1 at this point?
All this does is set usr.Meditate to 0 if it is currently not 0. Instead, I imagine you'll want to execute a series of statements while they're meditating, and have them stop meditating if they should call it again while meditating. I'll illustrate an example here:
Hiead