Advertisement
Bloonshack

[Tfm] Teste de Shaman (Não está pronto)

Jul 15th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.87 KB | None | 0 0
  1.  
  2.  
  3. adm = "Bloonshack" -- Seu Nome
  4.  
  5. tfm.exec.disableAutoNewGame()
  6. tfm.exec.setGameTime()
  7. maps = {"@6764611", "@6764611", "@6764611"}
  8. lastMaps = {}
  9.  
  10.  
  11. selectMap = function()
  12.     local id = math.random(1, #maps)
  13.  
  14.     if #lastMaps == #maps then
  15.         lastMaps = {}
  16.     end
  17.  
  18.     while (id == (nextMap or {}).id or lastMaps[id]) do
  19.         id = math.random(1, #maps)
  20.     end
  21.  
  22.     return {id = id, code = maps[id]}
  23. end
  24.  
  25. eventLoop = function(elapsedTime, remainingTime)
  26.     if remainingTime <= 0 or (function() local out = true for k, v in next, tfm.get.room.playerList do out = (out and v.isDead) if not v.isDead then break end end return out end)() then
  27.         tfm.exec.newGame(nextMap.code)
  28.     end
  29. end
  30.  
  31. eventNewGame = function()
  32.     lastMaps[nextMap.id] = true
  33.     nextMap = selectMap()
  34. end
  35.  
  36. nextMap = selectMap()
  37. tfm.exec.newGame(nextMap.code)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement