Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Rotación de mapas
- local maps = {5735974, 5736012, 5734562}
- local currentMap
- local playersAlive
- tfm.exec.disableAutoShaman(true)
- 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()
- tfm.exec.setUIMapName("<font color='#FEAB00'>#Parkour ~ <font color='#000000'>Black <font color='#FEAB00'>Edition")
- 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
- function eventLoop(t, tr)
- if tr <= 0 then
- endGame()
- end
- end
- main()
- -- Popup's
- function eventKeyboard(name, key, down, x,y)
- if key==72 then
- ui.addPopup(1,0,"<p align='center'><font color='#CCCDCC'>#Parkour ~ Black Edition, Trata de mapas de Parkour, En los cuales tendrás que pasar por obstáculos para llegar a tu casa con tu familia.</p>",name,300,200,200);
- elseif key==77 then
- ui.addPopup(2,0,"<p align='center'><font color='#CCCDCC'>Si quieres enviar tu mapa, Lo puedes enviar aquí : <font color='#E6FF00'>atelier801.com/topic?f=6&t=789271&p=1#m7</p>",name,300,200,200);
- end
- end
- for name, player in pairs(tfm.get.room.playerList) do
- tfm.exec.bindKeyboard(name, 72,false,true)
- end
- for name, player in pairs(tfm.get.room.playerList) do
- tfm.exec.bindKeyboard(name, 77,false,true)
- end
- -- Color random
- function randomColor()
- return "0x" .. string.format("%X", math.random(0x000000, 0xFFFFFF))
- end
- function eventLoop (currentTime, timeRemaining)
- for i=1,100 do
- for p,_ in pairs(tfm.get.room.playerList) do
- tfm.exec.setNameColor(p, randomColor());
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement