Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tfm.exec.setUIShamanName("Escape-Hatch")
- tfm.exec.disableAutoShaman (true)
- local maps = {1484328,608025,5609863,5607946,5609951,5924909}
- local currentMap
- local playersAlive
- function main()
- tfm.exec.disableAutoNewGame(true)
- startGame()
- end
- function startGame()
- local newMap
- repeat
- newMap = math.random(#maps)
- until newMap ~= currentMap
- currentMap = newMap
- tfm.exec.newGame(maps[newMap])
- end
- function endGame()
- startGame()
- end
- function eventNewGame()
- playersAlive = 0
- for _ in pairs(tfm.get.room.playerList) do
- playersAlive = playersAlive + 1
- end
- end
- function eventPlayerRespawn(name)
- playersAlive = playersAlive + 1
- end
- function eventPlayerDied(name)
- playersAlive = playersAlive - 1
- checkPlayers()
- end
- function eventPlayerWon(name)
- playersAlive = playersAlive - 1
- checkPlayers()
- end
- function checkPlayers()
- if playersAlive == 0 then
- endGame()
- end
- end
- function eventLoop(t, tr)
- if tr <= 0 then
- endGame()
- end
- end
- main()
- function eventLoop(name, x, y) -- Loop
- conjurarOvelhas=40 -- Objeto a Conjurar
- x=math.random(0,800) -- Local X
- y=math.random(0,400) -- Local Y
- tfm.exec.addShamanObject(conjurarOvelhas,x,y,0,0,0,NIL) -- Cojurar objeto
- end
- tfm.exec.setUIMapName("<N>Escape-Hatch")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement