ID:139097
 
Code:
mob
verb
Push_Combo()
set src in view(0)
usr.icon_state="Attack"
usr.dir=2
usr.density=1
sleep(2)
step(src,WEST)
sleep(2)
step(usr,WEST)
sleep(1)
step(src,WEST)
sleep(2)
step(usr,WEST)
sleep(1)
step(src,WEST)
sleep(2)
step(usr,WEST)
sleep(1)
step(src,EAST)
sleep(2)
step(usr,EAST)
sleep(2)
step(src,EAST)
sleep(2)
step(usr,EAST)
sleep(2)
step(src,EAST)
sleep(2)
step(usr,EAST)
sleep(2)


Problem description:

When i click on the Push Combo verb I want it to make it so that I push the mob 3 tiles back and then teleport on back of them and push them back to where they where.

for(1 to 3)  //  3 loops
step(X, X.dir) // Pushes X in X's direction
// No sleep in the loop = makes it appear that the push was instantaneous
Y.Move(get_step(X,X.dir)) // Y is beside X in X's direction
Y.dir = get_dir(Y,X) // make Y face X
......try to guess how to move them back to the original spot
... Hint, it's in this snippet


I do not get what you mean by " teleport on back of them ", you mean your /mob appear beside the person?

src = the source of the verb (the object that contains it)
usr = the person who invoked the verb

The way you have it, with view(0), the usr can be the src if the person invokes the verb on themselves. If you want others to invoke the verb and not the person itself, use oview()