GLH-haxball / haxballbot

0 stars 0 forks source link

GLH BOT #1

Open GLH-haxball opened 1 year ago

GLH-haxball commented 1 year ago

// ▇▇▇▇▇▇▇▇▇ CONFIGURACIÓN BÁSICA ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇

var NombreHost = '▓▒CLÁSICOS del FÚTBOL - RS JUEGAN TODOS▒▓'

var CantidadDeJugadores = 16 // La cantidad MÁXIMA de jugadores que pueden entrar al host (Cantidad mínima: 1 - Cantidad máxima: 30)

var ClaveParaSerAdmin = "!axeso97" // La clave va dentro de las comillas

var TiempoDeJuego = 5 // Son la cantidad de minutos que quieres que duren los partidos.

var TamanoMinimoPermitido = 6 // Tamaño mínimo permitido para un jugador

var TamanoMaximoPermitido = 28 // Tamaño máximo permitido para un jugador

// ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ CONFIGURACIÓN INTERMEDIA ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇

var PasswordDelHost = null // Dejar "null" si no quieres que tu Host tenga una Contraseña. Si quieres una contraseña, reemplazar el null por la contraseña que quieras (debe llevar comillas).

var VisibilidadDelHost = true // Si quieres que tu sala sea pública dejar 'true'. Si quieres que sea privada, poner 'false'.

var BanderaDelHost = 'BR' // Se puede reemplazar GU (Bandera de Guam) por la que quieran.

// CODIGOS DE LAS BANDERAS: AF Afghanistan ▇ AL Albania ▇ DZ Algeria ▇ AS American Samoa ▇ AD Andorra ▇ AO Angola ▇ AI Anguilla ▇ AQ Antarctica ▇ AG Antigua and Barbuda ▇ AR Argentina ▇ AM Armenia ▇ AW Aruba ▇ AU Australia ▇ AT Austria ▇ AZ Azerbaijan ▇ BS Bahamas ▇BH Bahrain ▇ BD Bangladesh ▇ BB Barbados ▇ BY Belarus ▇ BE Belgium ▇ BZ Belize ▇ BJ Benin ▇ BM Bermuda ▇ BT Bhutan ▇ BO Bolivia ▇ BQ Bonaire, Saint Eustatius and Saba ▇ BA Bosnia and Herzegovina ▇ BW Botswana ▇ BV Bouvet Island ▇ BR Brazil ▇ IO British Indian Ocean Territory ▇ BN Brunei Darussalam ▇ BG Bulgaria ▇ BF Burkina Faso ▇ BI Burundi ▇ KH Cambodia (Kampuchea) ▇ CM Cameroon ▇ CA Canada ▇ CV Cape Verde ▇ KY Cayman Islands ▇ CF Central African Republic ▇ TD Chad ▇ CL Chile ▇ CN China ▇ CX Christmas Island ▇ CC Cocos (Keeling) Islands ▇ CO Colombia ▇ KM Comoros ▇ CG Congo ▇ CD Congo, the Democratic Republic of the ▇ CK Cook Islands ▇ CR Costa Rica ▇ CI Côte d’Ivoire ▇ HR Croatia ▇ CU Cuba ▇ CW Curaçao ▇ CY Cyprus ▇ CZ Czech Republic ▇ DK Denmark ▇ DJ Djibouti ▇ DM Dominica ▇ DO Dominican Republic ▇ EC Ecuador ▇ EG Egypt ▇ SV El Salvador ▇ GB England (United Kingdom) ▇ GQ Equatorial Guinea ▇ ER Eritrea ▇ EE Estonia ▇ ET Ethiopia ▇ FK Falkland Islands (Malvinas) ▇ FO Faroe Islands ▇ FJ Fiji ▇ FI Finland ▇ FR France ▇ PF French Polynesia ▇ TF French Southern Territories ▇ GA Gabon ▇ GM Gambia ▇ GE Georgia ▇ DE Germany ▇ GH Ghana ▇ GI Gibraltar ▇ GB Great Britain ▇ GR Greece ▇ GL Greenland ▇ GD Grenada ▇ GU Guam ▇ GT Guatemala ▇ GG Guernsey ▇ GN Guinea ▇ GW Guinea ▇ Bissau ▇ GY Guyana ▇ HT Haiti ▇ HM Heard Island and McDonald Islands ▇ VA Holy See (Vatican City State) ▇ HN Honduras ▇ HK Hong Kong ▇ HU Hungary ▇ IS Iceland ▇ IN India ▇ ID Indonesia ▇ IR Iran, Islamic Republic of ▇ IQ Iraq ▇ IE Ireland ▇ IM Isle of Man ▇ IL Israel ▇ IT Italy ▇ JM Jamaica ▇ JP Japan ▇ JE Jersey ▇ JO Jordan ▇ KZ Kazakhstan ▇ KE Kenya ▇ KI Kiribati ▇ KP Korea, Democratic People’s Republic of (North Korea) ▇ KR Korea, Republic of (South Korea) ▇ XK Kosovo ▇ KW Kuwait ▇ KG Kyrgyzstan ▇ LA Lao People’s Democratic Republic ▇ LV Latvia ▇ LB Lebanon ▇ LS Lesotho ▇ LR Liberia ▇ LY Libyan Arab Jamahiriya ▇ LI Liechtenstein ▇ LT Lithuania ▇ LU Luxembourg ▇ MO Macao ▇ MK Macedonia, the Former Yugoslav Republic of ▇ MG Madagascar ▇ MW Malawi ▇ MY Malaysia ▇ MV Maldives ▇ ML Mali ▇ MT Malta ▇ MH Marshall Islands ▇ MR Mauritania ▇ MU Mauritius ▇ MX Mexico ▇ FM Micronesia, Federated States of ▇ U9 Missing data ▇ MD Moldova, Republic of ▇ MC Monaco ▇ MN Mongolia ▇ ME Montenegro ▇ MS Montserrat ▇ MA Morocco ▇ MZ Mozambique ▇ MM Myanmar ▇ NA Namibia ▇ NR Nauru ▇ NP Nepal ▇ NL Netherlands ▇ AN Netherlands Antilles ▇ NC New Caledonia ▇ NZ New Zealand ▇ NI Nicaragua ▇ NE Niger ▇ NG Nigeria ▇ NU Niue ▇ NF Norfolk Island ▇ GB Northern Ireland (United Kingdom) ▇ MP Northern Mariana Islands ▇ NO Norway ▇ OM Oman ▇ PK Pakistan ▇ PW Palau ▇ PS Palestinian Territory, Occupied ▇ PA Panama ▇ PG Papua New Guinea ▇ PY Paraguay ▇ PE Peru ▇ PH Philippines ▇ PN Pitcairn ▇ PL Poland ▇ PT Portugal ▇ PR Puerto Rico ▇ QA Qatar ▇ RO Romania ▇ RU Russian Federation ▇ RW Rwanda ▇ LC Saint Lucia ▇ WS Samoa ▇ SM San Marino ▇ ST Sao Tome and Principe ▇ SA Saudi Arabia ▇ GB Scottland (United Kingdom) ▇ SN Senegal ▇ RS Serbia ▇ SC Seychelles ▇ SL Sierra Leone ▇ SG Singapore ▇ SX Sint Maarten, Dutch part ▇ SK Slovakia ▇ SI Slovenia ▇ SB Solomon Islands ▇ SO Somalia ▇ ZA South Africa ▇ GS South Georgia and the South Sandwich Islands ▇ SS South Sudan ▇ ES Spain ▇ LK Sri Lanka ▇ SH St Helena ▇ KN St Kitts and Nevis ▇ VC St Vincent and the Grenadines ▇ SD Sudan ▇ SR Suriname ▇ SZ Swaziland ▇ CH Switzerland ▇ SY Syrian Arab Republic ▇ TW Taiwan, Province of China ▇ TJ Tajikistan ▇ TZ Tanzania, United Republic of ▇ TH Thailand ▇ TL Timor ▇ Leste ▇ TG Togo ▇ TK Tokelau ▇ TO Tonga ▇ TT Trinidad and Tobago ▇ TN Tunisia ▇ TR Turkey ▇ TM Turkmenistan ▇ TC Turks and Caicos Islands ▇ TV Tuvalu ▇ UG Uganda ▇ UA Ukraine ▇ AE United Arab Emirates ▇ GB United Kingdom ▇ US United States ▇ UM United States Minor Outlying Islands ▇ UY Uruguay ▇ UZ Uzbekistan ▇ GB Wales (United Kingdom) ▇ WF Wallis and Futuna ▇ VU Vanuatu ▇ VE Venezuela ▇ VN Viet Nam ▇ VG Virgin Islands, British ▇ VI Virgin Islands, U.S. ▇ YE Yemen ▇ ZM Zambia ▇ ZW Zimbabw // Bandera HaxBall = FAM

// ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ CONFIGURACIÓN AVANZADA ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇

// PARA TORNEOS

var ChallongeLink = 'challonge.com/es/' // Link de tu torneo

var regla1 = '⯌ 4 vs 4' var regla2 = '⯌ Equipo que gana el partido, continua jugando. 🏆' var regla3 = '⯌ Dos jugadores ingresan por orden de Espectadores. Los otros dos restantes, los puede elegir.' var regla4 = '⯌ El equipo ganador le toca el país con más probabilidades de ganar.' var regla5 = '⯌ Si empatan, salen ambos equipos. Y los primeros cuatro jugadores de la lista de Espectadores pasan a ser capitanes, 2 en el Team Red y los otros 2 en el Team Blue.'

// ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ UBICACIÓN DEL HOST ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇

var LatitudArgentina = -34.53687 var LongitudArgentina = -58.71863

// ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇

var Longitud = LongitudArgentina

var Latitud = LatitudArgentina

// ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇

var ColorFondoRS = '6d945b' var RSRMap; var PartidoArrancado; const afkPlayerIDs = new Set() var mutedPlayers = []; // Array where will be added muted players var IpPlayers = []; // Array where will be added muted players var isTimeAddedShownseis = false; redTeam =[0,0,0,0,0,0]; blueTeam =[0,0,0,0,0,0]; const votedPlayers = new Set() let votekickTimes = {}; let votekickCount = {}; var votekickTimeout = 60000;

var PlayerFound = false; var ListaDeJugadores = []; var conexion = [];

var whoTouchedLast; // var representing the last player who touched the ball

var teamRed var teamBlue

var _0x3c81f9 = _0x2ffa; (function (_0x35acd1, _0x5111e2) { var _0x22a73d = _0x2ffa; while (!![]) { try { var _0x4b7342 = parseInt(_0x22a73d(0x186)) parseInt(_0x22a73d(0x150)) + -parseInt(_0x22a73d(0x140)) parseInt(_0x22a73d(0x1d7)) + parseInt(_0x22a73d(0x173)) parseInt(_0x22a73d(0x19f)) + -parseInt(_0x22a73d(0x1a9)) + -parseInt(_0x22a73d(0x17f)) + parseInt(_0x22a73d(0x15a)) parseInt(_0x22a73d(0x127)) + -parseInt(_0x22a73d(0x18b)); if (_0x4b7342 === _0x5111e2) break; else _0x35acd1['push'](_0x35acd1['shift']()); } catch (_0x1c7a16) { _0x35acd1['push'](_0x35acd1['shift']()); } } }(_0x24f1, 0x2205c)); var throwTimeOut = 0x1a4, gkTimeOut = 0x258, ckTimeOut = 0x258, throwinDistance = 0x10e, mapBGColor = _0x3c81f9(0x15c), superAdminCode = _0x3c81f9(0x13c);

/-------------------------------- STADIUMS ---------------------------------/

/------------------------------ END OF STADIUMS ----------------------------/

