mob
verb
Kage_Konoha_Kyuu(mob/M in oview())
if (usr.resting==1)
usr << "Not while resting"
return
if(usr.Chakra >= 2)
set category = "Ninjutsu"
usr.Chakra = usr.Chakra-10
view()<<"Kage Konoha Kyuu!!"
usr<<"You teleport to someone!"
if(M.dir == NORTH) // If the mob's dir is NORTH...
src.Move(locate(usr.x,usr.y+1,usr.z))
if(M.dir == SOUTH) // If SOUTH...
src.Move(locate(usr.x,usr.y-1,usr.z))
if(M.dir == WEST) // If WEST...
src.Move(locate(usr.x-1,usr.y,usr.z))
if(M.dir == EAST) // If EAST...
src.Move(locate(usr.x+1,usr.y,usr.z))
if(prob(2))
usr.ninjutsu+=1
usr << "<b>Ninjutsu Increased!!</b>"
else
usr << "You are too exhausted!,Rest"
Problem description:Its suppost to teleport you behind the person but its not it just moves you somewhere else =\ Help?
Your code is ugly...
Well, I wanted to keep this for the Naruto game that Branks and I are making(if he's still in---he does the graphics, and I can't do much without them). Anyways, to find the space behind somebody, I came up with this formula:
Then, of course, you'd want to make sure that behind_M pointed to a valid location(M's back wasn't to the map border). Hope it helps(and I hope that Naruto The Future someday gets back on track. =D).
EDIT:
Also, don't check if a variable == 1, use if(variable)
It's much more robust that way.
Hiead