Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- countdown = 45
- tfm.exec.disableAutoNewGame(true)
- 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>'}
- function eventLoop(time,remaining)
- if remaining<=0 then
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- end
- function eventPlayerDied()
- local i=0
- for n,player in pairs(tfm.get.room.playerList) do
- if not player.isDead then
- i=i+1
- end
- end
- if i==0 then
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- end
- tfm.exec.disableAutoShaman(true)
- 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>')
- speeds={-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10}
- tfm.exec.disableAutoNewGame(true)
- function eventLoop(time,remaining)
- if remaining<=0 then
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- end
- objects={"17","10","1"}
- function eventLoop(n,m)
- tfm.exec.addShamanObject(objects[math.random(#objects)],math.random(750),20,0,speeds[math.random(#speeds)],math.random(10),false)
- countdown = countdown - 0.5
- ui.addTextArea(1,"<font size='20px'>Survive for this many seconds:",nil,50,60,200,nil,0xFFFFFF,0x000001,0,true)
- ui.addTextArea(2,"<font size='13px'>"..countdown,nil,50,120,20,20,0xFFFFFF,0x000001,0,true)
- end
- function eventPlayerWon(pn,te)
- tfm.exec.chatMessage("<ROSE>Good job "..pn.."! <br><br>A new game will start now.")
- tfm.exec.newGame(maps[math.random(#maps)])
- tfm.exec.setUIMapName("#FallingObjects - Last Round Time Survived: "..(te/100))
- end
- tfm.exec.setUIMapName("#FallingObjects - Last Round Time Survived:")
- function eventNewGame()
- countdown = 45
- end
Advertisement
Add Comment
Please, Sign In to add comment