Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[__ __ __ ___ __ _ __ __ ____
- / / / / / / / _ | / / | | / / _/_/ / __/
- / /__/ /_/ / / __ | / / | |/ / _/_/ _\ \
- /____/\____/ /_/ |_| / / |___/ /_/ /___/
- /_/
- _____ _ _ _ _
- |_ _| | || | | | | |
- | | _ __ ___ | || | ___ __ _ _ __ __| | ___ | | ___
- | | | '__| / _ \ | || | / _ \ / _` || '_ \ / _` | / _ \ | | / _ \
- | | | | | (_) || || || __/| (_| || | | || (_| || (_) || || (_) |
- \_/ |_| \___/ |_||_| \___| \__,_||_| |_| \__,_| \___/ |_| \___/
- V4.9
- [NOTE] Some pieces of code are created by Awesomz#2736
- -----------------------------------------------------------------------------------]]
- local ADMINISTRADOR = "Chuty#3190" -- Cambia tu nombre para ser administrador
- local enableRateMaps = false -- Enable map rating
- local bulletDelay = 1
- -----------------------------------------------------------------------------------]]
- --[[
- Comandos:
- !saltar - Para cambiar de mapa
- !puntos - Para cambiar el puntaje, ej: !puntos team1 5
- !np @codigo - Para poner cualquier mapa
- !pausa - Para pausar el juego
- !team - Para asignar jugadores a un equipo, ej: !team1 Trolleandolo
- !d NUMERO - Asigna el puntaje para ganar, ej: !d 20
- !añadir team nick - Añade un jugador a el equipo especificado, ej: !añadir team4 Trolleandolo
- !reset - Resetea el juego
- !quitar NOMBRE - saca a un jugador del juego
- !puntaje - para ver el puntaje [SOLO EN MODO DEATHMATCH]
- !k [playerName] - kills player
- --------------------------------------------------------------------
- ]]
- -----------------------------------------------------------------------------------
- local WINS = 15 -- Puntaje para ganar.
- ------------------------------------------------------------------------------------
- --[[
- MEJORAS DE LA VERSIÓN
- [BOTÓN REVANCHA EN DEATHMATCH Y TEAMS]
- [SE QUITÓ UN BUG]
- [SE AÑADIERON MAPAS DE BOOTCAMP]
- [SE REDUJERON LAS PROBABILIDADES DE BUG]
- [SE AÑADIÓ MODO 2 TEAMS AL AZAR]
- ]]
- math.randomseed(os.time())
- system.disableChatCommandDisplay("k")
- system.disableChatCommandDisplay("conj", true)
- system.disableChatCommandDisplay("np", true)
- system.disableChatCommandDisplay("pause", true)
- system.disableChatCommandDisplay("saltar", true)
- system.disableChatCommandDisplay("s", true)
- system.disableChatCommandDisplay("puntaje", true)
- system.disableChatCommandDisplay("antleve", true);
- tfm.exec.disablePhysicalConsumables()
- tfm.exec.disableAutoShaman()
- tfm.exec.disableAutoNewGame()
- tfm.exec.disableAutoTimeLeft()
- system.disableChatCommandDisplay()
- local playersAllowedToConj = {}
- local ratedMapsData = {}
- local mapToRate = "@0"
- local teams = {
- [1] = {},
- [2] = {},
- [3] = {},
- [4] = {},
- }
- local points = {
- [1] = 0,
- [2] = 0,
- [3] = 0,
- [4] = 0,
- }
- local equipos = {}
- local puntos = {}
- local modob = "racing"
- local modo = "bootcamp"
- local modo2 = "Deathmatch"
- local modo2b = "normal"
- local tiempo = 60
- tonumber(tiempo)
- local isfirst = false
- local gameRunning = false
- local winTime = false
- local playersInGame = {}
- local distanciax = 30
- local distanciay = 80
- local textarealugar = 300
- local textareaid = 0
- local mapasmix = {3046622,1844404,2319756,1921105,235863,481141,3710878,3745348,1551411,599339,1132841,3186738,1445806,2950316,1999433,7588217,7588218,7588221,7588222,7588224,7588225,7588229,7588230,7588233,7588235,7588238,3517551,7588239,7588240,7588243,7588244,7588245,7588246,7588249,7588251,7588253,7588256,7588257,7586454,4564380,1709079,1463576,2473784,1990585,4225415,3534755,1529753,6568183,3964168,4465679,5830619,1636847,3084024,2978758,2207242,2828225,1430257,1611752,5083570,1503669,3658619,3712466,2156325,2713762,7301894,912490,3637190,3690789,1469911,5086164,3702120,721910,2093306,3668632,3891989,3865829,1807161,2681705,2013606,1220037,7586576,7586577,7586578,7586579,7586581,7586582,7586583,7586584,7586585,7586587,7586589,7586590,7586591,7586592,7586593,7586594,7586595,3610554,7586596,7586597,7586598,7586600,7586601,7586602,3089485,7586603,2163742,1053539,1721251,5478906,6205970,3156745,4348352,3241835,3326440,1569481,3636571,2986279,1643776,3837289,5431781,6752042,2418253,2416543,5160713,3358124,411687,1712441,193187,2877165,1608238,1819776,3480598,2626804,3581991,3898426,2481042,3181008,4182202,5611222,2100416,2816064,2543452,3932685,5105940,389768,5395761,3697752,1967351,6830525,3896856,2705995,3489333,5484871,2501538,5313078,1118306,4818087,3428934,3757278,5523199,1944889,1519256,2894515,3150084,1468561,5499302,4900101,3570936,7585875,7585876,7585877,7585879,7585888,7585889,7585892,7585893,7585896,7585897,7585898,7585899,7585900,3520878,7585901,7585903,7585904,7585906,193187,7585907,7585908,7585911,7585912,6733104,521756,2785571,7243656,2504433,268985,4697282,2857448,2457864,1387242,2983538,1746823,6872493,3851834,3143538,468972,5814223,3841284,3630979,3216342,2774931,1040236,677608,895971,3564891,3676523,2159625,3697872,6121939,3806103,3946237,5539855,1817776,2185227,2445318,2973285,6203577,1606904,3190335,6103100,1590935,520308,2154166,6202855.1761416,2767238,3539557,531393,1537810,7521287,3803640,3705380,5000056,2962094,3549002,7259687,1699725,1451996,1610004,1338610,296361,1548446,3023500,6304005,4380537,7074890,3520951,1652941,3755613,4009415,401705,2237427,6201167,2784397,5255657,533946,3015348,4234518,3387926,1808440,852036,4271527,3661778,1580042,2880295,1616692,2413286,3988481,2583328,3221567,1453388,2972456,5017009,3663231,3491935,3478705,1891199,6140452,6498002,1706451,3777243,1691451,3685069,1964070,5070340,1972853,2178289,1418353,3849085,4298073,2211530,1845355,6109280,2035594,7583983,1999538,733188,7583985,1407496,885790,3717973,3906543,5948551,5976869,2452276,6070666,1487531,3026533,1975642,6714712,3217173,542206,2913914,5656820,1769722,1780844,7227763,7584185,7584186,7584187,7584189,7584190,2668543,7584191,7584192,7584193,7584194,7584195,5707667,7584197,7584198,7584201,7584202,7584204,1840109,3035430,3641597,5723425,716454,1748936,2698747,2024218,3204335,2833702,505805,2048050,3696199,3089894,1828315,3069262,3750609,2731707,3729330,1794589,2017255,7491603,4640565,4055165,6840620,6965421,3164541,6965421,3685464,2054943,365315,5813469,1033390,7054190,1124859,3641873,3661173,1473836,2431444,3503305,5737012,2423265,1705725,1949215,1589402,2476398,5710452,5919033,2879902,3497217,6571252,3433197,6104868,6726790,1380450,2558489,3721136,1650589,3647084,3624946,6557245,3912825,5166234,3029129,1477421,1799351,1737233,2038475,1446502,2012857,1958837,5432386,6042206,243962,5070428,2198167,2749103,1369255,2557752,5188867,3731931,3238202,1439286,5176687,1446952,1142162,3328963,721229,6050971,3531249,3756184,1532940,6660659,3184847,1971197,3832344,5293621,2239095,7581422,3379444,7581425,5402499,7581426,7581430,7581431,7581433,857969,7090005,7581435,7581437,7581441,4702472,7581442,7581443,7581444,7581445,7581446,7581447,7581448,7581449,7581450,5213306,7581451,7560419,7581453,7581456,7581457,7581458,5746152,7227007,4864351,3060011,5200910,3257930,2398407,1544861,3144670,1644081,2006666,1580374,5796038,2815472,5681686,3100650,2692126,1741073,2102814,3710363,1402257,2665959,3615479,2808418,5756977,370831,2129581,3684931,2716169,1609642,3702443,4359062,6516286,5524577,2274853,3831715,3478750,554595,3681488,3429348,1630969,808903,1815144,1997567,2984611,4966199,2479767,3350174,2977670,5758757,1776462,6032284,1494544,4211491,1819646,2787653,2915889,4723257,1284922,3402209,5544351,5096786,1421488,1319953,2151630,3090268,3728775,2696883,6975901,1682563,1055301,4089620,5493813,3388889,3873919,3621510,2040327,7563886,7563888,1703062,1770702,2049829,1031162,1940633,1477077,3485112,3650626,2240014,3000880,4833628,1568124,2599257,2457551,3963989,7574385,1923304,319426,2064891,5952334,5854437,2962820,3909564,3110731,3746970,3671792,630767,3960389,4625712,1473876,7088745,6647453,3236460,1391129,3894282,1664227,2816435,5838710,3285994,5017387,1476814,2306483,5568574,2537299,1183614,6255741,4143293,1357913,329489,768679,312415,345232,541888,883644,541088,415457,527634,5327280,3361351,1792257,2797861,2954979,3881931,3733964,2320378,7574387,7574388,7574390,7574391,7574392,2882873,2695460,5597023,2098179,7574400,2201219,5736061,1582926,1677763,38286787,1878759,7543645,393067,3067756,3963989,6717825,6731562,6820863,5865143,5746807,278585,1821529,6800839,141355,1220087,2922338,411415,7574383,5604555,6453895,7288042,2011033,1056854,3041398,311316,7514011,2211509,2982818,1566653,2266481,3357603,2802076,454094,1143472,5661746,3042024,4130245,1380341,7574381,7574382,3413565,3755295,3006464,2866340,2428982,3452457,2736710,439982,2713132,6526973,2425058,5489217,5231904,3164976,3783573,2141733,5281388,2624327,2455731,4306045,3318104,4427048,5896853,1642281,3095578,3821686,2247536,524651,3635836,2429975,2982051,1854121,313539,2055462,1357903,3915506,1213682,3569080,1676593,2187555,1998209,2200136,1739798,756388,2543093,5265432,2905532,2479621,7563913,1973197,1349271,5559971,7066091,5520818,2613717,3676771,1278553,3604629,1652907,5804164,1994754,7121654,1672102,3579181,3747997,136372,2918560,4395334,2363401,2203543,854252,7002137,2459502,3587695,2053429,697099,734286,566586,3707753,1626985,5784387,1265041,6798468,3772198,4244560,2673219,1695546,2994363,2730612,3100754,886099,3110056,3701884,3350141,3458781,112125,7294527,3099936,2317494,2286884,1620205,1941646,2451539,5462759,1752343,1291046,1767282,1634135,4940660,395638,1982490,1476917,1520050,5046251,2511270,7111081,3486777,339688,1817461,2601124,2242986,1465794,2925302,1705533,2922706,4836774,3660363,745660,3169468,1520763,3509457,3569617,355391,6648567,862026,2023835,2502370,7193672,1294506,3343007,2226606,3683984,1700134,3292563,7458781,2060440,3777791,3219347,5474,771,6020360,6886256,1585825,4483044,2054433,4372220,3823226,2111371,7014627,1416017,1569410,2901923,5597196,3368095,1959434,5120511,3800025,1874309,3903481,6025066,840023,2682348,3699720,2896854,3688479,1502057,1555263,809981,585601,1375127,1596918,360669,2840545,5635682,1846140,2615488,2849336,3201680,1231531,3608639,3146467,5324271,1976484,9789163120589,3680975,5517500,3089475,3192865,447198,5133665,3565552,1662547,2770880,1311245,6149285,6569917,6569917,1002415,562828,3245190,5484232,2459645,3568909,7552342,1203580,4082130,2222106,609377,6827736,1605542,5782928,1733405,7073872,2003397,3176790,2704798,940479,17024143193031,3495072,5246769,1886726,3806514,444669,4346701,3637879,1651912,2810301,2483585,6013518,2967201,1712139,1434614,2037858,1486073,796522,1704970,7562539,6006077,2904194,2299901,7379672,3428969,3695243,1646580,4856787,3693603,1695961,573162,1602006,5225660,7279147,4130519,2847085,432838,3367472,1661557,5578142,3848961,556991,5470076,1934684,7423396,3827073,2216672,5925390,2422320,6011897,1684971,5874848,2904364,1826106,1299778,3889066,1651396,2474610,2954389,2912090,1557183,1937029,2507487,5478924,1715294,2922372,5463645,1681132,4780988,913716,3545388,2932771,5413653,1845425,7295773,7094153,2493682,2990927,2887564,2677697,408672,5316507,3703101,7094153,2493682,2990927,3632558,2887564,2677697,408672,5316507,3703101,1308009,4770812,5337079,3755004,1415101,5745185,982968,3660773,1308009,4770812,5337079,3121001,247806,2271606,3931104,37258313205507,5505571,2668317,2885795,7051723,3732788,6507006,1709842,3412978,4119570,3678477,1576605,7175099,1305918,2924041,530050,1671341,6538336,2590428,3111412,3444188,2745018,4100202,2604892,3778127,2930905,5229169,7201798,1935783,1766070,1934713,3600756,2213804,2767444,2422252,2581588,2008408,3225517,1583004,806374,4743209,2206428,1337908,3639063,5819000,3696099,2222914,2000227,7422917,1883283,1686313,5521222,3089084,2442179,1759304,1747395,6538525,2553999,6982855,3685130,6751808,6099941,4934225,1516378,5805504,675584,470956,2510902,1242503,3749719,2487185,4129854,3526684,5851713,1567499,1723502,485685,5331758,3063021,312874,5086885,1334799,2673350,2094529,816937,1984183,3660915,5067745,1836636,2570299,4974043,2958926,1617612,16642067,2324943,1207415,7546911,2818215,4244697,3974286,1694497,7165647,3671337,2801423,2510424,2306838,1388511,624595,1297286,2436358,6091196,5512914,487571,534127,2815852,6458416,3804033,4933567,5744422,5722902,5470939,5452179,5457991,1640994,2873717,1524883,1845772,3674891,1875155,2464178,1739033,7421606,3724024,1791754,4159572,967165,2701754,5567026,2472185,5552462,331054,249043,3889066,1651396,2474610,2954389,2912090,1557183,1937029,2507487,5478924,1715294,2922372,5463645,1681132,4780988,913716,3545388,2932771,5413653,3084699,2785576,379257,1860558,4848841,3177975,2873752,2529630,2521006,400020,7543202,7534845,3699951,5905174,1989575,2497300,451053,2184388,1392529,434181,4851652,3721264,2702019,1597479,336108,1338400,7463026,1821872,3678098,1974435,6474880,3134012,2177055,1458500,3305645,856005,1595486,5458093,1612392,2460705,6267145,1580571,1538872,5824666,3872292,2604202,1970794,1794494,6914627,3913043,522169,1557181,2889144,1682581,3570595,2952667,3531094,972593,2828325,3718893,625620,1826923,3777243,3162194,2071143,3175833,2822802,6450734,3075720,1552345,400875,3695422,3617908,4999095,868500,3273027,1830647,3001168,839357,143026,6509298,6216983,2866493,1699319,3913043,6043877,2777244,3790887,1597535,6096882,5366786,1943658,5967356,4644327,2573869,4886905,5497221,6166360,3757587,1601279,409682,3656856,1880412,5548982,440803,3486898,1469614,1691653,3517982,1971388,1591567,2016029,1915474,1257990,2836295,3495373,1595131,2712714,2038888,2667948,2112482,5898371,2152725,1794645,1766575,3413233,1394393,2752920,5826810,1800219,3236194,780379,5880743,3888975,3239977,1672342,1289969,2634502,5898371,1994578,6070379,3974343,3862812,1959522,2695007,1975949,5539548,3817687,1969538,526457,3648898,2497733,3919737,3230126,3112996,1649655,1414281,1419212,1209447,4702472,524427,1578727,4670311,6569858,1900395,5593658,748627,3220216,3036369,1533891,6104868,5208730,3220691,2113571,5692470,1545496,212279,6832768,3411897,5039866,4198229,3220150,5040626,6945400,1580625,3783670,5086760,2954390,4649501,5605098,4316966,3814007,1893227,1570197,3950540,1662866,3720504,124749,1739328,1839751,3267052,3780004,5534969,5493628,2189066,4933333,5000031,2414326,1660312,877064,3650461,1740582,7532482,3694198,2852186,1170709,2872105,1682394,1202364,2153009,4366270,1824797,927167,1295001,919407,6814675,7108753,5556574,2818776,2749154,215024,5307145,4186227,5721017,1295391,2514839,5895587,903753,5642148,3886007,7576967,7577628,7577632,7577633,7577634,7577635,7577636,904700,7577637,7577638,7577639,7577641,7577645,7577646,7577648,7577649,7577650,7577652,7577654,455254,7577656,3708532,7577659,7577660,7577661,7577662,7577663,2951831,1632286,3133284,2888737,2959380,7316490,2923902,1879135,3817089,3743709,5784317,2196639,3491472,2932823,3556939,4721537,5557000,3707957,4449825,4335108,1650317,2627810,4940330,1197771,2515859,924199,5342184,3178756,6461474,3961089,2434803,4028439,3820443,2753029,3902921,1636847,5146101,1352371,6149586,2280915,1566790,2461560,1811706,1663869,6593705,1356823,6712790,1961069,3510802,3674914,2185637,1714183,5772036,4814426,2011425,5719032,3703405,5208010,120696,1677751,1390504,5058856,3153335,1997462,3603807,41413,2439981,2152273,2837758,2846092,5850864,1155577,3507172,287241,3741419,692902,5316041,5301410,3682607,1753932,3091367,788325,1449159,3366992,916292,6347261,1434657,6102366,1255406,2901402,1076556,2798150,1729711,5683203,6837500,1962691,5198233,599132,567368,3950087,4074777,6419244,2916236,4800287,3757673,293239,6536106,809165,3415097,854987,1990729,1476644,3197548,3732761,3042947,1669694,2670433,2863240,3744754,3042024,1414583,1405201,3900432,5568878,1344308,1827745,3192935,1904605,480826,1254895,3641472,4882220,1634079,3172505,2256215,562530,1394768,786326,6158708,3352107,5391121,5067010,2468375,3201256,3724600,6286341,3549181,7186722,339068,1979304,5435620,6028061,2708731,5178280,1201818,5699567,3397714,2247468,2719292,2179111,2232637,2368305,1411884,1623902,3824123,2917535,5641251,3737863,1900927,3026180,6873059,3324192,4289072,3233197,2023564,3691680,2277265,1757932,2676236,6428562,5881430,7576691,7576693,7576695,2794461,7576709,1395712,5530715,7576703,5444350,2207345,2842087,3572040,2162120,2440783,3499995,5130206,2370767,4558726,2591394,4060762,3628872,3532285,4675569,2835676,1528880,1383825,7272444,1961891,3079549,2501462,1986742,7545766,5400102,7070700,7100013,3521381,5504146,1976484,2609729,957128,997153,5727892,2380804,1310682,2807482,3101639,3044133,608631,2563142,1156897,3490631,3662992,1795637,5452668,4217430,2251303,3057877,1646186,5327503,2493682,6191961,1785252,6340741,2488702,3720570,2810346,4877063,3854293,575662,1907014,3047479,1986742,1716079,2606512,2606512,1612436,1982506,220935,1447073,4069988,5950280,5613707,2720250,1764190,7362662,4327453,1854383,1667570,2956296,1578036,354759,2870581,1462709,3718084,4797932,3337441,5410633,2621030,1837491,2825611,3207688,6101891,1965085,1618019,1977256,3936998,264703,3180155,1583081,1857925,3577533,1889832,1674133,2395730,1816288,865228,1863285,562845,4140811,3522511,4675782,2049637,885029,4888891,3555164,1112380,1707338,3141100,2815451,1346358,1485567,1929667,3411709,545781,3931308,2376400,2074773,4350786,5696509,1212123,3675423,870306,369681,3911642,732670,65153223208273,1947104,2861616,7146696,5727966,5544344,2200571,1654575,2870129,2438149,1783803,4726846,566405,5521249,2964283,1718606,2931383,6068515,356909,3387580,3662963,1390843,3380309,2273250,1463033,5696927,3604144,1995181,2223354,621792,4298881,2389991,3018399,1738402,4216313,1588182,1509640,3475709,2732012,3786946,5444310,2740735,3678170,1760310,2760069,2136431,4414133,2661522,2298033,3693685,2041416,2993613,4901435,2629615,6954201,1481171,2857562,478496,3487949,3046275,1961336,1919727,5000014,2129630,7205609,1728908,446226,1462790,1840202,2094275,2889323,2534715,3685884,2578386,1396216,2598706,2455062,1924872,2824021,3600181,361852,3709369,346069,1824086,1697385,3066506,5749982,4729716}
- local mapasbootcamp = {"#3", "#13"}
- local mapasracing = {7590727,7590728,7590730,7590731,7590735,7590737,7590738,7590744,7590745,7590748,7590754,7590761,7590762,7590763,7590766,7
- 590769,7590800,7590803,7590804,7590807,7590808,7590811,7590812,7590814,7590778,7372887,7373524,7373552,7488711,7467920,732
- 9536,7481567,7372968,75871857373492,7373774,7587189,7581371,7587189,7488680,7467939,7373539,7373773,7488645,7488669,746794
- 2,7373478,7488653,7373774,7587185,7372870,7587192,7581349,7373749,7581364,7372880,7590815,7590818,7590820,7590822,7590823,
- 7590824,7590825,7590827,7590830,7590831,7590833,7590834,7590835,7590837,7590838,7590839,7590840,7590841,7590842,7590844,75
- 90727,7590728,7590730,7590731,7590735,7590737,7590738,7590744,7590745,7590748,7590754,7590759,7590761,7590762,7590763,7590
- 766,7590769,7590800,7590803,7590804,7590807,7590808,7590811,7590812,7590814,7590778,7372887,7373524,7373552,7488711,746792
- 0,7329536,7481567,7373533,7373513,7488693,7373464,7373726,7372875,7373736,7590339,7488685,7372869,7590325,7467937,7467945,
- 7488681,7372962,7467923,7373495,7488684,7372959,7581361,7590519,7591083,7591085,7591086,7591087,7591088,7591089,7591090,75
- 91092,7591094,7591096,7591097,7591098,7591100,7591101,7591102,7591103,7591104,7591122,7591125,7591126,7591127,7591128,7591
- 129,7591132,7591143,7591145,7591147,7591148,7591150,7591151,7591152,7591154,7591155,7591156,7591157,7591158,7591159,759137
- 0,7591375,7591376,7591379,7591380,7591381,7591382,7591383,7591385,7591387,7591389,7591391,7591392,7591394,7591396,7591397,
- 7591400,7591401,7591404,7591591,7591608,7591609,7591610,7591611,7591614,7591615,7591617,7591619,7591620,7591621,7591623,75
- 91624,7591625,7591630,7591845,7591846,7591848,7591850,7591852,7591854,7591855,7591856,7591857,7591858,7591863,7591864,7591
- 865,7591866,7591867,7591868,538116,7592265,7592266,7592267,7592269,7592270,7592271,7592272,7592274,7592274,7592275,7592277
- ,7592278,7592279,7592280,7592281,7592282,7592284,7592285,7592286,7592287,7592288,7592290,7592291,7592292,7592293,7592294,7
- 592296,7592297,5557858,7592299,7592300,7556743,7592302,7592305,5997203,6085603,7592306,7592307,7592308,332290,6079960,5378
- 798,7592312,7592313,6571685,7592314,7532358,630046,7592315,7592316,4895634,6351285,7552728,201442,7592318,7021800,7592319,
- 7592320,7592321,7592323,7508884,7592488,7592489,7592490,7592493,7592494,7592495,7592496,7240530,7592497,7592498,7592499,75
- 92500,7592501,7592503,7592505,7592506,7592507,7592508,7592509,7592510,7386817,7525004,1015582,7280147,7592513,7592514,7592
- 723,7592724,7592725,7592726,7592728,7592729,7592730,7592738,7592739,7592742,75927457592748,7592749,7592751,7592752,759275
- 3,7592756,7592758,7592759,7592761,7592762,7592765,7592766,7592769,7592772,7592772,7592775,7592778,7592781,7592782,7592783,
- 7592784,7592785,7592789,7592790,7592792,7592796,7592798,7592799,7592802,7592804,7592806,7592809,7592811,7592812,7592815,75
- 92822,7592823,7592826,7592828,7592829}
- local maps = mapasracing
- local mapasAntLeve = {6656357,6656349,6974833,6667667,6667663,6667662,6667657,6659986,6659984,6659982,6659978,6659976,6659973,6659967,6659949,6659927,6659921,6659915,6658983,6658975,6658974,6658970,6658955,6658949,6658948,6658945,6658941,6658937,6658934,6658927,6656358,6656357,6656349,6656348,6656344,6656334,6656330,6656329,6656327,6651124,6651121,6651103,6651100,6651097,6651095,6641147,6641145,6641143,6641141,6641138,6641137,6641134,6641124,6641121,6641109,6641101,6641097,6641090,6641088,6641087,6641083,6641079,6641077,6641069,6641067,6641063,6641059,6640889,6640860,6640857,6640854,6640852,6640851,6640828,6640826,6640823,6640807,6640808,6640811,6640816,6640803,6640760,6640758,6640740,6640737,6639268,6639259,6639255,6639258,6639253,6639249,6639248,6639243,6639238,6639236,6639226,6639219,6639215,6639214,6638081,6638078,6638075,6638070,6638068,6638062,6638055,6638025,6638021,6638011,6638008,6638007,6637999,6637996,6637994,6637973,6637951,6637940,6637927,6637924,6637920,6637917,6637914,6637899,6637892,6637890,6637880,6637878,6635343,6635338,6635336,6635326,6635296,6635287,6635280,6635272,6635268,6635262,6635256,6635228,6635212,6635205,6635203,6634068,6634051,6634036,6627883,6626525,6626536,6626556,6626559,6626569,6627439,7124755,7124747,7124744,7124741,7124738,7124732,7124728,7124724,7124721,7124705,7124704,7124703,7124718,7124698,7124693,6667881,6667869,6667865,6667864,6667854,6667819,6667813,6667809,6667807,6667803,6667796,6667785,6667779,6667769,6667761,6667759,6667754,6667747,6667744,6667738,6667735,6667732,6667720,6667705,6667699,6667677,6667674} -- PUT ANTI-LEVE MAPS HERE
- local equipoc= {}
- local colors = {
- [1] = "e54427",
- [2] = "0a98db",
- [3] = "00ff00",
- [4] = "ffff00",
- }
- local queue = {}
- local nteam = 1
- local azar = {}
- local posicion = {}
- local modoazar = ""
- local numeroposicion = 1
- local totales = 0
- local totales2 = 0
- local jugando = {}
- local totaljugando = 1
- local jugandoposicion = {}
- local last_map = 0
- local freezePlayers = { }
- local settings = {
- map = "0",
- ammo = 2,
- force = 50,
- recoil = 10,
- maxObjects = 30,
- ammoTicks = 2,
- }
- local choosenPlayer = {}
- local objects = {}
- local loopCount = 0
- local initializedPlayer = false
- local bulletDELAY = bulletDelay
- local mapsToAdd = {}
- local copyTable = function(l)
- local out = { }
- for k, v in next, l do out[k] = v end
- return out
- end
- function newMap()
- local mapcode = last_map
- while mapcode==last_map do
- mapcode = maps[math.random(#maps)]
- end
- if #queue > 0 then
- mapcode = queue[1]
- table.remove(queue, 1)
- end
- tfm.exec.newGame(mapcode)
- for player, data in pairs(tfm.get.room.playerList) do
- if not playersInGame[player] then
- tfm.exec.killPlayer(player)
- end
- end
- tfm.exec.setGameTime(tiempo)
- if modo2b == "Deathmatch" then
- borrarScoreDeathmatch()
- end
- end
- function modoalazar()
- ui.addTextArea(38, "", nil, 235, 30, 302, 22, 0x324650, 0x5A7A8B, 1, true)
- ui.addTextArea(37, "<p align='center'><V>Administrador: "..ADMINISTRADOR, nil, 235, 30, 300, 20, 0x324650, 0x324650, 1, true)
- ui.addTextArea(2, "", nil, 142, 71, 516, 290, 0x0E1417, 0x0E1417, 1, true)
- ui.addTextArea(4, "", nil, 231, 79, 142, 22, 0x324650, 0x5A7A8B, 1, true)
- ui.addTextArea(5, "<p align='center'><V>Team 1", nil, 232, 80, 140, 20, 0x324650, 0x324650, 1, true)
- ui.addTextArea(6, "", nil, 399, 79, 142, 22, 0x324650, 0x5A7A8B, 1, true)
- ui.addTextArea(7, "<p align='center'><V>Team 2", nil, 400, 80, 140, 20, 0x324650, 0x324650, 1, true)
- for i=8, 11 do
- ui.removeTextArea(i)
- end
- ui.addTextArea(40, "", nil, 231, 120, 140, 200, 0x5A7A8B, 0x5A7A8B, 1, true)
- ui.addTextArea(31, "<p align='center'><font color='#"..colors[1].."'>"..table.concat(teams[1], "\n"), nil, 232, 121, 138, 198, 0x324650, 0x324650, 1, true)
- for i=32, 35 do
- ui.removeTextArea(i)
- end
- ui.addTextArea(36, "", nil, 399, 120, 140, 200, 0x5A7A8B, 0x5A7A8B, 1, true)
- ui.addTextArea(13, "<p align='center'><font color='#"..colors[2].."'>"..table.concat(teams[2], "\n"), nil, 400, 121, 138, 198, 0x324650, 0x324650, 1, true)
- ui.addTextArea(14, "<p align='center'><font color='#5A7A8B'>____ ____</font>", nil, 320, 197, 140, 200, 0, 0, 0, true)
- ui.addTextArea(15, "", nil, 367, 202, 40, 20, 0x5A7A8B, 0x5A7A8B, 1, true)
- ui.addTextArea(16, "<p align='center'><V>VS", nil, 368, 203, 38, 18, 0x324650, 0x324650, 1, true)
- ui.addTextArea(42, "", ADMINISTRADOR, 600, 81, 40, 20, 0x5A7A8B, 0x5A7A8B, 1, true)
- ui.addTextArea(41, "<p align='center'><V><a href='event:salir'>X", ADMINISTRADOR, 601, 82, 38, 18, 0x324650, 0x324650, 1, true)
- ui.addTextArea(45, "", ADMINISTRADOR, 600, 139, 52, 20, 0x5A7A8B, 0x5A7A8B, 1, true)
- ui.addTextArea(46, "<p align='center'><V><a href='event:reset'>Reset", ADMINISTRADOR, 601, 140, 50, 18, 0x324650, 0x324650, 1, true)
- ui.addTextArea(47, "", ADMINISTRADOR, 600, 173, 57, 20, 0x5A7A8B, 0x5A7A8B, 1, true)
- ui.addTextArea(50, string.format("<p align='center'><V>Modo %s - %s ",modob,modo2b),nil, 235, 375, 300, 17, 0x324650, 0x324650, 1, true)
- ui.addTextArea(16, "<p align='center'><V><a href='event:iniciarJogo'>GO", ADMINISTRADOR, 368, 203, 38, 18, 0x324650, 0x324650, 1, true)
- ui.addTextArea(57, "", ADMINISTRADOR, 600, 207, 57, 25, 0x5A7A8B, 0x5A7A8B, 1, true)
- ui.addTextArea(58, "<p align='center'><V><a href='event:volver'><font size='10'>4 Teams", ADMINISTRADOR, 601, 208, 55, 23, 0x324650, 0x324650, 1, true)
- ui.removeTextArea(59)
- ui.removeTextArea(60)
- ui.removeTextArea(53)
- ui.removeTextArea(51)
- ui.removeTextArea(54)
- ui.addTextArea(56, "<p align='center'><V><a href='event:azart'><font size='12'>Azar", ADMINISTRADOR, 601, 246, 55, 18, 0x324650, 0x324650, 1, true)
- verificarmodo2()
- end
- function eventPopupAnswer(popupId, playerName, answer)
- ratedMapsData[#ratedMapsData + 1] = answer == "yes"
- end
- function eventPlayerWon(player)
- if modob == "mix" and enableRateMaps then
- ui.addPopup(1, 1, "Do you like this map?\n( Te gusta este mapa? )", nil, 300, 100, 200, true)
- end
- if not isfirst then
- isfirst = true
- tfm.exec.setGameTime(3)
- if modo2b == "Deathmatch" then
- if puntos[player] >= WINS - 1 then
- gameRunning = false
- winTime = os.time()
- ui.addTextArea(29, string.format("<p align='center'><font size='37' color='#000000'>%s ganó\nLos otros son perdedores xdxdxd", player), nil, 3, 168, 800, 500, 0, 0, 0, true)
- ui.addTextArea(30, string.format("<p align='center'><font size='37'><font color='#cecece'><font color='#ff0000'>%s </font>ganó\nLos otros son perdedores xdxdxd", player), nil, 1, 170, 800, 500, 0, 0, 0, true)
- ui.addTextArea(16, "<p align='center'><font color='#225066' size='18' face='Tw Cen MT Condensed'><a href='event:iniciarJogo'>DE NUEVO", ADMINISTRADOR, 350, 270, 100, 20, 0xFFFFFF, 0xFFFFFF, 1, true)
- end
- tfm.exec.setGameTime(3)
- puntos[player] = puntos[player]+1
- equipoc[player] = "0x115b17"
- displayScoreDeathmatch()
- end
- if modo2b == "normal" then
- if table.contains(teams[1], player) then
- tfm.exec.setGameTime(3)
- points[1] = points[1]+1
- elseif table.contains(teams[2], player) then
- tfm.exec.setGameTime(3)
- points[2] = points[2]+1
- elseif table.contains(teams[3], player) then
- tfm.exec.setGameTime(3)
- points[3] = points[3]+1
- elseif table.contains(teams[4], player) then
- tfm.exec.setGameTime(3)
- points[4] = points[4]+1
- else
- isfirst = false
- end
- winner = false
- if points[1] >= WINS then
- winner = 1
- elseif points[2] >= WINS then
- winner = 2
- elseif points[3] >= WINS then
- winner = 3
- elseif points[4] >= WINS then
- winner = 4
- end
- if winner then
- gameRunning = false
- winTime = os.time()
- local names = {
- "Rojo",
- "Azul",
- "Verde",
- "Amarillo",
- }
- ui.addTextArea(26, string.format("<p align='center'><font size='37' color='#000000'>El equipo %s Ganó\nLos otros son perdedores xdxdxd", names[winner]), nil, 0, 171, 800, 500, 0, 0, 0, true)
- ui.addTextArea(27, string.format("<p align='center'><font size='37' color='#000000'>El equipo %s Ganó\nLos otros son perdedores xdxdxd", names[winner]), nil, 1, 170, 800, 500, 0, 0, 0, true)
- ui.addTextArea(28, string.format("<p align='center'><font size='37' color='#000000'>El equipo %s Ganó\nLos otros son perdedores xdxdxd", names[winner]), nil, 2, 169, 800, 500, 0, 0, 0, true)
- ui.addTextArea(29, string.format("<p align='center'><font size='37' color='#000000'>El equipo %s Ganó\nLos otros son perdedores xdxdxd", names[winner]), nil, 3, 168, 800, 500, 0, 0, 0, true)
- ui.addTextArea(30, string.format("<p align='center'><font size='37'><font color='#cecece'>El equipo <font color='#%s'>%s</font> Ganó\nLos otros son perdedores xdxdxd", colors[winner], names[winner]), nil, 1, 170, 800, 500, 0, 0, 0, true)
- ui.addTextArea(16, "<p align='center'><font color='#225066' size='18' face='Tw Cen MT Condensed'><a href='event:iniciarJogo'>REVANCHA", ADMINISTRADOR, 350, 270, 100, 20, 0xFFFFFF, 0xFFFFFF, 1, true)
- end
- displayScore()
- end
- end
- end
- local evLoop = 0
- function eventLoop(elapsed, remain)
- evLoop = evLoop + 500
- if gameRunning then
- remain = remain/1000
- if remain < 0 then
- remain = 100
- newMap()
- end
- else
- if winTime then
- if winTime > os.time()-30000 then
- else
- winTime = false
- ui.removeTextArea(26)
- ui.removeTextArea(27)
- ui.removeTextArea(28)
- ui.removeTextArea(29)
- ui.removeTextArea(30)
- displayTeams()
- teams = {
- [1] = {},
- [2] = {},
- [3] = {},
- [4] = {},
- }
- points = {
- [1] = 0,
- [2] = 0,
- [3] = 0,
- [4] = 0,
- }
- playersInGame = {}
- end
- end
- end
- for k, v in next, copyTable(freezePlayers) do
- v.time = v.time - .5
- tfm.exec.movePlayer(k, v.x, v.y)
- if v.time == 0 then
- freezePlayers[k] = nil
- end
- end
- if (evLoop >= 1000) and gameRunning then
- bulletDELAY = bulletDELAY - 1
- end
- if bulletDELAY <= 0 then
- if loopCount == 0 and initializedPlayer then
- ammo()
- end
- loopCount = (loopCount + 1) % settings.ammoTicks
- bulletDELAY = bulletDelay
- end
- end
- function string.title(s)
- return string.gsub(s, "%a", function(c)
- return string.upper(c)
- end, 1)
- end
- function resetmostrarjugadoresdeathmatch()
- distanciax = 30
- distanciay = 80
- textarealugar = 302
- textareaid = 0
- end
- math.randomseed(os.time());
- -- Create 4 teams:
- for i = 1, 4 do
- teams[i] = {}
- points[i] = 0
- end
- function getTeamIndexWithLessPlayers()
- local teamIndex = 1;
- for i = 1, #teams do
- if (#teams[i] < #teams[teamIndex]) then
- teamIndex = i;
- end
- end
- return teamIndex;
- end
- function eventChatCommand(player, command)
- args = string.split(command, " ")
- if ADMINISTRADOR:match(player) then
- if (args[1] == 'conj') then
- local name = args[2] or player
- system.bindMouse(name, true);
- playersAllowedToConj[name] = not playersAllowedToConj[name];
- end
- if args[1] == 's' and args[3] then
- if args[3] == 'all' then
- for name, info in next, tfm.get.room.playerList do
- if not info.isDead then
- tfm.exec.changePlayerSize(name, tonumber(args[2]) or 1)
- end
- end
- else
- tfm.exec.changePlayerSize(args[3], tonumber(args[2]) or 1)
- end
- end
- if args[1] == 'p' and args[2] then
- args[3] = tonumber(args[3])
- local who = args[2]
- if who ~= "*" then
- who = who:lower():gsub("%a", string.upper, 1)
- if not who:find("#") then
- who = who .. "#0000"
- end
- if not args[3] then
- freezePlayers[who] = nil
- elseif tfm.get.room.playerList[who] then
- freezePlayers[who] = { x = tfm.get.room.playerList[who].x, y = tfm.get.room.playerList[who].y, time = args[3] }
- end
- else
- if not args[3] then
- freezePlayers = { }
- else
- for k, v in next, tfm.get.room.playerList do
- freezePlayers[k] = { x = v.x, y = v.y, time = args[3] }
- end
- end
- end
- end
- end
- if modo2b == "Deathmatch" then
- if args[1] == "puntaje" then
- resetmostrarjugadoresdeathmatch()
- ui.addTextArea(300, "<p align='center'><V><a href='event:cerrarpuntaje'>X", player, 30, 50, 30, 16, 0x324650, 0x324650, 1, true)
- ui.addTextArea(301, string.format("<p align='center'><V>Deathmatch a %s puntos",WINS), player, 80, 45, 180, 18, 0x324650, 0x000000, 1, true)
- for k,players in pairs(tfm.get.room.playerList) do
- if puntos[k] then
- equipos[k] = k
- playersInGame[k] = true
- if textareaid >= 32 then
- else
- ui.addTextArea(textarealugar, string.format("<p align='center'><V>%s - %s",k,puntos[k]), player, distanciax, distanciay, 140, 18, 0x324650, 0x000000, 1, true)
- distanciay = distanciay + 37
- textareaid = textareaid + 1
- textarealugar = textarealugar + 1
- if textareaid == 8 then
- distanciax = distanciax + 190
- distanciay = 80
- textareaid = 0
- end
- end
- end
- end
- end
- end
- --Make the player join a random team:
- if (command:match("^join") and not playersInGame[player]) then
- player = string.title(player)
- if modoazar == "true" then
- if #teams[1] < #teams[2] then
- teamToJoin = 1
- else
- teamToJoin = 2
- end
- table.insert(teams[teamToJoin], player)
- playersInGame[player] = true
- else
- local teamToJoin = getTeamIndexWithLessPlayers();
- local lowest_score = -1
- for i=1, 4 do
- if points[i]<lowest_score or lowest_score==-1 then
- lowest_score = points[i]
- teamToJoin = i
- end
- end
- table.insert(teams[teamToJoin], player)
- playersInGame[player] = true
- end
- end
- if player:lower() == ADMINISTRADOR:lower() then
- if command:sub(1,1) == "k" then
- tfm.exec.killPlayer(command:sub(3))
- end
- args = string.split(command, " ")
- if args[1] == "team1" then
- if modo2b == "normal" then
- table.remove(args, 1)
- teams[1] = {}
- points[1] = 0
- for index, player in pairs(args) do
- player = string.title(player)
- table.insert(teams[1], player)
- playersInGame[player] = true
- end
- if modoazar == "true" then
- modoalazar()
- else
- displayTeams()
- end
- end
- elseif args[1] == "team2" and modo2b == "normal" then
- table.remove(args, 1)
- teams[2] = {}
- points[2] = 0
- for index, player in pairs(args) do
- player = string.title(player)
- table.insert(teams[2], player)
- playersInGame[player] = true
- end
- if modoazar == "true" then
- modoalazar()
- else
- displayTeams()
- end
- elseif args[1] == "team3" and modo2b == "normal" then
- table.remove(args, 1)
- teams[3] = {}
- points[3] = 0
- for index, player in pairs(args) do
- player = string.title(player)
- table.insert(teams[3], player)
- playersInGame[player] = true
- end
- if modoazar == "true" then
- modoalazar()
- else
- displayTeams()
- end
- elseif args[1] == "team4" and modo2b == "normal" then
- table.remove(args, 1)
- teams[4] = {}
- points[4] = 0
- for index, player in pairs(args) do
- player = string.title(player)
- table.insert(teams[4], player)
- playersInGame[player] = true
- end
- if modoazar == "true" then
- modoalazar()
- else
- displayTeams()
- end
- elseif args[1] == "saltar" then
- newMap()
- elseif args[1] == "np" then
- table.remove(args, 1)
- for i, arg in next, args do
- table.insert(mapsToAdd, i, arg)
- end
- for order, list in next, mapsToAdd do
- table.insert(queue, order, list)
- end
- elseif args[1] == "d" then
- if args[2] then
- WINS = tonumber(args[2])
- displayScore()
- end
- elseif args[1] == "añadir" and modo2b == "Deathmatch" then
- if args[2] then
- table.remove(args, 1)
- for index, player in pairs(args) do
- equipos[player] = player
- puntos[player] = 0
- playersInGame[player] = true
- end
- end
- elseif args[1] == "añadir" and modo2b == "normal" then
- if args[2] and args[3] then
- if args[2] == "team1" and modo2b == "normal" then
- table.remove(args, 1)
- table.remove(args, 1)
- for index, player in pairs(args) do
- player = string.title(player)
- table.insert(teams[1], player)
- playersInGame[player] = true
- end
- end
- if args[2] == "team2" and modo2b == "normal" then
- table.remove(args, 1)
- table.remove(args, 1)
- for index, player in pairs(args, 3) do
- player = string.title(player)
- table.insert(teams[2], player)
- playersInGame[player] = true
- end
- end
- if args[2] == "team3" and modo2b == "normal" then
- table.remove(args, 1)
- table.remove(args, 1)
- for index, player in pairs(args) do
- player = string.title(player)
- table.insert(teams[3], player)
- playersInGame[player] = true
- end
- end
- if args[2] == "team4" and modo2b == "normal" then
- table.remove(args, 1)
- table.remove(args, 1)
- for index, player in pairs(args) do
- player = string.title(player)
- table.insert(teams[4], player)
- playersInGame[player] = true
- end
- end
- end
- elseif args[1] == "quitar" then
- if args[2] then
- for index, player in pairs(args) do
- player = string.title(player)
- playersInGame[player] = false
- for i=1, 4 do
- for n=1, #teams[i] do
- if teams[i][n] == player then
- table.remove(teams[i], n)
- end
- end
- end
- end
- end
- elseif args[1] == "reset" then
- teams[1] = {}
- points[1] = 0
- teams[2] = {}
- points[2] = 0
- teams[3] = {}
- points[3] = 0
- teams[4] = {}
- points[4] = 0
- equipos = {}
- puntos = {}
- modob = "racing"
- modo = "bootcamp"
- modo2 = "Deathmatch"
- modo2b = "normal"
- displayTeams()
- elseif args[1] == "puntos" and modo2b == "normal" then
- if args[2] and args[3] then
- local team = tonumber(args[2]:match("team(%d+)") or 0)
- if team > 0 and team < 5 then
- local newScore = tonumber(args[3]) or points[team]
- points[team] = newScore
- displayScore()
- end
- end
- elseif args[1] == "pausa" then
- gameRunning = not gameRunning
- if not gameRunning then
- ui.addTextArea(90, "", nil, 235, 200, 302, 22, 0x324650, 0x5A7A8B, 1, true)
- ui.addTextArea(91, "<p align='center'><V> Juego pausado ", nil, 235, 200, 300, 20, 0x324650, 0x324650, 1, true)
- tfm.exec.disableAutoTimeLeft(true)
- else
- ui.removeTextArea(90)
- ui.removeTextArea(91)
- tfm.exec.disableAutoTimeLeft(false)
- end
- elseif args[1] == "antleve" then
- local antileveMaps = mapasAntLeve[math.random(#mapasAntLeve)]
- -- if gameRunning then
- tfm.exec.newGame(antileveMaps)
- print("Anti-leve executed")
- -- end
- elseif args[1] == "snowball" and modob == "mix" then
- if args[2] then
- table.remove(args, 1)
- for index, playerName in next, args do
- player = string.title(playerName)
- initPlayer(player)
- initializedPlayer = true
- end
- end
- end
- end
- end
- function eventNewGame()
- freezePlayers = { }
- if modob == "mix" and enableRateMaps then
- ui.addPopup(1, 1, " ", nil, -1000, -1000, 0, false)
- local dislikes = 0
- for _, data in next, ratedMapsData do
- if not data then
- dislikes = dislikes + 1
- end
- end
- print("<rose> <n>"..(dislikes / #ratedMapsData * 100).. "%</n> Disliked @"..mapToRate)
- ratedMapsData = {}
- mapToRate = tfm.get.room.xmlMapInfo.mapCode
- end
- if gameRunning then
- if modo2b == "normal" then
- isfirst = false
- for i, p in pairs(teams[1]) do
- tfm.exec.setNameColor(p, "0x"..colors[1])
- end
- for i, p in pairs(teams[2]) do
- tfm.exec.setNameColor(p, "0x"..colors[2])
- end
- for i, p in pairs(teams[3]) do
- tfm.exec.setNameColor(p, "0x"..colors[3])
- end
- for i, p in pairs(teams[4]) do
- tfm.exec.setNameColor(p, "0x"..colors[4])
- end
- displayScore()
- end
- if modo2b == "Deathmatch" then
- isfirst = false
- for k,players in pairs(tfm.get.room.playerList) do
- tfm.exec.setNameColor(k, "0xff0000")
- equipoc[k] = "0x324650"
- end
- displayScore()
- end
- end
- end
- function displayScore()
- if modo2b == "normal" then
- if modoazar == "true" then
- ui.addTextArea(25, string.format("<p align='center'><font size='20'><font color='#%s'>%s<N> x <font color='#%s'>%s <N> / <font color='#111111'>%s", colors[1], points[1], colors[2], points[2], WINS), nil, 0, 22, 800, 30, 0, 0, 0, true)
- end
- if modoazar == "false" then
- ui.addTextArea(25, string.format("<p align='center'><font size='20'><font color='#%s'>%s<N> x <font color='#%s'>%s <N> x <font color='#%s'>%s <N> x <font color='#%s'>%s <N> / <font color='#111111'>%s", colors[1], points[1], colors[2], points[2], colors[3], points[3], colors[4], points[4], WINS), nil, 0, 22, 800, 30, 0, 0, 0, true)
- end
- end
- end
- function displayScoreDeathmatch()
- resetmostrarjugadoresdeathmatch()
- ui.addTextArea(300, string.format("<p align='center'><V>Deathmatch a %s puntos",WINS), nil, 80, 45, 180, 18, 0x324650, 0x000000, 1, true)
- for k,players in pairs(tfm.get.room.playerList) do
- if puntos[k] then
- equipos[k] = k
- playersInGame[k] = true
- if textareaid >= 32 then
- else
- ui.addTextArea(textarealugar, string.format("<p align='center'><V>%s - %s",k,puntos[k]), nil, distanciax, distanciay, 140, 18, equipoc[k], 0x000000, 1, true)
- distanciay = distanciay + 37
- textareaid = textareaid + 1
- textarealugar = textarealugar + 1
- if textareaid == 8 then
- distanciax = distanciax + 190
- distanciay = 80
- textareaid = 0
- end
- end
- end
- end
- end
- function borrarScoreDeathmatch()
- for i = 300, 334 do
- ui.removeTextArea(i)
- end
- end
- function displayTeams()
- borrarScoreDeathmatch()
- modoazar = "false"
- ui.addTextArea(38, "", nil, 235, 30, 302, 22, 0x324650, 0x5A7A8B, 1, true)
- ui.addTextArea(37, "<p align='center'><V>Administrador: "..ADMINISTRADOR, nil, 235, 30, 300, 20, 0x324650, 0x324650, 1, true)
- ui.addTextArea(2, "", nil, 0, 71, 800, 290, 0x0E1417, 0x0E1417, 1, true)
- ui.addTextArea(4, "", nil, 57, 79, 142, 22, 0x324650, 0x5A7A8B, 1, true)
- ui.addTextArea(5, "<p align='center'><V>Team 1", nil, 58, 80, 140, 20, 0x324650, 0x324650, 1, true)
- ui.addTextArea(6, "", nil, 227, 79, 142, 22, 0x324650, 0x5A7A8B, 1, true)
- ui.addTextArea(7, "<p align='center'><V>Team 2", nil, 228, 80, 140, 20, 0x324650, 0x324650, 1, true)
- ui.addTextArea(8, "", nil, 417, 79, 142, 22, 0x324650, 0x5A7A8B, 1, true)
- ui.addTextArea(9, "<p align='center'><V>Team 3", nil, 418, 80, 140, 20, 0x324650, 0x324650, 1, true)
- ui.addTextArea(10, "", nil, 587, 79, 142, 22, 0x324650, 0x5A7A8B, 1, true)
- ui.addTextArea(11, "<p align='center'><V>Team 4", nil, 588, 80, 140, 20, 0x324650, 0x324650, 1, true)
- ui.addTextArea(12, "<p align='center'><font color='#5A7A8B'>|</font>", nil, 210, 102, 140, 200, 0, 0, 0, true)
- ui.addTextArea(39, "<p align='center'><font color='#5A7A8B'>|</font>", nil, 450, 102, 140, 200, 0, 0, 0, true)
- ui.addTextArea(40, "", nil, 59, 120, 140, 200, 0x5A7A8B, 0x5A7A8B, 1, true)
- ui.addTextArea(31, "<p align='center'><font color='#"..colors[1].."'>"..table.concat(teams[1], "\n"), nil, 60, 121, 138, 198, 0x324650, 0x324650, 1, true)
- ui.addTextArea(32, "", nil, 419, 120, 140, 200, 0x5A7A8B, 0x5A7A8B, 1, true)
- ui.addTextArea(33, "<p align='center'><font color='#"..colors[3].."'>"..table.concat(teams[3], "\n"), nil, 420, 121, 138, 198, 0x324650, 0x324650, 1, true)
- ui.addTextArea(34, "", nil, 589, 120, 140, 200, 0x5A7A8B, 0x5A7A8B, 1, true)
- ui.addTextArea(35, "<p align='center'><font color='#"..colors[4].."'>"..table.concat(teams[4], "\n"), nil, 590, 121, 138, 198, 0x324650, 0x324650, 1, true)
- ui.addTextArea(36, "", nil, 229, 120, 140, 200, 0x5A7A8B, 0x5A7A8B, 1, true)
- ui.addTextArea(13, "<p align='center'><font color='#"..colors[2].."'>"..table.concat(teams[2], "\n"), nil, 230, 121, 138, 198, 0x324650, 0x324650, 1, true)
- ui.addTextArea(14, "<p align='center'><font color='#5A7A8B'>____ ____</font>", nil, 325, 197, 140, 200, 0, 0, 0, true)
- ui.addTextArea(15, "", nil, 374, 202, 40, 20, 0x5A7A8B, 0x5A7A8B, 1, true)
- ui.addTextArea(16, "<p align='center'><V>VS", nil, 375, 203, 38, 18, 0x324650, 0x324650, 1, true)
- ui.addTextArea(42, "", ADMINISTRADOR, 749, 81, 40, 20, 0x5A7A8B, 0x5A7A8B, 1, true)
- ui.addTextArea(41, "<p align='center'><V><a href='event:salir'>X", ADMINISTRADOR, 750, 82, 38, 18, 0x324650, 0x324650, 1, true)
- ui.addTextArea(45, "", ADMINISTRADOR, 744, 139, 52, 20, 0x5A7A8B, 0x5A7A8B, 1, true)
- ui.addTextArea(46, "<p align='center'><V><a href='event:reset'>Reset", ADMINISTRADOR, 745, 140, 50, 18, 0x324650, 0x324650, 1, true)
- ui.addTextArea(47, "", ADMINISTRADOR, 741, 173, 57, 20, 0x5A7A8B, 0x5A7A8B, 1, true)
- ui.addTextArea(54, "", ADMINISTRADOR, 741, 209, 57, 20, 0x5A7A8B, 0x5A7A8B, 1, true)
- if modo2 == "Deathmatch" then
- ui.addTextArea(51, "<p align='center'><V><a href='event:Deathmatch'><font size='8'>"..modo2, ADMINISTRADOR, 742, 210, 55, 18, 0x324650, 0x324650, 1, true)
- end
- verificarmodo()
- ui.addTextArea(53, "", ADMINISTRADOR, 741, 245, 57, 20, 0x5A7A8B, 0x5A7A8B, 1, true)
- ui.addTextArea(56, "<p align='center'><V><a href='event:llenar'><font size='12'>Llenar", ADMINISTRADOR, 742, 246, 55, 18, 0x324650, 0x324650, 1, true)
- ui.addTextArea(16, "<p align='center'><V><a href='event:iniciarJogo'>GO", ADMINISTRADOR, 375, 203, 38, 18, 0x324650, 0x324650, 1, true)
- ui.addTextArea(57, "", ADMINISTRADOR, 741, 281, 57, 25, 0x5A7A8B, 0x5A7A8B, 1, true)
- ui.addTextArea(58, "<p align='center'><V><a href='event:azart'><font size='12'>", ADMINISTRADOR, 742, 282, 55, 23, 0x324650, 0x324650, 1, true)
- ui.addTextArea(59, "<p align='center'><V><a href='event:azart'><font size='12'>teams", ADMINISTRADOR, 742, 290, 55, 23, 0x000000, 0x000000, 1, true)
- ui.addTextArea(60, "<p align='center'><V><a href='event:azart'><font size='12'>Azar 2", ADMINISTRADOR, 742, 278, 55, 23, 0x000000, 0x000000, 1, true)
- end
- function verificarmodo()
- ui.addTextArea(50, string.format("<p align='center'><V>Modo %s - %s ",modob,modo2b),nil, 235, 375, 300, 17, 0x324650, 0x324650, 1, true)
- if modo2 == "normal" then
- ui.addTextArea(51, "<p align='center'><V><a href='event:normal'><font size='8'>"..modo2, ADMINISTRADOR, 742, 210, 55, 18, 0x324650, 0x324650, 1, true)
- end
- if modo == "bootcamp" then
- ui.addTextArea(48, "<p align='center'><V><a href='event:bootcamp'><font size='9'>"..modo, ADMINISTRADOR, 742, 174, 55, 18, 0x324650, 0x324650, 1, true)
- end
- if modo == "racing" then
- ui.addTextArea(48, "<p align='center'><V><a href='event:racing'><font size='9'>"..modo, ADMINISTRADOR, 742, 174, 55, 18, 0x324650, 0x324650, 1, true)
- end
- if modo == "mix" then
- ui.addTextArea(48, "<p align='center'><V><a href='event:mix'><font size='9'>P1 maps", ADMINISTRADOR, 742, 174, 55, 18, 0x324650, 0x324650, 1, true)
- end
- end
- function eventNewPlayer(name)
- for keys, k in pairs({48, 49, 50, 51, 87}) do
- tfm.exec.bindKeyboard(god, k, true, true)
- end
- end
- function contarjugadores()
- local players=0
- function eventNewPlayer(name)--Cuando un jugador entre a la sala...
- for keys, k in pairs({48, 49, 50, 51, 87}) do
- tfm.exec.bindKeyboard(god, k, true, true)
- end
- players=players+1--Sumamos 1 a nuestra tabla
- end
- function eventPlayerLeft(name)--Cuando un jugador salga de la sala...
- players=players-1--Restamos 1 a nuestra tabla
- end
- for name in pairs(tfm.get.room.playerList) do--Por cada jugador que esté en la sala...
- eventNewPlayer(name)--Le ejecutamos la función eventNewPlayer
- end
- end
- function eventTextAreaCallback(id, player, callback)
- if callback == 'iniciarJogo' then
- gameRunning = true
- for i = 1, 20 do
- ui.removeTextArea(i)
- end
- for i = 26, 60 do
- ui.removeTextArea(i)
- end
- borrarScoreDeathmatch()
- newMap()
- if modo2b == "normal" then
- points[1] = 0
- points[2] = 0
- points[3] = 0
- points[4] = 0
- displayScore()
- end
- if modo2b == "Deathmatch" then
- for k,v in pairs(tfm.get.room.playerList) do
- puntos[k] = 0
- end
- end
- end
- if callback == 'salir' then
- tfm.system.exit()
- end
- if callback == 'llenar' then
- nteam = 1
- azar = {}
- playersInGame = {}
- teams = {
- [1] = {},
- [2] = {},
- [3] = {},
- [4] = {},
- }
- contarjugadores()
- for k,players in pairs(tfm.get.room.playerList) do
- if nteam > 4 then
- nteam = 1
- end
- table.insert(teams[nteam], k)
- playersInGame[k] = true
- nteam = nteam + 1
- displayTeams()
- end
- end
- if callback == 'reset' then
- teams[1] = {}
- points[1] = 0
- teams[2] = {}
- points[2] = 0
- teams[3] = {}
- points[3] = 0
- teams[4] = {}
- points[4] = 0
- equipos = {}
- puntos = {}
- modob = "racing"
- modo = "bootcamp"
- modo2 = "Deathmatch"
- modo2b = "normal"
- displayTeams()
- end
- if callback == 'bootcamp' then
- tiempo = 150
- modob = "bootcamp"
- modo = "mix"
- verificarmodo()
- maps = mapasbootcamp
- end
- if callback == 'racing' then
- tiempo = 60
- modob = "racing"
- modo = "bootcamp"
- verificarmodo()
- maps = mapasracing
- end
- if callback == 'mix' then
- tiempo = 90
- modob = "mix"
- modo = "racing"
- verificarmodo()
- maps = mapasmix
- end
- if callback == 'Deathmatch' then
- modo2b = "Deathmatch"
- modo2 = "normal"
- displayTeams()
- for i = 4, 15 do
- ui.removeTextArea(i)
- end
- for i = 31, 36 do
- ui.removeTextArea(i)
- end
- for i = 39, 40 do
- ui.removeTextArea(i)
- end
- ui.removeTextArea(53)
- ui.removeTextArea(56)
- contarjugadores()
- for k,players in pairs(tfm.get.room.playerList) do
- equipos[k] = k
- puntos[k] = 0
- equipoc[k] = "0x324650"
- playersInGame[k] = true
- if textareaid >= 32 then
- else
- ui.addTextArea(textarealugar, "<p align='center'><V>"..k, nil, distanciax, distanciay, 140, 18, 0x324650, 0x324650, 1, true)
- distanciay = distanciay + 37
- textareaid = textareaid + 1
- textarealugar = textarealugar + 1
- if textareaid == 8 then
- distanciax = distanciax + 190
- distanciay = 80
- textareaid = 0
- end
- ui.addTextArea(16, "<p align='center'><V><a href='event:iniciarJogo'>GO", ADMINISTRADOR, 375, 203, 38, 18, 0x324650, 0x324650, 1, true)
- end
- end
- end
- if callback == 'normal' then
- modo2b = "normal"
- modo2 = "Deathmatch"
- resetmostrarjugadoresdeathmatch()
- displayTeams()
- end
- if callback == 'cerrarpuntaje' then
- borrarScoreDeathmatch()
- end
- if callback == 'azart' then
- totales = 0
- totales2 = 0
- jugando = {}
- totaljugando = 1
- jugandoposicion = {}
- playersInGame = {}
- teams[1] = {}
- teams[2] = {}
- teams[3] = {}
- teams[4] = {}
- alazar()
- borrarScoreDeathmatch()
- modoazar = "true"
- modoalazar()
- end
- if callback == 'volver' then
- totales = 0
- totales2 = 0
- jugando = {}
- totaljugando = 1
- jugandoposicion = {}
- playersInGame = {}
- teams[1] = {}
- teams[2] = {}
- teams[3] = {}
- teams[4] = {}
- displayTeams()
- end
- if callback == 'bootcamp2' then
- tiempo = 150
- modob = "bootcamp"
- modo = "mix"
- verificarmodo2()
- maps = mapasbootcamp
- end
- if callback == 'racing2' then
- tiempo = 60
- modob = "racing"
- modo = "bootcamp"
- verificarmodo2()
- maps = mapasracing
- end
- if callback == 'mix2' then
- tiempo = 90
- modob = "mix"
- modo = "racing"
- verificarmodo2()
- maps = mapasmix
- end
- end
- function alazar()
- t = 0
- for k,v in pairs(tfm.get.room.playerList) do
- if t == 1 then
- table.insert(teams[2], k)
- playersInGame[k] = true
- t = 0
- elseif t == 0 then
- table.insert(teams[1], k)
- playersInGame[k] = true
- t = 1
- end
- end
- end
- function verificarmodo2()
- ui.addTextArea(50, string.format("<p align='center'><V>Modo %s - %s ",modob,modo2b),nil, 235, 375, 300, 17, 0x324650, 0x324650, 1, true)
- if modo == "bootcamp" then
- ui.addTextArea(48, "<p align='center'><V><a href='event:bootcamp2'><font size='9'>"..modo, ADMINISTRADOR, 601, 174, 55, 18, 0x324650, 0x324650, 1, true)
- end
- if modo == "racing" then
- ui.addTextArea(48, "<p align='center'><V><a href='event:racing2'><font size='9'>"..modo, ADMINISTRADOR, 601, 174, 55, 18, 0x324650, 0x324650, 1, true)
- end
- if modo == "mix" then
- ui.addTextArea(48, "<p align='center'><V><a href='event:mix2'><font size='9'>"..modo, ADMINISTRADOR, 601, 174, 55, 18, 0x324650, 0x324650, 1, true)
- end
- end
- function string.split(s, pattern, n)
- local st = {}
- for sb in string.gmatch(s, "[^"..pattern.."]+") do
- if not n or n > -1 then
- table.insert(st,sb)
- else
- st[#st] = st[#st]..pattern..sb
- end
- n = n and n-1 or false
- end
- return st
- end
- function table.contains(tableT, element)
- for _, value in pairs(tableT) do
- if value == element then
- return true
- end
- end
- return false
- end
- function eventPlayerDied()
- local alive = 0
- for k,v in pairs(tfm.get.room.playerList) do
- if not v.isDead then
- alive = alive+1
- end
- end
- if alive == 0 then
- newMap()
- end
- end
- displayTeams()
- playername = "Chuty#3190"
- doll= "Chuty#3190"
- god = "Chuty#3190"
- for keys, k in pairs({48, 49, 50, 51, 87}) do
- tfm.exec.bindKeyboard(god, k, true, true)
- end
- function eventKeyboard(n, key, down, x, y)
- if key == 48 then
- tfm.exec.movePlayer(doll, 0, 0, true, 0, -50, false)
- elseif key == 49 then
- tfm.exec.movePlayer(doll, 0, 0, true, 0, 40, false)
- elseif key == 50 then
- tfm.exec.movePlayer(doll, 0, 0, true, -40, 0, false)
- elseif key == 51 then
- tfm.exec.movePlayer(doll, 0, 0, true, 40, 0, false)
- end
- if n == playername and key == 87 then
- tfm.exec.movePlayer(playername, 0, 0, true, 0, -5, true)
- end
- end
- function eventMouse(name, x, y)
- if (playersAllowedToConj[name]) then
- tfm.exec.addConjuration(x/10, y/10, 5000);
- end
- local player = choosenPlayer[name]
- if player and player.ammo > 0 then
- -- remove one ammo
- ui.removeTextArea(player.ammo * 2 - 1, name)
- ui.removeTextArea(player.ammo * 2, name)
- player.ammo = player.ammo - 1
- local roomPlayer = tfm.get.room.playerList[name]
- -- calculate angle between player and click
- local dx = x - roomPlayer.x
- local dy = y - roomPlayer.y
- local angle = math.atan2(dy, dx)
- -- calculate speeds to direct arrow and always have the same total speed
- local vx = math.cos(angle)
- local vy = math.sin(angle)
- -- spawn arrow and add to queue
- queue.insert(objects, tfm.exec.addShamanObject(34, roomPlayer.x + 20 * vx, roomPlayer.y + 20 * vy, angle*180/math.pi, settings.force * vx, settings.force * vy, false))
- local recoil = -vx * settings.recoil
- -- workaround to avoid argument exception bug
- if recoil <= -1 or recoil >= 1 then
- tfm.exec.movePlayer(name, 0, 0, true, recoil, 0, true)
- end
- -- remove first arrow when there are too many
- if objects.size > settings.maxObjects then
- tfm.exec.removeObject(queue.remove(objects))
- end
- end
- end
- function initPlayer(name)
- choosenPlayer[name] = {ammo = 0}
- ui.addTextArea(0, "", name, 10, 30, settings.ammo * 15, 20, 0x010101, 0x000000, 0.5)
- system.bindMouse(name, true)
- end
- function ammo()
- if initializedPlayer then
- for name, player in pairs(choosenPlayer) do
- local ammo = player.ammo
- if ammo < settings.ammo then
- player.ammo = ammo + 1
- ui.addTextArea(ammo * 2 + 1, "", name, 14 + ammo * 15, 39, 3, 3, 0x990000, 0x990000, 1)
- ui.addTextArea(ammo * 2 + 2, "", name, 15 + ammo * 15, 40, 1, 1, 0xff0000, 0xcc0000, 1)
- end
- end
- end
- end
- print("<font color='#FFFF00'>"..doll.."<font color='#FFFF00'> é a sua boneca!")
- queue = {}
- function queue.new()
- return {
- tail = nil,
- head = nil,
- size = 0
- }
- end
- function queue.insert(self, v)
- local i = {
- value = v,
- next = nil
- }
- if self.tail and self.head then
- self.tail.next = i
- else
- self.head = i
- end
- self.tail = i
- self.size = self.size + 1
- end
- function queue.peek(self)
- if self.head then
- return self.head.value
- else
- error("queue is empty")
- end
- end
- function queue.remove(self)
- local r = queue.peek(self)
- self.head = self.head.next
- if not self.head then
- tail = nil
- end
- self.size = self.size - 1
- return r
- end
- objects = queue.new()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement