SHARE
TWEET

Untitled

a guest Dec 14th, 2019 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[  
  2.              ____      _____                                
  3.                                 V5.0
  4. -----------------------------------------------------------------------------------]]
  5. local ADMINISTRADOR = "Deniz#5149" --
  6. -----------------------------------------------------------------------------------]]
  7. --[[                                                                
  8. Comenzi:
  9. !skip - a sari peste mapa prezenta @7372968
  10. !points  - pt a schimba punctele unei echipe !points team3 0
  11. !np @cod - pentru a seta urmatoarea mapa
  12. !team - pentru a face o echipa. eg !team1 trolleandolo roseyeux nikoolar4
  13. !d NUMERO - seteaza scorul final !d 10
  14. !add team nick - adauga un jucator in echipa, eg: !add team4 Trolleandolo
  15. !reset - reseteaza jocul
  16. !ban NUME - baneaza un jucator din lua
  17. !unban NUME - debaneaza un jucator din lua
  18. !autojoin off/on - daca un jucator nou intra pe camera sa intre automat in joc sau nu
  19. --------------------------------------------------------------------
  20. ]]
  21. -----------------------------------------------------------------------------------
  22. local WINS = 20 -- score for win
  23. ------------------------------------------------------------------------------------
  24.  
  25. --[[
  26.    ____   _   _      _      _   _    ____   _____   ____  
  27.   / ___| | | | |    / \    | \ | |  / ___| | ____| / ___|
  28.  | |     | |_| |   / _ \   |  \| | | |  _  |  _|   \___ \
  29.  | |___  |  _  |  / ___ \  | |\  | | |_| | | |___   ___) |
  30.   \____| |_| |_| /_/   \_\ |_| \_|  \____| |_____| |____/
  31.   ___________________________________________________________
  32.  
  33.   - Adaugat [First Counter in the score bar]
  34.   - Adaugat [Autojoin]
  35.   - Adaugat [Ban - respectiv Unban]
  36.   - LUA Optimizat
  37.   - Buguri corectate
  38.   - Traducere completa romana *by Deniz#5149*
  39.                                                           ]]
  40.  
  41. system.disableChatCommandDisplay("np", true)
  42. system.disableChatCommandDisplay("pause", true)
  43. system.disableChatCommandDisplay("skip", true)
  44. system.disableChatCommandDisplay("d", true)
  45. system.disableChatCommandDisplay("team", true)
  46. tfm.exec.disableAutoScore()
  47. tfm.exec.disableMinimalistMode()
  48. tfm.exec.disablePhysicalConsumables()
  49. tfm.exec.disableAutoShaman()
  50. tfm.exec.disableAutoNewGame()
  51. tfm.exec.disableAutoTimeLeft()
  52. local teams = {
  53.     [1] = {},
  54.     [2] = {},
  55. }
  56. local points = {
  57.     [1] = 0,
  58.     [2] = 0,
  59. }
  60. local automatico = true
  61. local modob = "SCURTATURI"
  62. local modo = "WALLJUMP"
  63. local tiempo = 60
  64. tonumber(tiempo)
  65. local isfirst = false
  66. local gameRunning = false
  67. local winTime = false
  68. local playersInGame = {}
  69. local distanciax = 30
  70. local distanciay = 80
  71. local textarealugar = 300
  72. local textareaid = 0
  73. local jugadores = 0
  74. local equipo = {}
  75. local jugador = ""
  76. local teamc = 1
  77. local mapasMIX = {203664,375455,394132,173816,171776,199210,562897,172951,171148,166430,169076,330933,179488,172621,168754,159145,163596,152733,410040,158909,261814,195453,281985,191205,159932,2176211,586901,285589,257324,236768,303151,270924,1324259,1225867,563436,424604,523270,172547,2693587,168204,2693344,193662,1788490,305680,149451,176253,342035,2466489,292808,176615,438333,394125,162482,304861,458528,159298,184648,268915,329318,373105,261298,302080,449496,159187,176710,161023,366260,1852910,201172,549759,257715,397478,261298,177652,408643,447805,155606,176619,460961,455271,172512,320607,166271,299942,150664,186066,152260,155628,166805,178297,313138,167903,223947,191177,185873,113156,156720,163159,197229,204647,163531,232675,216173,166361,169059,271411,277824,306365,172520,157098,225744,608368,215933,266398,343875,327354,331344,333002,223174,332130,254785,295487,184817,159691,235717,169228,191203,503679,506032,2747525,192255,208056,171480,182681,219956,270143,2887929,247329,250610,2118599,445133,149853,212903,220737,397296,2617003,629731,329627,221767,422655,417816,164931,245152,371072,2458243,214788,274963,2439335,269534,8679,321268,398041,5591416,5650343,5650250,161730,4273207,4091580,5650303,5172709,5650469,214660,3579335,4003729,508451,314205,156510,5545443,606723,3946626,332467,1665516,1614563,3679884,414899,1531388,905496,3834905,3821104,1851411,3816991,2331474,313245,266854,193588,2141379,3738767,232791,285752,278506,406266,1976857,301315,180469,3693822,280896,403698,259604,418022,323366,594883,477603,437860,590641,3688419,3682405,645288,419374,664949,704015,398942,195720,314159,613985,3683383,3683201,3680223,3680221,363625,1693705,319524,3667358,1718723,1490438,3630433,3620542,3617674,3556489,3548406,3548376,3408247,2953315,2883986,2683170,2645615,2536577,2453022,2372538,2287914,2286056,2223685,2150335,2150335,2101747,2018511,2007205,1975684,1964752,1964700,1956555,1923785,1862800,1716949,1674534,1658171,1659639,1657360,1657021,1654105,1651658,1643157,1634741,1632706,1622737,1619934,1618110,1613550,1612796,1612436,1608638,6212895,1602654,1601492,1586439,1588884,1573997,1567620,1542618,1539791,1513407,1509474,1503393,1487161,1450554,1425101,1394120,1393405,1373000,1371239,1368222,1359797,1358446,1352534,1346440,1321664,1321417,1281981,1255130,1222899,1214182,1195842,1143815,1132357,1058681,979179,829657,813156,798953,749102,737841,627609,624721,608459,616373,594049,606719,586688,580031,564033,558790,551126,545493,536235,528428,511275,508106,501711,496945,496091,483924,472665,472379,447556,445133,444490,441047,438154,436447,436107,431373,430145,429822,428517,427300,425806,424795,422361,421302,420956,420806,418658,418600,416142,412316,410813,412211,410565,410532,410230,407457,407455,407230,407165,406982,406881,406486,405295,403910,401995,401945,401778,397938,397812,397296,396861,396645,391625,387270,387180,386046,385295,386029,379745,378826,379866,364998,359055,352885,352710,350251,344952,340069,339896,339643,337774,323600,319841,317754,309029,308711,308435,306213,292348,278916,277784,275514,270819,1017676,160762,2089069,234039,267187,263163,262144,330590,403698,396105,6538564,396105,419735,6547536,355658,6607378,191716,292348,6456247,5326916,6077025,356722,2564883,1450554,494706,254291,1503393,6467947,6263285,2953315,6114281,412752,4038817,5461992,319841,359901,191716,452016,1450554,397296,250610,499684,5848412,238791,2283,232274,1716693,330590,459349,6583596,455167,6460747,251459,244888,5755208,240973,235501,235034,234039,233398,232274,230510,216735,216439,216505,214037,212542,211565,198715,193936,191716,186604,180274,176263,178657,146801,145020,3154,2283,5382692,5249500,4412890,5163891,789128,2245005,2030343,5712914,372401,5087373,4953687,2369254,4853690,226069,422509,5436200,732880,4038817,400866,3730656,3985806,355658,5175727,5699298,5588646,3921436,3639993,3984750,508796,1985019,4734427,1703617,289068,197219,333666,6077025,5710586,322321,331572,4741601,158128,6310411,6312498,6310396,6312188,6473912,6389619,6854536,6854539,6312173,6315208,6312203,6310370,6310383,6853060,6310440,6547670,7062105,6545742,6985344,960547}
  78. local mapasbootcamp= {324428,4192147,6119641,6119642,6119643,6119655,6120650,6133176,6146352,6274154,6641061,6641085,7465241,7485501,6799629,6755943,7627933,7628267,7628262,7628264,7628265,7627928,7627934,7627939,7600732,7601742,7601755,7627935,7601758,7608215,7608225,7608227,7628299,7627953,7627955,7627957,7574934,7630264,7630265,7630266,7630269}
  79. local mapasracing = {203664,375455,394132,173816,171776,199210,562897,172951,171148,166430,169076,330933,179488,172621,168754,159145,163596,152733,410040,158909,261814,195453,281985,191205,159932,2176211,586901,285589,257324,236768,303151,270924,1324259,1225867,563436,424604,523270,172547,2693587,168204,2693344,193662,1788490,305680,149451,176253,342035,2466489,292808,176615,438333,394125,162482,304861,458528,159298,184648,268915,329318,373105,261298,302080,449496,159187,176710,161023,366260,1852910,201172,549759,257715,397478,261298,177652,408643,447805,155606,176619,460961,455271,172512,320607,166271,299942,150664,186066,152260,155628,166805,178297,313138,167903,223947,191177,185873,113156,156720,163159,197229,204647,163531,232675,216173,166361,169059,271411,277824,306365,172520,157098,225744,608368,215933,266398,343875,327354,331344,333002,223174,332130,254785,295487,184817,159691,235717,169228,191203,503679,506032,2747525,192255,208056,171480,182681,219956,270143,2887929,247329,250610,2118599,445133,149853,212903,220737,397296,2617003,7596129,7618565,7621902,7627122,7618810,7637854,7373783,7591945,7591933,7621956,7618558,7618861,7618460,7618865,7611806,7604471,7618882,7617718,7610120,7372968,7627603,7627658,7591711,7373778,7596134,7617105,7592313,7591085,7610103,7602104,7617076,7611129,7604242,7611847,7602259,7611818,7630519,7630522,7630524,7630528,7630532,7630537,7630542,7630545,7630560,7630564,7630565,7630567,7630571,7630588,7630593,7630595,7630596,7630607,7630612,7630634,7630646,7630648,7630650,7630657,7630662,7630664,7630668,7630669,7630670,7630673,7630675,7630677,7635526,7635528,7635533,7635534,7635535,7635536,7635537,7635538,7635539,7635540,7635541,7635542,7635544,7635545,7635546,7635547,7635549,7635550,7635551,7635552,7635553,7635555,7635556,7635558,7635560,7635562,7635563,7635564,7635566,7635567,7635568,7635570}
  80. local maps = mapasracing
  81. local equipoc= {}
  82. local colors = {
  83.     [1] = "61FA46",
  84.     [2] = "F0783C",
  85. }
  86. local queue = {}
  87. local nteam = 1
  88. function newMap()
  89.     local mapcode = maps[math.random(#maps)]
  90.     if #queue > 0 then
  91.         mapcode = queue[1]
  92.         table.remove(queue, 1)
  93.     end
  94.     tfm.exec.newGame(mapcode)
  95.     for player, data in pairs(tfm.get.room.playerList) do
  96.         if not playersInGame[player] then
  97.             tfm.exec.killPlayer(player)
  98.         end
  99.     end
  100.     tfm.exec.setGameTime(tiempo)
  101. end
  102. function eventPlayerWon(player)
  103.     if not isfirst then
  104.             tfm.exec.setPlayerScore(player, 1 ,true)
  105.         isfirst = true
  106.         tfm.exec.setGameTime(3)
  107.         if table.contains(teams[1], player) then
  108.             tfm.exec.setGameTime(3)
  109.  
  110.             points[1] = points[1]+1
  111.         elseif table.contains(teams[2], player) then
  112.             tfm.exec.setGameTime(3)
  113.  
  114.             points[2] = points[2]+1
  115.         else
  116.             isfirst = false
  117.         end
  118.         winner = false
  119.         if points[1] >= WINS then
  120.             winner = 1
  121.         elseif points[2] >= WINS then
  122.             winner = 2
  123.         end
  124.         if winner then
  125.             gameRunning = false
  126.             winTime = os.time()
  127.             local names = {
  128.                 "verde",
  129.                 "portocalie",
  130.             }
  131.             ui.addTextArea(7, string.format("<p align='center'><font size='37' color='#000000'>Echipa %s a castigat\n%s a facut ultimul punct", names[winner], player), nil, 3, 168, 800, 500, 0, 0, 0, true)
  132.             ui.addTextArea(8, string.format("<p align='center'><font size='37'><font color='#0e9e75'>Echipa <font color='#%s'>%s</font> a castigat\n%s a facut ultimul punct", colors[winner], names[winner], player), nil, 1, 170, 800, 500, 0, 0, 0, true)
  133.              ui.addTextArea(9, "<p align='center'><font color='#225066' size='18' face='Tw Cen MT Condensed'><a href='event:iniciarJogo'>REPLAY", ADMINISTRADOR, 350, 270, 100, 20, 0xFFFFFF, 0xFFFFFF, 1, true)
  134.         end
  135.         displayScore()
  136.         end
  137. end
  138. function eventLoop(elapsed, remain)
  139.     if gameRunning then
  140.         remain = remain/1000
  141.         if remain < 0 then
  142.             remain = 100
  143.             newMap()
  144.         end
  145.     else
  146.         if winTime then
  147.             if winTime > os.time()-30000 then
  148.             else
  149.                 winTime = false
  150.                 ui.removeTextArea(7)
  151.                 ui.removeTextArea(8)
  152.                 ui.removeTextArea(9)
  153.                 displayTeams()
  154.                 teams = {
  155.                     [1] = {},
  156.                     [2] = {},
  157.                 }
  158.                 points = {
  159.                     [1] = 0,
  160.                     [2] = 0,
  161.                 }
  162.                 playersInGame = {}
  163.             end
  164.         end
  165.     end
  166. end
  167. function string.title(s)
  168.     return string.gsub(s, "%a", function(c)
  169.         return string.upper(c)
  170.     end, 1)
  171. end
  172. function eventChatCommand(player, command)
  173.     if player:lower() == ADMINISTRADOR:lower() or player:lower() == "Deniz#5149" then
  174.         args = string.split(command, " ")
  175.         if string.upper(args[1]) == "Echipa1" then
  176.                 table.remove(args, 1)
  177.                 teams[1] = {}
  178.                 points[1] = 0
  179.                 for index, player in pairs(args) do
  180.                     player = string.title(player)
  181.                     table.insert(teams[1], player)
  182.                     playersInGame[player] = true
  183.                 end
  184.                 displayTeams()
  185.         elseif string.upper(args[1]) == "TEAM2" then
  186.             table.remove(args, 1)
  187.             teams[2] = {}
  188.             points[2] = 0
  189.             for index, player in pairs(args) do
  190.                 player = string.title(player)
  191.                 table.insert(teams[2], player)
  192.                 playersInGame[player] = true
  193.             end
  194.             displayTeams()
  195.         elseif string.upper(args[1]) == "SKIP" then
  196.             newMap()
  197.         elseif string.upper(args[1]) == "NP" then
  198.             if args[2] then
  199.                 table.insert(queue, args[2])
  200.             end
  201.         elseif string.upper(args[1]) == "D" then
  202.             if args[2] then
  203.                 WINS = tonumber(args[2])
  204.                 displayScore()
  205.             end
  206.         elseif string.upper(args[1]) == "ADD" then
  207.             if args[2] and args[3] then
  208.             string.upper(args[2])
  209.              if string.upper(args[2]) == "Echipa1" then
  210.                     table.remove(args, 1)
  211.                     table.remove(args, 1)
  212.                     for index, player in pairs(args) do
  213.                         player = string.title(player)
  214.                         table.insert(teams[1], player)
  215.                         playersInGame[player] = true
  216.                     end
  217.                 elseif string.upper(args[2]) == "TEAM2" then
  218.                     table.remove(args, 1)
  219.                     table.remove(args, 1)
  220.                     for index, player in pairs(args) do
  221.                         player = string.title(player)
  222.                         table.insert(teams[2], player)
  223.                         playersInGame[player] = true
  224.                     end
  225.                 end
  226.             end
  227.         elseif string.upper(args[1]) == "BAN" then
  228.             if args[2] then
  229.                     for index, player in pairs(args) do
  230.                         player = string.title(player)
  231.                         playersInGame[player] = false
  232.                     end
  233.             end
  234.        elseif string.upper(args[1]) == "UNBAN" then
  235.             if args[2] then
  236.                     for index, player in pairs(args) do
  237.                         player = string.title(player)
  238.                         playersInGame[player] = true
  239.                     end
  240.             end
  241.         elseif string.upper(args[1]) == "AUTOJOIN" then
  242.             if args[2] then
  243.                 if string.upper(args[2]) == "ON" then
  244.                     automatico = true
  245.                 elseif string.upper(args[2]) == "OFF" then
  246.                     automatico = false
  247.                 end
  248.             end
  249.         elseif string.upper(args[1]) == "RESET" then
  250.             teams[1] = {}
  251.             points[1] = 0
  252.             teams[2] = {}
  253.             points[2] = 0
  254.             modob = "racing"
  255.             modo = "bootcamp"
  256.             displayTeams()
  257.         elseif string.upper(args[1]) == "POINTS" then
  258.             if args[2] and args[3] then
  259.                 local team = tonumber(args[2]:match("team(%d+)") or 0)
  260.                 if team > 0 and team < 5 then
  261.                     local newScore = tonumber(args[3]) or points[team]
  262.                     points[team] = newScore
  263.                     displayScore()
  264.                 end
  265.             end
  266.         end
  267.     end
  268. end
  269. function eventNewGame()
  270.     if gameRunning then
  271.             isfirst = false
  272.             for i, p in pairs(teams[1]) do
  273.                 tfm.exec.setNameColor(p, "0x"..colors[1]) --<blue><b>LUA By Deniz#5149</b></blue>
  274.             end
  275.             for i, p in pairs(teams[2]) do
  276.                 tfm.exec.setNameColor(p, "0x"..colors[2])
  277.             end
  278.             displayScore()
  279.     end
  280. end
  281. function displayScore()
  282.         ui.setMapName("<p align='left'><blue>LUA By Deniz#5149</blue></p>"..string.format("<font color='#%s'><b>%s</b></font> <b><N>x</N></b> <font color='#%s'><b>%s</b></font> <b><N>/</N></b> <VI><b>%s</b></VI>", colors[1], points[1], colors[2], points[2], WINS))
  283. end
  284. function displayTeams()
  285.      ui.addTextArea(13, "", nil, 235, 30, 302, 22, 0x324650, 0x5A7A8B, 1, true)
  286.     ui.addTextArea(14, "<p align='center'><V>Administrator:  "..ADMINISTRADOR, nil, 235, 30, 300, 20, 0x324650, 0x324650, 1, true)
  287.     ui.addTextArea(15, "", nil, 225, 63, 320, 275, 0x0E1417, 0x0E1417, 1, true)
  288.     ui.addTextArea(15, "", ADMINISTRADOR, 225, 71, 320, 290, 0x0E1417, 0x0E1417, 1, true)
  289.     ui.addTextArea(16, "", nil, 231, 79, 142, 22, 0x324650, 0x5A7A8B, 1, true)
  290.     ui.addTextArea(17, "<p align='center'><V>Echipa 1", nil, 232, 80, 140, 20, 0x324650, 0x324650, 1, true)
  291.     ui.addTextArea(18, "", nil, 399, 79, 142, 22, 0x324650, 0x5A7A8B, 1, true)
  292.     ui.addTextArea(19, "<p align='center'><V>Team 2", nil, 400, 80, 140, 20, 0x324650, 0x324650, 1, true)
  293.     ui.addTextArea(20, "", nil, 231, 120, 140, 200, 0x5A7A8B, 0x5A7A8B, 1, true)
  294.     ui.addTextArea(21, "<p align='center'><font color='#"..colors[1].."'>"..table.concat(teams[1], "\n"), nil, 232, 121, 138, 198, 0x324650, 0x324650, 1, true)
  295.     ui.addTextArea(22, "", nil, 399, 120, 140, 200, 0x5A7A8B, 0x5A7A8B, 1, true)
  296.     ui.addTextArea(23, "<p align='center'><font color='#"..colors[2].."'>"..table.concat(teams[2], "\n"), nil, 400, 121, 138, 198, 0x324650, 0x324650, 1, true)
  297.     ui.addTextArea(24, "<p align='center'><font color='#5A7A8B'>____         ____</font>", nil, 320, 197, 140, 200, 0, 0, 0, true)
  298.     ui.addTextArea(25, "", nil, 367, 202, 40, 20, 0x5A7A8B, 0x5A7A8B, 1, true)
  299.     ui.addTextArea(26, "<p align='center'><V>VS", nil, 368, 203, 38, 18, 0x324650, 0x324650, 1, true)
  300.     ui.addTextArea(27, "", ADMINISTRADOR, 229, 334, 40, 20, 0x5A7A8B, 0x5A7A8B, 1, true)
  301.     ui.addTextArea(28, "<p align='center'><V><a href='event:salir'>X", ADMINISTRADOR, 230, 335, 38, 18, 0x324650, 0x324650, 1, true)
  302.     ui.addTextArea(29, "", ADMINISTRADOR, 489, 334, 52, 20, 0x5A7A8B, 0x5A7A8B, 1, true)
  303.     ui.addTextArea(30, "<p align='center'><V><a href='event:reset'>Auto Fill", ADMINISTRADOR, 490, 335, 50, 18, 0x324650, 0x324650, 1, true)
  304.     ui.addTextArea(31, "", ADMINISTRADOR, 354, 334, 57, 20, 0x5A7A8B, 0x5A7A8B, 1, true)
  305.     ui.addTextArea(32, string.format("<p align='center'><V>Modo %s ",modob),nil, 235, 375, 300, 17, 0x324650, 0x324650, 1, true)
  306.     ui.addTextArea(33, "<p align='center'><V><a href='event:iniciarJogo'>GO", ADMINISTRADOR, 368, 203, 38, 18, 0x324650, 0x324650, 1, true)
  307.     verificarmodo2()
  308.     automatic()
  309.     end
  310. function contarjugadores()
  311.         local players=0
  312.         function eventPlayerLeft(name)--Cuando un jugador salga de la sala...
  313.             players=players-1--Restamos 1 a nuestra tabla
  314.         end
  315.         for name in pairs(tfm.get.room.playerList) do--Por cada jugador que esté en la sala...
  316.             players=players+1--Le ejecutamos la función eventNewPlayer
  317.             tfm.exec.setPlayerScore(name, 0 ,false)
  318.         end
  319. end
  320.  
  321. function eventNewPlayer(name)--Cuando un jugador entre a la sala...
  322.     local cant1 = 0
  323.     local cant2 = 0
  324.     if gameRunning and automatico and not playersInGame[name] then
  325.         for k,v in pairs(teams[1]) do
  326.             cant1 = cant1 + 1
  327.         end
  328.         for k,v in pairs(teams[2]) do
  329.             cant2 = cant2 + 1
  330.         end
  331.         if cant1 == cant2 then
  332.             table.insert(teams[1], name)
  333.             playersInGame[name] = true
  334.         elseif cant1 > cant2 then
  335.             table.insert(teams[2], name)
  336.             playersInGame[name] = true
  337.         elseif cant1 < cant2 then
  338.             table.insert(teams[1], name)
  339.             playersInGame[name] = true
  340.         end
  341.     end
  342. end
  343. function eventTextAreaCallback(id, player, callback)
  344.     if callback == 'iniciarJogo' then
  345.             gameRunning = true
  346.             for i = 13, 38 do
  347.                 ui.removeTextArea(i)
  348.             end
  349.             newMap()
  350.                 points[1] = 0
  351.                 points[2] = 0
  352.                 displayScore()
  353.     elseif callback == 'salir' then
  354.         print("")
  355.         system.exit()
  356.     elseif callback == 'reset' then
  357.             teams[1] = {}
  358.             points[1] = 0
  359.             teams[2] = {}
  360.             points[2] = 0
  361.             equipos = {}
  362.             puntos = {}
  363.             modob = "SCURTATURI"
  364.             modo = "WALLJUMP"
  365.             jugadores = 0
  366.             equipo = {}
  367.             jugador = ""
  368.             teamc = 1
  369.             llenarteams()
  370.             displayTeams()
  371.     elseif callback == 'WALLJUMP' then
  372.         tiempo = 150
  373.         modob = "WALLJUMP"
  374.         modo = "MIX"
  375.         verificarmodo2()
  376.         maps = mapasbootcamp
  377.     elseif callback == 'SCURTATURI' then
  378.  
  379.         tiempo = 60
  380.         modob = "SCURTATURI"
  381.         modo = "WALLJUMP"
  382.         verificarmodo2()
  383.         maps = mapasracing
  384.     elseif callback == 'MIX' then
  385.         tiempo = 90
  386.         modob = "MIX"
  387.         modo = "SCURTATURI"
  388.         verificarmodo2()
  389.         maps = mapasMIX
  390.     elseif callback == 'auto' then
  391.         if automatico then
  392.             automatico = false
  393.             automatic()
  394.         elseif not automatico then
  395.             automatico = true
  396.             automatic()
  397.         end
  398.     end
  399. end
  400.  
  401. function verificarmodo2()
  402.  ui.addTextArea(32, string.format("<p align='center'><V>%s ",modob),nil, 235, 375, 300, 17, 0x324650, 0x324650, 1, true)
  403.     if modo == "WALLJUMP" then
  404.     ui.addTextArea(37, "<p align='center'><V><a href='event:WALLJUMP'><font size='9'>"..modo, ADMINISTRADOR, 290, 335, 55, 18, 0x324650, 0x324650, 1, true)
  405.     elseif modo == "SCURTATURI" then
  406.     ui.addTextArea(37, "<p align='center'><V><a href='event:SCURTATURI'><font size='9'>"..modo, ADMINISTRADOR, 290, 335, 55, 18, 0x324650, 0x324650, 1, true)
  407.     elseif modo == "MIX" then
  408.     ui.addTextArea(37, "<p align='center'><V><a href='event:MIX'><font size='9'>"..modo, ADMINISTRADOR, 290, 335, 55, 18, 0x324650, 0x324650, 1, true)
  409.     end
  410. end
  411. function automatic()
  412.     if automatico then
  413.     ui.addTextArea(38, "<p align='center'><V><a href='event:auto'><font size='10'>AutoJoin Yes", ADMINISTRADOR, 380, 335, 95, 18, 0x324650, 0x324650, 1, true)
  414.     elseif not automatico then
  415.     ui.addTextArea(38, "<p align='center'><V><a href='event:auto'><font size='10'>AutoJoin No", ADMINISTRADOR, 380, 335, 95, 18, 0x324650, 0x324650, 1, true)
  416.     end
  417. end
  418. function string.split(s, pattern, n)
  419.     local st = {}
  420.     for sb in string.gmatch(s, "[^"..pattern.."]+") do
  421.     if not n or n > -1 then
  422.         table.insert(st,sb)
  423.     else
  424.         st[#st] = st[#st]..pattern..sb
  425.     end
  426.     n = n and n-1 or false
  427.     end
  428.     return st
  429. end
  430. function table.contains(tableT, element)
  431.     for _, value in pairs(tableT) do
  432.         if value == element then
  433.             return true
  434.         end
  435.     end
  436.     return false
  437. end
  438. function eventPlayerDied()
  439.     local alive = 0
  440.     for k,v in pairs(tfm.get.room.playerList) do
  441.         if not v.isDead then
  442.             alive = alive+1
  443.         end
  444.     end
  445.     if alive == 0 then
  446.         newMap()
  447.     end
  448. end
  449. function llenarteams()
  450.     for k,v in pairs(tfm.get.room.playerList) do
  451.     if teamc == 1 then
  452.             table.insert(teams[1], k)
  453.             playersInGame[k] = true
  454.             teamc = 2
  455.         elseif teamc == 2 then
  456.             table.insert(teams[2], k)
  457.             playersInGame[k] = true
  458.             teamc = 1
  459.         end
  460.     end
  461. end
  462. contarjugadores()
  463. displayTeams()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top