Advertisement
Tectoon

[TFM] Treino Supa V1.0

Aug 25th, 2015
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.53 KB | None | 0 0
  1. maps={"@6208213","@6209388", "@6209424", "@6209532", "@6209574","@6209582", "@6209596", "@6209645","@6209899", "@6224586"};
  2. tempo=99999; -- Tempo em segundos
  3. respawn=1; -- 1 = true    2 = false
  4. pos=0;
  5. vivo=0;
  6. sala=0;
  7. local tempo=1;
  8. admins = {Sagazgamer = true, Tectoon = true}
  9.  
  10. tfm.exec.disableAutoNewGame(true)
  11. tfm.exec.disableAutoShaman(true)
  12. tfm.exec.disableAutoTimeLeft(true)
  13. tfm.exec.newGame(maps[math.random(#maps)])
  14. tfm.exec.setUIMapName("<J>Treino Supa  <N>|  <CH>Tempo : <V>00:00\n")
  15. tfm.exec.setNameColor("Sagazgamer", 0x20ABFF)
  16. tfm.exec.setNameColor("Tectoon", 0xFF3838)
  17.  
  18. function eventNewGame()
  19.     tfm.exec.setGameTime(tempo)
  20. end
  21.  
  22. function eventPlayerDied(p)
  23.     if respawn == 1 then
  24.         tfm.exec.respawnPlayer(p)
  25.         tfm.exec.setNameColor("Sagazgamer", 0x20ABFF)
  26.         tfm.exec.setNameColor("Tectoon", 0xFF3838)
  27.     else
  28.         local i = 0;
  29.         for v in pairs(tfm.get.room.playerList) do
  30.             i=i+1;
  31.         end
  32.         if i == 0 then
  33.             tfm.exec.newGame(maps[math.random(#maps)])
  34.             tfm.exec.setUIMapName("<J><B>Treino Supa</B>  <N>|  <CH>Tempo : <V>00:00\n")
  35.         end
  36.     end
  37. end
  38.  
  39. function eventPlayerWon(p)
  40.     if respawn == 1 then
  41.         tfm.exec.respawnPlayer(p)
  42.         tfm.exec.setNameColor("Sagazgamer", 0x20ABFF)
  43.         tfm.exec.setNameColor("Tectoon", 0xFF3838)
  44.     else
  45.         local i = 0;
  46.         for v in pairs(tfm.get.room.playerList) do
  47.             i=i+1;
  48.         end
  49.         if i == 0 then
  50.             tfm.exec.newGame(maps[math.random(#maps)])
  51.             tfm.exec.setUIMapName("<J><B>Treino Supa</B>  <N>|  <CH>Tempo : <V>00:00\n")
  52.         end
  53.     end
  54. end
  55.  
  56. function eventLoop(currentTime, timeRemaining)
  57.         tempo = tempo +0.5
  58.         if (tempo%1 == 0) then
  59.         T = string.format("%.2d:%.2d",tempo/60%999999, tempo%60)
  60.         tfm.exec.setUIMapName("<J><B>Treino Supa</B> <CH>|  <N>Tempo Treinado: <V>"..T.."</J>")
  61.         end
  62. end
  63.  
  64. function eventChatCommand(p,c)
  65.  if c==[[skip]] and p==[[Sagazgamer]] then
  66.                 tfm.exec.newGame(maps[math.random(#maps)])
  67.                 tfm.exec.setUIMapName("<J><B>Treino Supa</B> <CH>|  <N>Tempo Treinado: <V>"..T.."</J>")
  68.                 tfm.exec.setGameTime(tempo)
  69.                 tfm.exec.setNameColor("Sagazgamer", 0x20ABFF)
  70.                 tfm.exec.setNameColor("Tectoon", 0xFF3838)
  71.                 print("<J>Próximo mapa<ch> supa!<n> Mapa carregado com sucesso!")
  72.  
  73.  elseif c==[[dead]] then
  74.                 tfm.exec.killPlayer(p)
  75.  end
  76. end
  77.  
  78. function eventNewPlayer(p)
  79.  tfm.exec.respawnPlayer(p)
  80. end
  81.  
  82. ui.addTextArea(0,"<font color='#5ACDD5' align='center' size='20'><b>     <i><s>     Projeto Treino Supa </s></i></font><font size='26' color='#068AFF' align='center' face='Soopafresh'><br>              Treino Supa V1.0<font face='verdana' size='12'><br><b><J><br><br><b><font size='12'>Ola ratinhos, seu objetivo é treinar <R>supa,<j> o mapa será infinito <j>caso queira mudar de mapa dê <rose>!skip</font><font size='12'><br><j>Caso seu ratinho bug, dê <rose>!dead <j>que você morrerá e renascerá novamente! <j>? <br><font size='10'><j>Bom Jogo a Todos<R> ?? <j> By <V> Tectoon <br><br><ch><font size='12'><j>Criado por Sagazgamer",playerName,200,125,380,170, 0x3E3D3C, 0xF9E1AF, 0.8, true)
  83. ui.addTextArea(1,"<p align='center'><font color='#4AAEE9'><B><a href='event:close'>X</a>",player,568,112,19,18,0xFF4100,0x313131,1,true)
  84. function eventTextAreaCallback(textAreaId, player, callback)
  85. if(callback == "close") then
  86. ui.removeTextArea(0,player)
  87. ui.removeTextArea(1,player)
  88. end
  89. end
  90.  
  91. for i,command in ipairs({"skip","dead"}) do
  92.         system.disableChatCommandDisplay(command)
  93.         end
  94. print("<J>Treino Supa <ch>V1.0<n> Carregado com sucesso!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement