mob
verb
Rest()
if(usr.resting == 0)
usr.resting = 1
usr<<"You begin to rest!"
overlays += 'Rest.dmi'
usr.walk = 1
rest()
else
usr.resting = 0
usr.walk = 0
usr<<"Your done resting!"
overlays -= 'Rest.dmi'
mob
proc
rest()
if(usr.resting==1)
sleep 25
usr.health = usr.mhealth
usr.chakra = usr.mchakra
usr.rest()
else
..()
I dont no why my rest verb isnt stoping on its own.. i have to click rest again for it to stop when it should be stoping itself... any suggestions?
Now, here's the thing - why would you think it's stopping itself? It most certainly does not.
Once it gets into this bit:
It will just keep looping until something makes src.resting 0. If you want it to stop after 25 seconds, just call Rest(). DM is case-sensitive - rest() is different to Rest(). One note, though - you should set usr to src before calling Rest().
And finally, instead of if(usr.resting==0), you should have if(!resting). And if(usr.resting==1) should be if(resting)