Advertisement
Zagear

shams

Dec 15th, 2017
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.84 KB | None | 0 0
  1. for _,v in pairs ({'disablePhysicalConsumables','disableAutoNewGame','disableMortCommand','disableAutoShaman'}) do
  2.     tfm.exec[v](true)
  3. end
  4. maps = {3349286,292592,1277941,6893010,390657,464787,6891734}
  5. tfm.exec.newGame(maps[math.random(#maps)])
  6.  
  7. function eventNewGame()
  8.     tfm.exec.setUIMapName("#Shams")
  9.     for n,p in pairs(tfm.get.room.playerList) do
  10.         tfm.exec.setShaman(n)
  11.     end
  12. end
  13.  
  14. function eventPlayerDied(name)
  15.     local i=0
  16.     local n
  17.     for pname,player in pairs(tfm.get.room.playerList) do
  18.         if not player.isDead then
  19.             i=i+1
  20.             n=pname
  21.         end
  22.     end
  23.     if i==0 then
  24.         tfm.exec.newGame(maps[math.random(#maps)])
  25.     elseif i==1 then
  26.         tfm.exec.giveCheese(n)
  27.         tfm.exec.playerVictory(n)
  28.         tfm.exec.setGameTime(5)
  29.     end
  30. end
  31.  
  32. function eventLoop(time,remaining)
  33.     if remaining<=0 then
  34.         tfm.exec.newGame(maps[math.random(#maps)])
  35.     end
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement