Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. DOWN = string.byte("S")
  2.  
  3. data={}
  4.  
  5.  
  6.  
  7. function eventNewPlayer(n)
  8.  
  9.  
  10. tfm.exec.bindKeyboard(n, DOWN, true, true)
  11. tfm.exec.bindKeyboard(n, 40, true, true)
  12. tfm.exec.bindKeyboard(n, 32,true,true)
  13. end
  14. for n in next,tfm.get.room.playerList do
  15. tfm.exec.bindKeyboard(n, DOWN, true, true)
  16. tfm.exec.bindKeyboard(n, 40, true, true)
  17. tfm.exec.bindKeyboard(n, 32,true,true)
  18. end
  19.  
  20.  
  21.  
  22. tfm.exec.setUIMapName("<N>The Bronze Dragon")
  23. for n in next,tfm.get.room.playerList do
  24. system.bindMouse(n,true)
  25. system.bindKeyboard(name, DOWN1, true)
  26. system.bindKeyboard(name, DOWN2, true)
  27. end
  28.  
  29. function eventMouse(playerName,x,y)
  30. tfm.exec.movePlayer(playerName,x,y,false,0,0,false)
  31. end
  32.  
  33. DOWN1 = 40 --keycode of down arrow
  34. DOWN2 = string.byte("S") --keycode of S
  35.  
  36.  
  37.  
  38. function eventKeyboard(playerName, keyCode, dow, x, y)
  39.  
  40.  
  41.  
  42. if keyCode==40 or keyCode==DOWN or keyCode==32 then
  43. tfm.exec.displayParticle(2,x - math.random(50),y - math.random(10),0.2,0.1,0.2,0.1,nil)
  44. tfm.exec.displayParticle(2,x + math.random(50), y + math.random(10),-0,2,-0.2,-0.1,nil)
  45. tfm.exec.displayParticle(2,x - math.random(50),y - math.random(10),0.2,0.1,0.2,0.1,nil)
  46. tfm.exec.displayParticle(2,x + math.random(50), y + math.random(10),-0,2,-0.2,-0.1,nil)
  47. tfm.exec.displayParticle(2,x - math.random(50),y - math.random(10),0.2,0.1,0.2,0.1,nil)
  48. tfm.exec.displayParticle(2,x + math.random(50), y + math.random(10),-0,2,-0.2,-0.1,nil)
  49. tfm.exec.displayParticle(14,x - math.random(50),y - math.random(10),0.2,0.1,0.2,0.1,nil)
  50. tfm.exec.displayParticle(14,x + math.random(50), y + math.random(10),-0,2,-0.2,-0.1,nil)
  51. tfm.exec.displayParticle(14,x - math.random(50),y - math.random(10),0.2,0.1,0.2,0.1,nil)
  52. tfm.exec.displayParticle(14,x + math.random(50), y + math.random(10),-0,2,-0.2,-0.1,nil)
  53. tfm.exec.displayParticle(26,x - math.random(50),y - math.random(10),0.2,0.1,0.2,0.1,nil)
  54. tfm.exec.displayParticle(10,x -1, y - 3,-0,2,-0.2,-0.1,nil)
  55. tfm.exec.displayParticle(10,x -150, y - 3,-0,2,-0.2,-0.1,nil)
  56. tfm.exec.displayParticle(10,x +150, y - 3,-0,2,-0.2,-0.1,nil)
  57.  
  58. tfm.exec.explosion(x, y + 30, 20, 25, true)
  59. tfm.exec.displayParticle(tfm.enum.particle.spirit, x, y + 30)
  60.  
  61. end
  62.  
  63. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement