tfm.exec.disableAutoNewGame() tfm.exec.disableAllShamanSkills() shaman = "" function eventNewGame() vivo=0 shaman = "" for name,player in pairs(tfm.get.room.playerList) do vivo=vivo+1 if player.isShaman == true then shaman = name system.bindKeyboard(name, 0, true) system.bindKeyboard(name, 1, true) system.bindKeyboard(name, 2, true) system.bindKeyboard(name, 3, true) end end end function eventPlayerDied(name) vivo=vivo-1 end function eventPlayerWon(name) vivo=vivo-1 end function eventLoop(tempoPassado, tempoFaltando) if vivo == 0 or tempoFaltando < 1000 then tfm.exec.newGame(math.random(200)) end end function eventKeyboard(n,k) if n == shaman then if k == 0 then for n,plr in pairs(tfm.get.room.playerList) do tfm.exec.movePlayer(n, tfm.get.room.playerList[n].x - 100, tfm.get.room.playerList[n].y) end elseif k == 1 then for n,plr in pairs(tfm.get.room.playerList) do tfm.exec.movePlayer(n, tfm.get.room.playerList[n].x, tfm.get.room.playerList[n].y - 100) end elseif k == 2 then for n,plr in pairs(tfm.get.room.playerList) do tfm.exec.movePlayer(n, tfm.get.room.playerList[n].x + 100, tfm.get.room.playerList[n].y) end elseif k == 3 then for n,plr in pairs(tfm.get.room.playerList) do tfm.exec.movePlayer(n, tfm.get.room.playerList[n].x, tfm.get.room.playerList[n].y + 100) end end end end tfm.exec.newGame(math.random(200))