Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tfm.exec.disableAutoShaman()
- tfm.exec.disableAutoNewGame()
- maps={"@7478080","@7452634","@7478173"}
- function toStart()
- local i=0
- for n,p in pairs(tfm.get.room.playerList) do
- if not p.isDead then
- i=i+1
- end
- end
- if i==0 then
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- end
- eventPlayerDied=toStart
- eventPlayerWon=toStart
- function eventLoop(time,remaining)
- if remaining <= 0 then
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- end
- tfm.exec.setUIMapName("Skysnow")
- toDespawn={}
- function eventNewPlayer(n)
- system.bindKeyboard(n, 3, true, true)
- end
- table.foreach(tfm.get.room.playerList, eventNewPlayer)
- function eventKeyboard(n,key,down,Px,Py)
- if key == 3 and not tfm.get.room.playerList[n].isDead then
- local id=tfm.exec.addShamanObject(10, Px+(tfm.get.room.playerList[n].isFacingRight and 5 or -10), Py-3, 20, -20, 0)
- table.insert(toDespawn,{os.time(),id})
- end
- end
- function eventLoop()
- for i,cannon in ipairs(toDespawn) do
- if cannon[1] <= os.time()-1500 then
- tfm.exec.removeObject(cannon[2])
- table.remove(toDespawn,i)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement