Advertisement
Guest User

BOX

a guest
Nov 28th, 2014
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.41 KB | None | 0 0
  1. pAtOnce=50
  2. radiusX=100
  3. radiusY=100
  4. id=0
  5.  
  6. function eventLoop(ct,tr)
  7. for i=1,id do
  8. ui.removeTextArea(i,nil)
  9. end
  10. id=0
  11. for i=1,pAtOnce do
  12. color=math.random(0x000000, 0xFFFFFF)
  13. ui.addTextArea(i,"",nil,math.random(400-radiusX*4,400+radiusX*4),math.random(200-radiusY*2,200+radiusY*2),1,1,color,color,0.75,true)
  14. id=id+1
  15. end
  16. end
  17.  
  18. function eventChatCommand(p,c)
  19. if c:sub(0,3)=="par" and tonumber(c:sub(5))<=1000 then
  20. pAtOnce=c:sub(5)
  21. elseif c:sub(0,2)=="rx" then
  22. radiusX=c:sub(4)
  23. elseif c:sub(0,2)=="ry" then
  24. radiusY=c:sub(4)
  25. end
  26. print("<v>["..p.."] <n>"..c)
  27. end
  28.  
  29. system.disableChatCommandDisplay("par",true)
  30. system.disableChatCommandDisplay("rx",true)
  31. system.disableChatCommandDisplay("ry",true)
  32.  
  33. players={}
  34. i=0
  35.  
  36. mouseLeft=[[
  37. <font color='#2E72CB'>BOXER
  38. ]]
  39. mouseRight=[[
  40. <font color='#2E72CB'>BOXER
  41. ]]
  42.  
  43. function eventNewGame()
  44.  
  45. end
  46.  
  47. function eventNewPlayer(name)
  48. players[name]={
  49. x=tfm.get.room.playerList[name].x,
  50. y=tfm.get.room.playerList[name].y,
  51. id=i
  52. }
  53. print(players[name].x)
  54. if(tfm.get.room.playerList[name].isFacingRight) then
  55. mouse=mouseRight
  56. else
  57. mouse=mouseLeft
  58. end
  59. ui.addTextArea(players[name].id,mouse,nil,players[name].x,players[name].y,0,0,0xffffff,0xffffff,0.0)
  60. i=i+1
  61. end
  62.  
  63. for name,player in pairs(tfm.get.room.playerList) do
  64. eventNewPlayer(name)
  65. end
  66.  
  67. function eventLoop(tc,tr)
  68. for name,player in pairs(tfm.get.room.playerList) do
  69. if not tfm.get.room.playerList[name].isDead then
  70. local x= tfm.get.room.playerList[name].x
  71. local y= tfm.get.room.playerList[name].y
  72. if(tfm.get.room.playerList[name].isFacingRight) then
  73. mouse=mouseRight
  74. x=x+20
  75. else
  76. mouse=mouseLeft
  77. x=x-20
  78. end
  79. y=y-10
  80. if(x~=players[name].x) or (y~=players[name].y) then
  81. ui.addTextArea(players[name].id,mouse,nil,x,y,0,0,0xffffff,0xffffff,0.0)
  82. end
  83. end
  84. end
  85. end
  86.  
  87. tfm.exec.disableAutoShaman(true)
  88. tfm.exec.newGame("@2838853")
  89. tfm.exec.disableAutoNewGame(true)
  90.  
  91. tfm.exec.setVampirePlayer("Mercedel")
  92.  
  93. tfm.exec.setVampirePlayer("Panadesoim")
  94.  
  95. tfm.exec.setVampirePlayer("Micesoareci")
  96.  
  97. tfm.exec.giveMeep("Micesoareci")
  98.  
  99. tfm.exec.giveMeep("Mercedel")
  100.  
  101. tfm.exec.giveMeep("Panadesoim")
  102.  
  103. tfm.exec.setNameColor('Panadesoim', 0xFF0000)
  104.  
  105. tfm.exec.setNameColor('Micesoareci', 0xFF0000)
  106.  
  107. tfm.exec.disableAfkDeath(true)
  108.  
  109.  
  110. tfm.exec.setUIMapName("<font color='#56BFE4'>BOX<font color='#0033CC'>|</font> <font color='#ffffff'>Creatori:</font> <font color='#FF0000'>Panadesoim & Micesoareci</font>")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement