Tectoon

[TFM] Painel Admin+ MultiFunções

Jun 21st, 2015
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 38.76 KB | None | 0 0
  1. print([[<ROSE>[~Tribu] <N>Lua launched successfully! <J>##]]);
  2.  
  3. system.disableChatCommandDisplay([[report]])
  4. system.disableChatCommandDisplay([[mort]])
  5. system.disableChatCommandDisplay([[help]])
  6. system.disableChatCommandDisplay([[msg]], true)
  7. tfm.exec.disableAutoNewGame(false)
  8. tfm.exec.disableAutoShaman(false)
  9.  
  10. port = 0
  11. alive = 0
  12. time = os.time()
  13. msgs = {};
  14. txtChat = "<VP><B>[~Bot]</B> <N>Bem vindo ao Painel Admin!";
  15. ads = {[[<bv>Concurso: "Meu pequeno Script"<br><j>Dia: 15/01/2014 - 16:30<br>Usuários interessados em participar comparecer no cafofo na data e horário!<br><br><v>Prêmio: Cargo exclusivo!]],[[<BV>Campeonato de #fight<br><j>Dia: 16/01/2014 - 16:00<br><v>Prêmio: Um beijo Meu<br><br><r>By: Squalleze]]}
  16. log = [[<ROSE>[~Log] <N>Lua Carregado com sucesso!]]
  17.  
  18. players = {};
  19. banneds = {};
  20. master = {Theapps = true, YourName = true}
  21. admins = {Theapps = true, YourName = true};
  22. info = {}
  23. Reportados = {}
  24. currentMaplist = [[alert]]
  25. temp1 = [[]]
  26.  
  27. maps = {["alert"] = {[[If the total of 2,000 characters pass the maps can not be edited here!]]}, ["vanilla"] = {}, ["default"] = {[[@3078]],[[@8679]],[[@82090]],[[@127419]],[[@129835]],[[@142101]],[[@142738]],[[@146364]],[[@146615]],[[@147437]]}, ["defilante"] = {[[@767142]],[[@1299415]],[[@1408349]],[[@2067212]],[[@2350333]],[[@2391874]],[[@2403601]],[[@2724523]],[[@2828653]],[[@3360371]]}, ["racing"] = {[[@1471124]],[[@1694602]],[[@1644638]],[[@1542736]],[[@1495344]]}, ["art"] = {[[@129420]],[[@154859]],[[@202952]],[[@224120]],[[@230970]],[[@235931]],[[@238162]],[[@247992]],[[@256797]],[[@257777]],}, ["mecanic"] = {[[@49101]],[[@60303]],[[@113235]],[[@119308]],[[@121043]],[[@121494]],[[@123777]],[[@124969]],[[@126151]],[[@127440]]}, ["survivor"] = {[[@276534]],[[@279689]],[[@280120]],[[@280159]],[[@281431]],[[@281479]],[[@281492]],[[@281649]],[[@289932]],[[@289964]]}, ["vampire"] = {[[@258972]],[[@334445]],[[@423793]],[[@615791]],[[@760329]],[[@812007]],[[@946893]],[[@955523]],[[@1296883]],[[@1542025]]}}
  28.  
  29. Rotating = false
  30. Vanilla = false
  31. Vampire = false
  32. Defilante = false
  33. Bootcamp = false
  34. Racing = false
  35. Art = false
  36. Mecanic = false
  37. Survivor = false
  38. NameFlashing = false
  39. Fly = false
  40. Jump = false
  41. Teleport = false
  42. TeleJump = false
  43. Speed = false
  44. Ads = false
  45.  
  46. for x = 0, 143 do
  47.     table.insert(maps["vanilla"], x)
  48. end
  49. for x = 200, 210 do
  50.     table.insert(maps["vanilla"], x)
  51. end
  52. for x = 1, 100 do
  53.     table.insert(Reportados, #Reportados+1, [[-]])
  54. end
  55.  
  56. function concatedMaps()
  57.     local ret = [[]]
  58.     for i, map in pairs(maps[currentMaplist]) do
  59.         ret = ret..[[<N><a href='event:deletemap_]]..map..[['>]]..map..[[</a><br>]]
  60.     end
  61.     return ret
  62. end
  63.  
  64. function concatedLists()
  65.     local ret = [[]]
  66.     for list,_ in pairs(maps) do
  67.         ret = ret..[[<br> - ]]..list
  68.     end
  69.     return ret
  70. end
  71.  
  72. function eventReportsLog(v)
  73.         ui.addTextArea(51, [[]], p, 50, 60, 700, 290, 768, 768, 0.8, true);
  74.         ui.addTextArea(52, [[<B>Lista de Reportados:]], p, 50, 60, 300, 25, 768, 768, 0, true);
  75.         ui.addTextArea(53, [[]]..(1+v)..[[. ]]..Reportados[1+v]..[[]], p, 50, 85, 300, 25, 768, 768, 0, true);
  76.         ui.addTextArea(54, [[]]..(2+v)..[[. ]]..Reportados[2+v]..[[]], p, 50, 110, 300, 25, 768, 768, 0, true);
  77.         ui.addTextArea(55, [[]]..(3+v)..[[. ]]..Reportados[3+v]..[[]], p, 50, 135, 300, 25, 768, 768, 0, true);
  78.         ui.addTextArea(56, [[]]..(4+v)..[[. ]]..Reportados[4+v]..[[]], p, 50, 160, 300, 25, 768, 768, 0, true);
  79.         ui.addTextArea(57, [[]]..(5+v)..[[. ]]..Reportados[5+v]..[[]], p, 50, 185, 300, 25, 768, 768, 0, true);
  80.         ui.addTextArea(58, [[]]..(6+v)..[[. ]]..Reportados[6+v]..[[]], p, 50, 210, 300, 25, 768, 768, 0, true);
  81.         ui.addTextArea(59, [[]]..(7+v)..[[. ]]..Reportados[7+v]..[[]], p, 50, 235, 300, 25, 768, 768, 0, true);
  82.         ui.addTextArea(60, [[]]..(8+v)..[[. ]]..Reportados[8+v]..[[]], p, 50, 260, 300, 25, 768, 768, 0, true);
  83.         ui.addTextArea(61, [[]]..(9+v)..[[. ]]..Reportados[9+v]..[[]], p, 50, 285, 300, 25, 768, 768, 0, true);
  84.         ui.addTextArea(62, [[]]..(10+v)..[[. ]]..Reportados[10+v]..[[]], p, 50, 310, 300, 25, 768, 768, 0, true);
  85.         ui.addTextArea(63, [[]]..(11+v)..[[. ]]..Reportados[11+v]..[[]], p, 400, 85, 300, 25, 768, 768, 0, true);
  86.         ui.addTextArea(64, [[]]..(12+v)..[[. ]]..Reportados[12+v]..[[]], p, 400, 110, 300, 25, 768, 768, 0, true);
  87.         ui.addTextArea(65, [[]]..(13+v)..[[. ]]..Reportados[13+v]..[[]], p, 400, 135, 300, 25, 768, 768, 0, true);
  88.         ui.addTextArea(66, [[]]..(14+v)..[[. ]]..Reportados[14+v]..[[]], p, 400, 160, 300, 25, 768, 768, 0, true);
  89.         ui.addTextArea(67, [[]]..(15+v)..[[. ]]..Reportados[15+v]..[[]], p, 400, 185, 300, 25, 768, 768, 0, true);
  90.         ui.addTextArea(68, [[]]..(16+v)..[[. ]]..Reportados[16+v]..[[]], p, 400, 210, 300, 25, 768, 768, 0, true);
  91.         ui.addTextArea(69, [[]]..(17+v)..[[. ]]..Reportados[17+v]..[[]], p, 400, 235, 300, 25, 768, 768, 0, true);
  92.         ui.addTextArea(70, [[]]..(18+v)..[[. ]]..Reportados[18+v]..[[]], p, 400, 260, 300, 25, 768, 768, 0, true);
  93.         ui.addTextArea(71, [[]]..(19+v)..[[. ]]..Reportados[19+v]..[[]], p, 400, 285, 300, 25, 768, 768, 0, true);
  94.         ui.addTextArea(72, [[]]..(20+v)..[[. ]]..Reportados[20+v]..[[]], p, 400, 310, 300, 25, 768, 768, 0, true);
  95.         ui.addTextArea(73, [[<p align='right'><a href='event:close'><b>Close</b></a></p>]], p, 700, 333, 50, 25, 768, 768, 0, true);
  96.         ui.addTextArea(74, [[<a href='event:alert'>Alertar</a> ~ <a href='event:ban'>Banir</a> ~ <a href='event:unban'>Desbanir</a>]], p, 50, 333, 200, 25, 768, 768, 0, true);
  97.         ui.addTextArea(75, [[<p align='right'><a href='event:reset'><b>Limpar</b></a></p>]], p, 700, 60, 50, 25, 768, 768, 0, true);
  98.     if (port > 20) and (port < 40) then
  99.         ui.addTextArea(76, [[<p align='center'><font color='#C2C2DA'><a href='event:log'><b></b></a></font> <font color='#C2C2DA'><a href='event:log2'><b></b></a></font>]], p, 380, 60, 40, 25, 768, 768, 0, true);
  100.     elseif (port > 40) and (port < 60) then
  101.         ui.addTextArea(76, [[<p align='center'><font color='#C2C2DA'><a href='event:log'><b></b></a></font> <font color='#C2C2DA'><a href='event:log2'><b></b></a></font> <font color='#C2C2DA'><a href='event:log3'><b></b></a></font>]], p, 370, 60, 60, 25, 768, 768, 0, true);
  102.     elseif (port > 60) and (port < 80) then
  103.         ui.addTextArea(76, [[<p align='center'><font color='#C2C2DA'><a href='event:log'><b></b></a></font> <font color='#C2C2DA'><a href='event:log2'><b></b></a></font> <font color='#C2C2DA'><a href='event:log3'><b></b></a></font> <font color='#C2C2DA'><a href='event:log4'><b></b></a></font>]], p, 360, 60, 80, 25, 768, 768, 0, true);
  104.     elseif (port > 80) then
  105.         ui.addTextArea(76, [[<p align='center'><font color='#C2C2DA'><a href='event:log'><b></b></a></font> <font color='#C2C2DA'><a href='event:log2'><b></b></a></font> <font color='#C2C2DA'><a href='event:log3'><b></b></a></font> <font color='#C2C2DA'><a href='event:log4'><b></b></a></font> <font color='#C2C2DA'><a href='event:log5'><b></b></a></font>]], p, 350, 60, 100, 25, 768, 768, 0, true);
  106.     end
  107. end
  108.  
  109. function eventGiveAdmin(o)
  110.     if master[o] then
  111.         admins[o] = true
  112.         tfm.exec.setNameColor(o, 0xEB1D51)
  113.         ui.addTextArea(1,[[<BR><p align='center'><a href='event:chat'><b>Chat</b></a></p>]],o,602,10,33,30, 0x300, 0x300, 0.8, true);
  114.         ui.addTextArea(2,[[<BR><p align='center'><a href='event:panel'><b>Panel</b></a></p>]],o,657,10,40,30, 0x300, 0x300, 0.8, true);
  115.         ui.addTextArea(3,[[<BR><p align='center'><a href='event:logs'><b>Log</b></a></p>]],o,757,10,27,30, 0x300, 0x300, 0.8, true);
  116.     elseif not master[o] then
  117.         admins[o] = true
  118.         tfm.exec.setNameColor(o, 0x2F7FCC)
  119.         ui.addTextArea(1,[[<BR><p align='center'><a href='event:chat'><b>Chat</b></a></p>]],o,602,10,33,30, 0x300, 0x300, 0.8, true);
  120.         ui.addTextArea(2,[[<BR><p align='center'><a href='event:panel'><b>Panel</b></a></p>]],o,657,10,40,30, 0x300, 0x300, 0.8, true);
  121.         ui.addTextArea(3,[[<BR><p align='center'><a href='event:logs'><b>Log</b></a></p>]],o,757,10,27,30, 0x300, 0x300, 0.8, true);
  122.     end
  123. end
  124.  
  125. function eventAds(p)
  126.     if info[p].ads == true then
  127.         ui.addTextArea(14, [[]], p, -1500, -1500, 3000, 3000, 6976661, 6976661, 1.1, true);
  128.         ui.addTextArea(15, [[<font face='Comic Sans MS' size='30'><p align='center'><br><b><r>Aviso!</ch></font><br><font face='Comic Sans MS' size='25'><j>]]..info[p].text..[[</p><br><font size="10"><j><ESCREVA AQUI(POUCA COISA)</j></font>]], p, 5, 5, 790, 590, 768, 768, 0.3, true);
  129.         ui.addTextArea(16, [[<font face='Comic Sans MS' size="15">Você poderá jogar em ]]..info[p].count..[[ </font>]], p, 625, 320, 300, nil, 768, 768, 0.3, true);
  130.         ui.addTextArea(17, [[]], p, 805, 5, 3000, 690, 6976661, 6976661, 1.1, true);
  131.     end
  132. end
  133.  
  134. function eventAdsExit(p)
  135.     if info[p].ads == true then
  136.         ui.addTextArea(16, [[<font face='Comic Sans MS' size="15"><a href='event:close'>Jogar ! » </a></font>]], p, 700, 320, 300, nil, 768, 768, 0.3, true);
  137.         ui.addTextArea(17, [[]], p, 805, 5, 3000, 690, 6976661, 6976661, 1.1, true);
  138.     end
  139. end
  140.  
  141. function eventNewGame()
  142.     alive = 0
  143.     if Bootcamp == false then
  144.         tfm.exec.disableAfkDeath(false)
  145.         tfm.exec.disableAutoTimeLeft(false)
  146.     elseif Bootcamp == true then
  147.         tfm.exec.disableAfkDeath(true)
  148.         tfm.exec.disableAutoTimeLeft(true)
  149.     end
  150.     for p in pairs(tfm.get.room.playerList) do
  151.         alive = alive+1
  152.         if banneds[p] == true then
  153.             tfm.exec.killPlayer(p)
  154.             ui.addTextArea(-1, [[]], p, -1000, -1000, 2800, 2800, 768, 768, 1.1, true);
  155.         end
  156.     end
  157. end
  158.  
  159. function eventLoop(tp,tr)
  160.     if  Rotating == true then
  161.         if tr <= 0 or alive == 0 then
  162.             tfm.exec.newGame(maps.default[math.random(#maps.default)])
  163.         end
  164.     elseif Vanilla then
  165.         if tr <= 0 or alive == 0 then
  166.             tfm.exec.newGame(maps.vanilla[math.random(#maps.vanilla)])
  167.         end
  168.     elseif Defilante == true then
  169.         if tr <= 0 or alive == 0 then
  170.             tfm.exec.newGame(maps.defilante[math.random(#maps.defilante)])
  171.         end
  172.     elseif Bootcamp == true then
  173.         if tr <= 0 or alive == 0 then
  174.             tfm.exec.newGame(maps.bootcamp[math.random(#maps.bootcamp)])
  175.             tfm.exec.setGameTime([[360]])
  176.         elseif time < os.time()-5000 then
  177.             time = os.time()
  178.             for p in pairs(tfm.get.room.playerList) do
  179.                 tfm.exec.respawnPlayer(p)
  180.             end
  181.         end
  182.     elseif Racing == true then
  183.         if tr <= 0 or alive == 0 then
  184.             tfm.exec.newGame(maps.racing[math.random(#maps.racing)])
  185.             tfm.exec.setGameTime([[63]])
  186.         end
  187.     elseif Art == true then
  188.         if tr <= 0 or alive == 0 then
  189.             tfm.exec.newGame(maps.art[math.random(#maps.art)])
  190.         end
  191.     elseif Mecanic == true then
  192.         if tr <= 0 or alive == 0 then
  193.             tfm.exec.newGame(maps.mecanic[math.random(#maps.mecanic)])
  194.         end
  195.     elseif Survivor == true then
  196.         if tr <= 0 or alive == 0 then
  197.             tfm.exec.newGame(maps.survivor[math.random(#maps.survivor)])
  198.         end
  199.     elseif Vampire == true then
  200.         if tr <= 0 or alive == 0 then
  201.             tfm.exec.newGame(maps.vampire[math.random(#maps.vampire)])
  202.         end
  203.     elseif NameFlashing == true then
  204.         for i=1,100 do
  205.             for p in pairs(tfm.get.room.playerList) do
  206.                 tfm.exec.setNameColor(p, randomColor());
  207.             end
  208.         end
  209.     end
  210.     for p in pairs(tfm.get.room.playerList) do
  211.         if Ads == true then
  212.             if info[p].adstime < os.time()-1000 and info[p].count > 0 and not info[p].ads == false then
  213.                 info[p].adstime = os.time()
  214.                 info[p].count = info[p].count-1
  215.                 eventAds(p)
  216.             elseif info[p].count == 0 and not info[p].ads == false then
  217.                 eventAdsExit(p)
  218.             end
  219.         end
  220.     end
  221. end
  222.  
  223. function eventPlayerRespawn(p)
  224.     if not Bootcamp == true then
  225.         alive = alive+1
  226.     end
  227.     if banneds[p] == true then
  228.         tfm.exec.killPlayer(p)
  229.         ui.addTextArea(-1, [[]], p, -1000, -1000, 2800, 2800, 768, 768, 1.1, true);
  230.     end
  231. end
  232.  
  233. function randomColor()
  234.     return "0x" .. string.format("%X", math.random(0x000000, 0xFFFFFF))
  235. end
  236.  
  237. function eventPlayerWon(p)
  238.     if not Bootcamp == true then
  239.         alive = alive-1
  240.     end
  241. end
  242.  
  243. function nextRound()
  244.     if Rotating == true then
  245.         tfm.exec.newGame(maps[default][math.random(#maps.default)])
  246.     elseif Vanilla == true then
  247.         tfm.exec.newGame(maps.vanilla[math.random(#maps.vanilla)])
  248.     elseif Defilante== true then
  249.         tfm.exec.newGame(maps.defilante[math.random(#maps.defilante)])
  250.     elseif Bootcamp == true then
  251.         tfm.exec.newGame(maps.bootcamp[math.random(#maps.bootcamp)])
  252.         tfm.exec.setGameTime([[360]])
  253.     elseif Racing == true then
  254.         tfm.exec.newGame(maps.racing[math.random(#maps.racing)])
  255.         tfm.exec.setGameTime([[63]])
  256.     elseif Art == true then
  257.         tfm.exec.newGame(maps.art[math.random(#maps.art)])
  258.     elseif Mecanic == true then
  259.         tfm.exec.newGame(maps.mecanic[math.random(#maps.mecanic)])
  260.     elseif Survivor == true then
  261.         tfm.exec.newGame(maps.survivor[math.random(#maps.survivor)])
  262.     elseif Vampire == true then
  263.         tfm.exec.newGame(maps.vampire[math.random(#maps.vampire)])
  264.     end
  265. end
  266.  
  267. function eventPlayerDied(p)
  268.     if not Bootcamp == true then
  269.         alive = alive-1
  270.     end
  271. end
  272.  
  273. translations={
  274.     EN={
  275.         help={
  276.             [[<font size='18'><b><p align='center'>Bem-vindo(a) ao Cafofo</p></b></font><br>Seu objetivo é se divertir e fazer amigos(as).<br>Use as teclas direcionais (,,, ↓ ou, W, A , S, D) para se movimentar]],
  277.             [[<font size='18'><b><p align='center'>Comandos/Regras</p></b></font><br><font size='11'><b>Comandos:</b></font><br>!mort - faz você morrer.<br>!report - reporta um usuário aos administradores.<br><br><font size='11'><b>Regras:</b></font><br>- Não peça cargo de administrador ou você poderá ser punido(a).<br>- O uso de Hacker é proibido, o usuário que for pego usando será expulso da tribo.<br><br><font size='11'><b>Observações:</b></font><br>- Os administradores podem ser identificados pelo nome azul e os masters pelo nome vermelho.<br>- O abuso do comando !report pode causar consequências.]],
  278.             [[<font size='18'><b><p align='center'>Créditos</p></b></font><br><bv><b>Squalleze</b><n> - criar a Tribo, adicionar sistema de administração e etc.<br><br><b>Anônimo</b> - criar o sistema de lista de mapas.<br><br><b>Joaovictors</b> - criar o sistema de chat para admins.<br><br><b>Brenower</b> - ajudar a criar o painel administrativo.<br><br><b>Fluffyshine</b> - ajudar na criação do sistema de desbanimento.]],
  279.             }
  280.         }
  281. }
  282.  
  283. function newMsg(p, msg)
  284.     if #msgs <= 20 then
  285.         table.insert(msgs, #msgs+1, "\n<ROSE>["..p.."]: <N>"..msg)
  286.         txtChat = txtChat.."\n<ROSE>["..p.."]: <N>"..msg
  287.     else
  288.         table.remove(msgs, 1)
  289.         table.insert(msgs, #msgs+1, "\n<ROSE>["..p.."]: <N>"..msg)
  290.         txtChat = ""
  291.             for i,v in pairs(msgs) do
  292.                 txtChat = txtChat..msgs[i]
  293.             end
  294.     end
  295.     eventTextAreaCallback(t, p, [[chat]])
  296. end
  297.  
  298. function eventNewPlayer(p)
  299.     players[p]={helpid=1}
  300.     table.insert(players,p)
  301.     tfm.exec.bindKeyboard(p,32,true)
  302.     tfm.exec.bindKeyboard(p,77,true)
  303.     system.bindMouse(p, true)
  304.     ui.addTextArea(0,[[<BR><p align='center'><a href='event:help'><V><b>?</b></a></p>]],p,719,10,16,30,0x300,0x300,0.8, true);
  305.     if admins[p] == true then
  306.         eventGiveAdmin(p)
  307.     elseif banneds[p] == true then
  308.         ui.addTextArea(-1, [[Oi]], p, -1000, -1000, 2800, 2800, 768, 768, 1.1, true);
  309.     elseif not admins[p] then
  310.         table.insert(admins, #admins+1, p)
  311.         table.insert(banneds, #banneds+1, p)
  312.     end
  313.     if not info[p] then
  314.         data = {
  315.             ["time"] = os.time();
  316.             ["ads"] = true;
  317.             ["adstime"] = os.time();
  318.             ["count"] = 5;
  319.             ["text"] = ads[math.random(#ads)];
  320.         }
  321.         info[p] = data
  322.     elseif info[p] and Ads == true then
  323.         info[p].text = ads[math.random(#ads)]
  324.         info[p].count = 5
  325.         info[p].adstime = os.time()
  326.     end
  327. end
  328.  
  329. for p in pairs(tfm.get.room.playerList) do
  330.     eventNewPlayer(p)
  331. end
  332.  
  333. function doTranslate(message)
  334.     if translations[tfm.get.room.community] and translations[tfm.get.room.community][message] then
  335.         return translations[tfm.get.room.community][message]
  336.     else
  337.         return translations.EN[message]
  338.     end
  339. end
  340.  
  341. function eventChatCommand(p,c)
  342.     if (c == [[help]]) then
  343.         ui.addTextArea(4,doTranslate([[help]])[players[p].helpid],p,250,50,300,300,0x300,0x300,0.8, true);
  344.         ui.addTextArea(5,[[<p align='center'><a href='event:previous'><b>«</b></a></p>]],p,500,365,16,16,0x300,0x300,0.8, true);
  345.         ui.addTextArea(6,[[<p align='center'><a href='event:next'><b>»</b></a></p>]],p,532,365,16,16,0x300,0x300,0.8, true);
  346.         ui.addTextArea(7,[[<p align='center'><a href='event:close'><b>Close</b></a></p>]],p,442,365,42,16,0x300,0x300,0.8, true);
  347.         ui.addTextArea(8,[[<p align='center'>]]..players[p].helpid..[[/]]..#doTranslate([[help]])..[[</p>]],p,250,365,42,16,0x300,0x300,0.8, true);
  348.     elseif (c == [[mort]]) then
  349.             tfm.exec.killPlayer(p)
  350.     elseif (c:sub(0,6) == [[report]]) and not banneds[p] == true then
  351.         for str,num in pairs(tfm.get.room.playerList) do
  352.             if (str == c:sub(8)) then
  353.                 port=port+1
  354.                 table.insert(Reportados,port,[[<BV>]]..p..[[ <N>Reportou <R>]]..str..[[]])
  355.             end
  356.         end
  357.     elseif c:sub(0,3) == [[msg]] and admins[p] == true then
  358.         newMsg(p, c:sub(5))
  359.     end
  360. end
  361.  
  362. function eventTextAreaCallback(t,p,c)
  363.     if c == [[help]]then
  364.         eventChatCommand(p,c)
  365.     elseif c == [[close]] then
  366.         players[p].helpid = 1
  367.         if t == 7 then
  368.             for i = 4,8 do
  369.                 ui.removeTextArea(i,p)
  370.             end
  371.         elseif t == 24 then
  372.             for i = 23,25 do
  373.                 ui.removeTextArea(i,p)
  374.             end
  375.         elseif t == 16 then
  376.             for i = 14,17 do
  377.                 ui.removeTextArea(i,p)
  378.             end
  379.         elseif t == 73 then
  380.             for i = 51, 76 do
  381.                 ui.removeTextArea(i,p)
  382.             end
  383.         elseif t == 9 then
  384.             ui.removeTextArea(9,p)
  385.         end
  386.     elseif c == [[addmapa]] then
  387.         ui.addPopup(21, 2, [[Code map:]], p, 300, 200, 200, true)
  388.     elseif c == [[mudarlist]] then
  389.         ui.addPopup(22, 2, [[Maplist available:]]..concatedLists(), p, 300, 100, 200, true)
  390.     elseif c == [[addlist]] then
  391.         ui.addPopup(23, 2, [[Name of list:]], p, 300, 200, 200, true)
  392.     elseif c == [[fecharlistademapaes]] then
  393.         for i = 18, 22 do
  394.             ui.removeTextArea(i, p)
  395.         end
  396.     elseif c:sub(1,10) == [[deletemap_]] then
  397.         ui.addPopup(24, 1, [[Do you really want to delete the map]]..c:sub(11)..[[ of maplist? o.Õ]], p, 300, 200, 200, true)
  398.         temp1 = c:sub(11)
  399.     elseif c == [[next]] and players[p].helpid<#doTranslate([[help]]) then
  400.         players[p].helpid=(players[p].helpid)+1
  401.         ui.updateTextArea(4,doTranslate([[help]])[players[p].helpid],p);
  402.         ui.updateTextArea(8,[[<p align='center'>]]..players[p].helpid..[[/]]..#doTranslate([[help]])..[[</p>]],p);
  403.     elseif c == [[previous]] and players[p].helpid>1 then
  404.         players[p].helpid=players[p].helpid-1
  405.         ui.updateTextArea(4,doTranslate([[help]])[players[p].helpid],p);
  406.         ui.updateTextArea(8,[[<p align='center'>]]..players[p].helpid..[[/]]..#doTranslate([[help]])..[[</p>]],p);
  407.     elseif c == [[panel]] then
  408.         ui.addTextArea(9,[[<br><b>Functions:</b><br><a href='event:administer'>Administer</a><br><a href='event:mapconf'>Configure map</a><br><a href='event:playerconf'>Configure users</a><br><a href='event:maps'>Rotating</a><br><a href='event:skill'>Skills</a><br><b><a href='event:close'><p align='right'>Close</p></a></b>]], p, 481 ,10, 100, nil, 0x300, 0x300, 0.8, true);        
  409.     elseif c == [[maps]] then
  410.         ui.addTextArea(9, [[<br><b>Categories:</b><br><a href='event:rotating'>Aleatory</a><br><a href='event:rotatingart'>Art</a><br><a href='event:rotatingbootcamp'>Bootcamp</a><br><a href='event:rotatingdefilante'>Defilante</a><br><a href='event:rotatingmecanic'>Mecanic</a><br><a href='event:rotatingracing'>Racing</a><br><a href='event:rotatingsurvivor'>Survivor</a><br><a href='event:rotatingvampire'>Vampire</a><br><a href='event:rotatingvanilla'>Vanilla</a><br><br><b>Maps:</b><br><a href='event:mapsconf'>Settings</a><br><b><a href='event:panel'><p align='right'>Return</p></a><b>]], p, 481, 10, 100, nil, 0x300, 0x300, 0.8, true);
  411.     elseif c == [[skill]] then
  412.         ui.addTextArea(9, [[<br><b>Skills:</b><br><a href='event:fly'>Fly</a><br><a href='event:jump'>Jump</a><br><a href='event:nameflashing'>Name Flashing</a><br><a href='event:speed'>Speed</a><br><a href='event:teleport'>Teleport</a><br><a href='event:telejump'>TeleJump</a><br><b><a href='event:panel'><p align='right'>Return</p></a><b>]], p, 481, 10, 100, nil, 0x300, 0x300, 0.8, true);
  413.     elseif c == [[administer]] then
  414.         if master[p] == true then
  415.             ui.addTextArea(9, [[<br><b>Administer:</b><br><a href='event:ban'>Ban</a><br><a href='event:unban'>Unban</a><br><a href='event:addadmin'>Give Admin.</a><br><a href='event:removeadmin'>Remove Admin.</a><br><a href='event:alert'>Alert</a><br><a href='event:disconnect'>Disconnect Lua</a><br><b><a href='event:panel'><p align='right'>Return</p></a><b>]], p, 481, 10, 100, nil, 0x300, 0x300, 0.8, true);
  416.         elseif not master[p] then
  417.             ui.addTextArea(9, [[<br><b>Administer:</b><br><a href='event:ban'>Ban</a><br><a href='event:unban'>Unban</a><br><a href='event:alert'>Alert</a><br><b><a href='event:panel'><p align='right'>Return</p></a><b>]], p, 481, 10, 100, nil, 0x300, 0x300, 0.8, true);
  418.         end
  419.     elseif c == [[playerconf]] then
  420.         ui.addTextArea(9, [[<br><b>Settings:</b><br><a href='event:cheese'>Cheese</a><br><a href='event:hole'>Hole</a><br><a href='event:kill'>Kill</a><br><a href='event:meep'>Meep</a><br><a href='event:respawn'>Respawn</a><br><a href='event:score'>Score</a><br><a href='event:sha'>Shaman</a><br><a href='event:vamp'>Vampire</a><br><a href='event:win'>Win</a><br><b><a href='event:panel'><p align='right'>Return</p></a><b>]], p, 481, 10, 100, nil, 0x300, 0x300, 0.8, true);
  421.     elseif c == [[mapconf]] then
  422.         ui.addTextArea(9, [[<br><b>Settings:</b><br><a href='event:mapname'>Map name</a><br><a href='event:neige'>Neige</a><br><a href='event:np'>Np</a><br><a href='event:shaname'>Shaman name</a><br><a href='event:time'>Time</a><br><b><a href='event:panel'><p align='right'>Return</p></a><b>]], p, 481, 10, 100, nil, 0x300, 0x300, 0.8, true);
  423.     elseif c == [[mapsconf]] then
  424.         ui.addTextArea(18, [[<N>Maps: <br>]]..concatedMaps(), p, 240, 50, 320, 255, 768, 768, 0.8, true)
  425.         ui.addTextArea(19, [[<N><p align='center'><a href='event:addmapa'>New map</a>]], p, 240, 320, 100, 20, 768, 768, 0.8, true)
  426.         ui.addTextArea(20, [[<N><p align='center'><a href='event:mudarlist'>Change list</a>]], p, 355, 320, 90, 20, 768, 768, 0.8, true)
  427.         ui.addTextArea(21, [[<N><p align='center'><a href='event:addlist'>New maplist</a>]], p, 460, 320, 100, 20, 768, 768, 0.8, true)
  428.         ui.addTextArea(22, [[<N><p align='center'><a href='event:fecharlistademapaes'>Close</a>]], p, 240, 355, 320, 20, 768, 768, 0.8, true)
  429.     elseif c == [[logs]] then
  430.         ui.addTextArea(9, [[<br><b>Logs:</b><br><a href='event:actions'>Actions</a><br><a href='event:log'>Reports</a><br><b><a href='event:close'><p align='right'>Close</p></a><b>]], p, 481, 10, 100, nil, 0x300, 0x300, 0.8, true);
  431.     elseif c == [[log]] then
  432.         eventReportsLog(0)
  433.     elseif c == [[log2]] then
  434.         eventReportsLog(20)
  435.     elseif c == [[log3]] then
  436.         eventReportsLog(40)
  437.     elseif c == [[log4]] then
  438.         eventReportsLog(60)
  439.     elseif c == [[log5]] then
  440.         eventReportsLog(80)
  441.     elseif c == [[actions]] then
  442.         ui.addTextArea(23, log, p, 50, 60, 700, 290, 768, 768, 0.8, true);
  443.         ui.addTextArea(24, [[<p align='right'><a href='event:close'><b>Close</b></a></p>]], p, 700, 333, 50, 25, 768, 768, 0, true);
  444.         ui.addTextArea(25, [[<p align='right'><a href='event:reset'><b>Clear</b></a></p>]], p, 700, 60, 50, 25, 768, 768, 0, true);
  445.     elseif c == [[reset]] then
  446.         if t == 75 then
  447.             port  =0
  448.             for i = 1, 100 do
  449.                 table.insert(Reportados,i,[[-]])
  450.             end
  451.             for i = 51, 76 do
  452.                 ui.removeTextArea(i,p)
  453.             end
  454.         elseif t == 25 then
  455.             log = [[<ROSE>[~Log] <N>Log reset by ]]..p..[[]]
  456.             for i = 23, 25 do
  457.                 ui.removeTextArea(i,p)
  458.             end
  459.         end
  460.     elseif c == [[kill]] then
  461.         ui.addPopup(0,2,[[Digite o usuário]],p,300,160,200, true);
  462.     elseif c == [[cheese]] then
  463.         ui.addPopup(1,2,[[Digite o usuário]],p,300,160,200, true);
  464.     elseif c == [[meep]] then
  465.         ui.addPopup(2,2,[[Digite o usuário]],p,300,160,200, true);
  466.     elseif c == [[sha]] then
  467.         ui.addPopup(3,2,[[Digite o usuário]],p,300,160,200, true);
  468.     elseif c == [[vamp]] then
  469.         ui.addPopup(4,2,[[Digite o usuário]],p,300,160,200, true);
  470.     elseif c == [[neige]] then
  471.         tfm.exec.snow(30, 10)
  472.         ui.addPopup(5,3,[[Neve ativado com Sucesso!]],p,300,160,200, true);
  473.     elseif c == [[time]] then
  474.         ui.addPopup(6,2,[[Digite o tempo]],p,300,160,200, true);
  475.     elseif c == [[np]] then
  476.         ui.addPopup(7,2,[[Digite o Mapa]],p,300,160,200, true);
  477.     elseif c == [[hole]] then
  478.         ui.addPopup(8,2,[[Digite o usuário]],p,300,160,200, true);
  479.     elseif c == [[respawn]] then
  480.         ui.addPopup(9,2,[[Digite o usuário]],p,300,160,200, true);
  481.     elseif c == [[score]] then
  482.         ui.addPopup(10,2,[[Digite o usuário]],p,300,160,200, true);
  483.     elseif c == [[mapname]] then
  484.         ui.addPopup(11,2,[[Digite o texto]],p,300,160,200, true);
  485.     elseif c == [[shaname]] then
  486.         ui.addPopup(12,2,[[Digite o texto]],p,300,160,200, true);
  487.     elseif c == [[disconnect]] then
  488.         ui.addPopup(13,0,[[Lua Disconectado com Sucesso!]],p,300,160,200, true);
  489.         system.exit()
  490.     elseif c == [[win]] then
  491.         ui.addPopup(14,2,[[Digite o usuário]],p,300,160,200, true);
  492.     elseif c == [[maxp]] then
  493.         ui.addPopup(15,2,[[Digite a quantidade]],p,300,160,200, true);
  494.     elseif c == [[alert]] then
  495.         ui.addPopup(16,2,[[Digite o texto]],p,300,160,200, true);
  496.     elseif c == [[closet]] then
  497.         ui.removeTextArea(9,p);
  498.     elseif c == [[closeur]] then
  499.         ui.removeTextArea(94,p);
  500.     elseif c == [[addadmin]] then
  501.         ui.addPopup(17,2,[[Digite o usuário]],p,300,160,200, true);
  502.     elseif c == [[removeadmin]] then
  503.         ui.addPopup(18,2,[[Digite o usuário]],p,300,160,200, true);
  504.     elseif c == [[ban]] then
  505.         ui.addPopup(19,2,[[Digite o usuário]],p,300,160,200, true);
  506.     elseif c == [[unban]] then
  507.         ui.addPopup(20,2,[[Digite o usuário]],p,300,160,200, true);
  508.     elseif c == [[teleport]] then
  509.         if Teleport == false then
  510.             Teleport = true
  511.             TeleJump = false
  512.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ Teleport Ativado.]]
  513.         elseif Teleport == true then
  514.             Teleport = false
  515.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ Teleport Desativado.]]
  516.         end
  517.     elseif c == [[speed]] then
  518.         if Speed == false then
  519.             Speed = true
  520.             Jump = false
  521.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ Speed Ativado.]]
  522.         elseif Speed == true then
  523.             Speed = false
  524.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ Speed Ativado.]]
  525.         end
  526.     elseif c == [[fly]] then
  527.         if Fly == false then
  528.             Fly = true
  529.             Jump = false
  530.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ Fly Ativado.]]
  531.         elseif Fly == true then
  532.             Fly = false
  533.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ Fly Desativado.]]
  534.         end
  535.     elseif c == [[jump]] then
  536.         if Jump == false then
  537.             Jump = true
  538.             Fly = false
  539.             Speed = false
  540.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ Jump Ativado.]]
  541.         elseif Jump == true then
  542.             Jump = false
  543.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ Jump Desativado.]]
  544.         end
  545.     elseif c == [[telejump]] then
  546.         if TeleJump == false then
  547.             TeleJump = true
  548.             Teleport = false
  549.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ TeleJump Ativado.]]
  550.         elseif TeleJump == true then
  551.             TeleJump = false
  552.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ TeleJump Desativado.]]
  553.         end
  554.     elseif c == [[nameflashing]] then
  555.         if NameFlashing == false then
  556.             NameFlashing = true
  557.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ Nome Piscando Ativado.]]
  558.         elseif NameFlashing == true then
  559.             NameFlashing = false
  560.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ Nome Piscando Desativado.]]
  561.         end
  562.     elseif c == [[closechat]] then
  563.         for i = 10,13 do
  564.             ui.removeTextArea(i, p)
  565.         end
  566.     elseif c == [[resetchat]] then
  567.         txtChat = "<VP><B>[~Bot]</B> <N>Bem vindo ao painel Admin!";
  568.         ui.updateTextArea(10, txtChat, p)
  569.         ui.updateTextArea(11, " X", p)
  570.         ui.addTextArea(12, [[<p align='right'><a href='event:closechat'><b>Close</b></a></p>]], p, 700, 333, 50, 25, 768, 768, 0, true);
  571.         ui.addTextArea(13, [[<p align='right'><a href='event:resetchat'><b>Clear</b></a></p>]], p, 700, 60, 50, 25, 768, 768, 0, true);
  572.     elseif c == [[chat]] then
  573.         ui.addTextArea(10, txtChat, p, 50, 60, 700, 290, 768, 768, 0.8, true)
  574.         ui.addTextArea(12, [[<p align='right'><a href='event:closechat'><b>Close</b></a></p>]], p, 700, 333, 50, 25, 768, 768, 0, true);
  575.         ui.addTextArea(13, [[<p align='right'><a href='event:resetchat'><b>Clear</b></a></p>]], p, 700, 60, 50, 25, 768, 768, 0, true);
  576.     elseif c == [[Rotação]] then
  577.         if Rotating == false then
  578.             Rotating = true
  579.             Vanilla = false
  580.             Defilante = false
  581.             Bootcamp = false
  582.             Racing = false
  583.             Art = false
  584.             Mecanic = false
  585.             Survivor = false
  586.             Vampire = false
  587.             nextRound()
  588.             tfm.exec.disableAutoNewGame(true)
  589.             tfm.exec.disableAutoShaman(false)
  590.             tfm.exec.disableAfkDeath(false)
  591.             tfm.exec.disableAutoTimeLeft(false)
  592.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ activated rotation maps.]]
  593.         elseif Rotating == true then
  594.             Rotating = false
  595.             tfm.exec.disableAutoNewGame(false)
  596.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ deactivated rotation maps.]]
  597.         end
  598.     elseif c == [[rotatingvanilla]] then
  599.         if Vanilla == false then
  600.             Rotating = false
  601.             Vanilla = true
  602.             Defilante = false
  603.             Bootcamp = false
  604.             Racing = false
  605.             Art = false
  606.             Mecanic = false
  607.             Survivor = false
  608.             Vampire = false
  609.             nextRound()
  610.             tfm.exec.disableAutoNewGame(true)
  611.             tfm.exec.disableAutoShaman(false)
  612.             tfm.exec.disableAfkDeath(false)
  613.             tfm.exec.disableAutoTimeLeft(false)
  614.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ activated rotation maps vanilla.]]
  615.         elseif Vanilla == true then
  616.             Vanilla = false
  617.             tfm.exec.disableAutoNewGame(false)
  618.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ deactivated rotation maps vanilla.]]
  619.         end
  620.     elseif c == [[rotatingart]] then
  621.         if Art == false then
  622.             Rotating = false
  623.             Vanilla = false
  624.             Defilante = false
  625.             Bootcamp = false
  626.             Racing = false
  627.             Art = true
  628.             Mecanic = false
  629.             Survivor = false
  630.             Vampire = false
  631.             nextRound()
  632.             tfm.exec.disableAutoNewGame(true)
  633.             tfm.exec.disableAutoShaman(false)
  634.             tfm.exec.disableAfkDeath(false)
  635.             tfm.exec.disableAutoTimeLeft(false)
  636.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ activated rotation maps art.]]
  637.         elseif Art == true then
  638.             Art = false
  639.             tfm.exec.disableAutoNewGame(false)
  640.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ deactivated rotation maps art.]]
  641.         end
  642.     elseif c == [[rotatingdefilante]] then
  643.         if Defilante == false then
  644.             Rotating = false
  645.             Vanilla = false
  646.             Defilante = true
  647.             Bootcamp = false
  648.             Racing = false
  649.             Art = false
  650.             Mecanic = false
  651.             Survivor = false
  652.             Vampire = false
  653.             nextRound()
  654.             tfm.exec.disableAutoNewGame(true)
  655.             tfm.exec.disableAutoShaman(false)
  656.             tfm.exec.disableAfkDeath(false)
  657.             tfm.exec.disableAutoTimeLeft(false)
  658.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ activated rotation maps defilante.]]
  659.         elseif Defilante == true then
  660.             Defilante = false
  661.             tfm.exec.disableAutoNewGame(false)
  662.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ deactivated rotation maps defilante.]]
  663.         end
  664.     elseif c == [[rotatingbootcamp]] then
  665.         if Bootcamp == false then
  666.             Rotating = false
  667.             Vanilla = false
  668.             Defilante = false
  669.             Bootcamp = true
  670.             Racing = false
  671.             Art = false
  672.             Mecanic = false
  673.             Survivor = false
  674.             Vampire = false
  675.             tfm.exec.disableAutoShaman(true)
  676.             tfm.exec.disableAutoNewGame(true)
  677.             tfm.exec.disableAfkDeath(true)
  678.             tfm.exec.disableAutoTimeLeft(true)
  679.             nextRound()
  680.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ activated rotation maps bootcamp.]]
  681.         elseif Bootcamp == true then
  682.             Bootcamp = false
  683.             tfm.exec.disableAutoShaman(false)
  684.             tfm.exec.disableAutoNewGame(false)
  685.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ deactivated rotation maps bootcamp.]]
  686.         end
  687.     elseif c == [[rotatingracing]] then
  688.         if Racing == false then
  689.             Rotating = false
  690.             Vanilla = false
  691.             Defilante = false
  692.             Bootcamp = false
  693.             Racing = true
  694.             Art = false
  695.             Mecanic = false
  696.             Survivor = false
  697.             Vampire = false
  698.             nextRound()
  699.             tfm.exec.disableAutoNewGame(true)
  700.             tfm.exec.disableAutoShaman(false)
  701.             tfm.exec.disableAfkDeath(false)
  702.             tfm.exec.disableAutoTimeLeft(false)
  703.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ activated rotation maps racing.]]
  704.         elseif Racing == true then
  705.             Racing = false
  706.             tfm.exec.disableAutoNewGame(false)
  707.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ deactivated rotation maps racing.]]
  708.         end
  709.     elseif c == [[rotatingmecanic]] then
  710.         if Mecanic == false then
  711.             Rotating = false
  712.             Vanilla = false
  713.             Defilante = false
  714.             Bootcamp = false
  715.             Racing = false
  716.             Art = false
  717.             Mecanic = true
  718.             Survivor = false
  719.             Vampire = false
  720.             nextRound()
  721.             tfm.exec.disableAutoNewGame(true)
  722.             tfm.exec.disableAutoShaman(false)
  723.             tfm.exec.disableAfkDeath(false)
  724.             tfm.exec.disableAutoTimeLeft(false)
  725.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ activated rotation maps mecanic.]]
  726.         elseif Mecanic == true then
  727.             Mecanic = false
  728.             tfm.exec.disableAutoNewGame(false)
  729.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ deactivated rotation maps mecanic.]]
  730.         end
  731.     elseif c == [[rotatingsurvivor]] then
  732.         if Survivor == false then
  733.             Rotating = false
  734.             Vanilla = false
  735.             Defilante = false
  736.             Bootcamp = false
  737.             Racing = false
  738.             Art = false
  739.             Mecanic = false
  740.             Survivor = true
  741.             Vampire = false
  742.             nextRound()
  743.             tfm.exec.disableAutoNewGame(true)
  744.             tfm.exec.disableAutoShaman(false)
  745.             tfm.exec.disableAfkDeath(false)
  746.             tfm.exec.disableAutoTimeLeft(false)
  747.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ activated rotation maps survivor.]]
  748.         elseif Survivor == true then
  749.             Survivor = false
  750.             tfm.exec.disableAutoNewGame(false)
  751.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ deactivated rotation maps survivor.]]
  752.         end
  753.     elseif c == [[rotatingvampire]] then
  754.         if Vampire == false then
  755.             Rotating = false
  756.             Vanilla = false
  757.             Defilante = false
  758.             Bootcamp = false
  759.             Racing = false
  760.             Art = false
  761.             Mecanic = false
  762.             Survivor = false
  763.             Vampire = true
  764.             nextRound()
  765.             tfm.exec.disableAutoNewGame(true)
  766.             tfm.exec.disableAutoShaman(false)
  767.             tfm.exec.disableAfkDeath(false)
  768.             tfm.exec.disableAutoTimeLeft(false)
  769.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ activated rotation maps vampire.]]
  770.         elseif Vampire == true then
  771.             Vampire = false
  772.             tfm.exec.disableAutoNewGame(false)
  773.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ deactivated rotation maps vampire.]]
  774.         end
  775.     end
  776. end
  777.  
  778. function eventPopupAnswer(pi,p,a)
  779.     for a in pairs(tfm.get.room.playerList) do
  780.         if (l == a) then
  781.             if pi == 0 then
  782.                 tfm.exec.killPlayer(l)
  783.                 log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ killed ]]..l..[[.]]
  784.             elseif pi == 1 then
  785.                 tfm.exec.giveCheese(l)
  786.                 log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ gave cheese to ]]..l..[[.]]
  787.             elseif pi == 2 then
  788.                 tfm.exec.giveMeep(l)
  789.                 log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ gave to meep ]]..l..[[.]]
  790.             elseif pi == 3 then
  791.                 tfm.exec.setShaman(l)
  792.                 log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ gave shaman to ]]..l..[[.]]
  793.             elseif pi == 4 then
  794.                 tfm.exec.setVampirePlayer(l)
  795.                 log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ gave vampire to ]]..l..[[.]]
  796.             elseif pi == 5 then
  797.                 log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ connected/disconnected the snow.]]
  798.             elseif pi == 8 then
  799.                 tfm.exec.playerVictory(l)
  800.                 log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ gave hole to ]]..l..[[.]]
  801.             elseif pi == 9 then
  802.                 tfm.exec.respawnPlayer(l)
  803.                 log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ resurrected ]]..l..[[.]]
  804.             elseif pi == 10 then
  805.                 tfm.exec.setPlayerScore(l,0,false)
  806.                 log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ restarted the score ]]..l..[[ for 0 points.]]
  807.             elseif pi == 13 then
  808.                 log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ disconnect the Lua.]]
  809.             elseif pi == 14 then
  810.                 tfm.exec.giveCheese(l)
  811.                 tfm.exec.playerVictory(l)
  812.                 log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ gave cheese and hole to ]]..l..[[.]]
  813.             elseif pi == 17 then
  814.                 eventGiveAdmin(l)
  815.                 log = log..[[<br><ROSE>[~Alert] <N>]]..p..[[ gave adminitrador to ]]..l..[[]]
  816.             elseif pi == 18 then
  817.                 admins[l] = false
  818.                 tfm.exec.setNameColor(l, 0x0)
  819.             for i in pairs({1,2,3,9}) do
  820.                 ui.removeTextArea(i,a)
  821.             end
  822.                 log = log..[[<br><ROSE>[~Alert] <N>]]..p..[[ removed adminitrador of ]]..l..[[]]
  823.             elseif pi == 19 then
  824.                 banneds[l] = true
  825.                 tfm.exec.killPlayer(l)
  826.                 log = log..[[<br><ROSE>[~Alert] <N>]]..p..[[ banned ]]..l..[[]]
  827.                 ui.addTextArea(452, [[Oi]], l, -1000, -1000, 2800, 2800, 768, 768, 1.1);
  828.             elseif pi == 20 then
  829.                 banneds[l] = false
  830.                 log = log..[[<br><ROSE>[~Alert] <N>]]..p..[[ desbanned ]]..l..[[]]
  831.                 ui.removeTextArea(452, l);
  832.             end
  833.         end
  834.     end
  835.         if pi == 6 then
  836.             tfm.exec.setGameTime(a)
  837.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ change the time to ]]..a..[[s.]]
  838.         elseif pi == 7 then
  839.             tfm.exec.newGame(a)
  840.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ changed the map to ]]..a..[[.]]
  841.         elseif pi == 15 then
  842.             tfm.exec.setRoomMaxPlayers(a)
  843.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ changed the limit of peoples to ]]..a..[[.]]
  844.         elseif pi == 16 then
  845.             ui.addPopup(16,0,[[<font color='#ED67EA'>[~]]..p..[[] </font>]]..a..[[]],nil,300,160,200);
  846.             log = log..[[<br><ROSE>[~Alert] <N>]]..p..[[ sent the message: ]]..a..[[.]]
  847.         elseif pi == 11 then
  848.             tfm.exec.setUIMapName(a)
  849.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ changed the name of the map to ]]..a..[[.]]
  850.         elseif pi == 12 then
  851.             tfm.exec.setUIShamanName(a)
  852.             log = log..[[<br><ROSE>[~Log] <N>]]..p..[[ changed the name of the shaman to ]]..a..[[.]]
  853.         elseif pi == 21 then
  854.             if a:find([[@]]) then
  855.                 if tonumber(a:sub(2)) ~= nil then
  856.                     table.insert(maps[currentMaplist], a)
  857.                 end
  858.             else
  859.                 if tonumber(a) ~= nil then
  860.                     table.insert(maps[currentMaplist], a)
  861.                 end
  862.             end
  863.             ui.addTextArea(18, [[<N>Mapas: <br>]]..concatedMaps(), p, 240, 50, 320, 255, 768, 768, 0.8, true)
  864.         elseif pi == 23 then
  865.             if not a:find([[ ]]) then
  866.                 maps[a] = {[[0]]}
  867.                 ui.addTextArea(18, [[<N>Mapas: <br>]]..concatedMaps(), p, 240, 50, 320, 255, 768, 768, 0.8, true)
  868.             end
  869.         elseif pi == 22 then
  870.             for list,_ in pairs(maps) do
  871.                 if list:lower() == a:lower() then
  872.                     currentMaplist = a
  873.                     break;
  874.                 end
  875.             end
  876.             ui.updateTextArea(18, [[<N>Mapas: <br>]]..concatedMaps(), p)
  877.         elseif pi == 24 then
  878.             if a:lower() == [[yes]] or a:lower() == [[sim]] then
  879.                 for i,map in pairs(maps[currentMaplist]) do
  880.                     if maps[currentMaplist][i] == temp1 then
  881.                         table.remove(maps[currentMaplist], i)
  882.                         ui.addTextArea(18, [[<N>Mapas: <br>]]..concatedMaps(), p, 240, 50, 320, 255, 768, 768, 0.8, true)
  883.                         break;
  884.                     end
  885.                 end
  886.             end
  887.         end
  888. end
  889.  
  890. function eventKeyboard(p,k,d,x,y)
  891.     if Fly == true then
  892.         if k == 32 then
  893.             tfm.exec.movePlayer(p,0,-1,true,0,-49,false)
  894.         end
  895.     elseif Jump == true then
  896.         if k == 32 and tfm.get.room.playerList[p].isJumping == false and info[p].time < os.time()-2500 then
  897.             info[p].time = os.time()
  898.             tfm.exec.movePlayer(p, 0, 0, false, 0, -100, false)
  899.         end
  900.     elseif Speed == true then
  901.         if k == 32 and tfm.get.room.playerList[p].isFacingRight == true and info[p].time < os.time()-1500 then
  902.             info[p].time = os.time()
  903.             tfm.exec.movePlayer(p,0,0,true,100,0,false)
  904.         elseif k == 32 and tfm.get.room.playerList[p].isFacingRight == false and info[p].time < os.time()-1500 then
  905.             info[p].time = os.time()
  906.             tfm.exec.movePlayer(p,0,0,true,-100,0,false)
  907.         end
  908.     elseif k == 77 and admins[p] == true then
  909.         eventTextAreaCallback(t,p,[[log]])
  910.     end
  911. end
  912.  
  913. function eventMouse(p, x, y)
  914.     if Teleport == true then
  915.         tfm.exec.movePlayer(p, x, y, false, vx, vy, false)
  916.     elseif TeleJump == true then
  917.         tfm.exec.movePlayer(p, x, y, false, 0, -100, false)
  918.     end
  919. end
Advertisement
Add Comment
Please, Sign In to add comment