ID:149573
 
*sigh* im trying to stop the client from using the movement from the arrow keys when resting is equal to 1, but it just seems to ignore it....see if you guys can find what im doing wrong, here's my code...also, i have two diff. types of indenting in my code...two spaces and tab, but i never use them together

The Resting Verb:

rest()
if(usr.resting == 1)
usr << "You stand and feel refreshed."
usr.resting = 0
else
usr << "You sit down and begin to rest."
usr.resting = 1
spawn while(usr.resting == 1)
sleep(60)
usr.health += 5
if(usr.health > usr.Health) usr.health = usr.Health
usr.mana += 5
if(usr.mana > usr.Mana) usr.mana = usr.Mana

The Check Resting On Movement Thingie:
Move()
if (mob.resting == 0)
return ..()
else
usr << "You should stop resting before you run off."
return 0
How about,

mob/Move()
if(src.resting==1)
return
..()

mob/verb/Rest()
if(src.resting==1)
src<<"You are resting"
return
else
src.blah+=1
just add what you think should be included in the resting code.
In response to Super16
thanks, once i changed it to mob/Move() it started working.