Robonado

Rotação c/ Níveis

Apr 30th, 2015
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. nextMap= function()
  2.     lvl= math.random(#map);
  3.     mapa,str= map[lvl][math.random(#map[lvl])],'<J>Dificuldade: <VP>%s';
  4.     main= tfm.exec.newGame(mapa) or ui.setMapName(str:format(lvl));
  5. end
  6.  
  7. eventLoop= tfm.exec.disableAutoNewGame(true) or function(a, b)
  8.     c, map= 0, { [1]= {1054567}; [2]= {47,48}; };
  9.     table.foreach(tfm.get.room.playerList, function(i,v) c= not v.isDead and c + 1 or c end)
  10.     c= (c == 0 or b <=0) and nextMap();
  11. end
  12.  
  13. eventLoop(0, 0)
Advertisement
Add Comment
Please, Sign In to add comment