I have attached a baddy script - it uses the move command. I made it initially for archaic, but it should help you.
But to the point:
NPC Code:
tx = targetx - x;
ty = targety - y;
dist = (tx*tx+ty*ty)^0.5;
nx = (tx/dist)*walkspeed;
ny = (ty/dist)*walkspeed;
Edit:
Then simply use
NPC Code:
move nx,ny,walkspeed,1+4+8;
etc.
Hope It helped
