Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Mensagens de boas vindas
- ui.addTextArea(1, "<p align='center'><a href='event:close'><b>Fechar</a></p>", name, 308.55, 334, 180, 24, 0x324650, 0x0, 0.8, true)
- ui.addTextArea(0, "<center><font size=\"15\"><p align=\"center\">Welcome To Time Portals</center></p><br><br><font size=\"13\"> <b>A game in which you and your friends must use the portals to get pass the incredible maps. Challenging! <br><br><br><br><br><br><br><br><p align=\"right\">Version: 0.5<br><br>", nane, 206.5, 93, 387, 214)
- function eventTextAreaCallback(t,p,c)
- if c == [[close]] then
- for i = 0,2 do
- ui.removeTextArea(i,p)
- end
- end
- end
- -- portais
- if k == 32 and tfm.get.room.playerList[p].isFacingRight == true and info[p].time < os.time()-1500 then
- info[p].time = os.time()
- tfm.exec.movePlayer(p,0,0,true,100,0,false)
- elseif k == 32 and tfm.get.room.playerList[p].isFacingRight == false and info[p].time < os.time()-1500 then
- info[p].time = os.time()
- tfm.exec.movePlayer(p,0,0,true,-100,0,false)
- end
- local facingLeft = {}
- for name in pairs(tfm.get.room.playerList) do
- for _,key in pairs{0,2,3} do system.bindKeyboard(name, key, true)
- end
- end
- function eventKeyboard(name, key, down, x, y)
- if key == 0 or key == 2 then
- facingLeft[name] = key == 0
- elseif key == 3 then
- if facingLeft[name] then
- tfm.exec.addShamanObject(27, x - 8, y - 5, 0, 20)
- tfm.exec.addShamanObject(24, x - 8, y - 5, 0, 20)
- else
- tfm.exec.addShamanObject(26, x + 8, y - 5, 0, 20)
- tfm.exec.addShamanObject(24, x + 8, y - 5, 0, 20)
- end
- end
- end
- --- Desabilitações
- tfm.exec.disableAutoShaman()
- function eventPlayerWon(p)
- tfm.exec.respawnPlayer(p)
- end
- function eventPlayerWon(p)
- tfm.exec.respawnPlayer(p)
- end
- tfm.exec.disableAutoTimeLeft()
- ---Rotação de mapas
- maps={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,69,65,64,61,62,63,70,71,72,73,74,75,76,77,78,79,8,81,82,83,200,201,210}
- vivo=0;
- tfm.exec.disableAutoNewGame(true)
- function novaRodada()
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- novaRodada();
- function eventNewGame()
- vivo=0; -- A Variavel vivo Reseta
- for p in pairs(tfm.get.room.playerList) do -- Pra Todos Os Jogadores Da Sala
- vivo=vivo+1; -- Soma Da Variavel vivo
- end
- end
- function eventPlayerLeft(p)
- if not tfm.get.room.playerList
- .isDead then -- Verifica Se o Jogador Está Morto
- vivo=vivo-1; -- Se Ele Não Estiver, A Variavel Perde 1
- end
- end
- function eventPlayerDied(p)
- vivo=vivo-1;
- end
- function eventLoop()
- end
- function eventLoop(tempoPassado,tepoFaltando)
- end
- function eventLoop(tempoPassado,tempoFaltando)
- if vivo==0 or tempoFaltando <= 0 then -- Verifica se A Variavel vivo Chegou a 0 Ou Se o Tempo Restante Do Mapa Chegou a 0
- novaRodada();
- end
- end
- -- Jogador morre recucita
- function eventPlayerDied(p)
- tfm.exec.respawnPlayer(p)
- end
Add Comment
Please, Sign In to add comment