Boeing747-8

Untitled

May 27th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.28 KB | None | 0 0
  1. countdown = 45
  2.  
  3. tfm.exec.disableAutoNewGame(true)
  4. 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>'}
  5.  
  6. function eventLoop(time,remaining)
  7. if remaining<=0 then
  8. tfm.exec.newGame(maps[math.random(#maps)])
  9. end
  10. end
  11.  
  12. function eventPlayerDied()
  13. local i=0
  14. for n,player in pairs(tfm.get.room.playerList) do
  15. if not player.isDead then
  16. i=i+1
  17. end
  18. end
  19. if i==0 then
  20. tfm.exec.newGame(maps[math.random(#maps)])
  21. end
  22. end
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31. tfm.exec.disableAutoShaman(true)
  32.  
  33.  
  34.  
  35. 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>')
  36. speeds={-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10}
  37. tfm.exec.disableAutoNewGame(true)
  38.  
  39. function eventLoop(time,remaining)
  40. if remaining<=0 then
  41. tfm.exec.newGame(maps[math.random(#maps)])
  42.  
  43. end
  44. end
  45.  
  46. objects={"17","10","1"}
  47.  
  48. function eventLoop(n,m)
  49. tfm.exec.addShamanObject(objects[math.random(#objects)],math.random(750),20,0,speeds[math.random(#speeds)],math.random(10),false)
  50.  
  51. countdown = countdown - 0.5
  52. ui.addTextArea(1,"<font size='20px'>Survive for this many seconds:",nil,50,60,200,nil,0xFFFFFF,0x000001,0,true)
  53. ui.addTextArea(2,"<font size='13px'>"..countdown,nil,50,120,20,20,0xFFFFFF,0x000001,0,true)
  54. end
  55.  
  56. function eventPlayerWon(pn,te)
  57. tfm.exec.chatMessage("<ROSE>Good job "..pn.."! <br><br>A new game will start now.")
  58.  
  59.  
  60. tfm.exec.newGame(maps[math.random(#maps)])
  61.  
  62. tfm.exec.setUIMapName("#FallingObjects - Last Round Time Survived: "..(te/100))
  63. end
  64.  
  65. tfm.exec.setUIMapName("#FallingObjects - Last Round Time Survived:")
  66.  
  67. function eventNewGame()
  68. countdown = 45
  69. end
Advertisement
Add Comment
Please, Sign In to add comment