Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoScore(true)
- local alive = 0
- local maxscore = 0
- local won = 0
- local sh = 2
- maps = {[[1]], [[2]]}
- eventNewGame = function()
- sh = 2
- alive = 0
- maxscore = 0
- for i in pairs(tfm.get.room.playerList) do
- alive = alive + 1
- for l = 1,2 do
- if tfm.get.room.playerList[i].score < maxscore + 1 and sh ~= 0 then
- sh = sh - 1
- tfm.exec.setShaman(i)
- tfm.exec.setPlayerScore(i, 0, false)
- if sh == 1 then
- tfm.exec.setNameColor(i, 0xFEB1FC)
- end
- end
- end
- end
- end
- eventPlayerWon = function(p)
- alive = alive - 1
- if not tfm.get.room.playerList[p].isShaman == true then
- won = won + 1
- tfm.exec.setPlayerScore(p, 10, true)
- if won == 1 then
- maxscore = maxscore + 10
- end
- end
- end
- eventPlayerDied = function(p)
- alive = alive - 1
- end
- eventLoop = function(tp, tr)
- if tr < 100 or alive == 0 then
- eventNextGame()
- end
- end
- eventNextGame = function(m)
- if m then
- tfm.exec.newGame(m)
- elseif not m then
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment