Advertisement
Tectoon

[TFM] Controlar outro Rato

Jul 6th, 2015
338
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.26 KB | None | 0 0
  1. vitima= "Bote sua vitima aqui"
  2.  
  3. troll = "Seu nick aqui"
  4. -- pronto agora você pode trollar as pessoas c:
  5.  
  6.  
  7.  
  8. -- Comandos:
  9. -- 73 é I: a tecla pra pular sua vitima
  10. -- 75 é K: tecla para abaixar sua vitima(obs: nao é agaixar é faze-lo cair forçando rato pra baixo).
  11. -- 74 é J: tecla para esquerda.
  12. -- 76 é L: tecla para direita.
  13.  
  14. for name in pairs(tfm.get.room.playerList) do
  15. -- Instead of binding each key seperately, we put them all in a group.
  16.     for keys, k in pairs({73, 74, 75, 76}) do
  17. --And now the keys are binded!
  18.         tfm.exec.bindKeyboard(troll, k, true, true)
  19.     end
  20. end
  21.  
  22.  
  23. function eventKeyboard(troll, key, down, x, y)
  24.     if key == 73 then
  25. -- Move Vitima para Cima: 50 pixels
  26.         tfm.exec.movePlayer(vitima, 0, 0, true, 0, -50, false)
  27.     elseif key == 75 then
  28. -- Move Vitima para Baixo: 40pixels
  29.         tfm.exec.movePlayer(vitima, 0, 0, true, 0, 40, false)
  30.     elseif key == 74 then
  31. -- Move Vitima para Esquerda: 40pixels
  32.         tfm.exec.movePlayer(vitima, 0, 0, true, -40, 0, false)                
  33.     elseif key == 76 then
  34. -- Move Vitima para Direita: 40pixels
  35.         tfm.exec.movePlayer(vitima, 0, 0, true, 40, 0, false)                      
  36.     end
  37. end
  38.  
  39. -- Avisa quem é sua vitima.
  40.  
  41. print("<font color='#FFFF00'>"..vitima.."<font color='#FFFF00'> ser sua vitima!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement