Boeing747-8

Improved Room Chat

Mar 14th, 2018
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.65 KB | None | 0 0
  1. -- Room Chat by Fuzzyfirsdog 3/14/18
  2.  
  3. pr = "<font size='12'><T>Room Chat - Developed by Fuzzyfirsdog</T><br><br><br><br>"
  4.  
  5. ui.addTextArea(0, "<p align='center'><font face='verdana'><font size='20'>Room Chat", nil, 5, 130, 260, 32, 0x324650, 0x000000, 0.2, true)
  6.  
  7. system.disableChatCommandDisplay("history",true)
  8. print(pr)
  9. ui.addTextArea(1,pr,nil,5,30,260,90,0x324650,0x212F36,0.4,true)
  10.  
  11. function eventChatMessage(n,m)
  12.  
  13. pr = "<font size='12'><V>["..n.."]<N> "..m.."<br>"..pr.."</font"
  14. ui.addTextArea(1,pr,nil,5,30,260,90,0x324650,0x212F36,0.4,true)
  15.  
  16. end
  17.  
  18. function eventLoop()
  19. print(pr)
  20.  
  21.  
  22. end
  23.  
  24. DOWN = string.byte("S")
  25.  
  26. data={}
  27.  
  28.  
  29.  
  30. function eventNewPlayer(n)
  31.  
  32.  
  33. tfm.exec.bindKeyboard(n, DOWN, true, true)
  34. tfm.exec.bindKeyboard(n, 40, true, true)
  35. tfm.exec.bindKeyboard(n, 32,true,true)
  36. end
  37. for n in next,tfm.get.room.playerList do
  38. tfm.exec.bindKeyboard(n, DOWN, true, true)
  39. tfm.exec.bindKeyboard(n, 40, true, true)
  40. tfm.exec.bindKeyboard(n, 32, true, true)
  41. end
  42.  
  43.  
  44.  
  45. tfm.exec.setUIMapName("<N>The Bronze Dragon")
  46. for n in next,tfm.get.room.playerList do
  47. system.bindMouse(n,true)
  48. system.bindKeyboard(name, DOWN1, true)
  49. system.bindKeyboard(name, DOWN2, true)
  50. end
  51.  
  52.  
  53.  
  54. DOWN1 = 40 --keycode of down arrow
  55. DOWN2 = string.byte("S") --keycode of S
  56.  
  57.  
  58.  
  59. function eventKeyboard(playerName, keyCode, dow, x, y)
  60.  
  61.  
  62.  
  63. if keyCode==40 or keyCode==DOWN or keyCode==32 then
  64. tfm.exec.displayParticle(2,x - math.random(50),y - math.random(10),0.2,0.1,0.2,0.1,nil)
  65. tfm.exec.displayParticle(2,x + math.random(50), y + math.random(10),-0,2,-0.2,-0.1,nil)
  66. tfm.exec.displayParticle(2,x - math.random(50),y - math.random(10),0.2,0.1,0.2,0.1,nil)
  67. tfm.exec.displayParticle(2,x + math.random(50), y + math.random(10),-0,2,-0.2,-0.1,nil)
  68. tfm.exec.displayParticle(2,x - math.random(50),y - math.random(10),0.2,0.1,0.2,0.1,nil)
  69. tfm.exec.displayParticle(2,x + math.random(50), y + math.random(10),-0,2,-0.2,-0.1,nil)
  70. tfm.exec.displayParticle(14,x - math.random(50),y - math.random(10),0.2,0.1,0.2,0.1,nil)
  71. tfm.exec.displayParticle(14,x + math.random(50), y + math.random(10),-0,2,-0.2,-0.1,nil)
  72. tfm.exec.displayParticle(14,x - math.random(50),y - math.random(10),0.2,0.1,0.2,0.1,nil)
  73. tfm.exec.displayParticle(14,x + math.random(50), y + math.random(10),-0,2,-0.2,-0.1,nil)
  74. tfm.exec.displayParticle(26,x - math.random(50),y - math.random(10),0.2,0.1,0.2,0.1,nil)
  75. tfm.exec.displayParticle(10,x -1, y - 3,-0,2,-0.2,-0.1,nil)
  76. tfm.exec.displayParticle(10,x -150, y - 3,-0,2,-0.2,-0.1,nil)
  77. tfm.exec.displayParticle(10,x +150, y - 3,-0,2,-0.2,-0.1,nil)
  78.  
  79. tfm.exec.explosion(x, y + 40, 17, 40, false)
  80. tfm.exec.displayParticle(tfm.enum.particle.spirit, x, y + 30)
  81.  
  82. end
  83.  
  84. end
Advertisement
Add Comment
Please, Sign In to add comment