Safwanrockz

Untitled

Oct 24th, 2013
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tfm.exec.newGame ("47")
  2. players={}
  3. tfm.exec.disableAllShamanSkills(false)
  4. for name,player in pairs(tfm.get.room.playerList) do
  5.     tfm.exec.setShaman(name)
  6.     table.insert(players,name)
  7. end
  8.  
  9. tfm.exec.disableAutoNewGame(true)
  10. tfm.exec.setGameTime(0)
  11.  
  12. function eventNewGame()
  13. for name,player in pairs(tfm.get.room.playerList) do
  14.     tfm.exec.setPlayerScore(name,0)
  15. end
  16. end
  17. function eventChatCommand(name,cmd)
  18. local arg={}
  19. for argument in cmd:gmatch("[^%s]+") do
  20. table.insert(arg, argument);
  21. end
  22. if arg[1]=="score" then
  23. tfm.exec.setPlayerScore(arg[2],arg[3])
  24. end
  25. end
  26. function eventPlayerDied(name)
  27. for name,player in pairs(tfm.get.room.playerList) do
  28.    if tfm.get.room.playerList[name].score<15 then
  29.     tfm.exec.respawnPlayer(name)
  30.    elseif tfm.get.room.playerList[name].score>=15 then
  31.     ui.addTextArea(0, "<J>"..name.."</J><BV> has lost! They won't be revived anymore!", nil)
  32.    elseif #players==1 then
  33.     ui.updateTextArea(0, "<J>"..name.."</J><BV> has won the round! Starting a new round..", nil)
  34.    end
  35.  end
  36. end
Advertisement
Add Comment
Please, Sign In to add comment