Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -----The ballons
- system.bindMouse("Hpassos", true);
- function eventMouse(playerName, xMouse, yMouse)
- tfm.exec.addShamanObject(28, xMouse, yMouse, 0, 0, 0, false);
- end
- ranking={};
- function estaNaTabela(player)
- for i = #ranking,1,-1 do
- if ranking == player then
- return true;
- end
- end
- return false;
- end
- function verRanking(player)
- for i = #ranking,1,-1 do
- table.remove(ranking,i)
- end
- for i = 0,3 do
- local score = -1;
- local pl = nil;
- for p,v in pairs(tfm.get.room.playerList) do
- if v.score > score and not estaNaTabela(p) then
- score=v.score;
- pl=p;
- end
- end
- table.insert(ranking,pl)
- end
- for i = #ranking,1,-1 do
- print(ranking)
- end
- end
- verRanking()
- tfm.exec.disableAutoNewGame(true);
- mapas={"@5016375", "@5016389"}
- function nextRound()
- tfm.exec.newGame(mapas[math.random(#mapas)]);
- end
- function eventNewGame()
- vivo=0
- for name,player in pairs(tfm.get.room.playerList) do
- vivo=vivo+1
- 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
- nextRound();
- end
- end
- nextRound();
- red={}
- blue={}
- function makeTeams()
- local playerList={}
- for name,player in pairs(tfm.get.room.playerList) do
- table.insert(playerList,name)
- end
- for i=1,#playerList,1 do
- local index=math.random(#playerList)
- local name=playerList[index]
- if i%2==0 then
- table.insert(red,name)
- else
- table.insert(blue,name)
- end
- table.remove(playerList,index)
- end
- end
- makeTeams()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement