Advertisement
Dudugz-Contistente

Untitled

Oct 1st, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. local items = {1,10}
  2. local sitem = 0
  3. local time = 0
  4. local str = 0
  5. local p = ""
  6. local map;
  7.  
  8. tfm.exec.disableAutoNewGame()
  9. tfm.exec.disableAutoShaman()
  10.  
  11. alives = function()
  12. local a = 0 table.foreach(tfm.get.room.playerList,function(k,v) if not v.isDead then a=a+1 end end) return a
  13. end
  14.  
  15. kills = function()
  16. local a = 0 table.foreach(tfm.get.room.playerList,function(k,v) if v.isDead then a=a+1 end end) return a
  17. end
  18.  
  19. function eventNewGame() str = 0 end
  20.  
  21. check=function()
  22. table.foreach(tfm.get.room.playerList,function(k,v)
  23. if v.x > 805 then
  24. tfm.exec.movePlayer(k,0,0,false,0,100,true)
  25. end
  26.  
  27. if v.x < 5 then
  28. tfm.exec.movePlayer(k,0,0,false,0,100,true)
  29. end
  30.  
  31. if not v.isDead then
  32. tfm.exec.setPlayerScore(k,str,false)
  33. end
  34. end)
  35. end
  36.  
  37. function eventLoop(t,r)
  38. map = '<C><P aie="1" Ca="" F="'..math.random(1,7)..'" G="'..math.random(-8,8)..','..math.random(4.5,7.0)..'" /><Z><S><S P="0,0,0.0,0.2,0,0,0,0" L="800" o="6a7495" X="400" c="3" Y="398" T="14" H="10" /></S><D><DS Y="373" X="400" /></D><O /></Z></C>'
  39. if time < os.time()-5000 then
  40. sitem = items[math.random(#items)]
  41. time=os.time()
  42. if math.random(1,14) == 7 then
  43. local j = {} for n in pairs(tfm.get.room.playerList) do table.insert(j,n) end
  44. p = j[math.random(#j)]
  45. else
  46. p = ""
  47. end
  48. end
  49.  
  50. if time < os.time()-2000 then
  51. if math.random(2,8) == 4 then
  52. angle=180
  53. else
  54. angle=math.random(0,270)
  55. end
  56. end
  57.  
  58. if t > 3000 then
  59. local imgs = {"15eda680320.png","15eda5e9d64.png"}
  60. check()
  61. str=str+math.random(0.1,3.0)
  62. if p == "" then
  63. for i = 1,1 do
  64. id=tfm.exec.addShamanObject(sitem,math.random(-10,790),math.random(1,40),angle,0,str)
  65. tfm.exec.addImage (imgs[math.random(#imgs)], "#"..id, 0, 0, nil) end
  66. else
  67. for i = 1,1 do
  68. id=tfm.exec.addShamanObject(sitem,tfm.get.room.playerList[p].x+math.random(-20,20),math.random(1,40),180,0,str)
  69. tfm.exec.addImage (imgs[math.random(#imgs)], "#"..id, 0, 0, nil)
  70. end
  71. end
  72.  
  73.  
  74. end
  75.  
  76. if r <= 1000 or alives() == 0 then
  77. tfm.exec.newGame(map)
  78. end
  79.  
  80. ui.setMapName("Coxinha Rain <BL>|</BL> <N>Vivos:</N> <V>"..alives().."</V> <BL>|</BL> <N>Mortos:</N> <V>"..kills().."</V> <BL>|</BL> <N>Strength:</N> <V>"..str.."</V><")
  81. end
  82.  
  83. tfm.exec.newGame(map)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement