Zerveorus

Inmovilizar jugador

May 19th, 2017
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. function immobilize(name,time,x,y)
  2. local time = time*1000 or 3000                      --time or the conjurations
  3. local x= x or tfm.get.room.playerList[name].x       --position x to move the player
  4. local y=y or tfm.get.room.playerList[name].y        --position y to move the player
  5. tfm.exec.movePlayer(name,x,y)
  6.     for k = -1,1 do
  7.     local i,o = -2,2
  8.         tfm.exec.addConjuration(x/10+k,y/10+o,time)
  9.         tfm.exec.addConjuration(x/10+k,y/10+i,time)
  10.         tfm.exec.addConjuration(x/10+o,y/10+k,time)
  11.         tfm.exec.addConjuration(x/10+i,y/10+k,time)
  12.     end
  13. end
Advertisement
Add Comment
Please, Sign In to add comment