if(usr.Dive == 1)
usr.Move(locate(usr.x,usr.y,usr.z + 1))
usr.Dive = 0
usr<<"You ran out of breath"
return
Problem description: Well....usr.Move causes all the rest of the code after it to have a delay of 1-3 seconds before doing them,and it won't move the user if he is moving around....so i was wondering is there a better way of doing this. (I tried putting the usr.Move last but it just causes a small bug,and it still won't work if the user is moving around)
if(usr.Dive==1)
Do this:
if(usr.Dive)
As Dive is 1 it will be true and it will work in the same way.
Now to your problem, As the user is moving to the next Z level, there is no need to move, you could simply edit the loc like so:
I think it takes time as you're moving to a different Z level, either that or you are doing extra processing at mob/Move().