Advertisement
Guest User

Untitled

a guest
Aug 29th, 2014
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. local pos = getPlayerPosition(cid)
  2. local pos_dir = getPositionByDirection(pos, direction)
  3.  
  4.  
  5. local pos = getCreaturePosition(cid)
  6. for i = 1, 8 do
  7. if isWalkable(getPosByDir(pos, i), true, false, false, true) then
  8. doTeleportThing(cid, getPosByDir(pos, i), true)
  9. end
  10. end
  11.  
  12. if not ignoreParalyzeCheck then
  13. if getCreatureNoMove(cid) and not getParalyzeNoMove(cid) then
  14. return false
  15. end
  16. end
  17. doMoveCreature(cid, direction)
  18. else
  19. doMoveCreature(cid, getClosestFreeTile(cid, pos, true))
  20. end
  21. return false
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement