ID:270824
 
mob/verb/Rest()
while(usr.Health)
if(usr.Health>=100)
break
else
if(usr.Move)
break
else
usr.Health+=rand(1,9)

I have made this, but it seems to not work.Any suggestions on making it work and making it more efficient?
mob/verb/Rest()
src.Restproc()

mob/proc/Restproc()
while(src.Health<=100)
src.Health+=rand(1,9)
sleep(5) //I would advise this to slow down how long they must rest for
if(src.Health>=100)
src<<"Health at max."
src.Health=100
return
In response to Zythyr
Yeah, all you need to do is loop it.