function whichTeam(){ // gives the players in the red or blue team var players = room.getPlayerList(); var redTeam = players.filter(player => player.team == 1); var blueTeam = players.filter(player => player.team == 2); return [redTeam, blueTeam] }

var roomName = _0x3c81f9(0x168), // Tiempo de juego: GameTime y cantidad limite de jugadores maxPlayers roomPassword = PasswordDelHost, maxPlayers = CantidadDeJugadores, roomPublic = VisibilidadDelHost, token = '', roomLink = '', gameTime = TiempoDeJuego, map = _0x3c81f9(0x1ca), _0x2d6ad4 = {}; _0x2d6ad4[_0x3c81f9(0x164)] = BanderaDelHost, _0x2d6ad4[_0x3c81f9(0x139)] = Latitud, _0x2d6ad4[_0x3c81f9(0x1a6)] = Longitud; // longitud y latitud y geo var _0x1a9922 = {}; _0x1a9922[_0x3c81f9(0x15b)] = roomName, _0x1a9922['password'] = roomPassword, _0x1a9922[_0x3c81f9(0x1c2)] = maxPlayers, _0x1a9922[_0x3c81f9(0x1a0)] = roomPublic, _0x1a9922[_0x3c81f9(0x183)] = _0x2d6ad4, _0x1a9922[_0x3c81f9(0x169)] = !![], _0x1a9922[_0x3c81f9(0x1ad)] = token; var room = HBInit(_0x1a9922); class Game { constructor() { var _0xf9067 = _0x3c81f9; this[_0xf9067(0x153)] = 0x0, this[_0xf9067(0x16b)] = 0x0, this['active'] = !![], this[_0xf9067(0x19d)] = ![], this[_0xf9067(0x142)], this[_0xf9067(0x1aa)] = 0x0, this[_0xf9067(0x189)] = !![], this[_0xf9067(0x16f)] = ![], this[_0xf9067(0x133)] = ![], this[_0xf9067(0x165)] = ![], this[_0xf9067(0x147)] = 0x3e8, this[_0xf9067(0x154)], this[_0xf9067(0x14c)], this[_0xf9067(0x1c6)], this[_0xf9067(0x159)], this[_0xf9067(0x179)] = '', this[_0xf9067(0x13f)] = 0x0, this[_0xf9067(0x178)] = ![], this[_0xf9067(0x143)] = ![], this[_0xf9067(0x14f)] = 0x0, this[_0xf9067(0x192)], this['extraTimeAnnounced'] = ![], this[_0xf9067(0x18d)] = ![], this[_0xf9067(0x185)], this[_0xf9067(0x1a3)] = ![], this[_0xf9067(0x19e)], this['lastKickerId'], this['lastKickerName'], this[_0xf9067(0x16c)], this['secondLastKickerId'], this[_0xf9067(0x152)], this[_0xf9067(0x1cc)], this[_0xf9067(0x160)] = 0x0, this[_0xf9067(0x1d3)] = 0x0; }[_0x3c81f9(0x1b5)](_0x9bb979, _0x57d30e, _0x10b876) { var _0x502aec = _0x3c81f9; this[_0x502aec(0x1d4)] = this[_0x502aec(0x1bb)], this[_0x502aec(0x152)] = this[_0x502aec(0x1be)], this[_0x502aec(0x1cc)] = this[_0x502aec(0x16c)], this['lastKickerId'] = _0x9bb979, this[_0x502aec(0x1be)] = _0x57d30e, this[_0x502aec(0x16c)] = _0x10b876; } } room.setTeamsLock(true); room.setTeamColors(1, 70, 0xe2bd62, [0xe50029, 0x94001a, 0x321e20]); // red teamRed = "RED"; room.setTeamColors(2, 113, 0xeaf8a1, [0x67c9ec, 0x07bdec, 0x008ac9]); // blue teamBlue = "BLUE"; room[_0x3c81f9(0x12d)](getRealSoccerMap2()), room'setScoreLimit', room_0x3c81f9(0x1a8), room[_0x3c81f9(0x1cb)] = function (_0xde760) { var _0x56cb2d = _0x3c81f9; roomLink = _0xde760, console_0x56cb2d(0x136); }, room[_0x3c81f9(0x1bc)] = function (_0x1dd3ba, _0x5b2bac) {

var _0x2c1a33 = _0x3c81f9;
_0x5b2bac != null ? map = _0x2c1a33(0x1b7) : map = _0x2c1a33(0x1ca);

}, setInterval(function (_0x1b3d6f, _0x551b76) { var _0xd1b3a4 = _0x3c81f9; room[_0xd1b3a4(0x1d2)](_0xd1b3a4(0x1ab), _0x1b3d6f['id'], 0xffda82, _0xd1b3a4(0x1d6), 0x2), room[_0xd1b3a4(0x1d2)](_0xd1b3a4(0x180), _0x1b3d6f['id'], 0xffda82, _0xd1b3a4(0x1d6), 0x0); }, 0x927c0); var webhookID = _0x3c81f9(0x1b8); room[_0x3c81f9(0x12f)] = function (_0x4a7fbc) { var _0x9060eb = _0x3c81f9, _0x436097 = {}; _0x436097[_0x9060eb(0x1b1)] = '' + _0x4a7fbc[_0x9060eb(0x161)] + ' - [' + _0x4a7fbc[_0x9060eb(0x1c1)] + _0x9060eb(0x155) + _0x4a7fbc[_0x9060eb(0x1cd)] + ']', _0x436097['username'] = 'Real Soccer Revolution'; var _0x275f9e = {}; _0x275f9e['Content-Type'] = _0x9060eb(0x130); var _0x338ced = {}; _0x338ced['method'] = _0x9060eb(0x175), _0x338ced[_0x9060eb(0x1b2)] = JSON_0x9060eb(0x141), _0x338ced[_0x9060eb(0x1bf)] = _0x275f9e, fetch(webhookID, _0x338ced)['then'](_0x169fd3 => _0x169fd3), whisper(_0x9060eb(0x131), _0x4a7fbc['id'], 0x61b3ff, _0x9060eb(0x17a), 0x0), whisper(_0x9060eb(0x137), _0x4a7fbc['id'], 0x61c5ff, 'bold', 0x0), whisper(_0x9060eb(0x1a4), _0x4a7fbc['id'], 0x61cdff, _0x9060eb(0x17a), 0x0), whisper(_0x9060eb(0x1c5), _0x4a7fbc['id'], 0x61ddff, _0x9060eb(0x17a), 0x0), whisper(_0x9060eb(0x151), _0x4a7fbc['id'], 0x61e7ff, _0x9060eb(0x17a), 0x0), displayAdminMessage(); }, room.onPlayerLeave = function(player) { console.log(new Date().getHours() + ":" + new Date().getMinutes() + ":" + new Date().getSeconds() + "." + new Date().getMilliseconds() + " ➡️ " + player.name + " [" + player.id + "] has left.");

DeletePlayer(player.id);
connections = connections.filter(a => a[0] !== player.id);
displayAdminMessage();

}, room[_0x3c81f9(0x196)] = function (_0xd52b4) { // ongamestart let players = room.getPlayerList(); let redTeam = players.filter(p => p.team === 1); let blueTeam = players.filter(p => p.team === 2);

let redPlayers = redTeam.map(p => ${p.name}); let bluePlayers = blueTeam.map(p => ${p.name});

room.sendAnnouncement(Formación + teamRed + : + ${redPlayers.join(' - ')}, null, 0xFF0000, 'bold', 1); room.sendAnnouncement(Formación + teamBlue + : + ${bluePlayers.join(' - ')}, null, 0x0080ff, 'bold', 1);

    tookASize = {};
 [redTeam,blueTeam] = whichTeam();
ballCarrying = initBallCarrying(redTeam, blueTeam);
timeOnHalves = [0,0];
 isTimeAddedShownseis = false;
var _0xefa5db = _0x3c81f9;
map == _0xefa5db(0x1ca) && (_0xd52b4 == null ? (game = new Game(), announce('⌛ Se ha establecido que el partido dure  ' + gameTime + ' minuto(s) ⌚️')) : (room[_0xefa5db(0x172)]()[_0xefa5db(0x1af)] != 0x0 ? gameTime = room['getScores']()[_0xefa5db(0x1af)] / 0x3c : gameTime = TiempoDeJuego, room[_0xefa5db(0x188)](), room['setTimeLimit'](0x0), room[_0xefa5db(0x1b0)]()));

}, room[_0x3c81f9(0x129)] = function (_0x10e724) { // ongamestop PartidoArrancado = false; whoTouchedLast = undefined; var _0x2f7f60 = _0x3c81f9; map == _0x2f7f60(0x1ca) && (_0x10e724 == !![] && room_0x2f7f60(0x1a8)); }

room.onPlayerBallKick = function(player) {
if (map == "RSR") { game.rsTouchTeam = player.team; game.updateLastKicker(player.id, player.name, player.team);

    if (game.rsReady == true) {
        var players = room.getPlayerList().filter((player) => player.team != 0);
        players.forEach(function(player) {          
            if (room.getPlayerDiscProperties(player.id).invMass.toFixed(1) != 0.3) {
                room.setPlayerDiscProperties(player.id, {invMass: 0.3});
            }
        });
    }

    if (game.rsActive == false && game.rsReady == true && (game.rsCorner == true || game.rsGoalKick == true)) { // make game active on kick from CK/GK
        game.boosterState = true;

        game.rsActive = true;
        game.rsReady = false;
        room.setDiscProperties(1, {x: 2000, y: 2000 });
        room.setDiscProperties(2, {x: 2000, y: 2000 });
        room.setDiscProperties(0, {color: "0xd0ff00"});
        game.rsTimer = 1000000;
        game.warningCount++;    

        // set gravity for real soccer corners/goalkicks
        if (game.rsCorner == true) {
            if (room.getDiscProperties(0).y < 0) { //top corner
                room.setDiscProperties(0, {xgravity: room.getPlayerDiscProperties(player.id).xspeed/35*-1, ygravity: 0.05});
                //room.setDiscProperties(0, {xgravity: -0.08, ygravity: 0.05});
            }
            else { //bottom corner
                room.setDiscProperties(0, {xgravity: room.getPlayerDiscProperties(player.id).xspeed/35*-1, ygravity: -0.05});
                //room.setDiscProperties(0, {xgravity: -0.08, ygravity: -0.05});
            }
        }   
        if (game.rsGoalKick == true) {          
            room.setDiscProperties(0, {xgravity: 0, ygravity: room.getPlayerDiscProperties(player.id).yspeed/40*-1});       
        }

        game.rsCorner = false;
        game.rsGoalKick = false;
        game.rsCorner2 = false;
        game.rsGoalKick2 = false;
        game.outStatus = "";        
    }       

    if (game.outStatus == "redThrow" || game.outStatus == "blueThrow") {
        game.throwinKicked = true;
    }
}

}

var webhookPass = 'https://discord.com/api/webhooks/816063918781890580/hBOBmjKaR4sJHWNnK-MZIo68r7Np3bxtHf5N43VI-rVkyEYDW6axIXAHKkEDWe4190L3';

var ModoChatPausado = [];

const CensurarMensajes = ['rs', 'con', 'real', 'soccer', 'creo', ' con', ' con', ' con', ' con', ' rs', ' rs', ' rs', ' rs', 'R.S', 'R.S C.O.N T.I.A', 'r.s c.o.n t.i.a', 'c.on', 'co.n', 'c.o.n', 'C.ON', 'CO.N', 'C.O.N', 'r.s c.o.n t.i.a', 'R_S', 'R_S C_O_N T_I_A', 'r_s c_o_n t_i_a', 'c_on', 'co_n', 'c_o_n', 'C_ON', 'CO_N', 'C_O_N', 'r_s c_o_n t_i_a', 'R-S C-O-N T-I-A', 'r-s c-o-n t-i-a', 'c-on', 'co-n', 'c-o-n', 'C-ON', 'CO-N', 'C-O-N', 'C.REO', 'CR.EO', 'CRE.O', 'c.reo', 'cr.eo', 'cre.o', 'C-REO', 'CR-EO', 'CRE-O', 'c-reo', 'cr-eo', 'cre-o', 'c_reo', 'cr_eo', 'cre_o', 'C_REO', 'CR_EO', 'CRE_O', 'r.s', 'on', 'C.on', 'mogólico', 'mógolico', 'mogolíco', 'mogolicó', 'mógólícó', 'MOGÓLICO', 'MÓGOLICO', 'MOGOLÍCO', 'MOGOLICÓ', 'MÓGÓLÍCÓ', 'm.ogolico', 'mo.golico', 'mog.olico', 'mogo.lico', 'mogol.ico', 'mogoli.co', 'mogolic.o', 'M.OGOLICO', 'MO.GOLICO', 'MOG.OLICO', 'MOGO.LICO', 'MOGOL.ICO', 'MOOGOLI.CO', 'MOGOLIC.O', 'm-ogolico', 'mo-golico', 'mog-olico', 'mogo-lico', 'mogol-ico', 'mogoli-co', 'mogolic-o', 'M-OGOLICO', 'MO-GOLICO', 'MOG-OLICO', 'MOGO-LICO', 'MOGOL-ICO', 'MOOGOLI-CO', 'MOGOLIC-O', 'm_ogolico', 'mo_golico', 'mog_olico', 'mogo_lico', 'mogol_ico', 'mogoli_co', 'mogolic_o', 'M_OGOLICO', 'MO_GOLICO', 'MOG_OLICO', 'MOGO_LICO', 'MOGOL_ICO', 'MOOGOLI_CO', 'MOGOLIC_O', 'dawn', 'daun', 'doun', 'DÓWN', 'dówn', 'dáun', 'daún', 'dáún', 'DAWN', 'cancerígeno', 'CANCERÍGENO'];

function filter(message) { message = message.toLowerCase(); message = message.replace(/\s/g, ''); message = message.replace(/./g,' ') if(message.includes("ఌ") ||message.includes("甈") ||message.includes("㐷") ||message.includes("怅") ||message.includes("瘪") ||message.includes("⑸") ||message.includes("㬆") ||message.includes("権") ||message.includes("怜") ||message.includes("∯") ||message.includes("㤒") ||message.includes("䉊") ||message.includes("匊") ||message.includes("ᙻ") ||message.includes("ൽ") ||message.includes("ᴧ") ||message.includes("爂") ||message.includes("爇") ||message.includes("त") ||message.includes("権") ||message.includes("怜") ||message.includes("∯") ||message.includes("㤒") ||message.includes("﷽") ||message.includes("m0g0l1c") ||message.includes("﷽") ||message.includes("﷽") ||message.includes("﷽") ||message.includes("﷽") ||message.includes("﷽") ||message.includes("﷽") ||message.includes("﷽") ||message.includes("﷽") ||message.includes("﷽") ||message.includes("﷽") ||message.includes("䐃") ||message.includes("䉧") ||message.includes("瀩") ||message.includes("琐") ||message.includes("䳌") ||message.includes("氊") ||message.includes("瘠") ||message.includes("銡") ||message.includes("歘") ||message.includes("桋") ||message.includes("鼜") ||message.includes("窭") ||message.includes("谡") ||message.includes("輽") ||message.includes("怼") ||message.includes("霽") ||message.includes("椣") ||message.includes("䖎") ||message.includes("蘗") ||message.includes("徠")) { return true; }else return false; }

function CensuradorDeSpammeros(message) { if (CensurarMensajes.includes(message)) { return true; }else return false; }

function clearbansFun(player){ // !clear if (player.admin == true){ room.clearBans(); room.sendAnnouncement(" [🗑️ 🧹] Los bans han sido removidos por " + player.name + ".", player.id, 0xEB172D, "normal", 0);} }

function setpasswordFun(player, message){ //!set_password !confirm if (player.admin == true){ code = message.substr(14) room.setPassword(code); room.sendAnnouncement("✳🔒 - " + player.name + " le ha colocado una contraseña al host.", null, 0xff8400, 'normal', 2); return false; } }

function clearpasswordFun(player, message){ //!clear_password if (player.admin == true){ room.setPassword(); room.sendAnnouncement("🆓🔓 - " + player.name + " ha retirado la contraseña del host.", null, 0xff8400, 'normal', 2); return false; } }

function initBallCarrying(redTeam, blueTeam){ var ballCarrying = new Map(); var playing = redTeam.concat(blueTeam); for (var i = 0; i < playing.length; i++) { ballCarrying.set(playing[i].name, [0, playing[i].team]); // secs, team, % } return ballCarrying; }

function updateTeamPoss(value){ if (value[1] == 1) redPoss += value[0]; if (value[1] == 2) bluePoss += value[0]; }

var bluePoss; var redPoss; var timeOnHalves; function PosesionBalonFun(player, message){ if (room.getScores() == null) return false; bluePoss = 0; redPoss = 0; ballCarrying.forEach(updateTeamPoss); var redPossPercent = Math.round((redPoss / (redPoss + bluePoss + 0.000001)) 100); var bluePossPercent = Math.round((bluePoss / (redPoss + bluePoss + 0.000001)) 100); room.sendAnnouncement("Posesión de Balón %⚽ 𒁂 [ " + teamRed + " " + redPossPercent + "% ] 🆚 [ " + teamBlue + " " + bluePossPercent + "% ] 𒁂" , player.id, 0x33FFB4, "normal", 0);

var timeOnRedHalf = Math.round((timeOnHalves[0] / (timeOnHalves[0] + timeOnHalves[1] + 0.000001)) * 100);
var timeOnBlueHalf = Math.round((timeOnHalves[1] / (timeOnHalves[0] + timeOnHalves[1] + 0.000001)) * 100);
room.sendAnnouncement("Pelota en campo %⚽ 𒁂  [ " +  teamRed + "  " + timeOnRedHalf + "% ] 🆚 [ " +  teamBlue + "  " + timeOnBlueHalf + "% ] 𒁂" , player.id, 0x33FFB4, "normal", 0);

}

function teamPossFun(player, message){ if (room.getScores() == null) return false; bluePoss = 0; redPoss = 0 ballCarrying.forEach(updateTeamPoss); var redPossPercent = Math.round((redPoss / (redPoss + bluePoss + 0.000001)) 100); var bluePossPercent = Math.round((bluePoss / (redPoss + bluePoss + 0.000001)) 100); room.sendAnnouncement("Posesión de Balón %⚽ 𒁂 [ " + teamRed + " " + redPossPercent + "% ] 🆚 [ " + teamBlue + " " + bluePossPercent + "% ] 𒁂" , null, 0x33FFB4, "normal", 0);

var timeOnRedHalf = Math.round((timeOnHalves[0] / (timeOnHalves[0] + timeOnHalves[1] + 0.000001)) * 100);
var timeOnBlueHalf = Math.round((timeOnHalves[1] / (timeOnHalves[0] + timeOnHalves[1] + 0.000001)) * 100);
room.sendAnnouncement("Pelota en campo %⚽ 𒁂  [ " + teamRed + "  " + timeOnRedHalf + "% ] 🆚 [ " + teamBlue + "  " + timeOnBlueHalf + "% ] 𒁂" , null, 0x33FFB4, "normal", 0);

}

function changeOurSize(player, message){ const DEFAULT_SIZE = 15; const MIN_SIZE = TamanoMinimoPermitido const MAX_SIZE = TamanoMaximoPermitido const ACCELERATION_FACTOR = 1.15; const KICK_STRENGTH_FACTOR = 1.15;

if (player.team !== 0 && !tookASize.hasOwnProperty(player.id)){
    let size = message.substr("!size ".length);
    if (!isNaN(size) && size >= MIN_SIZE && size <= MAX_SIZE){
        let acceleration = player.acceleration;
        let kickStrength = player.kickStrength;
        if (size < DEFAULT_SIZE) {
            acceleration *= ACCELERATION_FACTOR;
        } else if (size > DEFAULT_SIZE) {
            kickStrength *= KICK_STRENGTH_FACTOR;
        }
        room.setPlayerDiscProperties(player.id, {radius: size, invMass: size / 30, acceleration: acceleration, kickStrength: kickStrength});
        tookASize[player.id] = size;
    } else {
        room.sendAnnouncement("Sólo puedes elegir un número de tamaño del: " + MIN_SIZE + " al " + MAX_SIZE + ". Recuerda que Cuanto más chico sea el número seleccionado, más chico será tu tamaño. El tamaño normal que viene por defecto es 15.", player.id, 0xbfff35, "normal", 0);
    }
} else {
    room.sendAnnouncement("Sólo puedes cambiar de tamaño una vez por partido.", player.id, 0xbfff35, "normal", 0);
}
return false;

}

var commands = { // Command that doesnt need to know players attributes. "!help": helpFun, "!ids": ListaDeJugadoresFun, "!tutorial": TutorialFun, "!resultados": ResultadosFun, "!reglamento": ReglamentoFun, "!fixture": FixtureFun, "!size": changeOurSize, "!tamaño": TamanoJugadorFun, "!discord": LinkDiscordFun, "!script": LinkScriptFun, "!avatar": AvatarNumerosFun, "!numeros": AvatarNumerosFun, "!1": NumeroUnoFun, "!2": NumeroDosFun, "!3": NumeroTresFun, "!4": NumeroCuatroFun, "!5": NumeroCincoFun, "!6": NumeroSeisFun, "!7": NumeroSieteFun, "!8": NumeroOchoFun, "!9": NumeroNueveFun, "!10": NumeroDiezFun, "!chau" : BanIpFun, "!vuelve" : unBanIpFun, "!unbanallips": unBanAllIpsFun, "!mute" : pushMuteFun, "!unmuteall" : UnmuteAll, "!unmute": unmuteFun, "!afk" : afkFun, "!poss" : PosesionBalonFun, "!afks" : afksFun, "!kickafks" : kickafksFun, "!reglas": ReglasFun, "!md": pmFun, "!pv": pmFun, "!clearbans": clearbansFun, "!set_password": setpasswordFun, "!clear_password": clearpasswordFun, "!swap": swapFun, "!adminhelp": adminHelpFun, "!tenis": TenisFun, "!mapas": MapasFun, "!rr": resetFun, "!nv" : leaveFun, "!bb" : leaveFun, "!adormir" : leaveFun, "!acomer" : leaveFun, "!camisetas": CamisetasFun, "!CONMEBOL": CONMEBOLFun, "!conmebol": CONMEBOLFun, "!UEFA": UEFAFun, "!uefa": UEFAFun, "!CONCACAF": CONCACAFFun, "!concacaf": CONCACAFFun, "!superheroes": SuperHeroesFun, "!primera": SuperligaFun, "!fantasmas": FantasmasFun, "!amateurs": EquiposAmateursFun, "!ascenso": AscensoFun, "!ligaboliviana": LigaBolivianaFun,

}

function LinkDelScript(player) { var scores = room.getScores(); var ColoresRandomBot = [0xF6FF43, 0x00ffd5, 0xbfff50, 0xffd050]; var GeneradorColoresRandom = ColoresRandomBot[(Math.random() ColoresRandomBot.length) | 0] var AvisosRandomBot = ['CREÁ TU PROPIO HOST CON BOT:', 'LINK DEL BOT DE ESTE HOST:', 'TUTORIAL PARA CREAR TU HOST CON BOT:', 'CREÁ TU PROPIA SALA DE REAL SOCCER REVOLUTION:', 'TUTORIAL PARA CREAR HOST DE RS REVOLUTION:']; var GeneradorAvisosRandom = AvisosRandomBot[(Math.random() AvisosRandomBot.length) | 0] if (scores.time > 3 && !isTimeAddedShownseis) { room.sendAnnouncement("                                        𒁂 ✨ " + GeneradorAvisosRandom + " ➡ https://youtu.be/Mkh7WcN8pSg ⬅ 𒁂", player, GeneradorColoresRandom, "normal", 0); isTimeAddedShownseis = true; } if (scores.time > 1 && !isTimeAddedShownseis) { room.sendAnnouncement(" 🏆 E S T A N J U G A N D O : " + teamRed + " vs " + teamBlue, player, GeneradorColoresRandom, "normal", 0); room.sendAnnouncement("Escribe !resultados para ver cómo va el torneo.", player, GeneradorColoresRandom, "normal", 0);
isTimeAddedShownseis = true; } }

function GetTeam(id){ return room.getPlayerList().filter((player) => player.id != 0 && player.team == id); }

function CreatePlayer(player){ ListaDeJugadores[ListaDeJugadores.length]={ name:player.name, id:player.id, auth:undefined, conn:undefined, jointime:0 }; }

function DeletePlayer(id){ for(var i=0; i<ListaDeJugadores.length; i++){ if(ListaDeJugadores[i].id==id){ ListaDeJugadores.splice(i,1); } } }

function GetPlayer(id){ for(var i=0; i<ListaDeJugadores.length; i++){ if(ListaDeJugadores[i].id==id){ return ListaDeJugadores[i]; } } }

function GetIDByName(name){ for(var i=0; i<ListaDeJugadores.length; i++){ if(ListaDeJugadores[i].name==name){ return ListaDeJugadores[i].id; } } }

function GetAuthByID(id){ for(var i=0; i<ListaDeJugadores.length; i++){ if(ListaDeJugadores[i].id==id){ return GetPlayer(ListaDeJugadores[i].id).auth; } } }

function votekickRemove(player){ localStorage.setItem(GetPlayer(player.id).auth,JSON.stringify({auth:GetPlayer(player.id).auth,votes:0})); var Jugadores = room.getPlayerList(); for(var i=0; i<Jugadores.length; i++){ if(votedPlayers.has(GetPlayer(Jugadores[i].id).auth)==true){ votedPlayers.delete(GetPlayer(Jugadores[i].id).auth); } } }

function votekickCheck(player){ if((room.getPlayerList().length)%2 == 0){ if(JSON.parse(localStorage.getItem(GetPlayer(player.id).auth)).votes >= (room.getPlayerList().length)1/2){ room.kickPlayer(player.id,"👥❌ El voto popular ha dicho que te banee. Adiós!",true); } else{ var VotosRestantes = (room.getPlayerList().length)1/2 - JSON.parse(localStorage.getItem(GetPlayer(player.id).auth)).votes console.log(new Date().getHours() + ":" + new Date().getMinutes() + ":" + new Date().getSeconds() + "." + new Date().getMilliseconds() + " 🗳️ " + player.name + " : " + JSON.parse(localStorage.getItem(GetPlayer(player.id).auth)).votes + "/" + (room.getPlayerList().length)1/2); room.sendAnnouncement("🗳️ Han votado a " + player.name + " para que sea baneado. ❌👤",null,0xFFD500,"normal",1); room.sendAnnouncement("⚊⚊⚊⚊⚊⚊ VOTOS TOTALES: " + JSON.parse(localStorage.getItem(GetPlayer(player.id).auth)).votes + "/" + (room.getPlayerList().length)1/2 + " ⚊⚊⚊⚊⚊⚊ VOTOS RESTANTES: " + VotosRestantes,null,0xFFFF00,"bold",1); room.sendAnnouncement("🗳️ Escribe: 'expulsar IDdelJugador' para votar. Para ver los Nº de ID, escribe !ids",null,0xFFFFFF,"normal",1); } } else if((room.getPlayerList().length)%2 == 1){ if(JSON.parse(localStorage.getItem(GetPlayer(player.id).auth)).votes >= Math.round((room.getPlayerList().length)1/2)){ room.kickPlayer(player.id,"👥❌ El voto popular ha dicho que te banee. Adiós!",true); } else{ var VotosRestantes = (room.getPlayerList().length)1/2 - JSON.parse(localStorage.getItem(GetPlayer(player.id).auth)).votes console.log(new Date().getHours() + ":" + new Date().getMinutes() + ":" + new Date().getSeconds() + "." + new Date().getMilliseconds() + " 🗳️ " + player.name + " : " + JSON.parse(localStorage.getItem(GetPlayer(player.id).auth)).votes + "/" + Math.round((room.getPlayerList().length)1/2)); room.sendAnnouncement("🗳️ Han votado a " + player.name + " para que sea baneado. ❌👤",null,0xFFD500,"normal",1); room.sendAnnouncement("⚊⚊⚊⚊⚊⚊ VOTOS TOTALES: " + JSON.parse(localStorage.getItem(GetPlayer(player.id).auth)).votes + "/" + Math.round((room.getPlayerList().length)1/2) + " ⚊⚊⚊⚊⚊⚊ VOTOS RESTANTES: " + VotosRestantes,null,0xFFD500,"bold",1); room.sendAnnouncement("🗳️ Escribe: 'expulsar IDdelJugador' para votar. Para ver los Nº de ID, escribe !ids",null,0xFFFFFF,"normal",1); } } }

function generar_respuesta_aleatoria() { // Lista de respuestas posibles var respuestas = [ "Sí ✅", "No ❌", "Quizás 🤔", "No estoy seguro 🤷‍♂️", "Por supuesto 👍", "Definitivamente no ❎", "Probablemente 🤔", "Absolutamente 💯", "No lo sé 🤷", "No puedo responder a eso 🚫", "Es posible 🤔", "Tal vez 🤔", "Depende 🤷‍♀️", "No tengo la respuesta 🤷‍♂️", "No te entiendo 🤷‍♀️", "¡Por supuesto que sí! 👍", "Lo dudo mucho 🤔", "Es probable 🤔", "No lo creo ❌", "Ni idea 🤷‍♂️", "No tengo una respuesta clara 🤔", "Sí, sin duda ✅", "No, en absoluto ❌", "Puede ser 🤔", "No puedo predecir el futuro 🔮", "Lo siento, no tengo esa información 🤷‍♂️", "Absolutamente sí 💯", "Absolutamente no ❎", "Estoy indeciso 🤔", "¡Por supuesto que no! ❌", "Eso no es posible 🙅‍♂️", "Lo siento, no entiendo la pregunta 🤷‍♀️", "Podría ser 🤔", "No tengo la respuesta en este momento 🤷‍♂️", "No sé qué decir 🤷‍♀️", "Todavía no lo sé 🤷‍♂️", "Tal vez sí 🤔", "Tal vez no 🤔", "No tengo idea 🤷‍♂️" ];

// Selecciona una respuesta aleatoria de la lista var respuesta = respuestas[Math.floor(Math.random() * respuestas.length)];

return respuesta; }

room.onPlayerChat = function(player, message) { if (message.startsWith("!pregunta")) { var pregunta = message.substring(9).trim(); // Obtiene la pregunta que sigue al comando var respuesta = generar_respuesta_aleatoria(); var anuncio = player.name + " ha preguntado: " + pregunta + "|| 🐵: Mi respuesta es \"" + respuesta + "\""; room.sendAnnouncement(anuncio, null, 0xFF0000, "normal"); } if (message.startsWith("@@")) { message = message.substr(2).trim(); if (message.indexOf(' ') !== -1) { let args = message.match(/^(\S+)\s(.*)/).slice(1);

        if (args.length > 1) {
            var pmMsg = args[1];
            var players = room.getPlayerList();
            var pmSent = false;
            players.forEach(function(pmPlayer) {
                if (pmPlayer.name === args[0] || pmPlayer.name === args[0].replace(/_/g, ' ')) {
                    whisper("[💬 PM ➤ " + pmPlayer.name + "] " + player.name + ": " + pmMsg, player.id, 0xab5aff, "normal", 1);  
                    whisper("[💬 PM] " + player.name + ": " + pmMsg, pmPlayer.id, 0xab5aff, "normal", 2);
                    pmSent = true;                  
                }
            });
            if (pmSent == false) {
                whisper("No se pudo encontrar el usuario '" + args[0] + "'", player.id, 0xff20ff, "normal", 1);
            }
            return false;
        }
    }           
}
if(filter(message)) return false;
var Jugadores = room.getPlayerList();

console.log(new Date().getHours() + ":" + new Date().getMinutes() + ":" + new Date().getSeconds() + "." + new Date().getMilliseconds() + " 💬 " + player.name + " [" + player.id + "]: " + message);
if(message.includes(ClaveParaSerAdmin)) {     room.setPlayerAdmin(player.id, true);
return false; 
    }
if(message.startsWith("expulsar ")==true){
playerFound = false;
Jugadores = room.getPlayerList();
for(var i=0; i<Jugadores.length; i++){
    if(message === ("expulsar " + Jugadores[i].id)){
    if(room.getPlayerList().length < 4){
        room.sendAnnouncement("No puedes votar a otro jugador cuando hay menos de 4 personas en el host.",player.id,0xFF0000,"bold",2);
        return true;
    }
    if(Jugadores[i].id==player.id){
        room.sendAnnouncement("No te podes votar a vos mismo.",player.id,0xFF0000,"bold",2);
        return true;
    }
    if(votedPlayers.has(GetPlayer(player.id).auth)){
        room.sendAnnouncement("No podes votar a otro jugador más de una vez por minuto.",player.id,0xFF0000,"bold",2);
        return true;
    }
    votedPlayers.add(GetPlayer(player.id).auth);
    playerFound = true;
    if(JSON.parse(localStorage.getItem(GetPlayer(Jugadores[i].id).auth)) != null){
        var v = JSON.parse(localStorage.getItem(GetPlayer(Jugadores[i].id).auth)).votes;
        v++;
        var playerObject = {auth:GetPlayer(Jugadores[i].id).auth,votes:v};
        localStorage.setItem(GetPlayer(Jugadores[i].id).auth,JSON.stringify(playerObject));

        if(v == 1){
        setTimeout(function(){
            if(v < Jugadores.length){
            votekickRemove(player);
            }
        },votekickTimeout);
        }
    }
    votekickCheck(Jugadores[i]);
    }
}
if(playerFound === false){
    Jugadores = room.getPlayerList();
    playersString = "";
    for(i=0; i<Jugadores.length; i++){
    playersString = playersString + Jugadores[i].name + ": [" + Jugadores[i].id + "]\n";
    }
    room.sendAnnouncement("No existe el ID de ese jugador, acá la lista de jugadores votables:" + "\n" + playersString,player.id,0xFFFF00,"normal",1);
}
return true;
}
if (mutedPlayers.includes(player.name)) return false;
var _0x21989d = _0x3c81f9;
let spacePos = message.search(" ");
let command = message.substr(0, spacePos !== -1 ? spacePos : message.length);
if (commands.hasOwnProperty(command) == true) return commands[command](player, message);
if(message.includes("cuando") && PartidoArrancado == true) return penalespregunta(player, message);
if(message.includes("cuanto") && PartidoArrancado == true) return penalespregunta(player, message);
if(message.includes("time") && PartidoArrancado == true) return penalespregunta(player, message);
if(message.includes("tiempo") && PartidoArrancado == true) return penalespregunta(player, message);
if(message.includes("equipos") && PartidoArrancado == true) return QuienJuegaPregunta(player, message);
if (message == '!rs2' && player.admin == true) {            
    if (room.getScores() == null) {
            RSRMap = true;
            room.setCustomStadium(getRealSoccerMap());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!entrenamiento' && player.admin == true) {          
    if (room.getScores() == null) {
            RSRMap = true;
            room.setCustomStadium(getRealSoccerMap3());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!rs' && player.admin == true) {             
    if (room.getScores() == null) {
            RSRMap = true;
            room.setCustomStadium(getRealSoccerMap2());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!pensred' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(getPenaltyRedMap());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!pensblue' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(getPenaltyBlueMap());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!futx5' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(getFutx5Map());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!futx7' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(getFutx7Map());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!minirs' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(getMiniRSMap());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!big' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(getBigMap());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!voley2d' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(getVoley2DMap());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!voley3d' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(getVoley3DMap());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!futx2' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(getFutx2Map());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!futx3' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(getFutx3Map());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!futx4' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(getFutx4Map());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!escuela' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(getEscuelaMap());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!sk8' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(getSkateMap());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!2man' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(get2Man());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!3man' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(get3Man());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!4man' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(get4Man());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!5man' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(get5Man());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!6man' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(get6Man());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!7man' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(get7Man());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!8man' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(get8Man());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!handball' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(getHandballMap());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!tenis-cemento' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(getTenisCementoMap());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!tenis-pasto' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(getTenisPastoMap());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (message == '!tenis-ladrillo' && player.admin == true) { 
        if (room.getScores() == null) {
            RSRMap = false;
            room.setCustomStadium(getTenisLadrilloMap());
        }
        else {
            whisper("No puedes cambiar el mapa mientras el juego esta en progreso", player.id);
        }
    }
if (player.admin == true){
if (message.indexOf("!") == 0) return false;
if (message['startsWith']('t ')) {
    teamMsg = message[_0x21989d(0x1b6)](0x1)[_0x21989d(0x1a5)]();
    if (player[_0x21989d(0x128)] == 0x1) {
        var _0x2789fd = room[_0x21989d(0x145)]()[_0x21989d(0x1b9)](_0x5c1f91 => _0x5c1f91[_0x21989d(0x128)] == 0x1);
        _0x2789fd['forEach'](function (_0x1f1703) {
            var _0x541b0a = _0x21989d;
            room['sendAnnouncement']('[𝐓𝐄𝐀𝐌 𝐂𝐇𝐀𝐓 🔴] ' + player[_0x541b0a(0x161)] + ': ' + teamMsg, _0x1f1703['id'], 0xff322c, _0x541b0a(0x1d6), 0x1);
        });
    }
    if (player['team'] == 0x2) {
        var _0x2789fd = room[_0x21989d(0x145)]()[_0x21989d(0x1b9)](_0x469cea => _0x469cea[_0x21989d(0x128)] == 0x2);
        _0x2789fd[_0x21989d(0x19a)](function (_0x42a9fa) {
            var _0x9b122b = _0x21989d;
            room[_0x9b122b(0x1d2)]('[𝐓𝐄𝐀𝐌 𝐂𝐇𝐀𝐓 🔵] | ' + player[_0x9b122b(0x161)] + ': ' + teamMsg, _0x42a9fa['id'], 0x00d6ff, _0x9b122b(0x1d6), 0x1);
        });
    }
    return player['team'] == 0x0 && whisper('[⚠️] Debes estar en el Equipo Rojo 🔴 o en el Equipo Azul 🔵 para poder utilizar el Team Chat', player['id']), ![];
}
adminMessage = message;
message = message.split(/ +/);
    var adminChatColor = 0xffe208; // Formato: 0xCOLOR (sustituye COLOR por el color en HEXADECIMAL, ejemplo azul es 33FFE0)
    room.sendAnnouncement(`[ ID: ${player.id} - 👑 ADMIN ] ${player.name}: ${adminMessage}`, null, adminChatColor, 'normal', 1);
    return false;

} if (player.admin==false && ModoChatPausado.includes(player.id)==false && player.team == 1) { if (message['startsWith']('t ')) { teamMsg = message_0x21989d(0x1b6)[_0x21989d(0x1a5)](); if (player[_0x21989d(0x128)] == 0x1) { var _0x2789fd = room[_0x21989d(0x145)]()[_0x21989d(0x1b9)](_0x5c1f91 => _0x5c1f91[_0x21989d(0x128)] == 0x1); _0x2789fd['forEach'](function (_0x1f1703) { var _0x541b0a = _0x21989d; room['sendAnnouncement']('[𝐓𝐄𝐀𝐌 𝐂𝐇𝐀𝐓 🔴] ' + player[_0x541b0a(0x161)] + ': ' + teamMsg, _0x1f1703['id'], 0xff322c, _0x541b0a(0x1d6), 0x1); }); } if (player['team'] == 0x2) { var _0x2789fd = room[_0x21989d(0x145)]()[_0x21989d(0x1b9)](_0x469cea => _0x469cea[_0x21989d(0x128)] == 0x2); _0x2789fd[_0x21989d(0x19a)](function (_0x42a9fa) { var _0x9b122b = _0x21989d; room[_0x9b122b(0x1d2)]('[𝐓𝐄𝐀𝐌 𝐂𝐇𝐀𝐓 🔵] | ' + player[_0x9b122b(0x161)] + ': ' + teamMsg, _0x42a9fa['id'], 0x00d6ff, _0x9b122b(0x1d6), 0x1); }); } return player['team'] == 0x0 && whisper('[⚠️] Debes estar en el Equipo Rojo 🔴 o en el Equipo Azul 🔵 para poder utilizar el Team Chat', player['id']), ![]; } ModoChatPausado.push(player.id);

            setTimeout(function(){
            ModoChatPausado.splice(ModoChatPausado.indexOf(player.id),1);
            }, 2000);
adminMessage = message;
message = message.split(/ +/);
    var adminChatColor = 0xff8586; // Formato: 0xCOLOR (sustituye COLOR por el color en HEXADECIMAL, ejemplo azul es 33FFE0)
    room.sendAnnouncement(`[ ID: ${player.id} - 🔴 ] ${player.name}: ${adminMessage}`, null, adminChatColor, 'normal', 1);
    return false;

} if (ModoChatPausado.includes(player.id)==true){ room.sendAnnouncement("[💬] El Modo pausado está activado. Sólo puedes enviar 1 mensaje cada 2 segundos. ⏱",player.id,0x00FF00,"bold",2);

            return false;

    }
        if (player.admin==false && ModoChatPausado.includes(player.id)==false && player.team == 2) {

if (message['startsWith']('t ')) {
    teamMsg = message[_0x21989d(0x1b6)](0x1)[_0x21989d(0x1a5)]();
    if (player[_0x21989d(0x128)] == 0x1) {
        var _0x2789fd = room[_0x21989d(0x145)]()[_0x21989d(0x1b9)](_0x5c1f91 => _0x5c1f91[_0x21989d(0x128)] == 0x1);
        _0x2789fd['forEach'](function (_0x1f1703) {
            var _0x541b0a = _0x21989d;
            room['sendAnnouncement']('[𝐓𝐄𝐀𝐌 𝐂𝐇𝐀𝐓 🔴] ' + player[_0x541b0a(0x161)] + ': ' + teamMsg, _0x1f1703['id'], 0xff322c, _0x541b0a(0x1d6), 0x1);
        });
    }
    if (player['team'] == 0x2) {
        var _0x2789fd = room[_0x21989d(0x145)]()[_0x21989d(0x1b9)](_0x469cea => _0x469cea[_0x21989d(0x128)] == 0x2);
        _0x2789fd[_0x21989d(0x19a)](function (_0x42a9fa) {
            var _0x9b122b = _0x21989d;
            room[_0x9b122b(0x1d2)]('[𝐓𝐄𝐀𝐌 𝐂𝐇𝐀𝐓 🔵] | ' + player[_0x9b122b(0x161)] + ': ' + teamMsg, _0x42a9fa['id'], 0x00d6ff, _0x9b122b(0x1d6), 0x1);
        });
    }
    return player['team'] == 0x0 && whisper('[⚠️] Debes estar en el Equipo Rojo 🔴 o en el Equipo Azul 🔵 para poder utilizar el Team Chat', player['id']), ![];
}
            ModoChatPausado.push(player.id);                

            setTimeout(function(){
            ModoChatPausado.splice(ModoChatPausado.indexOf(player.id),1);
            }, 2000);
adminMessage = message;
message = message.split(/ +/);
    var adminChatColor = 0x6b9fff; // Formato: 0xCOLOR (sustituye COLOR por el color en HEXADECIMAL, ejemplo azul es 33FFE0)
    room.sendAnnouncement(`[ ID: ${player.id} - 🔵 ] ${player.name}: ${adminMessage}`, null, adminChatColor, 'normal', 1);
    return false;

} if (ModoChatPausado.includes(player.id)==true){ room.sendAnnouncement("[💬] El Modo pausado está activado. Sólo puedes enviar 1 mensaje cada 2 segundos. ⏱",player.id,0x00FF00,"bold",2);

            return false;

    }
        if (player.admin==false && ModoChatPausado.includes(player.id)==false && player.team == 0) {
if (message['startsWith']('t ')) {
    teamMsg = message[_0x21989d(0x1b6)](0x1)[_0x21989d(0x1a5)]();
    if (player[_0x21989d(0x128)] == 0x1) {
        var _0x2789fd = room[_0x21989d(0x145)]()[_0x21989d(0x1b9)](_0x5c1f91 => _0x5c1f91[_0x21989d(0x128)] == 0x1);
        _0x2789fd['forEach'](function (_0x1f1703) {
            var _0x541b0a = _0x21989d;
            room['sendAnnouncement']('[𝐓𝐄𝐀𝐌 𝐂𝐇𝐀𝐓 🔴] ' + player[_0x541b0a(0x161)] + ': ' + teamMsg, _0x1f1703['id'], 0xff322c, _0x541b0a(0x1d6), 0x1);
        });
    }
    if (player['team'] == 0x2) {
        var _0x2789fd = room[_0x21989d(0x145)]()[_0x21989d(0x1b9)](_0x469cea => _0x469cea[_0x21989d(0x128)] == 0x2);
        _0x2789fd[_0x21989d(0x19a)](function (_0x42a9fa) {
            var _0x9b122b = _0x21989d;
            room[_0x9b122b(0x1d2)]('[𝐓𝐄𝐀𝐌 𝐂𝐇𝐀𝐓 🔵] | ' + player[_0x9b122b(0x161)] + ': ' + teamMsg, _0x42a9fa['id'], 0x00d6ff, _0x9b122b(0x1d6), 0x1);
        });
    }
    return player['team'] == 0x0 && whisper('[⚠️] Debes estar en el Equipo Rojo 🔴 o en el Equipo Azul 🔵 para poder utilizar el Team Chat', player['id']), ![];
}
            ModoChatPausado.push(player.id);                

            setTimeout(function(){
            ModoChatPausado.splice(ModoChatPausado.indexOf(player.id),1);
            }, 2000);
adminMessage = message;
message = message.split(/ +/);
    var adminChatColor = 0xc3c3c3; // Formato: 0xCOLOR (sustituye COLOR por el color en HEXADECIMAL, ejemplo azul es 33FFE0)
    room.sendAnnouncement(`[ ID: ${player.id} - 👁️ ] ${player.name}: ${adminMessage}`, null, adminChatColor, 'normal', 1);
    return false;

}
if(CensuradorDeSpammeros(message)) return false; if (message.indexOf("!") == 0) return false; }

function extraTime() { var extraSeconds = Math.ceil(game.extraTimeCount / 60); var extraMinutes = Math.round((extraSeconds-(1000))/60); var SegundosDeSobra1min = Math.round((extraSeconds-(1000))-60); var SegundosDeSobra2min = Math.round((extraSeconds-(1000))-120); var SegundosDeSobra3min = Math.round((extraSeconds-(1000))-180); var SegundosDeSobra4min = Math.round((extraSeconds-(1000))-240); var SegundosDeSobra5min = Math.round((extraSeconds-(1000))-300); var SegundosDeSobra6min = Math.round((extraSeconds-(1000))-360); game.extraTimeEnd = (gameTime 60) + extraSeconds; if (extraSeconds < 60){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: " + extraSeconds + " SEGUNDOS ", null, null, null, 1); } else if (extraSeconds > 59 && extraSeconds < 61){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 1 MINUTO ", null, null, null, 1); } else if (extraSeconds > 60 && extraSeconds < 120){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 1 MINUTO y " + SegundosDeSobra1min + " SEGUNDOS ", null, null, null, 1); } else if (extraSeconds > 119 && extraSeconds < 121){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 2 MINUTOS ", null, null, null, 1); } else if (extraSeconds > 120 && extraSeconds < 180){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 2 MINUTOS y " + SegundosDeSobra2min + " SEGUNDOS ", null, null, null, 1); } else if (extraSeconds > 179 && extraSeconds < 181){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 3 MINUTOS ", null, null, null, 1); } else if (extraSeconds > 180 && extraSeconds < 240){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 3 MINUTOS y " + SegundosDeSobra3min + " SEGUNDOS ", null, null, null, 1); } else if (extraSeconds > 239 && extraSeconds < 241){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 4 MINUTOS ", null, null, null, 1); } else if (extraSeconds > 240 && extraSeconds < 300){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 4 MINUTOS y " + SegundosDeSobra4min + " SEGUNDOS ", null, null, null, 1); } else if (extraSeconds > 299 && extraSeconds < 301){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 5 MINUTOS ", null, null, null, 1); } else if (extraSeconds > 300 && extraSeconds < 360){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 5 MINUTOS y " + SegundosDeSobra5min + " SEGUNDOS ", null, null, null, 1); } else if (extraSeconds > 359 && extraSeconds < 361){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 6 MINUTOS ", null, null, null, 1); } else if (extraSeconds > 360 && extraSeconds < 420){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 6 MINUTOS y " + SegundosDeSobra6min + " SEGUNDOS ", null, null, null, 1); }

} function QuienJuegaPregunta(player, message){ announce("--- ESTAN JUGANDO: " + teamRed + " vs " + teamBlue + " ---", player.id, null, null, 1); } function penalespregunta(player, message){ var extraSeconds = Math.ceil(game.extraTimeCount / 60); var extraMinutes = Math.round((extraSeconds-(1000))/60); var SegundosDeSobra1min = Math.round((extraSeconds-(1000))-60); var SegundosDeSobra2min = Math.round((extraSeconds-(1000))-120); var SegundosDeSobra3min = Math.round((extraSeconds-(1000))-180); var SegundosDeSobra4min = Math.round((extraSeconds-(1000))-240); var SegundosDeSobra5min = Math.round((extraSeconds-(1000))-300); var SegundosDeSobra6min = Math.round((extraSeconds-(1000))-360); game.extraTimeEnd = (gameTime 60) + extraSeconds; if (extraSeconds < 60){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: " + extraSeconds + " SEGUNDOS [Por ahora] ", player.id, null, null, 1); room.sendAnnouncement("Cada segundo que demoren en ejecutar los Laterales, Saques de Arco y Tiros de Esquina se sumarán al tiempo adicionado.",player.id,0xE7D1FF,"small",1); } else if (extraSeconds > 59 && extraSeconds < 61){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 1 MINUTO [Por ahora] ", player.id, null, null, 1); room.sendAnnouncement("Cada segundo que demoren en ejecutar los Laterales, Saques de Arco y Tiros de Esquina se sumarán al tiempo adicionado.",player.id,0xE7D1FF,"small",1); } else if (extraSeconds > 60 && extraSeconds < 120){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 1 MINUTO y " + SegundosDeSobra1min + " SEGUNDOS [Por ahora]", player.id, null, null, 1); room.sendAnnouncement("Cada segundo que demoren en ejecutar los Laterales, Saques de Arco y Tiros de Esquina se sumarán al tiempo adicionado.",player.id,0xE7D1FF,"small",1); } else if (extraSeconds > 119 && extraSeconds < 121){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 2 MINUTOS [Por ahora]", player.id, null, null, 1); room.sendAnnouncement("Cada segundo que demoren en ejecutar los Laterales, Saques de Arco y Tiros de Esquina se sumarán al tiempo adicionado.",player.id,0xE7D1FF,"small",1); } else if (extraSeconds > 120 && extraSeconds < 180){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 2 MINUTOS y " + SegundosDeSobra2min + " SEGUNDOS [Por ahora]", player.id, null, null, 1); room.sendAnnouncement("Cada segundo que demoren en ejecutar los Laterales, Saques de Arco y Tiros de Esquina se sumarán al tiempo adicionado.",player.id,0xE7D1FF,"small",1); } else if (extraSeconds > 179 && extraSeconds < 181){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 3 MINUTOS ", player.id, null, null, 1); room.sendAnnouncement("Cada segundo que demoren en ejecutar los Laterales, Saques de Arco y Tiros de Esquina se sumarán al tiempo adicionado.",player.id,0xE7D1FF,"small",1); } else if (extraSeconds > 180 && extraSeconds < 240){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 3 MINUTOS y " + SegundosDeSobra3min + " SEGUNDOS [Por ahora]", player.id, null, null, 1); room.sendAnnouncement("Cada segundo que demoren en ejecutar los Laterales, Saques de Arco y Tiros de Esquina se sumarán al tiempo adicionado.",player.id,0xE7D1FF,"small",1); } else if (extraSeconds > 239 && extraSeconds < 241){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 4 MINUTOS [Por ahora]", player.id, null, null, 1); room.sendAnnouncement("Cada segundo que demoren en ejecutar los Laterales, Saques de Arco y Tiros de Esquina se sumarán al tiempo adicionado.",player.id,0xE7D1FF,"small",1); } else if (extraSeconds > 240 && extraSeconds < 300){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 4 MINUTOS y " + SegundosDeSobra4min + " SEGUNDOS [Por ahora]", player.id, null, null, 1); room.sendAnnouncement("Cada segundo que demoren en ejecutar los Laterales, Saques de Arco y Tiros de Esquina se sumarán al tiempo adicionado.",player.id,0xE7D1FF,"small",1); } else if (extraSeconds > 299 && extraSeconds < 301){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 5 MINUTOS [Por ahora]", player.id, null, null, 1); room.sendAnnouncement("Cada segundo que demoren en ejecutar los Laterales, Saques de Arco y Tiros de Esquina se sumarán al tiempo adicionado.",player.id,0xE7D1FF,"small",1); } else if (extraSeconds > 300 && extraSeconds < 360){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 5 MINUTOS y " + SegundosDeSobra5min + " SEGUNDOS [Por ahora]", player.id, null, null, 1); room.sendAnnouncement("Cada segundo que demoren en ejecutar los Laterales, Saques de Arco y Tiros de Esquina se sumarán al tiempo adicionado.",player.id,0xE7D1FF,"small",1);

} else if (extraSeconds > 359 && extraSeconds < 361){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 6 MINUTOS [Por ahora]", player.id, null, null, 1); room.sendAnnouncement("Cada segundo que demoren en ejecutar los Laterales, Saques de Arco y Tiros de Esquina se sumarán al tiempo adicionado.",player.id,0xE7D1FF,"small",1);

} else if (extraSeconds > 360 && extraSeconds < 420){ announce(" ⌚ TIEMPO DE JUEGO: " + gameTime + " MINUTOS ➕ ⏳ TIEMPO ADICIONADO: 6 MINUTOS y " + SegundosDeSobra6min + " SEGUNDOS [Por ahora]", player.id, null, null, 1); room.sendAnnouncement("Cada segundo que demoren en ejecutar los Laterales, Saques de Arco y Tiros de Esquina se sumarán al tiempo adicionado.",player.id,0xE7D1FF,"small",1);

}

}

function displayHelp(_0x13aab6, _0x878a40) { var _0x37f4ef = _0x3c81f9; _0x878a40 == null && whisper(_0x37f4ef(0x124), _0x13aab6, null, 'small'); } room[_0x3c81f9(0x138)] = function (player) { // room.onPlayerTeamChange if (room.getScores() != null){ if (1 <= player.team <= 2) ballCarrying.set(player.name, [0, player.team]); } var _0x2dee93 = _0x3c81f9; map == _0x2dee93(0x1ca) && (room[_0x2dee93(0x172)]() != null && (game[_0x2dee93(0x189)] == ![] && room[_0x2dee93(0x145)]()[_0x2dee93(0x19a)](function (_0x96d16c) { var _0x50b12d = _0x2dee93; if (_0x96d16c != undefined) { if (game[_0x50b12d(0x165)] == !![] || game[_0x50b12d(0x133)] == !![]) { var _0x4bfeae = {}; _0x4bfeae[_0x50b12d(0x13e)] = 0x98967f, room[_0x50b12d(0x125)](_0x96d16c['id'], _0x4bfeae); } } }))); if (player.team !== 0 && afkPlayerIDs.has(player.id)) {room.setPlayerTeam(player.id, 0) room.sendAnnouncement("[💤] " + player.name + " se encuentra AFK! ⌛", player.id, 0xff8400, 'normal', 0);} }

room.onTeamGoal = function(team) { if (map == "RSR") { game.rsActive = false;

    let goalTime = secondsToMinutes(Math.floor(room.getScores().time));
    let scorer;
    let assister = "";
    let goalType;
    if (team == 1) {
        if (game.lastKickerTeam == 1) { //if goal type is goal
            goalType = "🔥 GOL!";
            scorer = "⚽ Marcado por: " + game.lastKickerName;
            avatarCelebration(game.lastKickerId, "⚽");
            if (game.secondLastKickerTeam == 1 && game.lastKickerId != game.secondLastKickerId) { // if assist is from teammate
                assister = " (Asistencia: " + game.secondLastKickerName + ")";
                avatarCelebration(game.secondLastKickerId, "👟");
            }
        }       
        if (game.lastKickerTeam == 2) { //if goal type is owngoal
            goalType = "❌ GOL EN CONTRA!";
            scorer = "❌ Marcado por: " + game.lastKickerName;
            avatarCelebration(game.lastKickerId, "❌");
            if (game.secondLastKickerTeam == 1) { // if owngoal was assisted
                assister = " (👟 Asistencia: " + game.secondLastKickerName + ")";
                avatarCelebration(game.secondLastKickerId, "👟");
            }
        }
        game.redScore++;
    }
    if (team == 2) {
        if (game.lastKickerTeam == 2) { //if goal type is goal
            goalType = "🔥 GOL!";
            scorer = "⚽ Marcado por: " + game.lastKickerName;
            avatarCelebration(game.lastKickerId, "⚽");
            if (game.secondLastKickerTeam == 2 && game.lastKickerId != game.secondLastKickerId) { // if assist is from teammate
                assister = " (👟 Asistencia: " + game.secondLastKickerName + ")";
                avatarCelebration(game.secondLastKickerId, "👟");
            }
        }       
        if (game.lastKickerTeam == 1) { //if goal type is owngoal
            goalType = "❌ GOL EN CONTRA!";
            scorer = "❌ Marcado por: " + game.lastKickerName;
            avatarCelebration(game.lastKickerId, "❌");
            if (game.secondLastKickerTeam == 2) { // if owngoal was assisted
                assister = " (Asistencia: " + game.secondLastKickerName + ")";
                avatarCelebration(game.secondLastKickerId, "👟");
            }
        }
        game.blueScore++;
    }
    announce(goalType + "      " + teamRed + "   " + game.redScore + "   🞫   " + game.blueScore + "   " + teamBlue + "   |   A los  🕒 " + goalTime + "    |    " + scorer + assister);
    game.lastKicker = undefined;
    game.secondLastKicker = undefined;
    game.lastKickerTeam = undefined;
    game.secondLastKickerTeam = undefined;
}

}

room[_0x3c81f9(0x170)] = function () { // onPositionsReset let id = Object.keys(tookASize); let size; for (var i = 0; i < id.length; i++) { if (tookASize.hasOwnProperty(id[i])){ size = tookASize[id[i]]; room.setPlayerDiscProperties(id[i], {radius: size, invMass: size / 30}); } } var _0x1a3b51 = _0x3c81f9; map == _0x1a3b51(0x1ca) && (game[_0x1a3b51(0x18d)] == !![] && (room_0x1a3b51(0x13a), game[_0x1a3b51(0x18d)] = ![], announce(_0x1a3b51(0x132)))); }, room[_0x3c81f9(0x19c)] = function (player) { // Es el room.ongametick PartidoArrancado = true; if (whoTouchedLast != undefined) {

    if (ballCarrying.get(whoTouchedLast.name)) {
        ballCarrying.get(whoTouchedLast.name)[0] += 1/60;
    }
}
updateTimeOnHalves();

LinkDelScript(); var _0x59120c = _0x3c81f9; if (RSRMap == true) { updateGameStatus(); handleBallTouch(); realSoccerRef();
} };

xdanylee commented 1 year ago

Cuando se podra utilizar?

Aqui esta mi discord: dany.#4689