spawn() Regen()
my problem now is, with the following proc for Regen, it will do one untill max THEN the other depending on which happened first :/
mob/proc
Regen()
while(src.HP<MaxHP)
src.HP+=1
sleep(40)
while(src.MP<MaxMP)
src.MP+=1
sleep(40)
spawn(1)Regen()
would anybody plz tell me How-To make it so both MP/HP will regen simultaneously (not one then the other other)
(like if im already regenerating HP cuz i got hit, but then i use MP, i want it to also start regen the MP while the HP regen is still going too)
hopefully this makes sense to somebody n they can help me out :D
PS:i feel like a forums hog i got one here now, and one in code problems about my item seller xD
http://www.byond.com/members/ BYONDAnime?command=view_post&post=98823
Basically though, I'd extend the restricted_number concept to have regeneration:
Then basically, whenever you reduce the person's stat, it will automatically regenerate up to their maximum, then stop as appropriate. Same goes, once you've set up one of these on login, you could make it regenerate by overriding New().
I hope that helps a little.