Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tfm.exec.disableAutoNewGame(true)
- mapas={"0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","88","90","91","92","93","94","95","96","97","98","99","100","101","102","103","104","105","106","107","128","129","130","131","132","133","201","202","203","204","205","206","207","208","209","210"}
- pos=0;
- vivo=0;
- sala=0;
- local tempo=90;
- function eventLoop(currentTime, timeRemaining)
- tempo = tempo -0.5
- if (tempo%1 == 0) then
- T = string.format("%.2d:%.2d",tempo/60%60, tempo%60)
- tfm.exec.setUIMapName("<N>Tempo restante: <J>"..T.." <N>/ Ratos na sala: <J>"..sala.." <N>/ Ratos vivos: <J>"..vivo.."</J>")
- end
- if tempo <= 0 or vivo == 0 then
- tfm.exec.newGame(mapas[math.random(#mapas)])
- end
- end
- function eventPlayerWon(playerName)
- pos=pos+1
- vivo=vivo-1
- if pos == 1 then
- ui.addPopup(0, 0, "ParabĂ©ns "..playerName.."! VocĂȘ firstou!", NIL, 300, 30, 300, true)
- end
- end
- function eventPlayerDied(playerName)
- vivo=vivo-1
- end
- function eventNewGame()
- tempo=90;
- vivo=0;
- sala=0;
- pos=0;
- for name,player in pairs(tfm.get.room.playerList) do
- sala=sala+1
- vivo=vivo+1
- end
- end
- function eventPlayerLeft(playerName)
- vivo=vivo-1
- sala=sala-1
- end
- tfm.exec.newGame(mapas[math.random(#mapas)])
- function eventNewPlayer(playerName)
- sala=sala+1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement