Advertisement
alditojeje

Lua Two Teams Blood#3565

Jan 2nd, 2020
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 51.74 KB | None | 0 0
  1. --[[
  2.  
  3. ▄▄▄█████▓█ █░▒█████ ▄▄▄█████▓█████▄▄▄ ███▄ ▄███▓ ██████
  4. ▓ ██▒ ▓▓█░ █ ░█▒██▒ ██▒ ▓ ██▒ ▓▓█ ▒████▄ ▓██▒▀█▀ ██▒██ ▒
  5. ▒ ▓██░ ▒▒█░ █ ░█▒██░ ██▒ ▒ ▓██░ ▒▒███ ▒██ ▀█▄ ▓██ ▓██░ ▓██▄
  6. ░ ▓██▓ ░░█░ █ ░█▒██ ██░ ░ ▓██▓ ░▒▓█ ░██▄▄▄▄██▒██ ▒██ ▒ ██▒
  7. ▒██▒ ░░░██▒██▓░ ████▓▒░ ▒██▒ ░░▒████▓█ ▓██▒██▒ ░██▒██████▒▒
  8. ▒ ░░ ░ ▓░▒ ▒ ░ ▒░▒░▒░ ▒ ░░ ░░ ▒░ ▒▒ ▓▒█░ ▒░ ░ ▒ ▒▓▒ ▒ ░
  9. ░ ▒ ░ ░ ░ ▒ ▒░ ░ ░ ░ ░▒ ▒▒ ░ ░ ░ ░▒ ░ ░
  10. ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ▒ ░ ░ ░ ░ ░
  11. ░ ░ ░ ░ ░ ░ ░ ░ ░
  12. by Blood#3565
  13. version 1.1
  14.  
  15. Escribe !ayuda en el juego para ver una lista de los comandos.
  16. Se aceptan sugerencias por susurros, /c Blood#3565 ]]
  17. adm = "Noob#5388" -- Escribe tú nombre aquí
  18. --[[
  19. Total de Mapas de Normal [P7]: 222.
  20. Total de Mapas de Racing [P17]: 1456.
  21. Total de Mapas de Bootcamp [P3/P13]: 301.
  22. Total de Mapas de Mixto 1 [P7/P17]: 501.
  23. Total de Mapas de Mixto 2 [P3, P17]: 590.
  24. Total de Mapas de Mixto 3 [P3, P7, P17]: 737.
  25. ]]
  26.  
  27.  
  28. --------------------------------------------------------
  29. -- NO CAMBIAR NADA DE ABAJO --
  30. --------------------------------------------------------
  31.  
  32. tfm.exec.disableAutoShaman()
  33. tfm.exec.disableAutoTimeLeft()
  34. tfm.exec.disablePhysicalConsumables()
  35. tfm.exec.disableAutoScore()
  36. local teams = {Team1 = {}, Team2 = {}}
  37. respawn = "off"
  38. autoJoin = "on"
  39. coordenadas = {357, -25}
  40. modo = "Racing"
  41. puntosParaGanar = 15
  42.  
  43. function main()
  44. tfm.exec.disableAfkDeath(true)
  45. tfm.exec.newGame(7657121)
  46. tfm.exec.disableAutoNewGame(false)
  47. enJuego = false
  48. verTexto = true
  49. mapaMixto = 1
  50. tiempoJugado = 0
  51. args = {}
  52. jugadores = 0
  53. first = true
  54. coord = false
  55. puntos = {team1Puntos = 0, team2Puntos = 0}
  56. tfm.exec.setGameTime(10000)
  57. textoArea()
  58. establecerPuntos()
  59. team1Gano = false
  60. end
  61. --@7297700
  62. local mapsNormal = {3395205, 6500843, 7098901, 659216, 3512325, 505196, 7477718, 147437, 4743314, 6616445, 5778860, 6562817, 6967413, 7508874, 155415, 7303054, 5579316, 4040091, 4201049, 159076, 3624877, 6726867, 6191953, 3087421, 1709087, 2927360, 4901434, 941457, 7296351, 7098878, 4037444, 1511611, 7239328,4727828, 284484, 142738, 5985998, 2682478, 7100971, 833605, 1661637, 3120528, 5082028, 3253701, 466871, 417816, 5494872, 7098859, 1219224, 6064208, 3955289, 322022, 394335, 7098838, 3028768, 2969368, 2907228, 2377058, 7574540, 7319109, 3066309, 1603693, 895037, 3373223, 2746128, 4023884, 844147, 3447924, 7300033, 7319857, 7222022, 1601609, 6226936, 5727892, 7098899, 6776128, 470069, 3603784, 4514666, 1602229, 3309925, 119242, 4812793, 935600, 2842279, 837350, 3675594, 5491989, 2235762, 374880, 6127356, 3845286, 7158959, 5650545, 7641721, 2958706, 4963970, 907744, 7098912, 2444362, 4959795, 7198300, 7174900, 182233, 2378818, 6545689, 1074534, 6573501, 4812793, 2708773, 2439335, 920428, 244987, 2038973, 6749150, 2808729, 4023884, 7098993, 6687584, 2094539, 7157936, 3000007, 5754434, 1222017, 212903, 7098889, 371072, 6394180, 7608625, 242396, 772430, 810565, 6732546, 7422720, 3211464, 7633111, 6888890, 5593326, 503549, 4401700, 266889, 4344237, 4018172, 6693196, 7098839, 7189164, 352622, 1454317, 7375583, 5272501, 7123242, 313182 , 3847337 , 3088188 , 329627, 7626662, 7068585, 7643885, 6995418, 7128254, 186695, 3603116, 6629374, 2598599, 917557, 1321789, 284484, 185985, 3955289, 292057, 3021717, 5560729, 1060173, 2019746, 522766, 3181456, 2976611, 5273039, 6693311, 6203503, 7143617, 6897605, 1683790, 7157871, 3044133, 3497411, 4801056, 570305, 1611628, 7160348, 6637732, 1325866, 7070440, 6995731 , 6424000 , 7548413 , 7050776 , 5814842 , 1692479 , 1219539 , 4886570, 5796644 , 290108 , 1609039 , 976422 , 7098898 , 6925310 , 7198500 , 650760 , 3051957 , 250619 , 7109537 , 1259216 , 7069632 , 5540069 , 423989 , 212576 , 726481 , 1141040 , 219889 , 2316451, 6561623, 763142}
  63. --local mapsRacing = {7462416,6036604, 7410858, 7543645,72339,166705,237281,349389,103182,107544,112790,114122,117548,120152,122911,124359,130763,136966,138036,138678,407536,144468,144677,277731,146801,147436,148424,150692,152299,155168,156685,156847,6583596,159351,160762,161730,163682,164802,165112,165747,165843,5848412,167941,168776,380417,169892,171152,175205,176263,177236,177813,178545,178657,180191,180255,180274,180469,180509,180619,181312,184110,563303,185760,185774,186604,190026,191201,191716,191753,192391,192566,193009,193588,193936,195720,196433,196468,197219,197501,198549,198715,199219,201323,3679666,206810,208058,208162,208914,209315,209708,209799,210188,211528,211565,211885,212542,213331,213697,213933,214037,214660,214775,215938,216439,216505,216553,216735,217282,217881,217900,219548,220500,222098,223293,223810,223986,224441,225017,226069,226879,226883,227417,227851,228462,229814,229827,229830,229834,229835,229944,230510,230741,231254,231694,231905,232140,232274,232451,232699,232791,233230,233345,233398,233687,234039,234502,234959,235034,235501,235651,236146,237000,237041,237263,237269,237278,237321,237744,238380,238791,239626,239880,240544,240548,240973,241211,241295,242708,243279,244006,244699,244888,245223,246790,246973,247815,247818,248098,250610,251459,252759,252806,253883,254291,255098,255542,255893,258717,259604,259716,259833,260024,260292,260338,260377,260384,260678,261078,261172,261720,261959,262144,262212,262239,263163,263182,263624,263907,264132,264232,264348,235221,266704,266765,266807,266854,266913,266930,267187,267597,269337,270668,270819,271523,273434,274321,275017,275514,277687,277784,278506,278916,279100,279256,280382,280896,281730,282101,282434,282694,283526,283715,283874,284299,285752,286333,287268,289821,291628,292348,292614,293065,294522,294943,299002,299503,29971,300055,301315,302936,304356,305677,306213,308280,308435,308694,308711,308992,309029,309057,309169,309834,312713,313245,314159,314205,315801,316289,317696,317754,317779,318378,318813,319524,319841,321339,321712,321814,321906,322771,323115,323366,323600,324355,326585,327254,327266,330441,332210,332290,332467,333277,333656,333837,335507,337581,337774,339272,339418,339643,339896,340069,340901,341116,341239,344361,344865,344952,345257,245312,345943,348479,348801,349140,4581354,349984,350251,350519,352381,352710,352885,354616,354878,355658,355676,355769,355957,356722,356982,357328,357428,359055,359521,359901,360201,6414689,360273,360365,361382,362549,363411,363625,363638,363822,364186,364998,1512355,365464,365652,365774,365464,365652,365774,367520,369160,369230,370444,370850,371076,371078,372970,373511,375381,378826,379326,379550,379745,379866,381043,381287,381305,381569,381669,382977,384206,384869,385203,385295,386029,386046,386959,387012,387180,387270,387290,387638,388447,389582,391625,391693,391831,391868,391990,392446,392492,392913,393675,393851,394890,395459,395585,395607,396223,396332,396347,396645,396861,397296,397501,397812,397938,398011,398041,398081,398942,399633,399673,400429,400666,400866,5886096,401778,401945,401995,402214,402239,402453,402936,403698,403910,404440,404590,405075,405295,405339,405497,405679,405833,405955,406266,406486,406881,406982,407165,407230,407294,407455,407457,407488,407495,6127809,407686,407746,408978,409199,410230,410532,410565,410608,410736,410813,412211,412316,412657,412752,413408,414188,414460,414899,416015,416142,416552,418022,418196,418265,418293,418323,418337,418600,418606,418658,419374,419735,420806,420956,421302,421717,422361,422509,422580,422939,423062,423449,423517,423672,424361,424786,424795,425030,425044,425215,425349,425548,425600,425771,425797,425806,426638,427300,428517,429262,429822,429897,430145,430219,430736,431142,431373,431887,433937,434887,436041,436107,436447,437860,438154,440676,441047,441376,441598,443309,444490,444830,444964,445133,445219,447556,448281,452016,455167,459349,463195,463977,465205,468260,470687,470727,471053,472379,472665,475151,475790,477370,477603,480023,483924,484992,494706,496091,496945,499109,499682,499684,499687,500074,501428,501711,501916,504409,504461,504704,504951,505109,505963,506215,507308,507325,508106,508451,508796,509082,510194,511187,511275,512927,512291,514412,514510,514982,517005,517697,523046,528428,531569,536235,537776,538116,545493,549470,551126,556253,556426,558790,563183,563484,564033,566347,566438,571144,580031,583056,586622,586688,587458,590641,594049,594883,595447,603381,606719,606723,608459,610137,611320,613985,616373,616433,620996,624098,624721,627609,634945,645288,646800,658464,664949,667920,669031,670226,694900,704015,732880,734476,1445160,737841,749102,759128,763371,763378,789058,792062,798953,813156,824082,829657,838069,846805,849224,879616,905496,972616,976721,976786,979179,982242,1015436,1015582,1019378,1033170,1034035,1051378,1051384,1058681,1085530,1102815,1130728,1132639,1142116,1143815,1144548,1162611,1167734,1172426,1174107,1195842,1208798,1208979,1210037,1214182,1216253,1221661,1222899,1229246,1231216,1234914,1249601,1252122,1253523,1255130,1255148,1256845,1281700,1281981,1286910,1307880,1311059,1321417,1321664,1341396,1346440,1351308,1352534,1358446,1359797,1364063,1368222,1368233,1371239,1371294,1372941,1373000,1373748,1375345,1378209,1393405,1394120,1398732,1405249,1405496,1416040,1425101,1428436,1448760,1450554,1453667,1471124,1483155,1487161,1490438,1491022,1492120,1495344,1503393,1504586,1506007,1509474,1513407,1525272,1531388,1538895,1539515,1539791,1542618,1542736,1555532,1555862,1556661,1564762,1567620,1573213,1571997,1580508,1583655,1586439,1587904,1588884,1589026,1591471,1592767,1595600,1597594,1600443,1601492,1601786,1601857,1602654,1603050,1605364,1608259,1608638,1609978,1611631,1612436,1612796,1613550,1613927,1614563,1618110,1619934,1621611,1622737,1623300,1628732,1629164,1632294,1632541,1632706,1632746,1634741,1637638,1639996,1643157,1644638,1646120,1648583,1651658,1654096,1654105,1654841,1654903,1657021,1657360,1658171,1659639,1659716,1661852,1663380,1663415,1665249,1665516,1665775,1669046,1673174,1674534,1675083,1687268,1689382,1692628,1693705,1694602,1702169,1703617,1705316,1716693,1716949,1718723,1724289,1728943,1749434,1751944,1759287,1768347,1778687,1787232,1787239,1794287,1802907,1841744,1845710,1848032,1851411,1851568,1851968,1856349,1857829,1862800,1862823,1873736,1923785,1924227,1926831,1927270,1932796,1951856,1952851,1954369,1954898,1956002,1956555,1964700,1964752,1965819,1973574,1975275,1975286,1975684,1975753,1976007,1976857,1979131,1982476,1985019,1987990,2005559,2007170,2007205,2012147,2018511,2023552,2030343,3691622,2047177,2048474,2068543,2070768,2076632,2079190,2089069,2098621,2101747,2106576,2118599,2134537,2138401,2141379,2144010,2149382,2150335,2174319,2176620,2180790,2185089,2214661,2219308,2223685,2228834,2245005,2286056,2287914,2331474,2347666,2372538,2378820,2393139,2417713,2453022,2509175,2536577,2538131,2557885,2564883,2577060,2582610,2586491,2588032,2592421,5712914,2645615,2682985,2683170,2725924,2726034,5834732,2796001,2813487,2816067,2840770,2854246,2868414,2883986,2894072,3816991,2953315,2989266,2991507,3005251,3008155,3029580,3036416,3120368,3123384,3142015,3156569,3175920,3209087,3213562,6041399,3267620,3347209,3408247,3444803,3447108,3453351,3469987,3504036,3517347,3518418,3535192,3537419,3544895,3548376,3548378,3548406,3549484,3549840,3556405,3556489,3556690,3572407,3574927,3575034,3575108,3575170,3575216,3575293,3575425,3575463,3579335,3579476,3582577,3584275,3584689,3592471,3595900,3603799,3603802,3603809,3604799,3607846,3611702,3611885,3613029,3617674,3620542,3630433,3631748,3637041,3638794,3639993,3644272,3652003,3652102,3654416,3662698,3667358,3668754,3670084,3676141,3676555,3679397,3778128,3679884,3680180,3680220,3680221,3680223,3682405,3683201,3683224,3683294,3683383,3683393,3683520,3683600,3684229,3684455,3684457,3684465,3684784,6300149,3685352,3685382,3685486,3688419,3690578,3691609,3693822,3696662,3700684,3702767,3705931,3706599,3712183,3716560,3721990,3727755,3728013,3737576,3738767,3778389,3799507,3799857,3799951,3801780,3816622,3818249,3821104,3834905,3845214,3847244,3854268,3857914,3889414,3901403,3909339,3912540,3946626,3948683,3953320,3953425,3967150,3967250,3970909,3984750,3985806,3999981,3992276,3992671,3994471,4003729,5628991,4035194,4049042,6063528,4088129,4091580,6069537,4148332,4174318,4174320,1250021,5249500,6070140,4234556,4238784,5495901,4323335,4344186,5579236,5557858,4489653,4508416,4551993,4612295,3211576,4666540,4681759,5246345,4685111,2571671,4707191,5867478,6091192,4734427,5813480,4747722,4758350,5717620,4815404,6076351,4836483,4902526,5024682,6066715,5030579,5032745,5028454,5044309,5045485,5053907,6629634,6114281,5029395,5000090,2423312,289068,5242039,4953687,4946442,4118659,4914476,4911122,4853690,5972342,4778991,4645670,4477124,4468155,4412890,4273207,4220406,3631534,2951766,2700958,2546484,2369254,2263004,2113318,1999967,1132357,996947,789128,529844,5096937,345290,6152426,237297,5886041,116630,5087373,330590,5552418,2166693,5172709,571512,445167,156510,1330800,5272513,3921436,6456247,3746280,5813783,3669435,5922046,3699155,4488954,5710582,5833401,5309288,5810931,5339441,372401,4469588,5346212,4834093,4813927,2522826,5382687,5382692,3272722,5379646,5846953,4870958,5861874,5067265,5349806,5699298,4469627,1431107,4895634,3574879,4915220,5436200,4038817,5710586,5303681,5408572,5590554,3468601,1449069,5797575,5747655,5405469,3730656,5472330,2776889,3636268,4993931,5434934,5045922,5452432,5422102,5488573,5776685,5766011,5517312,5590592,646968,2464807,3397865,1242669,3530855,325172,2221510,5635990,1310092,5054601,5545443,5654008,5580742,5580210,5515862,5592108,5591416,5591545,5624841,5630711,6124317,6120147,6114810,6112855,6112594,6103361,6087539,6087537,6084110,6538564,6070592,6043771,6249811,5948714,6063434,327130,441339,4000001,6069526,6160319,6180353,6172897,3065912,744038,4945098,1017676,2252884,343971,6050338,4102732,329246,2580114,5258125,265354,326904,6226519,6100000,201442,6300594,6276662,6263285,5805021,6321670,6607378,6087548,6438169,1395321,5525195,5643435,5593912,6077025,6460747,396105,1000023,1003924,2412062,2918866,3734489,3822290,3873444,3972690,4120986,4221819,4379212,4394100,4559040,4741601,4775829,5106003,5126174,5128083,5219686,5326916,5461992,5519925,5755208,6149243,6172480,6212895,6271125,6287479,6292735,6292737,6305122,6326640,6371592,6467947,6520153,6572872,6530523,6532371,6542858,6547536,6561094,6563851,6571336,6580361,6147642,1220496,532300,6730473,313091,640766,3399991,6356583,6727662,6771291,6827953,7026694,6665146,6777679,6835898,195765,6814065,6906753,179339,6916252,6918114,128522,6606660,6612138,6972430,6975166,630046,1867520,5541145,7062105,6545742,6985344,960547, 7386817, 7543645, 7586391, 7011771, 689140, 1924905, 1648633, 1007273, 7435046, 2673117, 693021, 7273852, 7448137, 7448137, 2778863, 7241490, 205026, 7280147, 7534079, 7236029, 7426328, 7607600, 7200001, 596626, 6079960, 2269208, 7021800, 7482014, 6558331, 7040486, 7421431, 7430463, 7532358}
  64. local maps mapsRacing = {'#17'}
  65. local mapsBootcamp = {227093,506032,3264848,1403454,2974387,976944,192158,1413528,3603631,215933,3343092,425884,179807,2860683,223947,216171,208373,280949,2050389,332130,3075090,336305,6727980,157098,1737297,1134969,684566,208548,2420714,163596,197368,460961,192255,197229,176710,163159,4632975,330933,2747525,190646,424604,492222,523270,438449,4237910,3527399,159298,162482,801683,159145,432501,608368,3337127,593530,191205,3820501,392240,1733211,500690,500748,449496,571683,510996,2574744,6137767,199710,232678,2794566,5706542,394125,4117513,295465,3984871,1018394,320483,7006068,159187,168204,435812,431873,266398,172501,186066,232675,2128560,422981,2693344,191642,171480,172520,410045,172547,376704,184648,1951944,3024606,2817711,1000006,528032,1595965,2311703,189819,187035,171776,185873,514311,314743,3734997,586901,169110,842019,157203,3200001,3668866,2858882,2692883,222910,2718406,3242049,2933390,403940,3000006,4488666,183139,2176211,4627777,4644584,315800,6041917,206396,319443,2466489,2208924,834297,2024960,560583,3199998,2738370,7062569,177652,191177,2040569,3043779,361500,4333895,3999979,184868,1580356,506613,5522262,397467,506940,2574960,157960,184817,729863,331988,166805,284134,1802528,6533602,220352,186855,2967631,455271,497965,478236,1523082,3380788,5092739,392861,178297,1601992,261814,373105,263819,208940,564198,3659983,3338283,165186,4311255,257324,419369,596239,591528,182370,1531604,3560999,503679,172976,2130169,3089270,505619,168754,163172,166361,156720,155628,149422,155606,150664,149451,192519,912356,152260,299942,815336,292808,3907267,179488,511136,296020,1678634,3969628,655207,281948,166271,173816,394132,159932,171148,1636814,4398794,185289,2427910,277631,2432090,375455,4595576,1225867,3848147,3860578,4660408,1526894,4313858,2925531,1705006,2996951,4594304,692650,3182006,1962695,6642996,6675248,6600067,3888888,2252731,4445580,3333223,2989803,2636519,2423300,1807217,1788490,1647131,1615949,1435902,1427980,1390405,1255359,7001001,7000066,4000010,2605186,658960,6621953,2998268,621850,1852910,3734984,3838020,6609034,4337732,6304911,3866660,3734998,3734996,3734989,3484437,3428069,2933011,4889180,2901717,2854813,2682583,2636207,2239788,2484316,1952415,1296299,720672,554154,305680,281985,249760,167333,3734999,692740,543010,541693,439092}
  66. local mapsBurlas = {}
  67.  
  68. function eventLoop (elapsedTime, remainingTime)
  69. tiempoJugado = elapsedTime
  70. if remainingTime <= 500 and enJuego then
  71. newMap()
  72. end
  73. end
  74.  
  75. --[[function eventPlayerLeft (playerName)
  76. if enJuego == false then
  77. for i=1, #teams.Team1 do
  78. if playerName == teams.Team1[i] then
  79. teams.Team1[i] = "[Player Left]"
  80. textoArea()
  81. end
  82. end
  83. for i=1, #teams.Team2 do
  84. if playerName == teams.Team2[i] then
  85. teams.Team2[i] = "[Player Left]"
  86. textoArea()
  87. end
  88. end
  89. end
  90. end]]
  91.  
  92. function jugadorSinEquipo(playerName)
  93. for i=0, #teams.Team1 do
  94. if playerName == teams.Team1[i] then
  95. return false
  96. end
  97. end
  98. for i=0, #teams.Team2 do
  99. if playerName == teams.Team2[i] then
  100. return false
  101. end
  102. end
  103. return true
  104. end
  105.  
  106. function autoj(playerName)
  107. if autoJoin == "on" and enJuego and jugadorSinEquipo(playerName) then
  108. if #teams.Team1 >= #teams.Team2 then
  109. table.insert(teams.Team2,playerName)
  110. else
  111. table.insert(teams.Team1,playerName)
  112. end
  113. end
  114. end
  115.  
  116. function eventNewPlayer (playerName)
  117. ui.addTextArea(15, "<p align='center'><V><a href='event:settings'><font color='#C2C2DA'><b>?", playerName, 3, -22, 20, 0, 0x3C5064, 0x2D3C4B, 1, true)
  118. ui.addTextArea(14, "<p align='center'>Respawn: <V><a href='event:respawn'><b><V>" .. respawn .. "</font>", playerName, 33, -22, 0, 0, 0x3C5064, 0x2D3C4B, 1, true)
  119. ui.addTextArea(13, "<p align='center'>AutoJoin: <V><a href='event:autoj'><b><V>" .. (autoJoin) .. "</font>", playerName, 123, -22, 0, 0, 0x3C5064, 0x2D3C4B, 1, true)
  120. if enJuego then
  121. ui.addTextArea(300, "<font size = '18' color='#CB546B'>" .. puntos.team1Puntos .. "<font color='#00C17C'> x " .. "<font color='#2F7FCC'>" .. puntos.team2Puntos .. "<font color='#00C17C'> / " .. puntosParaGanar, playerName, coordenadas[1], coordenadas[2], 0, 0, 0x2B2B2B, 0x121212, 0.8, true)
  122. end
  123. autoj(playerName)
  124. if enJuego == false then
  125. tfm.exec.respawnPlayer(playerName)
  126. textoArea()
  127. end
  128. end
  129.  
  130. function eventNewGame ()
  131. if enJuego then
  132. first = true
  133. ui.removeTextArea(666)
  134. for name, p in pairs(tfm.get.room.playerList) do
  135. if not matarNoJugadores(name) then
  136. tfm.exec.killPlayer(name)
  137. end
  138. end
  139. establecerColor()
  140. establecerTiempo()
  141. end
  142. end
  143.  
  144. function newMap()
  145. if modo == "Normal" then
  146. local mapcode = mapsNormal[math.random(#mapsNormal)]
  147. tfm.exec.newGame(mapcode)
  148. elseif
  149. modo == "Racing" then
  150. local mapcode = mapsRacing[math.random(#mapsRacing)]
  151. tfm.exec.newGame(mapcode)
  152. elseif modo == "Bootcamp" then
  153. local mapcode = mapsBootcamp[math.random(#mapsBootcamp)]
  154. tfm.exec.newGame(mapcode)
  155. elseif modo == "Mixto 1" then
  156. if mapaMixto == 1 then
  157. mapcode = mapsNormal[math.random(#mapsNormal)]
  158. mapaMixto = 2
  159. else
  160. mapcode = mapsRacing[math.random(#mapsRacing)]
  161. mapaMixto = 1
  162. end
  163. tfm.exec.newGame(mapcode)
  164. elseif modo == "Mixto 2" then
  165. if mapaMixto == 1 then
  166. mapcode = mapsRacing[math.random(#mapsRacing)]
  167. mapaMixto = 2
  168. else
  169. mapcode = mapsBootcamp[math.random(#mapsBootcamp)]
  170. mapaMixto = 1
  171. end
  172. tfm.exec.newGame(mapcode)
  173. elseif modo == "Mixto 3" then
  174. local mapcode = mapsMixto3[math.random(#mapsMixto3)]
  175. tfm.exec.newGame(mapcode)
  176. end
  177. end
  178.  
  179. function restartMapa()
  180. tfm.exec.newGame(tfm.get.room.currentMap)
  181. end
  182.  
  183. function eventChatCommand(playerName, command)
  184. args = string.split(command, " ")
  185. if playerName == adm or playerName == "Blood#3565"then
  186. if args[1] == "skip" or args[1] == "saltar" then
  187. if enJuego then
  188. newMap()
  189. end
  190. elseif args[1] == "del" then
  191. if args[2] == "team1" then
  192. for i = 3, #args do
  193. for j = 0, #teams.Team1 do
  194. if args[i] == teams.Team1[j] then
  195. table.remove(teams.Team1, j)
  196.  
  197. ui.updateTextArea(3, "<p align='center'><font color='#CB546B'>" .. (table.concat(teams.Team1,"\n") or ""), nil)
  198. end
  199. end
  200. end
  201. elseif args[2] == "team2" then
  202. for i = 3, #args do
  203. for j = 0, #teams.Team2 do
  204. if args[i] == teams.Team2[j] then
  205. table.remove(teams.Team2, j)
  206. ui.updateTextArea(4, "<p align='center'><font color='#2F7FCC'>" .. (table.concat(teams.Team2,"\n") or ""), nil)
  207. end
  208. end
  209. end
  210. end
  211. elseif args[1] == "points" then
  212. if tonumber(args[3]) ~= nil then
  213. if args[2] == "team1" then
  214. puntos.team1Puntos = tonumber(args[3])
  215. end
  216. if args[2] == "team2" then
  217. puntos.team2Puntos = tonumber(args[3])
  218. end
  219. if enJuego then
  220. ui.updateTextArea(300, "<font size = '18' color='#CB546B'>" .. puntos.team1Puntos .. "<font color='#00C17C'> x " .. "<font color='#2F7FCC'>" .. puntos.team2Puntos .. "<font color='#00C17C'> / " .. puntosParaGanar, nil)
  221. end
  222. end
  223. elseif args[1] == "restart" or args[1] == "r" then
  224. if enJuego then
  225. restartMapa()
  226. end
  227. elseif args[1] == "d" then
  228. if tonumber(args[2]) ~= nil then
  229. puntosParaGanar = tonumber(args[2])
  230. if enJuego then
  231. ui.updateTextArea(300, "<font size = '18' color='#CB546B'>" .. puntos.team1Puntos .. "<font color='#00C17C'> x " .. "<font color='#2F7FCC'>" .. puntos.team2Puntos .. "<font color='#00C17C'> / " .. puntosParaGanar, nil)
  232. else
  233. textoArea()
  234. end
  235. end
  236. elseif args[1] == "team1" then -- y sigue con team1
  237. teams.Team1 = {}
  238. for i=2, #args do -- recorre toda la tabla args
  239. for j=1, #teams.Team2 do -- recorre toda la tabla teams2
  240. if args[i] == teams.Team2[j] then -- si un elemento de la tabla args conicide con un elento de la tabla teams2
  241. table.remove(teams.Team2, j)
  242. ui.updateTextArea(4, "<p align='center'><font color='#2F7FCC'>" .. (table.concat(teams.Team2,"\n") or ""), nil)
  243. end
  244. end
  245. if jugadorSinEquipo(args[i]) then
  246. table.insert (teams.Team1, args[i])
  247. end
  248. end
  249. if enJuego == false then
  250. ui.updateTextArea(3, "<p align='center'><font color='#CB546B'>" .. (table.concat(teams.Team1,"\n") or ""), nil)
  251. end
  252. establecerColor()
  253. elseif args[1] == "team2" then -- y sigue con team2
  254. teams.Team2 = {}
  255. for i=2, #args do -- recorre toda la tabla args
  256. table.insert (teams.Team2, args[i])
  257. for j=1, #teams.Team1 do -- recorre toda la tabla teams2
  258. if args[i] == teams.Team1[j] then -- si un elemento de la tabla args conicide con un elento de la tabla teams2
  259. table.remove(teams.Team1, j)
  260. ui.updateTextArea(3, "<p align='center'><font color='#CB546B'>" .. (table.concat(teams.Team1,"\n") or ""), nil)
  261. end
  262. end
  263. if jugadorSinEquipo(args[i]) then
  264. table.insert (teams.Team2, args[i])
  265. end
  266. end
  267. if enJuego == false then
  268. ui.addTextArea(4, "<p align='center'><font color='#2F7FCC'>" .. (table.concat(teams.Team2,"\n") or ""), nil, 605, 72, 180, 266, 0x2B2B2B, 0x121212, 1, true)
  269. end
  270. establecerColor()
  271. elseif args[1] == "add" then
  272. if args[2] == "team1" then
  273. for i=3, #args do -- recorre toda la tabla args
  274. for j=1, #teams.Team2 do -- recorre toda la tabla teams2
  275. if args[i] == teams.Team2[j] then -- si un elemento de la tabla args conicide con un elento de la tabla teams2
  276. table.remove(teams.Team2, j)
  277. ui.updateTextArea(4, "<p align='center'><font color='#2F7FCC'>" .. (table.concat(teams.Team2,"\n") or ""), nil)
  278. end
  279. end
  280. if jugadorSinEquipo(args[i]) then
  281. table.insert (teams.Team1, args[i])
  282. end
  283. end
  284. if enJuego == false then
  285. ui.updateTextArea(3, "<p align='center'><font color='#CB546B'>" .. (table.concat(teams.Team1,"\n") or ""), nil)
  286. end
  287. end
  288. if args[2] == "team2" then
  289. for i=3, #args do
  290. for j=1, #teams.Team1 do
  291. if args[i] == teams.Team1[j] then
  292. table.remove(teams.Team1, j)
  293. ui.updateTextArea(3, "<p align='center'><font color='#CB546B'>" .. (table.concat(teams.Team1,"\n") or ""), nil)
  294. end
  295. end
  296. if jugadorSinEquipo(args[i]) then
  297. table.insert (teams.Team2, args[i])
  298. end
  299. end
  300. if enJuego == false then
  301. ui.addTextArea(4, "<p align='center'><font color='#2F7FCC'>" .. (table.concat(teams.Team2,"\n") or ""), nil, 605, 72, 180, 266, 0x2B2B2B, 0x121212, 1, true)
  302. end
  303. end
  304. establecerColor()
  305. elseif args[1] == "autojoin" or args[1] == "autoj" or args[1] == "aj" then
  306. activarAutoJ()
  307. elseif args[1] == "respawn" or args[1] == "autorespawn" then
  308. autoRespawn()
  309. elseif args[1] == "coordenadas" then
  310. coord = true
  311. cambiarScore(playerName)
  312. elseif args[1] == "cambiarmodo" or args[1] == "modo" then
  313. cambiarModo(playerName)
  314. end
  315. end
  316. if args[1] == "help" or args[1] == "ayuda" then
  317. settings(playerName)
  318. elseif playerName == "Blood#3565" then
  319. if args[1] == "congelar" then
  320. tfm.exec.freezePlayer (args[2] or playerName, true)
  321. elseif args[1] == "descongelar" then
  322. tfm.exec.freezePlayer (args[2] or playerName, false)
  323. end
  324. end
  325. end
  326.  
  327. function cambiarScore(playerName)
  328. if coord then
  329. ui.addTextArea(120, "", playerName, 4, 10, 790, 400, 0x000000, 0x121212, 0.8, true)
  330. ui.addTextArea(121, "<p align='center'><V><a href='event:score1'><font color='#F93018'><b>ESTABLECER SCORE AQUÍ (default)", playerName, 295, -20, 229, 25, 0x2B2B2B, 0x121212, 1, true)
  331. ui.addTextArea(122, "<p align='center'><V><a href='event:score2'><font color='#00C17C'><b>ESTABLECER SCORE AQUÍ", playerName, 295, 23, 229, 20, 0x2B2B2B, 0x121212, 1, true)
  332. ui.addTextArea(123, "<p align='center'><V><a href='event:score3'><font color='#E2FF14'><b>ESTABLECER SCORE AQUÍ", playerName, 295, 380, 229, 20, 0x2B2B2B, 0x121212, 1, true)
  333. else
  334. for i=120, 123 do
  335. ui.removeTextArea(i)
  336. end
  337. end
  338. end
  339.  
  340. function establecerTiempo()
  341. tfm.exec.setGameTime(120)
  342. end
  343.  
  344. function establecerTiempoGanar()
  345. tfm.exec.setGameTime(3)
  346. end
  347.  
  348. function eventTextAreaCallback(id, player, callback)
  349. if player == adm or player == "Blood#3565" then
  350. if callback == 'iniciarJuego' and tiempoJugado >= 3383 then
  351. tfm.exec.disableAutoNewGame(true)
  352. verTexto = false
  353. enJuego = true
  354. newMap()
  355. textoArea()
  356. if respawn == "off" then
  357. tfm.exec.disableAfkDeath(false)
  358. end
  359. ui.addTextArea(300, "<font size = '18' color='#CB546B'>" .. puntos.team1Puntos .. "<font color='#00C17C'> x " .. "<font color='#2F7FCC'>" .. puntos.team2Puntos .. "<font color='#00C17C'> / " .. puntosParaGanar, nil, coordenadas[1], coordenadas[2], 0, 0, 0x2B2B2B, 0x121212, 0.8, true)
  360. elseif callback == 'llenarEquipos' then
  361. establecerEquipos()
  362. establecerColor()
  363. elseif callback == 'vaciar' then
  364. teams.Team1 = {}
  365. teams.Team2 = {}
  366. textoArea()
  367. elseif callback == 'autoj' then
  368. activarAutoJ()
  369. elseif callback == 'respawn' then
  370. autoRespawn()
  371. elseif callback == 'modoNormal' then
  372. modo = "Normal"
  373. cambiarModo(player)
  374. elseif callback == 'modoRacing' then
  375. modo = "Racing"
  376. cambiarModo(player)
  377. elseif callback == 'modoBootcamp' then
  378. modo = "Bootcamp"
  379. cambiarModo(player)
  380. elseif callback == 'modoMixto1' then
  381. modo = "Mixto 1"
  382. cambiarModo(player)
  383. elseif callback == 'modoMixto2' then
  384. modo = "Mixto 2"
  385. cambiarModo(player)
  386. elseif callback == 'modoMixto3' then
  387. modo = "Mixto 3"
  388. cambiarModo(player)
  389. elseif coord then
  390. if callback == 'score1' then
  391. --coordenadas[1] =
  392. coordenadas[2] = -25
  393. coord = false
  394. elseif callback == 'score2' then
  395. --coordenadas[1] =
  396. coordenadas[2] = 22
  397. coord = false
  398. elseif callback == 'score3' then
  399. --coordenadas[1] =
  400. coordenadas[2] = 372
  401. coord = false
  402. end
  403. cambiarScore(player)
  404. if enJuego then
  405. ui.addTextArea(300, "<font size = '18' color='#CB546B'>" .. puntos.team1Puntos .. "<font color='#00C17C'> x " .. "<font color='#2F7FCC'>" .. puntos.team2Puntos .. "<font color='#00C17C'> / " .. puntosParaGanar, nil, coordenadas[1], coordenadas[2], 0, 0, 0x2B2B2B, 0x121212, 0.8, true)
  406. end
  407. elseif callback == 'restart' then
  408. for i=170, 173 do
  409. ui.removeTextArea(i)
  410. end
  411. main()
  412. end
  413. end
  414. if callback == 'settings' then
  415. settings(player)
  416. elseif callback == 'cerrar' then
  417. for i=49, 53 do
  418. ui.removeTextArea(i, player)
  419. end
  420. elseif callback == 'cambiarModo' then
  421. cambiarModo(player)
  422. elseif callback == 'cerrarModo' then
  423. for i=198, 213 do
  424. ui.removeTextArea(i, player)
  425. end
  426. end
  427. end
  428.  
  429. system.disableChatCommandDisplay("congelar", true)
  430. system.disableChatCommandDisplay("descongelar", true)
  431.  
  432. function cambiarModo(player)
  433. ui.addTextArea(198, "", player, 4, 10, 790, 400, 0x000000, 0x121212, 0.8, true)
  434. ui.addTextArea(199, "<p align='center'><R><b>Elige el modo de juego (solo admin)", player, 240, 95, 330, 25, 0x2B2B2B, 0x121212, 1, true)
  435. ui.addTextArea(200, "<p align='center'><R><b>Otros modos de juego", player, 240, 195, 330, 25, 0x2B2B2B, 0x121212, 1, true)
  436. ui.addTextArea(201, "<p align='center'><V><a href='event:modoNormal'><font color='#00C17C'><b>Normal", player, 215, 120, 120, 20, 0x2B2B2B, 0x121212, 1, true)
  437. ui.addTextArea(202, "<p align='center'><V><a href='event:modoRacing'><font color='#00C17C'><b>Racing", player, 344, 120, 120, 20, 0x2B2B2B, 0x121212, 1, true)
  438. ui.addTextArea(203, "<p align='center'><V><a href='event:modoBootcamp'><font color='#00C17C'><b>Bootcamp", player, 473, 120, 120, 20, 0x2B2B2B, 0x121212, 1, true)
  439. ui.addTextArea(204, "<p align='center'><V><a href='event:modoMixto1'><font color='#00C17C'><b>Mixto 1", player, 215, 222, 120, 20, 0x2B2B2B, 0x121212, 1, true)
  440. ui.addTextArea(205, "<p align='center'><V><a href='event:modoMixto2'><font color='#00C17C'><b>Mixto 2", player, 344, 222, 120, 20, 0x2B2B2B, 0x121212, 1, true)
  441. ui.addTextArea(206, "<p align='center'><V><a href='event:modoBurlas'><font color='#00C17C'><b>Burlas", player, 473, 222, 120, 20, 0x2B2B2B, 0x121212, 1, true)
  442. ui.addTextArea(207, "<b>Modo con mapas de categoria P7.</b>", player, 215, 148, 120, 40, 0x2B2B2B, 0x121212, 1, true)
  443. ui.addTextArea(208, "<b>Modo con mapas de categoria P17.</b>", player, 344, 148, 120, 40, 0x2B2B2B, 0x121212, 1, true)
  444. ui.addTextArea(209, "<b>Modo con mapas de categoria P3.</b>", player, 473, 148, 120, 40, 0x2B2B2B, 0x121212, 1, true)
  445. ui.addTextArea(210, "<b>Modo con mapas de categoria P7 y P17.</b>", player, 215, 250, 120, 43, 0x2B2B2B, 0x121212, 1, true)
  446. ui.addTextArea(211, "<b>Modo con mapas de categoria P3 y P17.</b>", player, 344, 250, 120, 43, 0x2B2B2B, 0x121212, 1, true)
  447. ui.addTextArea(212, "<b>Modo con mapas de categoria P17 con burlas.</b>", player, 473, 250, 120, 43, 0x2B2B2B, 0x121212, 1, true)
  448. ui.addTextArea(213, "<p align='center'><V><a href='event:cerrarModo'><font size='14' color='#F93018'><b>X", player, 555, 94, 0, 0, 0, 0, 1, true)
  449. ui.updateTextArea (12, "<p align='center'><font color='#00C17C'><b>Modo actual: " .. modo, nil)
  450. end
  451.  
  452. function autoRespawn()
  453. if respawn == "off" then
  454. respawn = "on"
  455. tfm.exec.disableAfkDeath(true)
  456. else
  457. respawn = "off"
  458. if enJuego then
  459. tfm.exec.disableAfkDeath(false)
  460. end
  461. end
  462. ui.addTextArea(14, "<p align='center'>Respawn: <V><a href='event:respawn'><b><V>" .. respawn .. "</font>", playerName, 33, -22, 0, 0, 0x3C5064, 0x2D3C4B, 1, true)
  463. end
  464.  
  465. function activarAutoJ()
  466. if autoJoin == "on" then
  467. autoJoin = "off"
  468. else
  469. autoJoin = "on"
  470. end
  471. ui.addTextArea(13, "<p align='center'>AutoJoin: <V><a href='event:autoj'><b><V>" .. (autoJoin) .. "</font>", playerName, 123, -22, 0, 0, 0x3C5064, 0x2D3C4B, 1, true)
  472. end
  473.  
  474. function eventPlayerDied(playerName)
  475. name = playerName
  476. if enJuego and autoJoin == "on" then
  477. if not matarNoJugadores(name) then
  478. autoj(name)
  479. end
  480. end
  481. if enJuego == false then
  482. tfm.exec.respawnPlayer(playerName)
  483. establecerColor()
  484. elseif respawn == "on" and matarNoJugadores(name) then
  485. tfm.exec.respawnPlayer(playerName)
  486. establecerColor()
  487. elseif respawn == "off" then
  488. verJugadoresMuertos()
  489. end
  490. end
  491.  
  492. function verJugadoresMuertos()
  493. jugadores = 0
  494. muertos = 0
  495. for i, k in pairs(tfm.get.room.playerList) do
  496. jugadores = jugadores + 1
  497. if k.isDead then
  498. muertos = muertos + 1
  499. end
  500. end
  501. if jugadores == muertos then
  502. newMap()
  503. end
  504. end
  505.  
  506. function matarNoJugadores(name)
  507. player = name
  508. for i = 1, #teams.Team1 do
  509. if teams.Team1[i] == player then
  510. return true
  511. end
  512. end
  513. for i = 1, #teams.Team2 do
  514. if teams.Team2[i] == player then
  515. return true
  516. end
  517. end
  518. return false
  519. end
  520.  
  521. function establecerPuntos()
  522. for name in pairs(tfm.get.room.playerList) do
  523. tfm.exec.setPlayerScore(name, 0)
  524. end
  525. end
  526.  
  527. function establecerEquipos()
  528. teams.Team1 = {}
  529. teams.Team2 = {}
  530. local equipo = 1
  531. local jugadoresTotal = {}
  532. for name, p in pairs(tfm.get.room.playerList) do
  533. table.insert(jugadoresTotal, name)
  534. end
  535. for i = 1, #jugadoresTotal do
  536. numJugador = math.random(#jugadoresTotal)
  537. agregarJugador = jugadoresTotal[numJugador]
  538. table.remove(jugadoresTotal, numJugador)
  539. if equipo == 1 then
  540. table.insert(teams.Team1, agregarJugador)
  541. equipo = 2
  542. elseif equipo == 2 then
  543. table.insert(teams.Team2, agregarJugador)
  544. equipo = 1
  545. end
  546. end
  547. ui.addTextArea(3, "<p align='center'><font color='#CB546B'>" .. (table.concat(teams.Team1,"\n") or ""), nil, 15, 72, 180, 266, 0x2B2B2B, 0x121212, 1, true)
  548. ui.addTextArea(4, "<p align='center'><font color='#2F7FCC'>" .. (table.concat(teams.Team2,"\n") or ""), nil, 605, 72, 180, 266, 0x2B2B2B, 0x121212, 1, true)
  549. end
  550.  
  551. function establecerColor()
  552. for i, k in pairs(teams.Team1) do
  553. tfm.exec.setNameColor(k, 0xCB546B)
  554. end
  555.  
  556. for i, k in pairs(teams.Team2) do
  557. tfm.exec.setNameColor(k, 0x2F7FCC)
  558. end
  559. end
  560.  
  561. function eventPlayerWon (playerName, timeElapsed, timeElapsedSinceRespawn)
  562. if enJuego and first then
  563. first = false
  564. establecerTiempoGanar()
  565. tfm.exec.setPlayerScore(playerName, 1,true)
  566. for i, v in pairs(teams.Team1) do
  567. if playerName == v then
  568. puntos.team1Puntos = puntos.team1Puntos + 1
  569. ui.addTextArea(666, "<b><font size = '16' color='#CB546B'>" .. playerName .. "</font><font size ='16'> hizo first!", nil, 9, 368, 0, 0, 0x2B2B2B, 0, 0.7, true)
  570. end
  571. end
  572. for i,v in pairs (teams.Team2) do
  573. if playerName == v then
  574. puntos.team2Puntos = puntos.team2Puntos + 1
  575. ui.addTextArea(666, "<b><font size = '16' color='#2F7FCC'>" .. playerName .. "</font><font size ='16'> hizo first!", nil, 9, 368, 0, 0, 0x2B2B2B, 0, 0.7, true)
  576. end
  577. end
  578. if puntos.team1Puntos == puntosParaGanar -1 and puntos.team2Puntos == puntosParaGanar -1 then
  579. puntosParaGanar = puntosParaGanar +1
  580. end
  581.  
  582. ui.addTextArea(300, "<font size = '18' color='#CB546B'>" .. puntos.team1Puntos .. "<font color='#00C17C'> x " .. "<font color='#2F7FCC'>" .. puntos.team2Puntos .. "<font color='#00C17C'> / " .. puntosParaGanar, nil, coordenadas[1], coordenadas[2], 0, 0, 0x2B2B2B, 0x121212, 0.8, true)
  583.  
  584. if puntos.team1Puntos >= puntosParaGanar then
  585. team1Gano = true
  586. ganador(playerName)
  587. end
  588. if puntos.team2Puntos >= puntosParaGanar then
  589. ganador(playerName)
  590. end
  591. end
  592. end
  593.  
  594. print("<CE>Lua cargado correctamente!</CE><br><R>Cualquier error o sugerencia susurrar a /c Blood#3565. Gracias por jugar mi lua &lt;3</R>")
  595.  
  596. function settings(player)
  597. ui.addTextArea(49, "", player, 4, 10, 790, 400, 0x000000, 0x121212, 0.8, true)
  598. ui.addTextArea(50, "<br><b><R>Comandos de administrador:</R><br></b><CE>!team1</CE> o <CE>!team2</CE> <BV>[nombresJugadores]</BV> (ejemplo: <CE>!team1</CE><BV> Anto#6095</BV><br><CE>!add </CE><V>team1</V> o <V>team2</V><BV> [nombresJugadores] </BV>- Añade uno o varios jugadores al equipo escogido (ejemplo: <CE>!add</CE><V> team1</V><BV> Anto#6095</BV>).<br><CE>!skip</CE> o <CE>!saltar </CE> - Pasa al siguiente mapa.<br><CE>!puntos </CE><V>team1</V> o <V>team2 </V><BV>[puntaje]</BV> - Establece el número de puntos de un equipo.<br><CE>!d</CE><V> [puntaje]</V> - Establece el número de puntos para ganar.<br><CE>!autojoin</CE> - Activa/desactiva el AutoJoin.<br><CE>!respawn</CE> - Activa/desactiva poder respawnear.<br><CE>!coordenadas</CE> - Permite cambiar la posición de donde se encuentra el score.<br><CE>!modo</CE> - Cambia el modo de juego.<br><p align='right'><CH>Lua by: Blood#3565", player, 200, 100, 400, 200, 0x2B2B2B, 0x121212, 1, true)
  599. ui.addTextArea(51, "<p align='center'><font size ='13' color='#00C17C'><b>Ayuda", player, 350, 85, 100, 20, 0x2B2B2B, 0x121212, 1, true)
  600. ui.addTextArea(52, "<p align='center'><V><a href='event:cerrar'><font size='14' color='#F93018'><b>X", player, 583, 98, 0, 0, 0, 0, 1, true)
  601. end
  602.  
  603. function ganador(playerName)
  604. ui.removeTextArea(666)
  605. enJuego = false
  606. scoreTop = -1
  607. nombreTop = ""
  608. for name, p in pairs(tfm.get.room.playerList) do
  609. if p.score + 1 > scoreTop then
  610. scoreTop = p.score + 1
  611. nombreTop = name
  612. end
  613. end
  614. tfm.exec.newGame(7589151)
  615. tfm.exec.disableAfkDeath(true)
  616. establecerColor()
  617. if team1Gano then
  618. ui.addTextArea(170, "<b><P align='center'><font size = '15'>¡El equipo 1 ganó!", nil, 300, 27, 200, 25, 0x2B2B2B, 0x121212, 0.8, true)
  619. else
  620. ui.addTextArea(170, "<b><P align='center'><font size = '15'>¡El equipo 2 ganó!", nil, 300, 27, 200, 25, 0x2B2B2B, 0x121212, 0.8, true)
  621. end
  622.  
  623. ui.addTextArea(171, "<b><font size = '13'><CE>Último punto: </CE><R>" .. playerName, nil, 480, 378, 0, 0, 0x2B2B2B, 0x121212, 0.8, true)
  624. ui.addTextArea(172, "<b><CE><font size = '13'>Mejor jugador: <CE><R>" .. nombreTop, nil, 103, 378, 0, 0, 0x2B2B2B, 0x121212, 0.8, true)
  625. ui.addTextArea(173, "<p align='center'><V><a href='event:restart'><CE><font size = '13'><b>Restart", adm, 358, 55, 85, 20, 0x2B2B2B, 0x121212, 0.8, true)
  626. tfm.exec.setGameTime(10000)
  627. end
  628.  
  629. function textoArea()
  630. if verTexto then
  631. ui.addTextArea(0, "", nil, 200, 62, 400, 12, 0x2B2B2B, 0x121212, 0.7, true)
  632. ui.addTextArea(1, "", nil, 200, 44, 400, 12, 0x2B2B2B, 0x121212, 1, true)
  633. ui.addTextArea(2, "<p align='center'><font color='#E2FF14'><b>" .. (adm), nil, 320, 36, 150, 20, 0x2B2B2B, 0x121212, 1, true)
  634. ui.addTextArea(3, "<p align='center'><font color='#CB546B'>" .. (table.concat(teams.Team1,"\n") or ""), nil, 15, 72, 180, 266, 0x2B2B2B, 0x121212, 1, true)
  635. ui.addTextArea(4, "<p align='center'><font color='#2F7FCC'>" .. (table.concat(teams.Team2,"\n") or ""), nil, 605, 72, 180, 266, 0x2B2B2B, 0x121212, 1, true)
  636. ui.addTextArea(5, "<p align='center'><font color='#CB546B'><b>Team 1", nil, 10, 44, 190, 20, 0x2B2B2B, 0x121212, 1, true)
  637. ui.addTextArea(6, "<p align='center'><font color='#2F7FCC'><b>Team 2", nil, 600, 44, 190, 20, 0x2B2B2B, 0x121212, 1, true)
  638. ui.addTextArea(7, "<p align='center'><V><a href='event:iniciarJuego'><font color='#F93018'><b>Iniciar", nil, 375, 60, 0, 0, 0x2B2B2B, 0x121212, 1, true)
  639. ui.addTextArea(8, "<p align='center'><V><a href='event:cambiarModo'><font color='#00C17C'><b>Modos", nil, 225, 36, 70, 20, 0x2B2B2B, 0x121212, 1, true)
  640. ui.addTextArea(9, "<p align='center'><V><a href='event:llenarEquipos'><font color='#F93018'><b>Llenar", nil, 236, 60, 0, 0, 0x2B2B2B, 0x121212, 1, true)
  641. ui.addTextArea(10, "<p align='center'>Score: <font color='#00C17C'><b>" ..(puntosParaGanar), nil, 500, 36, 70, 20, 0x2B2B2B, 0x121212, 1, true)
  642. ui.addTextArea(11, "<p align='center'><V><a href='event:vaciar'><font color='#F93018'><b>Vaciar", nil, 515, 60, 0, 0, 0x2B2B2B, 0x121212, 1, true)
  643. ui.addTextArea(13, "<p align='center'>AutoJoin: <V><a href='event:autoj'><b><V>" .. (autoJoin) .. "</font>", nil, 123, -22, 0, 0, 0x3C5064, 0x2D3C4B, 1, true)
  644. ui.addTextArea(12, "<p align='center'><font color='#00C17C'><b>Modo actual: " .. modo .. "</b>", nil, 300, 375, 200, 25, 0x2B2B2B, 0x121212, 0.7, true)
  645. ui.addTextArea(15, "<p align='center'><V><a href='event:settings'><font color='#C2C2DA'><b>?", nil, 3, -22, 20, 0, 0x3C5064, 0x2D3C4B, 1, true)
  646. ui.addTextArea(14, "<p align='center'>Respawn: <V><a href='event:respawn'><b><V>" .. respawn .. "</font>", nil, 33, -22, 0, 0, 0x3C5064, 0x2D3C4B, 1, true)
  647. establecerColor()
  648. else
  649. for i=0, 12 do
  650. ui.removeTextArea(i)
  651. end
  652. end
  653. end
  654.  
  655. function string.split(s, pattern, n)
  656. local st = {}
  657. for sb in string.gmatch(s, "[^"..pattern.."]+") do
  658. if not n or n > -1 then
  659. table.insert(st,sb)
  660. else
  661. st[#st] = st[#st]..pattern..sb
  662. end
  663. n = n and n-1 or false
  664. end
  665. return st
  666. end
  667.  
  668. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement