Boeing747-8

Untitled

May 27th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.62 KB | None | 0 0
  1. countdown = 45
  2. timesurvived = 0
  3.  
  4. tfm.exec.disableAutoNewGame(true)
  5. maps={'<C><P /><Z><S><S v="2500" X="402" L="125" Y="240" H="10" P="0,0,0,0.2,0,0,0,0" T="1" /><S v="2500" X="421" L="10" Y="260" H="172" P="0,0,0,0.2,0,0,0,0" T="1" /><S v="2500" X="379" L="10" Y="260" H="168" P="0,0,0,0.2,0,0,0,0" T="1" /><S X="400" L="10" Y="382" H="171" P="0,0,0,1.2,0,0,0,0" T="2" /><S X="400" o="324650" L="12" Y="362" v="45000" H="162" P="0,0,0.3,0.2,0,0,0,0" T="12" /><S X="300" o="324650" L="10" Y="422" H="162" P="0,0,0.3,0.2,0,0,0,0" T="12" /><S X="160" o="324650" L="10" Y="400" H="162" P="0,0,0.3,0.2,0,0,0,0" T="12" /><S X="500" o="324650" L="10" Y="422" H="162" P="0,0,0.3,0.2,0,0,0,0" T="12" /><S X="640" o="324650" L="10" Y="400" H="162" P="0,0,0.3,0.2,0,0,0,0" T="12" /><S X="720" o="324650" L="10" Y="434" H="162" P="0,0,0.3,0.2,0,0,0,0" T="12" /><S X="80" o="324650" L="10" Y="434" H="162" P="0,0,0.3,0.2,0,0,0,0" T="12" /></S><D><DS X="400" Y="269" /><T X="404" Y="65" /><F X="404" Y="58" /></D><O /></Z></C>'}
  6.  
  7. function eventLoop(time,remaining)
  8. if remaining<=0 then
  9. tfm.exec.newGame(maps[math.random(#maps)])
  10. end
  11. end
  12.  
  13. function eventPlayerDied()
  14.  
  15. local i=0
  16. for n,player in pairs(tfm.get.room.playerList) do
  17. if not player.isDead then
  18. i=i+1
  19. end
  20. end
  21. if i==0 then
  22.  
  23. tfm.exec.newGame(maps[math.random(#maps)])
  24. end
  25. end
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34. tfm.exec.disableAutoShaman(true)
  35.  
  36.  
  37.  
  38. tfm.exec.newGame('<C><P /><Z><S><S v="2500" X="402" L="125" Y="240" H="10" P="0,0,0,0.2,0,0,0,0" T="1" /><S v="2500" X="421" L="10" Y="260" H="172" P="0,0,0,0.2,0,0,0,0" T="1" /><S v="2500" X="379" L="10" Y="260" H="168" P="0,0,0,0.2,0,0,0,0" T="1" /><S X="400" L="10" Y="382" H="171" P="0,0,0,1.2,0,0,0,0" T="2" /><S X="400" o="324650" L="12" Y="362" v="45000" H="162" P="0,0,0.3,0.2,0,0,0,0" T="12" /><S X="300" o="324650" L="10" Y="422" H="162" P="0,0,0.3,0.2,0,0,0,0" T="12" /><S X="160" o="324650" L="10" Y="400" H="162" P="0,0,0.3,0.2,0,0,0,0" T="12" /><S X="500" o="324650" L="10" Y="422" H="162" P="0,0,0.3,0.2,0,0,0,0" T="12" /><S X="640" o="324650" L="10" Y="400" H="162" P="0,0,0.3,0.2,0,0,0,0" T="12" /><S X="720" o="324650" L="10" Y="434" H="162" P="0,0,0.3,0.2,0,0,0,0" T="12" /><S X="80" o="324650" L="10" Y="434" H="162" P="0,0,0.3,0.2,0,0,0,0" T="12" /></S><D><DS X="400" Y="269" /><T X="404" Y="65" /><F X="404" Y="58" /></D><O /></Z></C>')
  39. speeds={-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10}
  40. tfm.exec.disableAutoNewGame(true)
  41.  
  42. function eventLoop(time,remaining)
  43. if remaining<=0 then
  44. tfm.exec.newGame(maps[math.random(#maps)])
  45.  
  46. end
  47. end
  48.  
  49. middle={600 + math.random(400)}
  50.  
  51. objects={"17","10","1"}
  52.  
  53. function eventLoop(n,m)
  54. tfm.exec.addShamanObject(objects[math.random(#objects)],math.random(750),20,0,speeds[math.random(#speeds)],math.random(10),false)
  55. tfm.exec.addShamanObject(objects[math.random(#objects)],math.random(750),20,speeds[math.random(#speeds)],speeds[math.random(#speeds)],false)
  56. timesurvived = timesurvived + 0.5
  57. countdown = countdown - 0.5
  58. ui.addTextArea(1,"<font size='20px'>Survive for this many seconds:",nil,50,60,200,nil,0xFFFFFF,0x000001,0,true)
  59. ui.addTextArea(2,"<font size='13px'>"..countdown,nil,50,120,20,20,0xFFFFFF,0x000001,0,true)
  60. end
  61.  
  62. function eventNewGame()
  63. countdown = 45
  64. tfm.exec.setUIMapName("#FallingObjects - Last Round Time Survived:")
  65. end
  66.  
  67. function eventPlayerWon(pn,te)
  68.  
  69. tfm.exec.chatMessage("<ROSE>Good job "..pn.."! <br><br>A new game will start now.")
  70.  
  71.  
  72. tfm.exec.newGame(maps[math.random(#maps)])
  73.  
  74. tfm.exec.setUIMapName("#FallingObjects - Last Round Time Survived After Victory: "..(te/100))
  75.  
  76.  
  77. end
  78.  
  79. tfm.exec.setUIMapName("#FallingObjects - Last Round Time Survived After Victory: ")
Advertisement
Add Comment
Please, Sign In to add comment