0% found this document useful (0 votes)
4 views85 pages

Marbella AF 4V4 Game Setup Guide

The document outlines the configuration for a gaming room named '[Marbella] AF 4V4🟡🔵🔴', with a maximum capacity of 18 players and a public setting. It includes various settings such as geographical location, webhooks for Discord integration, and game parameters like time and score limits. Additionally, it contains a detailed JSON structure for a training map with specific attributes and properties.

Uploaded by

a.chaconcs2008
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views85 pages

Marbella AF 4V4 Game Setup Guide

The document outlines the configuration for a gaming room named '[Marbella] AF 4V4🟡🔵🔴', with a maximum capacity of 18 players and a public setting. It includes various settings such as geographical location, webhooks for Discord integration, and game parameters like time and score limits. Additionally, it contains a detailed JSON structure for a training map with specific attributes and properties.

Uploaded by

a.chaconcs2008
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

/* VARIABLES */

/* ROOM */

const roomName = '[Marbella] AF 4V4🟡🔵🔴';


const maxPlayers = 18;
const roomPublic = true; k
const geo = [{"code": "ve", "lat": 10.5,"lon": -66.9}];
const token = "thr1.AAAAAGUHZeJY2yBs-7In_Q.WAPeWaPl75w";

var llamaradminWebhook =
'[Link]
MxcADixnpLtvgE6vU-Kn-Rb_uupEQZnHVEChdcU'
var roomWebhook =
'[Link]
SOgF2lcjGrSRRkiS1t7j4wKJy1gL40LyUl3H_6P';
var gameWebhook =
'[Link]
tiCTGPZ767tmFibNVwOuEPWW7mQMeHHB2ZR2wm4Pj5V';
var fetchRecordingVariable = true;
var timeLimit = 4;
var scoreLimit = 3;

var gameConfig = {
roomName: roomName,
maxPlayers: maxPlayers,
public: roomPublic,
noPlayer: true,
geo: geo[0]
}

if (typeof token == 'string' && [Link] == 39) {


[Link] = token;
}

var room = HBInit(gameConfig);

const trainingMap = '{"name": "Vehax No Goles [OFICIAL BY NEY]", "width": 510,


"height": 230, "cameraWidth": 0, "cameraHeight": 0, "maxViewWidth": 0,
"cameraFollow": "ball", "spawnDistance": 150, "redSpawnPoints": [ [ -150, 0 ], [ -
270, 0 ] ], "blueSpawnPoints": [ [ 150, 0 ], [ 270, 0 ] ], "canBeStored": true,
"kickOffReset": "full", "bg": { "color": "1D2431", "height": 200, "width": 400 },
"traits": { "ballArea": { "vis": false, "bCoef": 1, "cMask": [ "ball" ] },
"goalPost": { "radius": 8, "invMass": 0, "bCoef": 0.5 }, "goalNet": { "vis": true,
"bCoef": 0.1, "cMask": [ "ball" ] }, "kickOffBarrier": { "vis": false, "bCoef":
0.1, "cGroup": [ "redKO", "blueKO" ], "cMask": [ "red", "blue" ] } }, "vertexes": [
{ "x": -400, "y": -200, "bCoef": 1, "cMask": [ "ball" ], "color": "C2AB4F", "bias":
-10, "vis": true }, { "x": 401, "y": -200, "bCoef": 1, "cMask": [ "ball" ],
"color": "C2AB4F", "bias": -10, "vis": true }, { "x": -401, "y": 200, "bCoef": 1,
"cMask": [ "ball" ], "color": "C2AB4F", "bias": 10, "vis": true }, { "x": 401, "y":
200, "bCoef": 1, "cMask": [ "ball" ], "color": "C2AB4F", "bias": 10, "vis": true },
{ "x": -400, "y": 70, "bCoef": 1, "cMask": [ "ball" ], "color": "C2AB4F", "bias":
10, "vis": true }, { "x": -400, "y": 201, "bCoef": 1, "cMask": [ "ball" ], "color":
"C2AB4F", "bias": 10, "vis": true }, { "x": 400, "y": 70, "bCoef": 1, "cMask":
[ "ball" ], "color": "C2AB4F", "bias": -10, "vis": true }, { "x": 400, "y": 201,
"bCoef": 1, "cMask": [ "ball" ], "color": "C2AB4F", "bias": -10, "vis": true },
{ "x": -400, "y": -200, "bCoef": 1, "cMask": [ "ball" ], "color": "C2AB4F", "bias":
10, "vis": true }, { "x": -400, "y": -70, "bCoef": 1, "cMask": [ "ball" ], "color":
"C2AB4F", "bias": 10, "vis": true }, { "x": 400, "y": -201, "bCoef": 1, "cMask":
[ "ball" ], "color": "C2AB4F", "bias": -10, "vis": true }, { "x": 400, "y": -70,
"bCoef": 1, "cMask": [ "ball" ], "color": "C2AB4F", "bias": -10, "vis": true },
{ "x": -436, "y": -70, "bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ],
"bias": -10, "color": "E51D44" }, { "x": -400, "y": -70, "bCoef": 0.2, "cMask":
[ "ball" ], "cGroup": [ "ball" ], "bias": -10, "color": "E51D44" }, { "x": -436,
"y": 70, "bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ], "bias": 10,
"color": "E51D44" }, { "x": -400, "y": 70, "bCoef": 0.2, "cMask": [ "ball" ],
"cGroup": [ "ball" ], "bias": 10, "color": "E51D44" }, { "x": -435, "y": -71,
"bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ], "bias": 10, "color":
"E51D44", "curve": -35 }, { "x": -435, "y": 71, "bCoef": 0.2, "cMask": [ "ball" ],
"cGroup": [ "ball" ], "bias": 10, "color": "E51D44", "curve": -35 }, { "x": 435,
"y": -71, "bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ], "bias": -10,
"color": "411DE5", "curve": 35 }, { "x": 435, "y": 71, "bCoef": 0.2, "cMask":
[ "ball" ], "cGroup": [ "ball" ], "bias": -10, "color": "411DE5", "curve": 35 },
{ "x": 436, "y": -70, "bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ],
"bias": 10, "color": "411DE5" }, { "x": 400, "y": -70, "bCoef": 0.2, "cMask":
[ "ball" ], "cGroup": [ "ball" ], "bias": 10, "color": "411DE5" }, { "x": 436, "y":
70, "bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ], "bias": -10, "color":
"411DE5" }, { "x": 400, "y": 70, "bCoef": 0.2, "cMask": [ "ball" ], "cGroup":
[ "ball" ], "bias": -10, "color": "411DE5" }, { "x": -400, "y": -70, "bCoef": 1,
"cMask": [ "red", "blue", "ball" ], "cGroup": [ "wall" ], "color": "ff6666",
"bias": 10 }, { "x": -400, "y": 70, "bCoef": 1, "cMask": [ "red", "blue", "ball" ],
"cGroup": [ "wall" ], "color": "ff6666", "bias": 10 }, { "x": 400, "y": -70,
"bCoef": 1, "cMask": [ "red", "blue", "ball" ], "cGroup": [ "wall" ], "color":
"6666ff", "bias": -10 }, { "x": 400, "y": 70, "bCoef": 1, "cMask": [ "red", "blue",
"ball" ], "cGroup": [ "wall" ], "color": "6666ff", "bias": -10 }, { "x": 0, "y": -
230, "cMask": [ "red", "blue" ], "cGroup": [ "redKO", "blueKO" ], "vis": true,
"color": "ACB9D1" }, { "x": 0, "y": -80, "cMask": [ "red", "blue" ], "cGroup":
[ "redKO", "blueKO" ], "vis": true, "color": "ACB9D1" }, { "x": 0, "y": 80,
"cMask": [ "red", "blue" ], "cGroup": [ "redKO", "blueKO" ], "color": "ACB9D1",
"vis": true }, { "x": 0, "y": 230, "cMask": [ "red", "blue" ], "cGroup": [ "redKO",
"blueKO" ], "color": "ACB9D1", "vis": true }, { "x": 0, "y": 80, "cMask": [ "red",
"blue" ], "cGroup": [ "blueKO" ], "color": "0A1524" }, { "x": 0, "y": -80, "cMask":
[ "red", "blue" ], "cGroup": [ "blueKO" ], "color": "0A1524" }, { "x": 0, "y": -80,
"cMask": [ "red", "blue" ], "cGroup": [ "redKO" ], "color": "0A1524" }, { "x": 0,
"y": 80, "cMask": [ "red", "blue" ], "cGroup": [ "redKO" ], "color": "0A1524" },
{ "x": 0, "y": -81, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "2E3440" },
{ "x": 0, "y": 81, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "2E3440" },
{ "x": -402, "y": -70, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "353C4A"
}, { "x": -402, "y": 70, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color":
"353C4A" }, { "x": -398, "y": -70, "cMask": [ "wall" ], "cGroup": [ "wall" ],
"color": "f4d7dc" }, { "x": -398, "y": 70, "cMask": [ "wall" ], "cGroup":
[ "wall" ], "color": "f4d7dc" }, { "x": 398, "y": -70, "cMask": [ "wall" ],
"cGroup": [ "wall" ], "color": "f4d7dc", "curve": 0 }, { "x": 398, "y": 70,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "f4d7dc", "curve": 0 }, { "x":
402, "y": -70, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "353C4A",
"curve": 0 }, { "x": 402, "y": 70, "cMask": [ "wall" ], "cGroup": [ "wall" ],
"color": "353C4A", "curve": 0 }, { "x": 0, "y": 25.2, "cMask": [ "wall" ],
"cGroup": [ "wall" ], "color": "DBF808", "curve": 25 }, { "x": 20, "y": -24,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "DBF808", "curve": 25 }, { "x":
0, "y": 25.2, "cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": -25, "color":
"DBF808" }, { "x": -20, "y": -24, "cMask": [ "wall" ], "cGroup": [ "wall" ],
"curve": -25, "color": "DBF808" }, { "x": 0, "y": 28.799999999999997, "cMask":
[ "wall" ], "cGroup": [ "wall" ], "color": "DBF808", "curve": 25 }, { "x": 20, "y":
-20.4, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "DBF808", "curve": 25 },
{ "x": 0, "y": 28.799999999999997, "cMask": [ "wall" ], "cGroup": [ "wall" ],
"curve": -25, "color": "DBF808" }, { "x": -20, "y": -20.4, "cMask": [ "wall" ],
"cGroup": [ "wall" ], "curve": -25, "color": "DBF808" }, { "x": 0, "y": 33,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "DBF808", "curve": 25 }, { "x":
20, "y": -16.2, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "DBF808",
"curve": 25 }, { "x": 0, "y": 33, "cMask": [ "wall" ], "cGroup": [ "wall" ],
"curve": -25, "color": "DBF808" }, { "x": -20, "y": -16.2, "cMask": [ "wall" ],
"cGroup": [ "wall" ], "curve": -25, "color": "DBF808" }, { "x": 0, "y": 36.6,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "DBF808", "curve": 25 }, { "x":
20, "y": -12.6, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "DBF808",
"curve": 25 }, { "x": 0, "y": 36.6, "cMask": [ "wall" ], "cGroup": [ "wall" ],
"curve": -25, "color": "DBF808" }, { "x": -20, "y": -12.6, "cMask": [ "wall" ],
"cGroup": [ "wall" ], "curve": -25, "color": "DBF808" }, { "x": 1, "y": 32.4,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "DBF808" }, { "x": -1, "y":
32.4, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "DBF808" }, { "x": 0,
"y": -24, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "DBF808" }, { "x": 0,
"y": 28, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "DBF808" }, { "x": 0,
"y": -26, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "DBF808" }, { "x": 0,
"y": 30, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "DBF808" }, { "x": 0,
"y": -26, "cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": 0, "color":
"DBF808" }, { "x": 0, "y": -24, "cMask": [ "wall" ], "cGroup": [ "wall" ], "curve":
0, "color": "DBF808" }, { "x": 0, "y": -81, "cMask": [ "wall" ], "cGroup": [ "wall"
], "curve": 180, "color": "ACB9D1" }, { "x": 1, "y": 80, "cMask": [ "wall" ],
"cGroup": [ "wall" ], "curve": 180, "color": "ACB9D1" }, { "x": 0, "y": -81,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": -180, "color": "ACB9D1" },
{ "x": 1, "y": 80, "cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": -180,
"color": "ACB9D1" } ], "segments": [ { "v0": 0, "v1": 1, "vis": true, "color":
"C2AB4F", "bCoef": 1, "cMask": [ "ball" ], "bias": -10, "y": -200 }, { "v0": 2,
"v1": 3, "vis": true, "color": "C2AB4F", "bCoef": 1, "cMask": [ "ball" ], "bias":
10, "y": 200 }, { "v0": 4, "v1": 5, "vis": true, "color": "C2AB4F", "bCoef": 1,
"cMask": [ "ball" ], "bias": 10, "x": -400 }, { "v0": 6, "v1": 7, "vis": true,
"color": "C2AB4F", "bCoef": 1, "cMask": [ "ball" ], "bias": -10, "x": 400 },
{ "v0": 8, "v1": 9, "vis": true, "color": "C2AB4F", "bCoef": 1, "cMask":
[ "ball" ], "bias": 10 }, { "v0": 10, "v1": 11, "vis": true, "color": "C2AB4F",
"bCoef": 1, "cMask": [ "ball" ], "bias": -10 }, { "v0": 12, "v1": 13, "color":
"E51D44", "bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ], "bias": -10 }, {
"v0": 14, "v1": 15, "color": "E51D44", "bCoef": 0.2, "cMask": [ "ball" ], "cGroup":
[ "ball" ], "bias": 10, "y": 70 }, { "v0": 16, "v1": 17, "curve": -35, "color":
"E51D44", "bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ], "bias": 10 },
{ "v0": 18, "v1": 19, "curve": 35, "color": "411DE5", "bCoef": 0.2, "cMask":
[ "ball" ], "cGroup": [ "ball" ], "bias": -10, "x": 435 }, { "v0": 20, "v1": 21,
"color": "411DE5", "bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ], "bias":
10 }, { "v0": 22, "v1": 23, "color": "411DE5", "bCoef": 0.2, "cMask": [ "ball" ],
"cGroup": [ "ball" ], "bias": -10, "y": 70 }, { "v0": 24, "v1": 25, "color":
"ff6666", "bCoef": 1, "cMask": [ "red", "blue", "ball" ], "cGroup": [ "wall" ],
"bias": 10, "x": -400 }, { "v0": 26, "v1": 27, "color": "6666ff", "bCoef": 1,
"cMask": [ "red", "blue", "ball" ], "cGroup":
[ "wall" ], "bias": -10, "x": 400 }, { "v0": 28, "v1": 29, "vis": true, "color":
"ACB9D1", "cMask": [ "red", "blue" ], "cGroup": [ "redKO", "blueKO" ], "x": 0 },
{ "v0": 30, "v1": 31, "vis": true, "color": "ACB9D1", "cMask": [ "red", "blue" ],
"cGroup": [ "redKO", "blueKO" ], "x": 0 }, { "v0": 32, "v1": 33, "curve": 180,
"vis": false, "color": "0A1524", "cMask": [ "red", "blue" ], "cGroup":
[ "blueKO" ], "x": 0 }, { "v0": 34, "v1": 35, "curve": 180, "vis": false, "color":
"0A1524", "cMask": [ "red", "blue" ], "cGroup": [ "redKO" ], "x": 0 }, { "v0": 36,
"v1": 37, "curve": -180, "color": "2E3440", "cMask": [ "wall" ], "cGroup": [ "wall"
], "x": 0 }, { "v0": 37, "v1": 36, "curve": -180, "color": "2E3440", "cMask":
[ "wall" ], "cGroup": [ "wall" ], "x": 0 }, { "v0": 46, "v1": 47, "curve":
21.61111655529532, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ] },
{ "v0": 48, "v1": 49, "curve": -21.61111655529532, "color": "DBF808", "cMask":
[ "wall" ], "cGroup": [ "wall" ] }, { "v0": 50, "v1": 51, "curve":
21.61111655529532, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ] },
{ "v0": 52, "v1": 53, "curve": -21.61111655529532, "color": "DBF808", "cMask":
[ "wall" ], "cGroup": [ "wall" ] }, { "v0": 54, "v1": 55, "curve":
21.61111655529532, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ] },
{ "v0": 56, "v1": 57, "curve": -21.6111165552953, "color": "DBF808", "cMask":
[ "wall" ], "cGroup": [ "wall" ] }, { "v0": 58, "v1": 59, "curve":
21.61111655529532, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ] },
{ "v0": 60, "v1": 61, "curve": -21.61111655529531, "color": "DBF808", "cMask":
[ "wall" ], "cGroup": [ "wall" ] }, { "v0": 47, "v1": 59, "curve":
20.934242330086946, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ] },
{ "v0": 61, "v1": 49, "curve": 20.93424233008692, "color": "DBF808", "cMask":
[ "wall" ], "cGroup": [ "wall" ] }, { "v0": 47, "v1": 59, "curve":
38.08709223936826, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ] },
{ "v0": 61, "v1": 49, "curve": 38.08709223936821, "color": "DBF808", "cMask":
[ "wall" ], "cGroup": [ "wall" ] }, { "v0": 62, "v1": 63, "curve": 180, "color":
"DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ] }, { "v0": 64, "v1": 65,
"curve": 180, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ], "x":
0 }, { "v0": 65, "v1": 64, "curve": 180, "color": "DBF808", "cMask": [ "wall" ],
"cGroup": [ "wall" ], "x": 0 }, { "v0": 66, "v1": 67, "curve": 180, "color":
"DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ], "x": 0 }, { "v0": 67, "v1":
66, "curve": 180, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ],
"x": 0 }, { "v0": 68, "v1": 69, "curve": 0, "color": "DBF808", "cMask": [ "wall" ],
"cGroup": [ "wall" ], "x": 0 }, { "v0": 70, "v1": 71, "curve": 180, "color":
"ACB9D1", "cMask": [ "wall" ], "cGroup": [ "wall" ], "y": -100 }, { "v0": 72, "v1":
73, "curve": -180, "color": "ACB9D1", "cMask": [ "wall" ], "cGroup": [ "wall" ],
"y": -100 } ], "goals": [], "discs": [ { "radius": 5, "invMass": 0, "pos": [ -400,
-70 ], "color": "192C3B", "bCoef": 1, "cMask": [ "all" ], "cGroup": [ "all" ] },
{ "radius": 5, "invMass": 0, "pos": [ -400, 70 ], "color": "192C3B", "bCoef": 1,
"cMask": [ "all" ], "cGroup": [ "all" ] }, { "radius": 5, "invMass": 0, "pos":
[ 400, -70 ], "color": "192C3B", "bCoef": 1, "cMask": [ "all" ], "cGroup":
[ "all" ] }, { "radius": 5, "invMass": 0, "pos": [ 400, 70 ], "color": "192C3B",
"bCoef": 1, "cMask": [ "all" ], "cGroup": [ "all" ] } ], "planes": [ { "normal":
[ 0, 1 ], "dist": -230, "cMask": [ "red", "blue" ] }, { "normal": [ 0, -1 ],
"dist": -230, "cMask": [ "red", "blue" ] }, { "normal": [ -1, 0 ], "dist": -510,
"cMask": [ "red", "blue" ], "cGroup": [ "wall" ] }, { "normal": [ 1, 0 ], "dist": -
510, "cMask": [ "red", "blue" ], "cGroup": [ "wall" ] } ], "joints": [],
"playerPhysics": { "radius": 15, "bCoef": 0, "invMass": 0.5, "damping": 0.96,
"cGroup": [ "red", "blue" ], "acceleration": 0.11, "gravity": [ 0, 0 ],
"kickingAcceleration": 0.083, "kickingDamping": 0.96, "kickStrength": 4.2,
"kickback": 0 }, "ballPhysics": { "radius": 5.8, "bCoef": 0.412, "cMask":
[ "all" ], "damping": 0.99, "invMass": 1.55, "gravity": [ 0, 0 ], "color":
"E8104E", "cGroup": [ "ball" ] } }';
const classicMap = '{"name": "Vehax x1, x2 [OFICIAL BY NEY]", "width": 510,
"height": 230, "cameraWidth": 0, "cameraHeight": 0, "maxViewWidth": 0,
"cameraFollow": "ball", "spawnDistance": 150, "redSpawnPoints": [ [ -150, 0 ], [ -
270, 0 ] ], "blueSpawnPoints": [ [ 150, 0 ], [ 270, 0 ] ], "canBeStored": true,
"kickOffReset": "full", "bg": { "color": "1D2431", "height": 200, "width": 400 },
"traits": { "ballArea": { "vis": false, "bCoef": 1, "cMask": [ "ball" ] },
"goalPost": { "radius": 8, "invMass": 0, "bCoef": 0.5 }, "goalNet": { "vis": true,
"bCoef": 0.1, "cMask": [ "ball" ] }, "kickOffBarrier": { "vis": false, "bCoef":
0.1, "cGroup": [ "redKO", "blueKO" ], "cMask": [ "red", "blue" ] } }, "vertexes": [
{ "x": -400, "y": -200, "bCoef": 1, "cMask": [ "ball" ], "color": "C2AB4F", "bias":
-10, "vis": true }, { "x": 401, "y": -200, "bCoef": 1, "cMask": [ "ball" ],
"color": "C2AB4F", "bias": -10, "vis": true }, { "x": -401, "y": 200, "bCoef": 1,
"cMask": [ "ball" ], "color": "C2AB4F", "bias": 10, "vis": true }, { "x": 401, "y":
200, "bCoef": 1, "cMask": [ "ball" ], "color": "C2AB4F", "bias": 10, "vis": true },
{ "x": -400, "y": 70, "bCoef": 1, "cMask": [ "ball" ], "color": "C2AB4F", "bias":
10, "vis": true }, { "x": -400, "y": 201, "bCoef": 1, "cMask": [ "ball" ], "color":
"C2AB4F", "bias": 10, "vis": true }, { "x": 400, "y": 70, "bCoef": 1, "cMask":
[ "ball" ], "color": "C2AB4F", "bias": -10, "vis": true }, { "x": 400, "y": 201,
"bCoef": 1, "cMask": [ "ball" ], "color": "C2AB4F", "bias": -10, "vis": true },
{ "x": -400, "y": -200, "bCoef": 1, "cMask": [ "ball" ], "color": "C2AB4F", "bias":
10, "vis": true }, { "x": -400, "y": -70, "bCoef": 1, "cMask": [ "ball" ], "color":
"C2AB4F", "bias": 10, "vis": true }, { "x": 400, "y": -201, "bCoef": 1, "cMask":
[ "ball" ], "color": "C2AB4F", "bias": -10, "vis": true }, { "x": 400, "y": -70,
"bCoef": 1, "cMask": [ "ball" ], "color": "C2AB4F", "bias": -10, "vis": true },
{ "x": -436, "y": -70, "bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ],
"bias": -10, "color": "E51D44" }, { "x": -400, "y": -70, "bCoef": 0.2, "cMask":
[ "ball" ], "cGroup": [ "ball" ], "bias": -10, "color": "E51D44" }, { "x": -436,
"y": 70, "bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ], "bias": 10,
"color": "E51D44" }, { "x": -400, "y": 70, "bCoef": 0.2, "cMask": [ "ball" ],
"cGroup": [ "ball" ], "bias": 10, "color": "E51D44" }, { "x": -435, "y": -71,
"bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ], "bias": 10, "color":
"E51D44", "curve": -35 }, { "x": -435, "y": 71, "bCoef": 0.2, "cMask": [ "ball" ],
"cGroup": [ "ball" ], "bias": 10, "color": "E51D44", "curve": -35 }, { "x": 435,
"y": -71, "bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ], "bias": -10,
"color": "411DE5", "curve": 35 }, { "x": 435, "y": 71, "bCoef": 0.2, "cMask":
[ "ball" ], "cGroup": [ "ball" ], "bias": -10, "color": "411DE5", "curve": 35 },
{ "x": 436, "y": -70, "bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ],
"bias": 10, "color": "411DE5" }, { "x": 400, "y": -70, "bCoef": 0.2, "cMask":
[ "ball" ], "cGroup": [ "ball" ], "bias": 10, "color": "411DE5" }, { "x": 436, "y":
70, "bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ], "bias": -10, "color":
"411DE5" }, { "x": 400, "y": 70, "bCoef": 0.2, "cMask": [ "ball" ], "cGroup":
[ "ball" ], "bias": -10, "color": "411DE5" }, { "x": -400, "y": -70, "cMask":
[ "wall" ], "cGroup": [ "wall" ], "color": "ff6666" }, { "x": -400, "y": 70,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "ff6666" }, { "x": 400, "y": -
70, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "6666ff" }, { "x": 400,
"y": 70, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "6666ff" }, { "x": 0,
"y": -230, "cMask": [ "red", "blue" ], "cGroup": [ "redKO", "blueKO" ], "vis":
true, "color": "ACB9D1" }, { "x": 0, "y": -80, "cMask": [ "red", "blue" ],
"cGroup": [ "redKO", "blueKO" ], "vis": true, "color": "ACB9D1" }, { "x": 0, "y":
80, "cMask": [ "red", "blue" ], "cGroup": [ "redKO", "blueKO" ], "color": "ACB9D1",
"vis": true }, { "x": 0, "y": 230, "cMask": [ "red", "blue" ], "cGroup": [ "redKO",
"blueKO" ], "color": "ACB9D1", "vis": true }, { "x": 0, "y": 80, "cMask": [ "red",
"blue" ], "cGroup": [ "blueKO" ], "color": "0A1524" }, { "x": 0, "y": -80, "cMask":
[ "red", "blue" ], "cGroup": [ "blueKO" ], "color": "0A1524" }, { "x": 0, "y": -80,
"cMask": [ "red", "blue" ], "cGroup": [ "redKO" ], "color": "0A1524" }, { "x": 0,
"y": 80, "cMask": [ "red", "blue" ], "cGroup": [ "redKO" ], "color": "0A1524" },
{ "x": 0, "y": -81, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "2E3440" },
{ "x": 0, "y": 81, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "2E3440" },
{ "x": -402, "y": -70, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color":
"353C4A", "_data": { "mirror": {} } }, { "x": -402, "y": 70, "cMask": [ "wall" ],
"cGroup": [ "wall" ], "color": "353C4A", "_data": { "mirror": {} } }, { "x": -398,
"y": -70, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "f4d7dc", "_data":
{ "mirror": {} } }, { "x": -398, "y": 70, "cMask": [ "wall" ], "cGroup":
[ "wall" ], "color": "f4d7dc", "_data": { "mirror": {} } }, { "x": 398, "y": -70,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "f4d7dc", "curve": 0, "_data":
{ "mirror": {} } }, { "x": 398, "y": 70, "cMask": [ "wall" ], "cGroup": [ "wall" ],
"color": "f4d7dc", "curve": 0, "_data": { "mirror": {} } }, { "x": 402, "y": -70,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "353C4A", "curve": 0 }, { "x":
402, "y": 70, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "353C4A",
"curve": 0 }, { "x": 0, "y": 25.2, "cMask": [ "wall" ], "cGroup": [ "wall" ],
"color": "DBF808", "curve": 25 }, { "x": 20, "y": -24, "cMask": [ "wall" ],
"cGroup": [ "wall" ], "color": "DBF808", "curve": 25 }, { "x": 0, "y": 25.2,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": -25, "color": "DBF808" },
{ "x": -20, "y": -24, "cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": -25,
"color": "DBF808" }, { "x": 0, "y": 28.799999999999997, "cMask": [ "wall" ],
"cGroup": [ "wall" ], "color": "DBF808", "curve": 25 }, { "x": 20, "y": -20.4,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "DBF808", "curve": 25 }, { "x":
0, "y": 28.799999999999997, "cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": -
25, "color": "DBF808" }, { "x": -20, "y": -20.4, "cMask": [ "wall" ], "cGroup":
[ "wall" ], "curve": -25, "color": "DBF808" }, { "x": 0, "y": 33, "cMask": [ "wall"
], "cGroup": [ "wall" ], "color": "DBF808", "curve": 25 }, { "x": 20, "y": -16.2,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "DBF808", "curve": 25 }, { "x":
0, "y": 33, "cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": -25, "color":
"DBF808" }, { "x": -20, "y": -16.2, "cMask": [ "wall" ], "cGroup": [ "wall" ],
"curve": -25, "color": "DBF808" }, { "x": 0, "y": 36.6, "cMask": [ "wall" ],
"cGroup": [ "wall" ], "color": "DBF808", "curve": 25 }, { "x": 20, "y": -12.6,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "DBF808", "curve": 25 }, { "x":
0, "y": 36.6, "cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": -25, "color":
"DBF808" }, { "x": -20, "y": -12.6, "cMask": [ "wall" ], "cGroup": [ "wall" ],
"curve": -25, "color": "DBF808" }, { "x": 1, "y": 32.4, "cMask": [ "wall" ],
"cGroup": [ "wall" ], "color": "DBF808" }, { "x": -1, "y": 32.4, "cMask":
[ "wall" ], "cGroup": [ "wall" ], "color": "DBF808" }, { "x": 0, "y": -24, "cMask":
[ "wall" ], "cGroup": [ "wall" ], "color": "DBF808" }, { "x": 0, "y": 28, "cMask":
[ "wall" ], "cGroup": [ "wall" ], "color": "DBF808" }, { "x": 0, "y": -26, "cMask":
[ "wall" ], "cGroup": [ "wall" ], "color": "DBF808" }, { "x": 0, "y": 30, "cMask":
[ "wall" ], "cGroup": [ "wall" ], "color": "DBF808" }, { "x": 0, "y": -26, "cMask":
[ "wall" ], "cGroup": [ "wall" ], "curve": 0, "color": "DBF808" }, { "x": 0, "y": -
24, "cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": 0, "color": "DBF808" },
{ "x": 0, "y": -81, "cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": 180,
"color": "ACB9D1" }, { "x": 1, "y": 80, "cMask": [ "wall" ], "cGroup": [ "wall" ],
"curve": 180, "color": "ACB9D1" }, { "x": 0, "y": -81, "cMask": [ "wall" ],
"cGroup": [ "wall" ], "curve": -180, "color": "ACB9D1" }, { "x": 1, "y": 80,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": -180, "color": "ACB9D1" } ],
"segments": [ { "v0": 0, "v1": 1, "vis": true, "color": "C2AB4F", "bCoef": 1,
"cMask": [ "ball" ], "bias": -10, "y": -200 }, { "v0": 2, "v1": 3, "vis": true,
"color": "C2AB4F", "bCoef": 1, "cMask": [ "ball" ], "bias": 10, "y": 200 }, { "v0":
4, "v1": 5, "vis": true, "color": "C2AB4F", "bCoef": 1, "cMask": [ "ball" ],
"bias": 10, "x": -400 }, { "v0": 6, "v1": 7, "vis": true, "color": "C2AB4F",
"bCoef": 1, "cMask": [ "ball" ], "bias": -10, "x": 400 }, { "v0": 8, "v1": 9,
"vis": true, "color": "C2AB4F", "bCoef": 1, "cMask": [ "ball" ], "bias": 10 },
{ "v0": 10, "v1": 11, "vis": true, "color": "C2AB4F", "bCoef": 1, "cMask": [ "ball"
], "bias": -10 }, { "v0": 12, "v1": 13, "color": "E51D44", "bCoef": 0.2, "cMask": [
"ball" ], "cGroup": [ "ball" ], "bias": -10 }, { "v0": 14, "v1": 15, "color":
"E51D44", "bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ], "bias": 10, "y":
70 }, { "v0": 16, "v1": 17, "curve": -35, "color": "E51D44", "bCoef": 0.2, "cMask":
[ "ball" ], "cGroup": [ "ball" ], "bias": 10 }, { "v0": 18, "v1": 19, "curve": 35,
"color": "411DE5", "bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ], "bias":
-10, "x": 435 }, { "v0": 20, "v1": 21, "color": "411DE5", "bCoef": 0.2, "cMask":
[ "ball" ], "cGroup": [ "ball" ], "bias": 10 }, { "v0": 22, "v1": 23, "color":
"411DE5", "bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ], "bias": -10,
"y": 70 }, { "v0": 24, "v1": 25, "color": "ff6666", "cMask": [ "wall" ], "cGroup":
[ "wall" ], "x": -400 }, { "v0": 26, "v1": 27, "color": "6666ff", "cMask": [ "wall"
], "cGroup": [ "wall" ], "x": 400 }, { "v0": 28, "v1": 29, "vis": true,
"color": "ACB9D1", "cMask": [ "red", "blue" ], "cGroup": [ "redKO", "blueKO" ],
"x": 0 }, { "v0": 30, "v1": 31, "vis": true, "color": "ACB9D1", "cMask": [ "red",
"blue" ], "cGroup": [ "redKO", "blueKO" ], "x": 0 }, { "v0": 32, "v1": 33, "curve":
180, "vis": false, "color": "0A1524", "cMask": [ "red", "blue" ], "cGroup":
[ "blueKO" ], "x": 0 }, { "v0": 34, "v1": 35, "curve": 180, "vis": false, "color":
"0A1524", "cMask": [ "red", "blue" ], "cGroup": [ "redKO" ], "x": 0 }, { "v0": 36,
"v1": 37, "curve": -180, "color": "2E3440", "cMask": [ "wall" ], "cGroup": [ "wall"
], "x": 0 }, { "v0": 37, "v1": 36, "curve": -180, "color": "2E3440", "cMask":
[ "wall" ], "cGroup": [ "wall" ], "x": 0 }, { "v0": 38, "v1": 39, "color":
"353C4A", "cMask": [ "wall" ], "cGroup": [ "wall" ], "x": -402, "_data":
{ "mirror": {}, "arc": { "a": [ -402, -70 ], "b": [ -402, 70 ], "radius": null,
"center": [ null, null ], "from": null, "to": null } } }, { "v0": 44, "v1": 45,
"curve": 0, "color": "353C4A", "cMask": [ "wall" ], "cGroup": [ "wall" ], "x":
402 }, { "v0": 46, "v1": 47, "curve": 21.61111655529532, "color": "DBF808",
"cMask": [ "wall" ], "cGroup": [ "wall" ] }, { "v0": 48, "v1": 49, "curve": -
21.61111655529532, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ] },
{ "v0": 50, "v1": 51, "curve": 21.61111655529532, "color": "DBF808", "cMask":
[ "wall" ], "cGroup": [ "wall" ] }, { "v0": 52, "v1": 53, "curve": -
21.61111655529532, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ] },
{ "v0": 54, "v1": 55, "curve": 21.61111655529532, "color": "DBF808", "cMask":
[ "wall" ], "cGroup": [ "wall" ] }, { "v0": 56, "v1": 57, "curve": -
21.6111165552953, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ] }, {
"v0": 58, "v1": 59, "curve": 21.61111655529532, "color": "DBF808", "cMask":
[ "wall" ], "cGroup": [ "wall" ] }, { "v0": 60, "v1": 61, "curve": -
21.61111655529531, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ] },
{ "v0": 47, "v1": 59, "curve": 20.934242330086946, "color": "DBF808", "cMask":
[ "wall" ], "cGroup": [ "wall" ] }, { "v0": 61, "v1": 49, "curve":
20.93424233008692, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ] },
{ "v0": 47, "v1": 59, "curve": 38.08709223936826, "color": "DBF808", "cMask":
[ "wall" ], "cGroup": [ "wall" ] }, { "v0": 61, "v1": 49, "curve":
38.08709223936821, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ] },
{ "v0": 62, "v1": 63, "curve": 180, "color": "DBF808", "cMask": [ "wall" ],
"cGroup": [ "wall" ] }, { "v0": 64, "v1": 65, "curve": 180, "color": "DBF808",
"cMask": [ "wall" ], "cGroup": [ "wall" ], "x": 0 }, { "v0": 65, "v1": 64, "curve":
180, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ], "x": 0 },
{ "v0": 66, "v1": 67, "curve": 180, "color": "DBF808", "cMask": [ "wall" ],
"cGroup": [ "wall" ], "x": 0 }, { "v0": 67, "v1": 66, "curve": 180, "color":
"DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ], "x": 0 }, { "v0": 68, "v1":
69, "curve": 0, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ], "x":
0 }, { "v0": 70, "v1": 71, "curve": 180, "color": "ACB9D1", "cMask": [ "wall" ],
"cGroup": [ "wall" ], "y": -100 }, { "v0": 72, "v1": 73, "curve": -180, "color":
"ACB9D1", "cMask": [ "wall" ], "cGroup": [ "wall" ], "y": -100 } ], "goals":
[ { "p0": [ -405.8, 70 ], "p1": [ -405.8, -70 ], "team": "red", "_data":
{ "mirror": {} } }, { "p0": [ 405.8, -70 ], "p1": [ 405.8, 70 ], "team":
"blue" } ], "discs": [ { "radius": 5, "invMass": 0, "pos": [ -400, -70 ], "color":
"192C3B", "bCoef": 1, "cMask": [ "all" ], "cGroup": [ "all" ] }, { "radius": 5,
"invMass": 0, "pos": [ -400, 70 ], "color": "192C3B", "bCoef": 1, "cMask":
[ "all" ], "cGroup": [ "all" ] }, { "radius": 5, "invMass": 0, "pos": [ 400, -70 ],
"color": "192C3B", "bCoef": 1, "cMask": [ "all" ], "cGroup": [ "all" ] },
{ "radius": 5, "invMass": 0, "pos": [ 400, 70 ], "color": "192C3B", "bCoef": 1,
"cMask": [ "all" ], "cGroup": [ "all" ] } ], "planes": [ { "normal": [ 0, 1 ],
"dist": -230, "cMask": [ "red", "blue" ], "_data": { "extremes": { "normal": [ 0, 1
], "dist": -230, "canvas_rect": [ -764.7462277091905, -274.3484224965706,
765.6035665294924, 275.2057613168724 ], "a": [ -764.7462277091905, -230 ], "b":
[ 765.6035665294924, -230 ] } } }, { "normal": [ 0, -1 ], "dist": -230, "cMask":
[ "red", "blue" ], "_data": { "extremes": { "normal": [ 0, -1 ], "dist": -230,
"canvas_rect": [ -764.7462277091905, -274.3484224965706, 765.6035665294924,
275.2057613168724 ], "a": [ -764.7462277091905, 230 ], "b": [ 765.6035665294924,
230 ] } } }, { "normal": [ -1, 0 ], "dist": -510, "cMask": [ "red", "blue" ],
"cGroup": [ "wall" ], "_data": { "extremes": { "normal": [ -1, 0 ], "dist": -510,
"canvas_rect": [ -764.7462277091905, -274.3484224965706, 765.6035665294924,
275.2057613168724 ], "a": [ 510, -274.3484224965706 ], "b": [ 510,
275.2057613168724 ] } } }, { "normal": [ 1, 0 ], "dist": -510, "cMask": [ "red",
"blue" ], "cGroup": [ "wall" ], "_data": { "extremes": { "normal": [ 1, 0 ],
"dist": -510, "canvas_rect": [ -764.7462277091905, -274.3484224965706,
765.6035665294924, 275.2057613168724 ], "a": [ -510, -274.3484224965706 ], "b": [ -
510, 275.2057613168724 ] } } } ], "joints": [], "playerPhysics": { "radius": 15,
"bCoef": 0, "invMass": 0.5, "damping": 0.96, "cGroup": [ "red", "blue" ],
"acceleration": 0.11, "gravity": [ 0, 0 ], "kickingAcceleration": 0.083,
"kickingDamping": 0.96, "kickStrength": 4.2, "kickback": 0 }, "ballPhysics":
{ "radius": 5.8, "bCoef": 0.412, "cMask": [ "all" ], "damping": 0.99, "invMass":
1.55, "gravity": [ 0, 0 ], "color": "E8104E", "cGroup": [ "ball" ] } }';
const bigMap = '{"name": "Vehax x3 [OFICIAL BY NEY]", "width": 710, "height":
300, "cameraWidth": 0, "cameraHeight": 0, "maxViewWidth": 0, "cameraFollow":
"ball", "spawnDistance": 150, "redSpawnPoints": [ [ -150, 0 ], [ -250, 150 ], [ -
250, -150 ], [ -630, 250 ], [ -630, -250 ] ], "blueSpawnPoints": [ [ 150, 0 ],
[ 250, 150 ], [ 250, -150 ], [ 630, 250 ], [ 630, -250 ] ], "canBeStored": true,
"kickOffReset": "full", "bg": { "color": "1D2431", "height": 270, "width": 600 },
"traits": { "ballArea": { "vis": false, "bCoef": 1, "cMask": [ "ball" ] },
"goalPost": { "radius": 8, "invMass": 0, "bCoef": 0.5 }, "goalNet": { "vis": true,
"bCoef": 0.1, "cMask": [ "ball" ] }, "kickOffBarrier": { "vis": false, "bCoef":
0.1, "cGroup": [ "redKO", "blueKO" ], "cMask": [ "red", "blue" ] } }, "vertexes": [
{ "x": -600, "y": -270, "bCoef": 1, "cMask": [ "ball" ], "color": "C2AB4F", "bias":
-10, "vis": true }, { "x": 600, "y": -270, "bCoef": 1, "cMask": [ "ball" ],
"color": "C2AB4F", "bias": -10, "vis": true }, { "x": -600, "y": 270, "bCoef": 1,
"cMask": [ "ball" ], "color": "C2AB4F", "bias": 10, "vis": true }, { "x": 600, "y":
270, "bCoef": 1, "cMask": [ "ball" ], "color": "C2AB4F", "bias": 10, "vis": true },
{ "x": -603, "y": 85, "bCoef": 1, "cMask": [ "ball" ], "color": "C2AB4F", "bias":
10, "vis": true }, { "x": -600, "y": 270, "bCoef": 1, "cMask": [ "ball" ], "color":
"C2AB4F", "bias": 10, "vis": true }, { "x": 602, "y": 85, "bCoef": 1, "cMask":
[ "ball" ], "color": "C2AB4F", "bias": -10, "vis": true }, { "x": 600, "y": 270,
"bCoef": 1, "cMask": [ "ball" ], "color": "C2AB4F", "bias": -10, "vis": true },
{ "x": -600, "y": -270, "bCoef": 1, "cMask": [ "ball" ], "color": "C2AB4F", "bias":
10, "vis": true }, { "x": -603, "y": -85, "bCoef": 1, "cMask": [ "ball" ], "color":
"C2AB4F", "bias": 10, "vis": true }, { "x": 600, "y": -270, "bCoef": 1, "cMask":
[ "ball" ], "color": "C2AB4F", "bias": -10, "vis": true }, { "x": 602, "y": -85,
"bCoef": 1, "cMask": [ "ball" ], "color": "C2AB4F", "bias": -10, "vis": true },
{ "x": -639, "y": -85, "bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ],
"bias": -10, "color": "E51D44" }, { "x": -603, "y": -85, "bCoef": 0.2, "cMask":
[ "ball" ], "cGroup": [ "ball" ], "bias": -10, "color": "E51D44" }, { "x": -639,
"y": 85, "bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ], "bias": 10,
"color": "E51D44" }, { "x": -603, "y": 85, "bCoef": 0.2, "cMask": [ "ball" ],
"cGroup": [ "ball" ], "bias": 10, "color": "E51D44" }, { "x": -638, "y": -85,
"bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ], "bias": 10, "color":
"E51D44", "curve": -35 }, { "x": -638, "y": 85, "bCoef": 0.2, "cMask": [ "ball" ],
"cGroup": [ "ball" ], "bias": 10, "color": "E51D44", "curve": -35 }, { "x": 637,
"y": -85, "bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ], "bias": -10,
"color": "411DE5", "curve": 35 }, { "x": 637, "y": 85, "bCoef": 0.2, "cMask":
[ "ball" ], "cGroup": [ "ball" ], "bias": -10, "color": "411DE5", "curve": 35 },
{ "x": 638, "y": -85, "bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ],
"bias": 10, "color": "411DE5" }, { "x": 602, "y": -85, "bCoef": 0.2, "cMask":
[ "ball" ], "cGroup": [ "ball" ], "bias": 10, "color": "411DE5" }, { "x": 638, "y":
85, "bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ], "bias": -10, "color":
"411DE5" }, { "x": 602, "y": 85, "bCoef": 0.2, "cMask": [ "ball" ], "cGroup":
[ "ball" ], "bias": -10, "color": "411DE5" }, { "x": -603, "y": -85, "cMask":
[ "wall" ], "cGroup": [ "wall" ], "color": "f4d7dc" }, { "x": -603, "y": 85,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "f4d7dc" }, { "x": 602, "y": -
85, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "f4d7dc" }, { "x": 602,
"y": 85, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "f4d7dc" }, { "x": -
600, "y": -235, "cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": 80, "color":
"454545" }, { "x": -450, "y": -80, "cMask": [ "wall" ], "cGroup": [ "wall" ],
"curve": 80, "color": "454545" }, { "x": -600, "y": 235, "cMask": [ "wall" ],
"cGroup": [ "wall" ], "curve": -80, "color": "454545" }, { "x": -450, "y": 80,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": -80, "color": "454545" },
{ "x": -359.84, "y": 5.004970147203547, "cMask": [ "wall" ], "cGroup": [ "wall" ],
"curve": 180, "color": "FFFFFF" }, { "x": -359.84, "y": 0.0049701472035472705,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": 180, "color": "FFFFFF" },
{ "x": 360.92, "y": 1.42, "cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": 180,
"color": "FFFFFF" }, { "x": 360.92, "y": -3.58, "cMask": [ "wall" ], "cGroup":
[ "wall" ], "curve": 180, "color": "FFFFFF" }, { "x": 0, "y": -300, "cMask":
[ "red", "blue" ], "cGroup": [ "redKO", "blueKO" ], "vis": true, "color":
"ACB9D1" }, { "x": 0, "y": -80, "cMask": [ "red", "blue" ], "cGroup": [ "redKO",
"blueKO" ], "vis": true, "color": "ACB9D1" }, { "x": 0, "y": 80, "cMask": [ "red",
"blue" ], "cGroup": [ "redKO", "blueKO" ], "color": "ACB9D1", "vis": true }, { "x":
0, "y": 300, "cMask": [ "red", "blue" ], "cGroup": [ "redKO", "blueKO" ], "color":
"ACB9D1", "vis": true }, { "x": 0, "y": 80, "cMask": [ "red", "blue" ], "cGroup": [
"blueKO" ], "color": "0A1524" }, { "x": 0, "y": -80, "cMask": [ "red", "blue" ],
"cGroup": [ "blueKO" ], "color": "0A1524" }, { "x": 0, "y": -80, "cMask": [ "red",
"blue" ], "cGroup": [ "redKO" ], "color": "0A1524" }, { "x": 0, "y": 80, "cMask": [
"red", "blue" ], "cGroup": [ "redKO" ], "color": "0A1524" }, { "x": 0, "y": -81,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "2E3440" }, { "x": 0, "y": 81,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "2E3440" }, { "x": -601, "y": -
85, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "353C4A" }, { "x": -601,
"y": 85, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "353C4A" }, { "x": -
605, "y": -85, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "353C4A" },
{ "x": -605, "y": 85, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color":
"353C4A" }, { "x": 600, "y": -85, "cMask": [ "wall" ], "cGroup": [ "wall" ],
"color": "353C4A", "curve": 0 }, { "x": 600, "y": 85, "cMask": [ "wall" ],
"cGroup": [ "wall" ], "color": "353C4A", "curve": 0 }, { "x": 604, "y": -85,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "353C4A", "curve": 0 }, { "x":
604, "y": 85, "cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "353C4A",
"curve": 0 }, { "x": 0, "y": 25.2, "cMask": [ "wall" ], "cGroup": [ "wall" ],
"color": "DBF808", "curve": 25 }, { "x": 20, "y": -24, "cMask": [ "wall" ],
"cGroup": [ "wall" ], "color": "DBF808", "curve": 25 }, { "x": 0, "y": 25.2,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": -25, "color": "DBF808" },
{ "x": -20, "y": -24, "cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": -25,
"color": "DBF808" }, { "x": 0, "y": 28.799999999999997, "cMask": [ "wall" ],
"cGroup": [ "wall" ], "color": "DBF808", "curve": 25 }, { "x": 20, "y": -20.4,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "DBF808", "curve": 25 }, { "x":
0, "y": 28.799999999999997, "cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": -
25, "color": "DBF808" }, { "x": -20, "y": -20.4, "cMask": [ "wall" ], "cGroup":
[ "wall" ], "curve": -25, "color": "DBF808" }, { "x": 0, "y": 33, "cMask": [ "wall"
], "cGroup": [ "wall" ], "color": "DBF808", "curve": 25 }, { "x": 20, "y": -16.2,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "DBF808", "curve": 25 }, { "x":
0, "y": 33, "cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": -25, "color":
"DBF808" }, { "x": -20, "y": -16.2, "cMask": [ "wall" ], "cGroup": [ "wall" ],
"curve": -25, "color": "DBF808" }, { "x": 0, "y": 36.6, "cMask": [ "wall" ],
"cGroup": [ "wall" ], "color": "DBF808", "curve": 25 }, { "x": 20, "y": -12.6,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "color": "DBF808", "curve": 25 }, { "x":
0, "y": 36.6, "cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": -25, "color":
"DBF808" }, { "x": -20, "y": -12.6, "cMask": [ "wall" ], "cGroup": [ "wall" ],
"curve": -25, "color": "DBF808" }, { "x": 1, "y": 32.4, "cMask": [ "wall" ],
"cGroup": [ "wall" ], "color": "DBF808" }, { "x": -1, "y": 32.4, "cMask":
[ "wall" ], "cGroup": [ "wall" ], "color": "DBF808" }, { "x": 0, "y": -24, "cMask":
[ "wall" ], "cGroup": [ "wall" ], "color": "DBF808" }, { "x": 0, "y": 28, "cMask":
[ "wall" ], "cGroup": [ "wall" ], "color": "DBF808" }, { "x": 0, "y": -26, "cMask":
[ "wall" ], "cGroup": [ "wall" ], "color": "DBF808" }, { "x": 0, "y": 30, "cMask":
[ "wall" ], "cGroup": [ "wall" ], "color": "DBF808" }, { "x": 0, "y": -26, "cMask":
[ "wall" ], "cGroup": [ "wall" ], "curve": 0, "color": "DBF808" }, { "x": 0, "y": -
24, "cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": 0, "color": "DBF808" },
{ "x": 0.05668039945604164, "y": -80.55367701775279, "cMask": [ "wall" ], "cGroup":
[ "wall" ], "color": "ACB9D1", "curve": -180 }, { "x": 0, "y": 80, "cMask":
[ "wall" ], "cGroup": [ "wall" ], "color": "ACB9D1", "curve": -180 }, { "x":
0.05668039945604164, "y": -80.55367701775279, "cMask": [ "wall" ], "cGroup":
[ "wall" ], "color": "ACB9D1", "curve": 180 }, { "x": 0, "y": 80, "cMask": [ "wall"
], "cGroup": [ "wall" ], "color": "ACB9D1", "curve": 180 }, { "x": -450, "y": 80,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": 0, "color": "454545" }, { "x":
-450, "y": -80, "cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": 0, "color":
"454545" }, { "x": 600, "y": 235, "cMask": [ "wall" ], "cGroup": [ "wall" ],
"curve": 80, "color": "454545" }, { "x": 450, "y": 80, "cMask": [ "wall" ],
"cGroup": [ "wall" ], "curve": 80, "color": "454545" }, { "x": 450, "y": -80,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": 80, "color": "454545" }, { "x":
600, "y": -235, "cMask": [ "wall" ], "cGroup": [ "wall" ], "curve": 80, "color":
"454545" }, { "x": 450, "y": 80, "cMask": [ "wall" ], "cGroup": [ "wall" ],
"curve": 0, "color": "454545" }, { "x": 450, "y": -80, "cMask": [ "wall" ],
"cGroup": [ "wall" ], "curve": 0, "color":
"454545" }, { "x": -600, "y": -259, "bCoef": 0, "cMask": [ "wall" ], "cGroup":
[ "wall" ], "bias": 0, "color": "f4d7dc", "curve": -90 }, { "x": -589, "y": -270,
"bCoef": 0, "cMask": [ "wall" ], "cGroup": [ "wall" ], "bias": 0, "color":
"f4d7dc", "curve": -90 }, { "x": 589, "y": -270, "bCoef": 0, "cMask": [ "wall" ],
"cGroup": [ "wall" ], "bias": 0, "color": "f4d7dc", "curve": -90 }, { "x": 600,
"y": -259.9162342520093, "bCoef": 0, "cMask": [ "wall" ], "cGroup": [ "wall" ],
"bias": 0, "color": "f4d7dc", "curve": -90 }, { "x": 600, "y": 259, "bCoef": 0,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "bias": 0, "color": "f4d7dc", "curve": -
90 }, { "x": 589, "y": 270, "bCoef": 0, "cMask": [ "wall" ], "cGroup": [ "wall" ],
"bias": 0, "color": "f4d7dc", "curve": -90 }, { "x": -589, "y": 270, "bCoef": 0,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "bias": 0, "color": "f4d7dc", "curve": -
90 }, { "x": -600, "y": 259, "bCoef": 0, "cMask": [ "wall" ], "cGroup": [ "wall" ],
"bias": 0, "color": "f4d7dc", "curve": -90 } ], "segments": [ { "v0": 0, "v1": 1,
"vis": true, "color": "C2AB4F", "bCoef": 1, "cMask": [ "ball" ], "bias": -10, "y":
-240 }, { "v0": 2, "v1": 3, "vis": true, "color": "C2AB4F", "bCoef": 1, "cMask":
[ "ball" ], "bias": 10, "y": 240 }, { "v0": 4, "v1": 5, "vis": true, "color":
"C2AB4F", "bCoef": 1, "cMask": [ "ball" ], "bias": 10, "x": -550 }, { "v0": 6,
"v1": 7, "vis": true, "color": "C2AB4F", "bCoef": 1, "cMask": [ "ball" ], "bias": -
10, "x": 550 }, { "v0": 8, "v1": 9, "vis": true, "color": "C2AB4F", "bCoef": 1,
"cMask": [ "ball" ], "bias": 10, "x": -550 }, { "v0": 10, "v1": 11, "vis": true,
"color": "C2AB4F", "bCoef": 1, "cMask": [ "ball" ], "bias": -10, "x": 550 },
{ "v0": 12, "v1": 13, "color": "E51D44", "bCoef": 0.2, "cMask": [ "ball" ],
"cGroup": [ "ball" ], "bias": -10, "y": -85 }, { "v0": 14, "v1": 15, "color":
"E51D44", "bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ], "bias": 10, "y":
85 }, { "v0": 16, "v1": 17, "curve": -35, "color": "E51D44", "bCoef": 0.2, "cMask":
[ "ball" ], "cGroup": [ "ball" ], "bias": 10, "x": -585 }, { "v0": 18, "v1": 19,
"curve": 35, "color": "411DE5", "bCoef": 0.2, "cMask": [ "ball" ], "cGroup":
[ "ball" ], "bias": -10, "x": 585 }, { "v0": 20, "v1": 21, "color": "411DE5",
"bCoef": 0.2, "cMask": [ "ball" ], "cGroup": [ "ball" ], "bias": 10, "y": -85 },
{ "v0": 22, "v1": 23, "color": "411DE5", "bCoef": 0.2, "cMask": [ "ball" ],
"cGroup": [ "ball" ], "bias": -10, "y": 85 }, { "v0": 24, "v1": 25, "color":
"f4d7dc", "cMask": [ "wall" ], "cGroup": [ "wall" ], "x": -550 }, { "v0": 26, "v1":
27, "color": "f4d7dc", "cMask": [ "wall" ], "cGroup": [ "wall" ], "x": 550 },
{ "v0": 28, "v1": 29, "curve": 80, "color": "454545", "cMask": [ "wall" ],
"cGroup": [ "wall" ], "y": -100 }, { "v0": 30, "v1": 31, "curve": -80, "color":
"454545", "cMask": [ "wall" ], "cGroup": [ "wall" ], "y": 190 }, { "v0": 32, "v1":
33, "curve": 0, "color": "2E3440", "cMask": [ "wall" ], "cGroup": [ "wall" ], "x":
-335 }, { "v0": 33, "v1": 32, "curve": 180, "color": "FFFFFF", "cMask": [ "wall" ],
"cGroup": [ "wall" ], "x": -335 }, { "v0": 32, "v1": 33, "curve": 180, "color":
"ffffff", "cMask": [ "wall" ], "cGroup": [ "wall" ], "x": -335 }, { "v0": 34, "v1":
35, "curve": 0, "color": "2E3440", "cMask": [ "wall" ], "cGroup": [ "wall" ], "x":
335 }, { "v0": 35, "v1": 34, "curve": 180, "color": "FFFFFF", "cMask": [ "wall" ],
"cGroup": [ "wall" ], "x": 335 }, { "v0": 34, "v1": 35, "curve": 180, "color":
"FFFFFF", "cMask": [ "wall" ], "cGroup": [ "wall" ], "x": 335 }, { "v0": 36, "v1":
37, "vis": true, "color": "ACB9D1", "cMask": [ "red", "blue" ], "cGroup":
[ "redKO", "blueKO" ], "x": 0 }, { "v0": 38, "v1": 39, "vis": true, "color":
"ACB9D1", "cMask": [ "red", "blue" ], "cGroup": [ "redKO", "blueKO" ], "x": 0 },
{ "v0": 40, "v1": 41, "curve": 180, "vis": false, "color": "0A1524", "cMask":
[ "red", "blue" ], "cGroup": [ "blueKO" ], "x": 0 }, { "v0": 42, "v1": 43, "curve":
180, "vis": false, "color": "0A1524", "cMask": [ "red", "blue" ], "cGroup":
[ "redKO" ], "x": 0 }, { "v0": 44, "v1": 45, "curve": -180, "color": "2E3440",
"cMask": [ "wall" ], "cGroup": [ "wall" ], "x": 0 }, { "v0": 45, "v1": 44, "curve":
-180, "color": "2E3440", "cMask": [ "wall" ], "cGroup": [ "wall" ], "x": 0 },
{ "v0": 54, "v1": 55, "curve": 21.61111655529532, "color": "DBF808", "cMask":
[ "wall" ], "cGroup": [ "wall" ] }, { "v0": 56, "v1": 57, "curve": -
21.61111655529532, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ] },
{ "v0": 58, "v1": 59, "curve": 21.61111655529532, "color": "DBF808", "cMask":
[ "wall" ], "cGroup": [ "wall" ] }, { "v0": 60, "v1": 61, "curve": -
21.61111655529532, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ] },
{ "v0": 62, "v1": 63, "curve": 21.61111655529532, "color": "DBF808", "cMask":
[ "wall" ], "cGroup": [ "wall" ] }, { "v0": 64, "v1": 65, "curve": -
21.6111165552953, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ] }, {
"v0": 66, "v1": 67, "curve": 21.61111655529532, "color": "DBF808", "cMask":
[ "wall" ], "cGroup": [ "wall" ] }, { "v0": 68, "v1": 69, "curve": -
21.61111655529531, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ] },
{ "v0": 55, "v1": 67, "curve": 20.934242330086946, "color": "DBF808", "cMask":
[ "wall" ], "cGroup": [ "wall" ] }, { "v0": 69, "v1": 57, "curve":
20.93424233008692, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ] },
{ "v0": 55, "v1": 67, "curve": 38.08709223936826, "color": "DBF808", "cMask":
[ "wall" ], "cGroup": [ "wall" ] }, { "v0": 69, "v1": 57, "curve":
38.08709223936821, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ] },
{ "v0": 70, "v1": 71, "curve": 180, "color": "DBF808", "cMask": [ "wall" ],
"cGroup": [ "wall" ] }, { "v0": 72, "v1": 73, "curve": 180, "color": "DBF808",
"cMask": [ "wall" ], "cGroup": [ "wall" ], "x": 0 }, { "v0": 73, "v1": 72, "curve":
180, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ], "x": 0 },
{ "v0": 74, "v1": 75, "curve": 180, "color": "DBF808", "cMask": [ "wall" ],
"cGroup": [ "wall" ], "x": 0 }, { "v0": 75, "v1": 74, "curve": 180, "color":
"DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ], "x": 0 }, { "v0": 76, "v1":
77, "curve": 0, "color": "DBF808", "cMask": [ "wall" ], "cGroup": [ "wall" ], "x":
0 }, { "v0": 78, "v1": 79, "curve": -180, "color": "ACB9D1", "cMask": [ "wall" ],
"cGroup": [ "wall" ], "x": -500 }, { "v0": 80, "v1": 81, "curve": 180, "color":
"ACB9D1", "cMask": [ "wall" ], "cGroup": [ "wall" ], "x": -500 }, { "v0": 82, "v1":
83, "curve": 0, "color": "454545", "cMask": [ "wall" ], "cGroup": [ "wall" ], "y":
190 }, { "v0": 84, "v1": 85, "curve": 80, "color": "454545", "cMask": [ "wall" ],
"cGroup": [ "wall" ], "y": 190 }, { "v0": 86, "v1": 87, "curve": 80, "color":
"454545", "cMask": [ "wall" ], "cGroup": [ "wall" ], "y": 190 }, { "v0": 88, "v1":
89, "curve": 0, "color": "454545", "cMask": [ "wall" ], "cGroup": [ "wall" ], "y":
190, "x": 435 }, { "v0": 90, "v1": 91, "curve": -90, "vis": true, "color":
"f4d7dc", "bCoef": 0, "cMask": [ "wall" ], "cGroup": [ "wall" ], "bias": 0 },
{ "v0": 92, "v1": 93, "curve": -90, "vis": true, "color": "f4d7dc", "bCoef": 0,
"cMask": [ "wall" ], "cGroup": [ "wall" ], "bias": 0 }, { "v0": 94, "v1": 95,
"curve": -90, "vis": true, "color": "f4d7dc", "bCoef": 0, "cMask": [ "wall" ],
"cGroup": [ "wall" ], "bias": 0 }, { "v0": 96, "v1": 97, "curve": -90, "vis": true,
"color": "f4d7dc", "bCoef": 0, "cMask": [ "wall" ], "cGroup": [ "wall" ], "bias": 0
} ], "goals": [ { "p0": [ -608.8, -79 ], "p1": [ -608.8, 81 ], "team": "red" },
{ "p0": [ 607.8, -79 ], "p1": [ 607.8, 81 ], "team": "blue" } ], "discs":
[ { "radius": 5, "invMass": 0, "pos": [ -603.08, -83.92 ], "color": "192C3B",
"bCoef": 1, "cMask": [ "all" ], "cGroup": [ "all" ], "y": -85 }, { "radius": 5,
"invMass": 0, "pos": [ -602.1599999999999, 85.92 ], "color": "192C3B", "bCoef": 1,
"cMask": [ "all" ], "cGroup": [ "all" ], "y": 85 }, { "radius": 5, "invMass": 0,
"pos": [ 602.08, -84 ], "color": "192C3B", "bCoef": 1, "cMask": [ "all" ],
"cGroup": [ "all" ], "y": -85 }, { "radius": 5, "invMass": 0, "pos": [ 602,
84.83999999999999 ], "color": "192C3B", "bCoef": 1, "cMask": [ "all" ], "cGroup": [
"all" ], "y": 85 } ], "planes": [ { "normal": [ 0, 1 ], "dist": -297, "cMask":
[ "red", "blue" ], "_data": { "extremes": { "normal": [ 0, 1 ], "dist": -297,
"canvas_rect": [ -655.6466286944362, -235.209552894865, 656.3816585472326,
235.94458274766146 ], "a": [ -655.6466286944362, -297 ], "b": [ 656.3816585472326,
-297 ] } } }, { "normal": [ 0, -1 ], "dist": -296, "cMask": [ "red", "blue" ],
"_data": { "extremes": { "normal": [ 0, -1 ], "dist": -296, "canvas_rect": [ -
655.6466286944362, -235.209552894865, 656.3816585472326, 235.94458274766146 ], "a":
[ -655.6466286944362, 296 ], "b": [ 656.3816585472326, 296 ] } } }, { "normal":
[ 1, 0 ], "dist": -710, "cMask": [ "red", "blue" ], "cGroup": [ "wall" ], "_data":
{ "extremes": { "normal": [ 1, 0 ], "dist": -710, "canvas_rect": [ -
655.6466286944362, -235.209552894865, 656.3816585472326, 235.94458274766146 ], "a":
[ -710, -235.209552894865 ], "b": [ -710, 235.94458274766146 ] } } }, { "normal": [
-1, 0 ], "dist": -709, "cMask": [ "red", "blue" ], "cGroup": [ "wall" ], "_data": {
"extremes": { "normal": [ -1, 0 ], "dist": -709, "canvas_rect": [ -
655.6466286944362, -235.209552894865, 656.3816585472326, 235.94458274766146 ], "a":
[ 709, -235.209552894865 ], "b": [ 709, 235.94458274766146 ] } } } ], "joints": [],
"playerPhysics": { "radius": 15, "bCoef": 0, "invMass": 0.5, "damping": 0.96,
"cGroup": [ "red", "blue" ], "acceleration": 0.11, "gravity": [ 0, 0 ],
"kickingAcceleration": 0.083, "kickingDamping": 0.96, "kickStrength": 4.545,
"kickback": 0 }, "ballPhysics": { "radius": 5.8, "bCoef": 0.412, "cMask":
[ "all" ], "damping": 0.99, "invMass": 1.5, "gravity": [ 0, 0 ], "color": "ffffff",
"cGroup": [ "ball" ] } }';
var currentStadium = 'training';
var bigMapObj = [Link](trainingMap);

const frasesGols = [" Que golazoooo!! de donde vienes? 😗,",


" Apareciendo en el momento que mas se le nesecitaba! 😍,",
" GOLAZO COSMICO!, De que planeta viene este jugador! 🪐,",
" Pero que jugadas tiene este jugador! ⚽,",
" Que gol mas loco acaba de marcar la leyenda! 🐐,",
" Qué gol después de escapársele a la defensa con sus skills! 💎, ",
" No culpo al gk, Eso era imparable 🔥🔥🔥,",
" Golazooo,",
" Impresionante finalización 💯,",
" La leyenda esta en fuego 🔥🔥🔥,",
" Con razon todos los clubes te busca 🔥🔥,",
" Pero que golazo!, No culpo a la defensa eres imparable 😱,",
" Golaaaazooo!, Es digno de un puskas ✨,",
" Y gooooooool, Todo el mundo grita 🥳,",
" ¡Dudo que el portero hubiese podido parar esa clavada! 🏹,",
" Casi que erra"

];

const frasesAsiten = [
" Y con la pedazo de asistencia de",
" Gracias a la buena colocación de",
" Asistencia fenomenal de",
" Y la tremeda asistencia de",
" Que centro de",
" Dios! Que vision tiene",
" Lo que coloca",
" Eres el puskas de asistencia"
];

const frasesOG = [" Gol en propia por el meme de",


" Con razon nadie te quiere fichar",
" Daaa! Que malo eres",
😂
" El que te pickeo tiene 0 de pickeo ",
" Yo si fuera admin te daria ban",
" Que haces??, Ojala nunca te fiche un equipo por malo",
" Cuanto te pagaron para que te metas og's?",
"Nah que meme Y asi quieres jugar en primera division",
"Esta en su prime y se mete autogol, Ya veo como sera sin prime 🤣"
];

[Link](scoreLimit);
[Link](timeLimit);
[Link](true);
[Link](6, 0, 0);

var masterPassword = 10000 + getRandomInt(90000);


var roomPassword = '';

/* OPTIONS */

var drawTimeLimit = Infinity;


var teamSize = 3;
var maxAdmins = 0;
var disableBans = false;
var debugMode = false;
var afkLimit = debugMode ? Infinity : 12;

var defaultSlowMode = 0.5;


var chooseModeSlowMode = 1;
var slowMode = defaultSlowMode;
var SMSet = new Set();

var hideClaimMessage = false;


var mentionPlayersUnpause = true;

/* OBJECTS */

class Goal {
constructor(time, team, striker, assist) {
[Link] = time;
[Link] = team;
[Link] = striker;
[Link] = assist;
}
}

class Game {
constructor() {
[Link] = [Link]();
[Link] = [Link]();
[Link] = getStartingLineups();
[Link] = [];
[Link] = [Link]();
[Link] = [];
}
}

class PlayerComposition {
constructor(player, auth, timeEntry, timeExit) {
[Link] = player;
[Link] = auth;
[Link] = timeEntry;
[Link] = timeExit;
[Link] = 0;
[Link] = 0;
}
}

class MutePlayer {
constructor(name, id, auth) {
[Link] = [Link]();
[Link] = name;
[Link] = id;
[Link] = auth;
[Link] = null;
}

static incrementId() {
if (![Link]) [Link] = 1
else [Link]++
return [Link]
}

setDuration(minutes) {
[Link] = setTimeout(() => {
[Link](
`Has sido desmuteado!.`,
[Link],
announcementColor,
"bold",
[Link]
);
[Link]();
}, minutes * 60 * 1000);
[Link](this);
}

remove() {
[Link] = null;
[Link]([Link]);
}
}

class MuteList {
constructor() {
[Link] = [];
}

add(mutePlayer) {
[Link](mutePlayer);
return mutePlayer;
}

getById(id) {
var index = [Link](mutePlayer => [Link] === id);
if (index !== -1) {
return [Link][index];
}
return null;
}

getByPlayerId(id) {
var index = [Link](mutePlayer => [Link] ===
id);
if (index !== -1) {
return [Link][index];
}
return null;
}

getByAuth(auth) {
var index = [Link](mutePlayer => [Link] ===
auth);
if (index !== -1) {
return [Link][index];
}
return null;
}

removeById(id) {
var index = [Link](mutePlayer => [Link] === id);
if (index !== -1) {
[Link](index, 1);
}
}

removeByAuth(auth) {
var index = [Link](mutePlayer => [Link] ===
auth);
if (index !== -1) {
[Link](index, 1);
}
}
}

class BallTouch {
constructor(player, time, goal, position) {
[Link] = player;
[Link] = time;
[Link] = goal;
[Link] = position;
}
}

class HaxStatistics {
constructor(playerName = '') {
[Link] = playerName;
[Link] = 0;
[Link] = 0;
[Link] = '0.00%';
[Link] = 0;
[Link] = 0;
[Link] = 0;
[Link] = 0;
[Link] = 0;
}
}

/* PLAYERS */

const Team = { SPECTATORS: 0, RED: 1, BLUE: 2 };


const State = { PLAY: 0, PAUSE: 1, STOP: 2 };
const Role = { PLAYER: 0, ADMIN_TEMP: 1, ADMIN_PERM: 2, MASTER: 3 };
const HaxNotification = { NONE: 0, CHAT: 1, MENTION: 2 };
const Situation = { STOP: 0, KICKOFF: 1, PLAY: 2, GOAL: 3 };

var gameState = [Link];


var playSituation = [Link];
var goldenGoal = false;
var playersAll = [];
var players = [];
var teamRed = [];
var teamBlue = [];
var teamSpec = [];

var teamRedStats = [];


var teamBlueStats = [];

var banList = [];

/* STATS */
var possession = [0, 0];
var actionZoneHalf = [0, 0];
var lastWinner = [Link];
var streak = 0;

/* AUTH */

var authArray = [];


var adminList = [
// ['INSERT_AUTH_HERE_1', 'NICK_OF_ADMIN_1'],
// ['INSERT_AUTH_HERE_2', 'NICK_OF_ADMIN_2'],
];
var masterList = [
// 'PESCF2USf8ikvAevwskvWiTX1jzaIXUO5YvP6D98Llw',
// 'PESCF2USf8ikvAevwskvWiTX1jzaIXUO5YvP6D98Llw'
];

/* COMMANDS */

var commands = {
help: {
aliases: ['commands', 'ayuda', 'comandos' ],
roles: [Link],
desc: `
Estos son todos los comandos dispobibles. Recuerda que depede de tu rango
para ejecutar alguno
Ejemplo para obtener ayuda sobre un comando: \'!help bb\' mostrará la
descripción del \'bb\' .`,
function: helpCommand,
},
claim: {
aliases: [],
roles: [Link],
desc: false,
function: masterCommand,
},
afk: {
aliases: [],
roles: [Link],
desc: `
Este comando te hace ir a AFK.
Tiene restricciones: 1 minuto mínimo de tiempo AFK, 5 minutos como máximo y
10 minutos de reutilización.`,
function: afkCommand,
},
afks: {
aliases: ['afklist'],
roles: [Link],
desc: `
Este comando muestra a todos los jugadores que esta afk.`,
function: afkListCommand,
},
bb: {
aliases: ['salir', 'adios', 'cya'],
roles: [Link],
desc: `
Este comando te hace salir al instante (uso recomendado).`,
function: leaveCommand,
},
me: {
aliases: ['stat', 'stats'],
roles: [Link],
desc: `
Este comando muestra sus estadísticas globales en la sala.`,
function: globalStatsCommand,
},
rename: {
aliases: [],
roles: [Link],
desc: `
Este comando te permite cambiarte el nombre de la tabla de
clasificación.`,
function: renameCommand,
},
games: {
aliases: [],
roles: [Link],
desc: `
Este comando muestra a los 5 mejores jugadores con mas partidos de la
sala.`,
function: statsLeaderboardCommand,
},
wins: {
aliases: [],
roles: [Link],
desc: `
Este comando muestra a los 5 mejores jugadores con la mayor cantidad de
victorias en la sala.`,
function: statsLeaderboardCommand,
},
goals: {
aliases: [],
roles: [Link],
desc: `
Este comando muestra a los 5 mejores jugadores con la mayor cantidad de
goles de la sala.`,
function: statsLeaderboardCommand,
},
assists: {
aliases: [],
roles: [Link],
desc: `
Este comando muestra a los 5 mejores jugadores con la mayor cantidad de
asistencias en la sala.`,
function: statsLeaderboardCommand,
},
cs: {
aliases: [],
roles: [Link],
desc: `
Este comando muestra a los 5 mejores jugadores con la mayor cantidad de
CS de la sala.`,
function: statsLeaderboardCommand,
},
playtime: {
aliases: [],
roles: [Link],
desc: `x
Este comando muestra a los 5 mejores jugadores con la mayor cantidad de
tiempo en la sala.`,
function: statsLeaderboardCommand,
},
discord: {
aliases: ['chat', 'server', 'dc', 'servidor', 'vehax', 'link'],
roles: [Link],
desc: `
Este comando te dara un enlace de invitacion para unirte a nuestro
discord oficial.`,
function: discordCommand,
},
llamaradmin: {
aliases: ['calladmin', 'llamar', 'llamar admin'],
roles: [Link],
desc: `
Para llamar un admin.`,
function: llamarAdmin,
},
frase: {
aliases: ['frases', 'frase de motivacion', 'frase diaria'],
roles: [Link],
desc: `
Obtener lista de ultimas actualizaciones.`,
function: frasesCommand,
},
log: {
aliases: ['changelog', 'cambios', 'update'],
roles: [Link],
desc: `
Para obtener una frase de motivacion.`,
function: logCommand,
},
inforank: {
aliases: [''],
roles: [Link],
desc: `
Para obtener una frase de motivacion.`,
function: infoRoles,
},
anunciar: {
aliases: ['a', 'anuncio'],
roles: Role.ADMIN_PERM,
desc: `
Comando para hacer anuncios en la sala.`,
function: anunciarCommand,
},
training: {
aliases: ['entrenamiento', 'sin goles', 'practica'],
roles: Role.ADMIN_TEMP,
desc: `
This command loads the classic training stadium.`,
function: stadiumCommand,
},
classic: {
aliases: ['futsalx2', 'futsalx1', 'mapa1v1', 'mapa2v2'],
roles: Role.ADMIN_TEMP,
desc: `
This command loads the classic stadium.`,
function: stadiumCommand,
},
big: {
aliases: ['futsalx3', 'futsal', 'mapa3v3',],
roles: Role.ADMIN_TEMP,
desc: `
This command loads the big stadium.`,
function: stadiumCommand,
},
rr: {
aliases: ['reiniciar'],
roles: Role.ADMIN_TEMP,
desc: `
Con este comando reinicias el partido`,
function: restartCommand,
},
rrs: {
aliases: [],
roles: Role.ADMIN_TEMP,
desc: `
Con este comando reinicias y cambias de lugar los equipos`,
function: restartSwapCommand,
},
swap: {
aliases: ['cambiar'],
roles: Role.ADMIN_TEMP,
desc: `
Este comando intercambia a los equipos cuando se detiene el juego.`,
function: swapCommand,
},
kickred: {
aliases: ['kickr'],
roles: Role.ADMIN_TEMP,
desc: `
This command kicks all the players from the red team, including the player
that entered the command. You can give as an argument the reason of the kick.`,
function: kickTeamCommand,
},
kickblue: {
aliases: ['kickb'],
roles: Role.ADMIN_TEMP,
desc: `
This command kicks all the players from the blue team, including the player
that entered the command. You can give as an argument the reason of the kick.`,
function: kickTeamCommand,
},
kickspec: {
aliases: ['kicks'],
roles: Role.ADMIN_TEMP,
desc: `
This command kicks all the players from the spectators team, including the
player that entered the command. You can give as an argument the reason of the
kick.`,
function: kickTeamCommand,
},
mute: {
aliases: ['m'],
roles: Role.ADMIN_TEMP,
desc: `
This command allows to mute a player. He won't be able to talk for a
certain duration, and can be unmuted at any time by admins.
It takes 2 arguments:
Argument 1: #<id> where <id> is the id of the player targeted. This won't
work if the player is an admin.
Argument 2 (optional): <duration> where <duration> is the duration of the
mute in minutes. If no value is provided, the mute lasts for the default duration,
${muteDuration} minutes.
Example: !mute #3 20 will mute the player with id 3 for 20 minutes.`,
function: muteCommand,
},
unmute: {
aliases: ['um'],
roles: Role.ADMIN_TEMP,
desc: `
This command allows to unmute someone.
It takes 1 argument:
Argument 1: #<id> where <id> is the id of the muted player.
OR
Argument 1: <number> where <number> is the number associated with the mute
given by the 'muteList' command.
Example: !unmute #300 will unmute the player with id 300,
!unmute 8 will unmute the n°8 player according to the 'muteList'
command.`,
function: unmuteCommand,
},
mutes: {
aliases: [],
roles: Role.ADMIN_TEMP,
desc: `
Este comando muestra la lista de jugadores muteados.`,
function: muteListCommand,
},
clearbans: {
aliases: [],
roles: [Link],
desc: `
Este comando no es a [Link]én puede desahogar a un jugador en
particular, agregando su identificación como argumento.`,
function: clearbansCommand,
},
bans: {
aliases: ['banlist'],
roles: [Link],
desc: `
Este comando muestra a todos los jugadores que fueron prohibidos y sus
ID.`,
function: banListCommand,
},
admins: {
aliases: ['adminlist'],
roles: [Link],
desc: `
Este comando muestra a todos los jugadores que son administradores
permanentes.`,
function: adminListCommand,
},
setadmin: {
aliases: ['admin'],
roles: [Link],
desc: `
This command allows to set someone as admin. He will be able to connect as
admin, and can be removed at any time by masters.
It takes 1 argument:
Argument 1: #<id> where <id> is the id of the player targeted.
Example: !setadmin #3 will give admin to the player with id 3.`,
function: setAdminCommand,
},
removeadmin: {
aliases: ['unadmin'],
roles: [Link],
desc: `
This command allows to remove someone as admin.
It takes 1 argument:
Argument 1: #<id> where <id> is the id of the player targeted.
OR
Argument 1: <number> where <number> is the number associated with the admin
given by the 'admins' command.
Example: !removeadmin #300 will remove admin to the player with id 300,
!removeadmin 2 will remove the admin n°2 according to the 'admins'
command.`,
function: removeAdminCommand,
},
password: {
aliases: ['pw'],
roles: [Link],
desc: `
Este comando permite agregar una contraseña a la habitación.
Se necesita 1 argumento:
Argumento 1: <Password> Where <Password> es la contraseña que desea para la
habitación.

To remove the room password, simply enter '!password'.`,


function: passwordCommand,
},
};

/* Rangos */
/* FUNCIONES DE INFORMACION DE ROLES */
/* FUNCIONES DE INFORMACION DE ROLES */

function infoRoles(player, message) {


if (message == "!inforank") {
[Link](
"Dependiendo de cuantas wins tengas va subiendo tu rol",
[Link],
0x174dff,
"bold"

[Link]("🎊 𝗜𝗻𝗶𝗰𝗶𝗮𝗻𝘁𝗲(<4)", [Link], 0x174dff, "bold");


);

[Link](
" 「
𝗣 𝗿𝗶𝗻 𝗰𝗶𝗽 𝗶𝗮 𝗻 𝘁𝗲 」
(>8)",
[Link],
0x174dff,
MessageColorWhite,
"bold"
);
[Link](
" 「
𝗣 𝗿𝗶𝗻 𝗰𝗶𝗽 𝗶𝗮 𝗻 𝘁𝗲 」
(>8)",
[Link],
0x174dff,
[Link],
"bold"
);

[Link](
"😎 「𝗔 𝗽 𝗿𝗲 𝗻 𝗱 𝗶𝘇」
(>20)",
[Link],
0x2EFEF7,
MessageColorBlue,
"bold"
);

"⚽ 𝗣𝗿𝗼𝗳𝗲𝘀𝗶𝗼𝗻𝗮𝗹(>35)",
[Link](

[Link],
0x04B404,
MessageColorBlack,
"bold"
);

"🥊 𝗜𝗺𝗽𝗮𝗿𝗮𝗯𝗹𝗲(>49)",
[Link](

[Link],
0xFE2E2E,
MessageColorRed,
"bold"
);
[Link](
"👽 「
𝗩 𝗲 𝘁𝗲 𝗿𝗮 𝗻 𝗼 」
(>58)",
[Link],
0x73EC59,
MessageColor

);
[Link](
"💪 「
𝗥 𝗲 𝘃 𝗲 𝗹𝗮 𝗰𝗶𝗼 𝗻 」
(>68)",
[Link],
0xFA58DF,
"bold"
);
[Link](
"🥈 「
𝐄 𝐱 𝐩 𝐞 𝐫𝐭𝐨 」(>80)",
[Link],
0xEC77CE,
"bold"
);
[Link]("🥇 「
𝗟𝗲 𝘆 𝗲 𝗻 𝗱 𝗮 」
(>98)", [Link], 0xBFFF00, "bold");

[Link]("💥 𝗖𝗮𝗺𝗽𝗲𝗼𝗻(>159)", [Link], 0xFFFF00, "bold");


[Link]("👑 「
𝗖 𝗿𝗮 𝗰𝗸 」
(>129)", [Link], 0xFFC375, "bold");

[Link]("💫 「
𝗘 𝘀𝘁𝗿𝗲 𝗹𝗹𝗮 」
(>179)", [Link], 0xFF7900, "bold");
[Link]("💎𝗦𝘂𝗽𝗲𝗿-𝗘𝘀𝘁𝗿𝗲𝗹𝗹𝗮」(>199)", [Link], 0x0040FF, "bold");
[Link]("🔥 「
𝐆𝐎𝐀𝐓」 (>399)", [Link], 0xFF8000, "bold");
}

$rank_colors = array(
'admin' = 'red',
'moderator' = 'green',
'vip' = 'blue',
'normal' ='black',
);

$rank_colors['admin'] = 4122;
$rank_colors['moderator'] = 4123;
$rank_colors['vip'] = 4124;
$rank_colors['normal'] = 4125;

/* GAME */

var lastTouches = Array(2).fill(null);


var lastTeamTouched;

var speedCoefficient = 100 / (5 * (0.99 ** 60 + 1));


var ballSpeed = 0;
var playerRadius = 15;
var ballRadius = 10;
var triggerDistance = playerRadius + ballRadius + 0.01;

/* COLORS */

var welcomeColor = 0xc4ff65;


var announcementColor = 0xffefd6;
var infoColor = 0xE00C56;
var privateMessageColor = 0xffc933;
var redColor = 0xff4c4c;
var blueColor = 0x62cbff;
var warningColor = 0xffa135;
var errorColor = 0xa40000;
var successColor = 0x75ff75;
var moradoColor = 0x6510FA;
var defaultColor = null;
var anunciosColor = 0xF0CD0C
var blancoColor = 0xffffff

/* AUXILIARY */

var checkTimeVariable = false;


var checkStadiumVariable = true;
var endGameVariable = false;
var cancelGameVariable = false;
var kickFetchVariable = false;

var chooseMode = false;


var timeOutCap;
var capLeft = false;
var redCaptainChoice = '';
var blueCaptainChoice = '';
var chooseTime = 20;

var AFKSet = new Set();


var AFKMinSet = new Set();
var AFKCooldownSet = new Set();
var minAFKDuration = 0;
var maxAFKDuration = 30;
var AFKCooldown = 0;

var muteArray = new MuteList();


var muteDuration = 5;

var removingPlayers = false;


var insertingPlayers = false;

var stopTimeout;
var startTimeout;
var unpauseTimeout;
var removingTimeout;
var insertingTimeout;

var emptyPlayer = {
id: 0,
};
stadiumCommand(emptyPlayer, "!training");

var game = new Game();

/* FUNCTIONS */

/* AUXILIARY FUNCTIONS */

if (typeof [Link] != 'function') {


[Link] = function (search, replacement) {
var target = this;
return [Link](search).join(replacement);
};
}

function getDate() {
let d = new Date();
return [Link]() + ' ' + [Link]();
}

/* MATH FUNCTIONS */

function getRandomInt(max) {
// returns a random number between 0 and max-1
return [Link]([Link]() * [Link](max));
}

function pointDistance(p1, p2) {


return [Link]([Link](p1.x - p2.x, 2) + [Link](p1.y - p2.y, 2));
}

/* TIME FUNCTIONS */
function getHoursStats(time) {
return [Link](time / 3600);
}

function getMinutesGame(time) {
var t = [Link](time / 60);
return `${[Link](t / 10)}${[Link](t % 10)}`;
}

function getMinutesReport(time) {
return [Link]([Link](time) / 60);
}

function getMinutesEmbed(time) {
var t = [Link]([Link](time) / 60);
return `${[Link](t / 10)}${[Link](t % 10)}`;
}

function getMinutesStats(time) {
return [Link](time / 60) - getHoursStats(time) * 60;
}

function getSecondsGame(time) {
var t = [Link](time - [Link](time / 60) * 60);
return `${[Link](t / 10)}${[Link](t % 10)}`;
}

function getSecondsReport(time) {
var t = [Link](time);
return [Link](t - getMinutesReport(t) * 60);
}

function getSecondsEmbed(time) {
var t = [Link](time);
var t2 = [Link](t - [Link](t / 60) * 60);
return `${[Link](t2 / 10)}${[Link](t2 % 10)}`;
}

function getTimeGame(time) {
return `[${getMinutesGame(time)}:${getSecondsGame(time)}]`;
}

function getTimeEmbed(time) {
return `[${getMinutesEmbed(time)}:${getSecondsEmbed(time)}]`;
}

function getTimeStats(time) {
if (getHoursStats(time) > 0) {
return `${getHoursStats(time)}h${getMinutesStats(time)}m`;
} else {
return `${getMinutesStats(time)}m`;
}
}

function getGoalGame() {
return [Link] + [Link];
}
/* REPORT FUNCTIONS */

function findFirstNumberCharString(str) {
let str_number = str[[Link](/[0-9]/g)];
return str_number === undefined ? "0" : str_number;
}

function getIdReport() {
var d = new Date();
return `${[Link]() % 100}${[Link]() < 9 ? '0' : ''}$
{[Link]() + 1}${[Link]() < 10 ? '0' : ''}${[Link]()}${[Link]() < 10 ?
'0' : ''}${[Link]()}${[Link]() < 10 ? '0' : ''}${[Link]()}$
{[Link]() < 10 ? '0' : ''}${[Link]()}$
{findFirstNumberCharString(roomName)}`;
}

function getRecordingName(game) {
let d = new Date();
let redCap = [Link][0][0] != undefined ? [Link][0]
[0].[Link] : 'Red';
let blueCap = [Link][1][0] != undefined ? [Link][1]
[0].[Link] : 'Blue';
let day = [Link]() < 10 ? '0' + [Link]() : [Link]();
let month = [Link]() < 10 ? '0' + ([Link]() + 1) : ([Link]() +
1);
let year = [Link]() % 100 < 10 ? '0' + ([Link]() % 100) :
([Link]() % 100);
let hour = [Link]() < 10 ? '0' + [Link]() : [Link]();
let minute = [Link]() < 10 ? '0' + [Link]() : [Link]();
return `${day}-${month}-${year}-${hour}h${minute}-${redCap}vs$
{blueCap}.hbr2`;
}

function fetchRecording(game) {
if (gameWebhook != "") {
let form = new FormData();
[Link](null, new File([[Link]], getRecordingName(game),
{ "type": "text/plain" }));
[Link]("payload_json", [Link]({
"username": roomName
}));

fetch(gameWebhook, {
method: 'POST',
body: form,
}).then((res) => res);
}
}

/* FEATURE FUNCTIONS */

function getCommand(commandStr) {
if ([Link](commandStr)) return commandStr;
for (const [key, value] of [Link](commands)) {
for (let alias of [Link]) {
if (alias == commandStr) return key;
}
}
return false;
}

function getPlayerComp(player) {
if (player == null || [Link] == 0) return null;
var comp = [Link];
var index = comp[0].findIndex((c) => [Link] == authArray[[Link]][0]);
if (index != -1) return comp[0][index];
index = comp[1].findIndex((c) => [Link] == authArray[[Link]][0]);
if (index != -1) return comp[1][index];
return null;
}

function getTeamArray(team, includeAFK = true) {


if (team == [Link]) return teamRed;
if (team == [Link]) return teamBlue;
if (includeAFK) {
return [Link]((p) => [Link] === [Link]);
}
return teamSpec;
}

function sendAnnouncementTeam(message, team, color, style, mention) {


for (let player of team) {
[Link](message, [Link], color, style, mention);
}
}

var adminPrefix = "[ADMIN] ";


var messageTarget = null;
var messageColors = {admin: 0x97FFFF, welcome: 0xFFFFFF};
var messageFonts = {normal: "normal", bold: "bold", italic: "italic", small:
"small", small_bold: "small-bold", small_italic: "small-italic"};
var messageSounds = {nothing: 0, normal: 1, highlight: 2};

[Link] = function(player,message){
if(Role.ADMIN_TEMP){
[Link](`${adminPrefix}${[Link]}: $
{message}`,messageTarget,[Link],[Link],[Link]
);
return false;
}
else{
[Link](`${[Link]}: $
{message}`,messageTarget,[Link],[Link],[Link]
mal);
return false;
}
}

function teamChat(player, message) {


var msgArray = [Link](/ +/).slice(1);
var emoji = [Link] == [Link] ? '🔴' : [Link] == [Link] ? '🔵' :
'⚪';
var message = `${emoji} [Equipo] ${[Link]}: ${[Link](' ')}`;
var team = getTeamArray([Link], true);
var color = [Link] == [Link] ? redColor : [Link] == [Link] ?
blueColor : null;
var style = 'bold';
var mention = [Link];
sendAnnouncementTeam(message, team, color, style, mention);
}

function playerChat(player, message) {


var msgArray = [Link](/ +/);
var playerTargetIndex = [Link](
(p) => [Link](' ', '_') == msgArray[0].substring(2)
);
if (playerTargetIndex == -1) {
[Link](
`Jugador no válido, asegúrese de que el nombre que ingresó sea
correcto.`,
[Link],
errorColor,
'bold',
null
);
return false;
}
var playerTarget = playersAll[playerTargetIndex];
if ([Link] == [Link]) {
[Link](
`¡No puedes enviarte un PM!`,
[Link],
errorColor,
'bold',
null
);
return false;
}
var messageFrom = `📝 [Privado con ${[Link]}] ${[Link]}: $
{[Link](1).join(' ')}`

var messageTo = `📝 [Privado con ${[Link]}] ${[Link]}: $


{[Link](1).join(' ')}`

[Link](
messageFrom,
[Link],
privateMessageColor,
'bold',
[Link]
);
[Link](
messageTo,
[Link],
privateMessageColor,
'bold',
[Link]
);
}

/* PHYSICS FUNCTIONS */

function calculateStadiumVariables() {
if (checkStadiumVariable && [Link] + [Link] > 0) {
checkStadiumVariable = false;
setTimeout(() => {
let ballDisc = [Link](0);
let playerDisc =
[Link]([Link](teamBlue)[0].id);
ballRadius = [Link];
playerRadius = [Link];
triggerDistance = ballRadius + playerRadius + 0.01;
speedCoefficient = 100 / (5 * [Link] * ([Link]
** 60 + 1));
}, 1);
}
}

function checkGoalKickTouch(array, index, goal) {


if (array != null && [Link] >= index + 1) {
var obj = array[index];
if (obj != null && [Link] != null && [Link] == goal) return obj;
}
return null;
}

/* BUTTONS */

function topButton() {
if ([Link] > 0) {
if ([Link] == [Link] && [Link] > 1) {
[Link](teamSpec[0].id, [Link]);
[Link](teamSpec[1].id, [Link]);
} else if ([Link] < [Link])
[Link](teamSpec[0].id, [Link]);
else [Link](teamSpec[0].id, [Link]);
}
}

function randomButton() {
if ([Link] > 0) {
if ([Link] == [Link] && [Link] > 1) {
var r = getRandomInt([Link]);
[Link](teamSpec[r].id, [Link]);
teamSpec = [Link]((spec) => [Link] != teamSpec[r].id);
[Link](teamSpec[getRandomInt([Link])].id,
[Link]);
} else if ([Link] < [Link])
[Link](teamSpec[getRandomInt([Link])].id,
[Link]);
else
[Link](teamSpec[getRandomInt([Link])].id,
[Link]);
}
}

function blueToSpecButton() {
clearTimeout(removingTimeout);
removingPlayers = true;
removingTimeout = setTimeout(() => {
removingPlayers = false;
}, 100);
for (var i = 0; i < [Link]; i++) {
[Link](teamBlue[[Link] - 1 - i].id,
[Link]);
}
}

function redToSpecButton() {
clearTimeout(removingTimeout);
removingPlayers = true;
removingTimeout = setTimeout(() => {
removingPlayers = false;
}, 100);
for (var i = 0; i < [Link]; i++) {
[Link](teamRed[[Link] - 1 - i].id,
[Link]);
}
}

function resetButton() {
clearTimeout(removingTimeout);
removingPlayers = true;
removingTimeout = setTimeout(() => {
removingPlayers = false;
}, 100);
for (let i = 0; i < [Link]([Link], [Link]); i++) {
if ([Link]([Link], [Link]) - [Link] - i > 0)
[Link](teamBlue[[Link] - 1 - i].id,
[Link]);
else if ([Link]([Link], [Link]) - [Link] -
i > 0)
[Link](teamRed[[Link] - 1 - i].id,
[Link]);
else break;
}
for (let i = 0; i < [Link]([Link], [Link]); i++) {
[Link](
teamBlue[[Link]([Link], [Link]) - 1 - i].id,
[Link]
);
[Link](
teamRed[[Link]([Link], [Link]) - 1 - i].id,
[Link]
);
}
}

function swapButton() {
clearTimeout(removingTimeout);
removingPlayers = true;
removingTimeout = setTimeout(() => {
removingPlayers = false;
}, 100);
for (let player of teamBlue) {
[Link]([Link], [Link]);
}
for (let player of teamRed) {
[Link]([Link], [Link]);
}
}

/* COMMAND FUNCTIONS */

/* PLAYER COMMANDS */
function leaveCommand(player, message) {
[Link]([Link], 'Hasta Luego, Vuelve Pronto!!', false);
}

function helpCommand(player, message) {


var msgArray = [Link](/ +/).slice(1);
if ([Link] == 0) {
var commandString = '
𝗟 𝗜𝗦 𝗧 𝗔 𝗗 𝗘 𝗖 𝗢 𝗠 𝗔 𝗡 𝗗 𝗢 𝗦 🔴
🟡 \n \n𝑪 𝑶 𝑴 𝑨 𝑵 𝑫 𝑶 𝑺 𝑫 𝑬 𝑼 𝑺 𝑼 𝑨 𝑹 𝑰𝑶 𝑺 :\n';
for (const [key, value] of [Link](commands)) {
if ([Link] && [Link] == [Link]) commandString += ` !$
{key},`;
}
commandString = [Link](0, [Link] - 1) +
'.\n';
if (getRole(player) >= Role.ADMIN_TEMP) {
commandString += `\
n------------------------------------------------\n𝑪𝑶𝑴𝑨𝑵𝑫𝑶𝑺 𝑫𝑬
𝑨 𝑫 𝑴 𝑰𝑵 𝑰𝑺 𝑻 𝑹 𝑨 𝑫 𝑶 𝑹 𝑬 𝑺 :\n`;
for (const [key, value] of [Link](commands)) {
if ([Link] && [Link] == Role.ADMIN_TEMP) commandString
+= ` !${key},`;
}
if ([Link]([Link] - 1) == ':')
commandString += ` None,`;
commandString = [Link](0, [Link] -
1) + '.\n';
}
if (getRole(player) >= [Link]) {
commandString += `\
n-------------------------------------------------\n𝑪 𝑶 𝑴 𝑨 𝑵 𝑫 𝑶 𝑺 𝑷 𝑨 𝑹 𝑨
𝑫 𝑼 𝑬 Ñ𝑶 𝑫 𝑬 𝑺 𝑨 𝑳 𝑨 :\n`;
for (const [key, value] of [Link](commands)) {
if ([Link] && [Link] == [Link]) commandString +=
` !${key},`;
}
if ([Link]([Link] - 1) == ':')
commandString += ` None,`;
commandString = [Link](0, [Link] -
1) + '.\n';
}
commandString += "\nPara obtener información sobre un comando
específico, escriba ''!help <Nombre del comando>'.";
[Link](
commandString,
[Link],
infoColor,
'bold',
[Link]
);
} else if ([Link] >= 1) {
var commandName = getCommand(msgArray[0].toLowerCase());
if (commandName != false && commands[commandName].desc != false)
[Link](
`\'${commandName}\' comando :\n${commands[commandName].desc}`,
[Link],
infoColor,
'bold',
[Link]
);
else
[Link](
`El comando en el que intentó obtener información no
[Link] verificar todos los comandos disponibles, escriba \ '! Ayuda \'`,
[Link],
errorColor,
'bold',
[Link]
);
}
}

function globalStatsCommand(player, message) {


var stats = new HaxStatistics([Link]);
if ([Link](authArray[[Link]][0])) {
stats = [Link]([Link](authArray[[Link]][0]));
}
var statsString = printPlayerStats(stats);
[Link](
statsString,
[Link],
infoColor,
'bold',
[Link]
);
}

function renameCommand(player, message) {


var msgArray = [Link](/ +/).slice(1);
if ([Link](authArray[[Link]][0])) {
var stats = [Link]([Link](authArray[[Link]][0]));
if ([Link] == 0) {
[Link] = [Link];
} else {
[Link] = [Link](' ');
}
[Link](authArray[[Link]][0], [Link](stats));
[Link](
`Te renombraste con éxito a ti mismo ${[Link]} !`,
[Link],
successColor,
'bold',
[Link]
);
} else {
[Link](
`Todavía no has jugado un juego en esta sala !`,
[Link],
errorColor,
'bold',
[Link]
);
}
}

function statsLeaderboardCommand(player, message) {


var key = [Link](/ +/)[0].substring(1).toLowerCase();
printRankings(key, [Link]);
}

function afkCommand(player, message) {


if ([Link] == [Link] || [Link] == 1) {
if ([Link]([Link])) {
if ([Link]([Link])) {
[Link](
`There is a minimum of ${minAFKDuration} minute of AFK
time. Don't abuse the command !`,
[Link],
errorColor,
'bold',
[Link]
);
} else {
[Link]([Link]);
[Link](
` ${[Link]} Ya no esta afk !`,
null,
announcementColor,
'bold',
null
);
updateTeams();
handlePlayersJoin();
}
} else {
if ([Link]([Link])) {
[Link](
`You can only go AFK every ${AFKCooldown} minutes. Don't
abuse the command !`,
[Link],
errorColor,
'bold',
[Link]
);
} else {
[Link]([Link]);
if (![Link]) {
[Link]([Link]);
[Link]([Link]);
setTimeout(
(id) => {
[Link](id);
},
minAFKDuration * 60 * 1000,
[Link]
);
setTimeout(
(id) => {
[Link](id);
},
maxAFKDuration * 60 * 1000,
[Link]
);
setTimeout(
(id) => {
[Link](id);
},
AFKCooldown * 60 * 1000,
[Link]
);
}
[Link]([Link], [Link]);
[Link](
`😴 ${[Link]} Esta Afk Ahora !`,
null,
announcementColor,
'bold',
null
);
updateTeams();
handlePlayersLeave();
}
}
} else {
[Link](
`No Puedes Ir A AFK Mientras Estás En Un Equipo!`,
[Link],
errorColor,
'bold',
[Link]
);
}
}

function afkListCommand(player, message) {


if ([Link] == 0) {
[Link](
"😴 No Hay Nadie En La Lista De AFK.",
[Link],
announcementColor,
'bold',
null
);
return;
}
var cstm = '😴 Lista De AFKS : ';
[Link]((_, value) => {
var p = [Link](value);
if (p != null) cstm += [Link] + `, `;
});
cstm = [Link](0, [Link] - 2) + '.';
[Link](cstm, [Link], announcementColor, 'bold', null);
}

function discordCommand(player) {
// Verifica que el jugador que ejecutó el comando sea válido
if (player) {
// Define el mensaje con el enlace de Discord
[Link](
`${[Link]}: Este es nuestro Discord:
[Link]
[Link],
blueColor,
'bold',
[Link]
);
}
}

function logCommand(player) {
// Verifica que el jugador que ejecutó el comando sea válido
if (player) {
// Define lista de cambios

[Link](
` Vehax x3
Version 0.75 Beta \n\n`,
[Link],
blancoColor,
'bold',
[Link]
);
[Link](
`
・ Esta vez si se corrigió el bug de x4 ✅
・ Se añadieron frases de goles, asistencias, y og's ✅
・ Se bajo la cantidad de tiempo maxima de inactividad, si duras 10s
inactivo seras kickeado ✅
・ Se bajo el tiempo para pickear, si duras 12s sin pickear seras
kickeado ✅
・ Se añadieron anuncios que se hace cada x tiempo y puede variar
siempre ✅
・ Se añadieron slots para los @Admin Pub , 17 slots, 2 son de admin

・ Se añadio el comando !frase, Este te dirá una frase de motivación

・ Se añadió el comando !votekick + id de jugador ✅ `,
[Link],
moradoColor,
'bold',
[Link]
);
}
}

// Lista de frases de motivación


var frases = [
'"No te rindas, nunca te rindas" - Rocky Balboa',
'"La victoria es un proceso, no un destino". - Vince Lombardi',
'"El éxito no es el final, el fracaso no es fatal: es el coraje para continuar
lo que cuenta". - Winston Churchill',
'"A veces hay que dejar de ser el mejor para que los demás pueda brillar" -
Ney',
'"No hay nada más peligroso que no arriesgarse" -Pep Guardiola',
'"El fútbol es un juego de errores. Quien cometa el menor error, gana" -Johan
Cruyff',
'"Yo estaba destinado a ser el mejor del mundo, pero el ping no ayuda" -
Memeber',
'"Cuanto más difícil es la victoria, mayor es la felicidad de ganar" -Pelé',
'"No soy el jugador con mas trofes porque mi equipo no ayuda -Ney',
'"Me retire porque no jugadores de mi nivel" -Ney',
'"Tal vez sea malo, pero yo estoy retirado y tú no y eres peor que yo" -Ember',
'"Tengo mucho ego porque si se la paso a un compañero sé que la va a memear" -
Nixcp',
'"Para ser el mejor hay que jugar con personas de mas nivel" -Vehax',
'"Esta sala esta mas buena que Ximena19" -Vehax',
'"No importa el retiro de Ember, igual nunca hizo nada -Wrzz"'
];

// Función para generar una frase aleatoria de la lista


function frasesCommand(player) {
// Generar un índice aleatorio
var randomIndex = [Link]([Link]() * [Link]);

// Obtener la frase aleatoria


var frase = frases[randomIndex];

// Enviar la frase al jugador


[Link](
frase,
[Link],
successColor,
'bold',
[Link]
);
}

// Comando para el chat


[Link] = function (player, command) {
if (command === "!frase") {
frasesCommand(player);
}
};

function anunciarCommand(player, message) {


// Verifica que el jugador que ejecutó el comando sea válido y que el mensaje
no esté vacío
if (player && message) {
// Divide el mensaje en palabras separadas por espacio
const words = [Link](' ');

// Verifica si el primer elemento del array de palabras es el comando !


anunciar
if (words[0] === '!anunciar') {
// Elimina el primer elemento (el comando) y une el resto de las palabras
en un solo mensaje
[Link](); // Elimina el primer elemento
const mensajeFinal = [Link](' ');

// Envia un anuncio en el chat con el mensaje final


[Link](
mensajeFinal,
null,
successColor,
'bold',
[Link]
);
}
}
}

function masterCommand(player, message) {


var msgArray = [Link](/ +/).slice(1);
if (parseInt(msgArray[0]) == masterPassword) {
if (![Link](authArray[[Link]][0])) {
[Link]([Link], true);
adminList = [Link]((a) => a[0] != authArray[[Link]]
[0]);
[Link](authArray[[Link]][0]);
[Link](
`${[Link]} Es ahora dueño de la sala !`,
null,
announcementColor,
'bold',
[Link]
);
} else {
[Link](
`Ya eres dueño de la sala !`,
[Link],
errorColor,
'bold',
[Link]
);
}
}
}

/* ADMIN COMMANDS */

function restartCommand(player, message) {


instantRestart();
}

function restartSwapCommand(player, message) {


[Link]();
swapButton();
startTimeout = setTimeout(() => {
[Link]();
}, 10);
}

function swapCommand(player, message) {


if (playSituation == [Link]) {
swapButton();
[Link](
'✔️ Equipos cambiados de lugar!',
null,
announcementColor,
'bold',
null
);
} else {
[Link](
`Por favor, detenga el juego antes de intercambiar.`,
[Link],
errorColor,
'bold',
[Link]
);
}
}

function kickTeamCommand(player, message) {


var msgArray = [Link](/ +/);
var reasonString = `Equipo kickeado por ${[Link]}`;
if ([Link] > 1) {
reasonString = [Link](1).join(' ');
}
if (['!kickred', '!kickr'].includes(msgArray[0].toLowerCase())) {
for (let i = 0; i < [Link]; i++) {
setTimeout(() => {
[Link](teamRed[0].id, reasonString, false);
}, i * 20)
}
} else if (['!kickblue', '!kickb'].includes(msgArray[0].toLowerCase())) {
for (let i = 0; i < [Link]; i++) {
setTimeout(() => {
[Link](teamBlue[0].id, reasonString, false);
}, i * 20)
}
} else if (['!kickspec', '!kicks'].includes(msgArray[0].toLowerCase())) {
for (let i = 0; i < [Link]; i++) {
setTimeout(() => {
[Link](teamSpec[0].id, reasonString, false);
}, i * 20)
}
}
}

function stadiumCommand(player, message) {


var msgArray = [Link](/ +/);
if (gameState == [Link]) {
if (['!classic'].includes(msgArray[0].toLowerCase())) {
if ([Link](classicMap).name == 'Classic') {
[Link]('Classic');
} else {
[Link](classicMap);
}
currentStadium = 'classic';
} else if (['!big'].includes(msgArray[0].toLowerCase())) {
if ([Link](bigMap).name == 'Big') {
[Link]('Big');
} else {
[Link](bigMap);
}
currentStadium = 'big';
} else if (['!training'].includes(msgArray[0].toLowerCase())) {
[Link](trainingMap);
currentStadium = 'training';
} else {
[Link](
`Stadium not recognized.`,
[Link],
errorColor,
'bold',
[Link]
);
}
} else {
[Link](
`Detén el juego antes de usar este comando.`,
[Link],
errorColor,
'bold',
[Link]
);
}
}

function muteCommand(player, message) {


var msgArray = [Link](/ +/).slice(1);
if ([Link] > 0) {
if (msgArray[0].length > 0 && msgArray[0][0] == '#') {
msgArray[0] = msgArray[0].substring(1, msgArray[0].length);
if ([Link](parseInt(msgArray[0])) != null) {
var playerMute = [Link](parseInt(msgArray[0]));
var minutesMute = muteDuration;
if ([Link] > 1 && parseInt(msgArray[1]) > 0) {
minutesMute = parseInt(msgArray[1]);
}
if (![Link]) {
var muteObj = new MutePlayer([Link],
[Link], authArray[[Link]][0]);
[Link](minutesMute);
[Link](
`${[Link]} ha sido silenciado por $
{minutesMute} minutos.`,
null,
announcementColor,
'bold',
null
);
} else {
[Link](
`No puedes silenciar a un administrador.`,
[Link],
errorColor,
'bold',
[Link]
);
}
} else {
[Link](
`No hay jugador con tal identificación en la
habitació[Link] "!help mute" para obtener más información.`,
[Link],
errorColor,
'bold',
[Link]
);
}
} else {
[Link](
`Formato incorrecto para su [Link] "!help mute" para
obtener más información.`,
[Link],
errorColor,
'bold',
[Link]
);
}
} else {
[Link](
`Número incorrecto de [Link] "!help mute" para obtener
más información.`,
[Link],
errorColor,
'bold',
[Link]
);
}
}

function unmuteCommand(player, message) {


var msgArray = [Link](/ +/).slice(1);
if ([Link] > 0) {
if (msgArray[0].length > 0 && msgArray[0][0] == '#') {
msgArray[0] = msgArray[0].substring(1, msgArray[0].length);
if ([Link](parseInt(msgArray[0])) != null) {
var playerUnmute = [Link](parseInt(msgArray[0]));
if ([Link]([Link]) != null) {
var muteObj = [Link]([Link]);
[Link]()
[Link](
`${[Link]} ha sido desmuteado!`,
null,
announcementColor,
'bold',
[Link]
);
} else {
[Link](
`Este jugador no está silenciado !`,
[Link],
errorColor,
'bold',
[Link]
);
}
} else {
[Link](
`No hay jugador con tal identificación en la
habitació[Link] "!help" para obtener más información.`,
[Link],
errorColor,
'bold',
[Link]
);
}
} else if (msgArray[0].length > 0 && parseInt(msgArray[0]) > 0 &&
[Link](parseInt(msgArray[0])) != null) {
var playerUnmute = [Link](parseInt(msgArray[0]));
[Link]();
[Link](
`${[Link]} ha sido desmuteado!`,
null,
announcementColor,
'bold',
[Link]
);
} else {
[Link](
`Formato incorrecto para su [Link] "!help umuted"
para obtener más información.`,
[Link],
errorColor,
'bold',
[Link]
);
}
} else {
[Link](
`Número incorrecto de [Link] "!help" para obtener más
información.`,
[Link],
errorColor,
'bold',
[Link]
);
}
}

function muteListCommand(player, message) {


if ([Link] == 0) {
[Link](
"🔇 No hay nadie en la lista de mudo.",
[Link],
announcementColor,
'bold',
null
);
return false;
}
var cstm = '🔇 Muteados lista:: ';
for (let mute of [Link]) {
cstm += [Link] + `[${[Link]}], `;
}
cstm = [Link](0, [Link] - 2) + '.';
[Link](
cstm,
[Link],
announcementColor,
'bold',
null
);
}

/* MASTER COMMANDS */

function clearbansCommand(player, message) {


var msgArray = [Link](/ +/).slice(1);
if ([Link] == 0) {
[Link]();
[Link](
'✔️ Baneos eleminados !',
null,
announcementColor,
'bold',
null
);
banList = [];
} else if ([Link] == 1) {
if (parseInt(msgArray[0]) > 0) {
var ID = parseInt(msgArray[0]);
[Link](ID);
if ([Link] != [Link]((p) => p[1] != ID).length) {
[Link](
`✔️ ${[Link]((p) => p[1] == ID)[0][0]} ha sido
desbaneado de la habitación !`,
null,
announcementColor,
'bold',
null
);
} else {
[Link](
`La identificación que ingresó no tiene una prohibición
[Link] "!help ClearBans" para obtener más información.`,
[Link],
errorColor,
'bold',
[Link]
);
}
banList = [Link]((p) => p[1] != ID);
} else {
[Link](
`Invalid ID entered. Enter "!help clearbans" for more
information.`,
[Link],
errorColor,
'bold',
[Link]
);
}
} else {
[Link](
`Wrong number of arguments. Enter "!help clearbans" for more
information.`,
[Link],
errorColor,
'bold',
[Link]
);
}
}

function banListCommand(player, message) {


if ([Link] == 0) {
[Link](
"📢 No Hay Nadie En La Lista De Prohibición.",
[Link],
announcementColor,
'bold',
null
);
return false;
}
var cstm = '📢 Lista De Baneados : ';
for (let ban of banList) {
cstm += ban[0] + `[${ban[1]}], `;
}
cstm = [Link](0, [Link] - 2) + '.';
[Link](
cstm,
[Link],
announcementColor,
'bold',
null
);
}

function adminListCommand(player, message) {


if ([Link] == 0) {
[Link](
"📢 No Hay Nadie En La Lista De Administración.",
[Link],
announcementColor,
'bold',
null
);
return false;
}
var cstm = '📢 Lista De Administradores : ';
for (let i = 0; i < [Link]; i++) {
cstm += adminList[i][1] + `[${i}], `;
}
cstm = [Link](0, [Link] - 2) + '.';
[Link](
cstm,
[Link],
announcementColor,
'bold',
null
);
}

function setAdminCommand(player, message) {


var msgArray = [Link](/ +/).slice(1);
if ([Link] > 0) {
if (msgArray[0].length > 0 && msgArray[0][0] == '#') {
msgArray[0] = msgArray[0].substring(1, msgArray[0].length);
if ([Link](parseInt(msgArray[0])) != null) {
var playerAdmin = [Link](parseInt(msgArray[0]));

if (![Link]((a) =>
a[0]).includes(authArray[[Link]][0])) {
if (![Link](authArray[[Link]][0])) {
[Link]([Link], true);
[Link]([authArray[[Link]][0],
[Link]]);
[Link](
`${[Link]} Es ahora adminnistrador !`,
null,
announcementColor,
'bold',
[Link]
);
} else {
[Link](
`Este jugador ya es rango dueño !`,
[Link],
errorColor,
'bold',
[Link]
);
}
} else {
[Link](
`Ya este jugador es administrador permanente !`,
[Link],
errorColor,
'bold',
[Link]
);
}
} else {
[Link](
`There is no player with such ID in the room. Enter "!help
setadmin" for more information.`,
[Link],
errorColor,
'bold',
[Link]
);
}
} else {
[Link](
`Incorrect format for your argument. Enter "!help setadmin" for
more information.`,
[Link],
errorColor,
'bold',
[Link]
);
}
} else {
[Link](
`Wrong number of arguments. Enter "!help setadmin" for more
information.`,
[Link],
errorColor,
'bold',
[Link]
);
}
}

function removeAdminCommand(player, message) {


var msgArray = [Link](/ +/).slice(1);
if ([Link] > 0) {
if (msgArray[0].length > 0 && msgArray[0][0] == '#') {
msgArray[0] = msgArray[0].substring(1, msgArray[0].length);
if ([Link](parseInt(msgArray[0])) != null) {
var playerAdmin = [Link](parseInt(msgArray[0]));

if ([Link]((a) =>
a[0]).includes(authArray[[Link]][0])) {
[Link]([Link], false);
adminList = [Link]((a) => a[0] !=
authArray[[Link]][0]);
[Link](
`${[Link]} Ya no es administrador de sala !`,
null,
announcementColor,
'bold',
[Link]
);
} else {
[Link](
`¡Este jugador no es un administrador permanente! !`,
[Link],
errorColor,
'bold',
[Link]
);
}
} else {
[Link](
`There is no player with such ID in the room. Enter "!help
removeadmin" for more information.`,
[Link],
errorColor,
'bold',
[Link]
);
}
} else if (msgArray[0].length > 0 && parseInt(msgArray[0]) <
[Link]) {
var index = parseInt(msgArray[0]);
var playerAdmin = adminList[index];
if ([Link]((p) => authArray[[Link]][0] ==
playerAdmin[0]) != -1) {
// check if there is the removed admin in the room
var indexRem = [Link]((p) => authArray[[Link]][0]
== playerAdmin[0]);
[Link](playersAll[indexRem].id, false);
}
[Link](index);
[Link](
`${playerAdmin[1]} Ya no es administrador de sala !`,
null,
announcementColor,
'bold',
[Link]
);
} else {
[Link](
`Incorrect format for your argument. Enter "!help removeadmin"
for more information.`,
[Link],
errorColor,
'bold',
[Link]
);
}
} else {
[Link](
`Wrong number of arguments. Enter "!help removeadmin" for more
information.`,
[Link],
errorColor,
'bold',
[Link]
);
}
}

function passwordCommand(player, message) {


var msgArray = [Link](/ +/).slice(1);
if ([Link] > 0) {
if ([Link] == 1 && msgArray[0] == '') {
roomPassword = '';
[Link](null);
[Link](
`La contraseña ha sido removida.`,
[Link],
announcementColor,
'bold',
[Link]
);
}
roomPassword = [Link](' ');
[Link](roomPassword);
[Link](
`La contraseña ha sido cambiada a ${roomPassword}`,
[Link],
announcementColor,
'bold',
[Link]
);
} else {
if (roomPassword != '') {
roomPassword = '';
[Link](null);
[Link](
`La contraseña ha sido removida.`,
[Link],
announcementColor,
'bold',
[Link]
);
} else {
[Link](
`La sala actualmente no tiene contraseñ[Link] "!Ayuda
contraseña" para obtener más información.`,
[Link],
errorColor,
'bold',
[Link]
);
}
}
}

/* GAME FUNCTIONS */

function checkTime() {
const scores = [Link]();
if (game != undefined) [Link] = scores;
if ([Link]([Link] - [Link]) <= 0.01 && [Link] !=
0 && playSituation == [Link]) {
if ([Link] != [Link]) {
if (!checkTimeVariable) {
checkTimeVariable = true;
setTimeout(() => {
checkTimeVariable = false;
}, 3000);
[Link] > [Link] ? endGame([Link]) :
endGame([Link]);
stopTimeout = setTimeout(() => {
[Link]();
}, 2000);
}
return;
}
if (drawTimeLimit != 0) {
goldenGoal = true;
[Link](
'⚽ Primer Equipo En Hacer Gol Gana !!',
null,
announcementColor,
'bold',
[Link]
);
}
}
if ([Link]([Link] - drawTimeLimit * 60 - [Link]) <= 0.01
&& [Link] != 0) {
if (!checkTimeVariable) {
checkTimeVariable = true;
setTimeout(() => {
checkTimeVariable = false;
}, 10);
endGame([Link]);
[Link]();
goldenGoal = false;
}
}
}

function instantRestart() {
[Link]();
startTimeout = setTimeout(() => {
[Link]();
}, 10);
}

function resumeGame() {
startTimeout = setTimeout(() => {
[Link]();
}, 1000);
setTimeout(() => {
[Link](false);
}, 500);
}

function endGame(winner) {
if ([Link] >= 2 * teamSize - 1) activateChooseMode();
const scores = [Link]();
[Link] = scores;
lastWinner = winner;
endGameVariable = true;
if (winner == [Link]) {
streak++;
[Link](
`✨ El equipo rojo gana ${[Link]} - ${[Link]} ! Racha
actual: ${streak}`,
null,
redColor,
'bold',
[Link]
);
} else if (winner == [Link]) {
streak = 1;
[Link](
`✨ El Equipo Azul Gana ${[Link]} - ${[Link]} ! Racha
Actual🏆: ${streak}`,
null,
blueColor,
'bold',
[Link]
);
} else {
streak = 0;
[Link](
'💤 Límite de dibujo alcanzado !',
null,
announcementColor,
'bold',
[Link]
);
}
let possessionRedPct = (possession[0] / (possession[0] + possession[1])) *
100;
let possessionBluePct = 100 - possessionRedPct;
let possessionString = `🔴 ${[Link](0)}% - $
{[Link](0)}% 🔵`;
let actionRedPct = (actionZoneHalf[0] / (actionZoneHalf[0] +
actionZoneHalf[1])) * 100;
let actionBluePct = 100 - actionRedPct;
let actionString = `🔴 ${[Link](0)}% - $
{[Link](0)}% 🔵`;
let CSString = getCSString(scores);
[Link](
`📊 Posesión: 🔴 ${possessionString}\n` +
`📊 Zona de acción: 🔴 ${actionString}\n` +
`${CSString}`,
null,
announcementColor,
'bold',
[Link]
);
updateStats();
}

/* CHOOSING FUNCTIONS */

function activateChooseMode() {
chooseMode = true;
slowMode = chooseModeSlowMode;
[Link](
`🐢 Modo Lento Cambiado Para Elegir La Duración Del Modo De: $
{chooseModeSlowMode}s.`,
null,
announcementColor,
'bold',
[Link]
);
}

function deactivateChooseMode() {
chooseMode = false;
clearTimeout(timeOutCap);
if (slowMode != defaultSlowMode) {
slowMode = defaultSlowMode;
[Link](
`🐢 Modo Lento Cambiado Para Elegir La Duración Del Modo De: $
{defaultSlowMode}s.`,
null,
announcementColor,
'bold',
[Link]
);
}
redCaptainChoice = '';
blueCaptainChoice = '';
}

function getSpecList(player) {
if (player == null) return null;
var cstm = 'Players : ';
for (let i = 0; i < [Link]; i++) {
cstm += teamSpec[i].name + `[${i + 1}], `;
}
cstm = [Link](0, [Link] - 2) + '.';
[Link](
cstm,
[Link],
infoColor,
'bold',
[Link]
);
}

function choosePlayer() {
clearTimeout(timeOutCap);
let captain;
if ([Link] <= [Link] && [Link] != 0) {
captain = teamRed[0];
} else if ([Link] < [Link] && [Link] != 0) {
captain = teamBlue[0];
}
if (captain != null) {
[Link](
"Para Elegir Un Jugador, Ingrese Su Número En La Lista Dada O Use
'top', 'random' o 'bottom'.",
[Link],
infoColor,
'bold',
[Link]
);
timeOutCap = setTimeout(
(player) => {
[Link](
`Apresúrate ${[Link]}, solo $
{[Link](String(chooseTime / 2))} para elegir!`,
[Link],
warningColor,
'bold',
[Link]
);
timeOutCap = setTimeout(
(player) => {
[Link](
[Link],
"¡No elegiste a tiempo!",
false
);
},
chooseTime * 500,
captain
);
},
chooseTime * 1000,
captain
);
}
if ([Link] != 0 && [Link] != 0) {
getSpecList([Link] <= [Link] ? teamRed[0] : teamBlue[0]);
}
}

function chooseModeFunction(player, message) {


var msgArray = [Link](/ +/);
if ([Link] == teamRed[0].id || [Link] == teamBlue[0].id) {
if ([Link] <= [Link] && [Link] == teamRed[0].id) {
if (['top', 'auto'].includes(msgArray[0].toLowerCase())) {
[Link](teamSpec[0].id, [Link]);
redCaptainChoice = 'top';
clearTimeout(timeOutCap);
[Link](
`${[Link]} Eligio Arriba !`,
null,
announcementColor,
'bold',
[Link]
);
} else if (['random', 'rand'].includes(msgArray[0].toLowerCase())) {
var r = getRandomInt([Link]);
[Link](teamSpec[r].id, [Link]);
redCaptainChoice = 'random';
clearTimeout(timeOutCap);
[Link](
`${[Link]} Elijio aleatorio !`,
null,
announcementColor,
'bold',
[Link]
);
} else if (['bottom', 'bot'].includes(msgArray[0].toLowerCase())) {
[Link](teamSpec[[Link] - 1].id, [Link]);
redCaptainChoice = 'bottom';
clearTimeout(timeOutCap);
[Link](
`${[Link]} Elijio abajo !`,
null,
announcementColor,
'bold',
[Link]
);
} else if (![Link]([Link](msgArray[0]))) {
if ([Link](msgArray[0]) > [Link] ||
[Link](msgArray[0]) < 1) {
[Link](
`Tu numero es invalido`,
[Link],
errorColor,
'bold',
[Link]
);
} else {
[Link](
teamSpec[[Link](msgArray[0]) - 1].id,
[Link]
);
[Link](
`${[Link]} eligio $
{teamSpec[[Link](msgArray[0]) - 1].name} !`,
null,
announcementColor,
'bold',
[Link]
);
}
} else return false;
return true;
}
if ([Link] > [Link] && [Link] == teamBlue[0].id) {
if (['top', 'auto'].includes(msgArray[0].toLowerCase())) {
[Link](teamSpec[0].id, [Link]);
blueCaptainChoice = 'top';
clearTimeout(timeOutCap);
[Link](
`${[Link]} Eligio Arriba !`,
null,
announcementColor,
'bold',
[Link]
);
} else if (['random', 'rand'].includes(msgArray[0].toLowerCase())) {
[Link](
teamSpec[getRandomInt([Link])].id,
[Link]
);
blueCaptainChoice = 'random';
clearTimeout(timeOutCap);
[Link](
`${[Link]} Elijio aleatorio !`,
null,
announcementColor,
'bold',
[Link]
);
} else if (['bottom', 'bot'].includes(msgArray[0].toLowerCase())) {
[Link](teamSpec[[Link] - 1].id, [Link]);
blueCaptainChoice = 'bottom';
clearTimeout(timeOutCap);
[Link](
`${[Link]} Elijio abajo !`,
null,
announcementColor,
'bold',
[Link]
);
} else if (![Link]([Link](msgArray[0]))) {
if ([Link](msgArray[0]) > [Link] ||
[Link](msgArray[0]) < 1) {
[Link](
`Tu numero es invalido`,
[Link],
errorColor,
'bold',
[Link]
);
} else {
[Link](
teamSpec[[Link](msgArray[0]) - 1].id,
[Link]
);
[Link](
`${[Link]} eligio $
{teamSpec[[Link](msgArray[0]) - 1].name} !`,
null,
announcementColor,
'bold',
[Link]
);
}
} else return false;
return true;
}
}
}
function checkCaptainLeave(player) {
if (
([Link]((red) => [Link] == [Link]) == 0 && chooseMode &&
[Link] <= [Link]) ||
([Link]((blue) => [Link] == [Link]) == 0 && chooseMode &&
[Link] < [Link])
) {
choosePlayer();
capLeft = true;
setTimeout(() => {
capLeft = false;
}, 10);
}
}

function slowModeFunction(player, message) {


if (![Link]) {
if (![Link]([Link])) {
[Link]([Link]);
setTimeout(
(number) => {
[Link](number);
},
slowMode * 1000,
[Link]
);
} else {
return true;
}
}
return false;
}

/* PLAYER FUNCTIONS */

function updateTeams() {
playersAll = [Link]();
players = [Link]((p) => ![Link]([Link]));
teamRed = [Link]((p) => [Link] == [Link]);
teamBlue = [Link]((p) => [Link] == [Link]);
teamSpec = [Link]((p) => [Link] == [Link]);
}

function updateAdmins(excludedPlayerID = 0) {
if ([Link] != 0 && [Link]((p) => [Link]).length < maxAdmins) {
let playerArray = [Link]((p) => [Link] != excludedPlayerID && !
[Link]);
let arrayID = [Link]((player) => [Link]);
[Link]([Link](...arrayID), true);
}
}

function getRole(player) {
return (
!![Link]((a) => a == authArray[[Link]][0]) * 2 +
!![Link]((a) => a[0] == authArray[[Link]][0]) * 1 +
[Link] * 1
);
}
function ghostKickHandle(oldP, newP) {
var teamArrayId = getTeamArray([Link], true).map((p) => [Link]);
[Link]([Link]((id) => id == [Link]), 1, [Link]);

[Link]([Link], 'Kickeo Fantasma', false);


[Link]([Link], [Link]);
[Link]([Link], [Link]);
[Link](teamArrayId, true);

if ([Link] != [Link] && playSituation != [Link]) {


var discProp = [Link]([Link]);
[Link]([Link], discProp);
}
}

/* ACTIVITY FUNCTIONS */

function handleActivityPlayer(player) {
let pComp = getPlayerComp(player);
if (pComp != null) {
[Link]++;
if ([Link] == 60 * ((2 / 3) * afkLimit)) {
[Link](
`⛔ ${[Link]}, si no te mueves o envías un mensaje en los
siguiente ${[Link](afkLimit / 3)} segundos, serás kickeado !`,
[Link],
warningColor,
'bold',
[Link]
);
return;
}
if ([Link] >= 60 * afkLimit) {
[Link] = 0;
if ([Link] <= afkLimit - 0.5) {
setTimeout(() => {
!chooseMode ? instantRestart() : [Link]();
}, 10);
}
[Link]([Link], 'AFK', false);
}
}
}

function handleActivityPlayerTeamChange(changedPlayer) {
if ([Link] == [Link]) {
let pComp = getPlayerComp(changedPlayer);
if (pComp != null) [Link] = 0;
}
}

function handleActivityStop() {
for (let player of players) {
let pComp = getPlayerComp(player);
if (pComp != null) [Link] = 0;
}
}
function handleActivity() {
if (gameState === [Link] && [Link] > 1) {
for (let player of teamRed) {
handleActivityPlayer(player);
}
for (let player of teamBlue) {
handleActivityPlayer(player);
}
}
}

/* LINEUP FUNCTIONS */

function getStartingLineups() {
var compositions = [[], []];
for (let player of teamRed) {
compositions[0].push(
new PlayerComposition(player, authArray[[Link]][0], [0], [])
);
}
for (let player of teamBlue) {
compositions[1].push(
new PlayerComposition(player, authArray[[Link]][0], [0], [])
);
}
return compositions;
}

function handleLineupChangeTeamChange(changedPlayer) {
if (gameState != [Link]) {
var playerLineup;
if ([Link] == [Link]) {
// player gets in red team
var redLineupAuth = [Link][0].map((p) => [Link]);
var ind = [Link]((auth) => auth ==
authArray[[Link]][0]);
if (ind != -1) {
// Player goes back in
playerLineup = [Link][0][ind];
if ([Link]([Link])) {
// gets subbed off then in at the exact same time -> no sub
[Link] = [Link]((t) => t !
= [Link]);
} else {
[Link]([Link]);
}
} else {
playerLineup = new PlayerComposition(
changedPlayer,
authArray[[Link]][0],
[[Link]],
[]
);
[Link][0].push(playerLineup);
}
} else if ([Link] == [Link]) {
// player gets in blue team
var blueLineupAuth = [Link][1].map((p) => [Link]);
var ind = [Link]((auth) => auth ==
authArray[[Link]][0]);
if (ind != -1) {
// Player goes back in
playerLineup = [Link][1][ind];
if ([Link]([Link])) {
// gets subbed off then in at the exact same time -> no sub
[Link] = [Link]((t) => t !
= [Link]);
} else {
[Link]([Link]);
}
} else {
playerLineup = new PlayerComposition(
changedPlayer,
authArray[[Link]][0],
[[Link]],
[]
);
[Link][1].push(playerLineup);
}
}
if ([Link]((r) => [Link] == [Link])) {
// player leaves red team
var redLineupAuth = [Link][0].map((p) => [Link]);
var ind = [Link]((auth) => auth ==
authArray[[Link]][0]);
playerLineup = [Link][0][ind];
if ([Link]([Link])) {
// gets subbed off then in at the exact same time -> no sub
if ([Link] == 0) {
[Link][0].splice(ind, 1);
} else {
[Link] = [Link]((t) => t
!= [Link]);
}
} else {
[Link]([Link]);
}
} else if ([Link]((r) => [Link] == [Link])) {
// player leaves blue team
var blueLineupAuth = [Link][1].map((p) => [Link]);
var ind = [Link]((auth) => auth ==
authArray[[Link]][0]);
playerLineup = [Link][1][ind];
if ([Link]([Link])) {
// gets subbed off then in at the exact same time -> no sub
if ([Link] == 0) {
[Link][1].splice(ind, 1);
} else {
[Link] = [Link]((t) => t
!= [Link]);
}
} else {
[Link]([Link]);
}
}
}
}
function handleLineupChangeLeave(player) {
if (playSituation != [Link]) {
if ([Link] == [Link]) {
// player gets in red team
var redLineupAuth = [Link][0].map((p) => [Link]);
var ind = [Link]((auth) => auth ==
authArray[[Link]][0]);
var playerLineup = [Link][0][ind];
if ([Link]([Link])) {
// gets subbed off then in at the exact same time -> no sub
if ([Link] == 0) {
[Link][0].splice(ind, 1);
} else {
[Link] = [Link]((t) => t
!= [Link]);
}
} else {
[Link]([Link]);
}
} else if ([Link] == [Link]) {
// player gets in blue team
var blueLineupAuth = [Link][1].map((p) => [Link]);
var ind = [Link]((auth) => auth ==
authArray[[Link]][0]);
var playerLineup = [Link][1][ind];
if ([Link]([Link])) {
// gets subbed off then in at the exact same time -> no sub
if ([Link] == 0) {
[Link][1].splice(ind, 1);
} else {
[Link] = [Link]((t) => t
!= [Link]);
}
} else {
[Link]([Link]);
}
}
}
}

/* TEAM BALANCE FUNCTIONS */

function balanceTeams() {
if (!chooseMode) {
if ([Link] == 0) {
[Link]();
[Link](scoreLimit);
[Link](timeLimit);
} else if ([Link] == 1 && [Link] == 0) {
instantRestart();
setTimeout(() => {
stadiumCommand(emptyPlayer, `!training`);
}, 5);
[Link](players[0].id, [Link]);
} else if ([Link]([Link] - [Link]) == [Link] &&
[Link] > 0) {
const n = [Link]([Link] - [Link]);
if ([Link] == 2) {
instantRestart();
setTimeout(() => {
stadiumCommand(emptyPlayer, `!classic`);
}, 5);
}
if ([Link] > [Link]) {
for (var i = 0; i < n; i++) {
[Link](teamSpec[i].id, [Link]);
}
} else {
for (var i = 0; i < n; i++) {
[Link](teamSpec[i].id, [Link]);
}
}
} else if ([Link]([Link] - [Link]) > [Link]) {
const n = [Link]([Link] - [Link]);
if ([Link] == 1) {
instantRestart();
setTimeout(() => {
stadiumCommand(emptyPlayer, `!training`);
}, 5);
[Link](players[0].id, [Link]);
return;
} else if (teamSize > 2 && [Link] == 5) {
instantRestart();
setTimeout(() => {
stadiumCommand(emptyPlayer, `!classic`);
}, 5);
}
if ([Link] == teamSize * 2 - 1) {
teamRedStats = [];
teamBlueStats = [];
}
if ([Link] > [Link]) {
for (var i = 0; i < n; i++) {
[Link](
teamRed[[Link] - 1 - i].id,
[Link]
);
}
} else {
for (var i = 0; i < n; i++) {
[Link](
teamBlue[[Link] - 1 - i].id,
[Link]
);
}
}
} else if ([Link]([Link] - [Link]) < [Link] &&
[Link] != [Link]) {
[Link](true);
activateChooseMode();
choosePlayer();
} else if ([Link] >= 2 && [Link] == [Link] &&
[Link] < teamSize) {
if ([Link] == 2) {
instantRestart();
setTimeout(() => {
stadiumCommand(emptyPlayer, `!big`);
}, 5);
}
topButton();
}
}
}

function handlePlayersJoin() {
if (chooseMode) {
if (teamSize > 2 && [Link] == 6) {
setTimeout(() => {
stadiumCommand(emptyPlayer, `!big`);
}, 5);
}
getSpecList([Link] <= [Link] ? teamRed[0] : teamBlue[0]);
}
balanceTeams();
}

function handlePlayersLeave() {
if (gameState != [Link]) {
var scores = [Link]();
if ([Link] >= 2 * teamSize && [Link] >= (5 / 6) *
[Link] && [Link] != [Link]) {
var rageQuitCheck = false;
if ([Link] < [Link]) {
if ([Link] - [Link] == 2) {
endGame([Link]);
rageQuitCheck = true;
}
} else {
if ([Link] - [Link] == 2) {
endGame([Link]);
rageQuitCheck = true;
}
}
if (rageQuitCheck) {
[Link](
"Ragequit detectado, juego terminado.",
null,
infoColor,
'bold',
[Link]
)
stopTimeout = setTimeout(() => {
[Link]();
}, 100);
return;
}
}
}
if (chooseMode) {
if (teamSize > 2 && [Link] == 5) {
setTimeout(() => {
stadiumCommand(emptyPlayer, `!classic`);
}, 5);
}
if ([Link] == 0 || [Link] == 0) {
[Link](teamSpec[0].id, [Link] == 0 ? [Link] :
[Link]);
return;
}
if ([Link]([Link] - [Link]) == [Link]) {
deactivateChooseMode();
resumeGame();
var b = [Link];
if ([Link] > [Link]) {
for (var i = 0; i < b; i++) {
clearTimeout(insertingTimeout);
insertingPlayers = true;
setTimeout(() => {
[Link](teamSpec[0].id, [Link]);
}, 5 * i);
}
insertingTimeout = setTimeout(() => {
insertingPlayers = false;
}, 5 * b);
} else {
for (var i = 0; i < b; i++) {
clearTimeout(insertingTimeout);
insertingPlayers = true;
setTimeout(() => {
[Link](teamSpec[0].id, [Link]);
}, 5 * i);
}
insertingTimeout = setTimeout(() => {
insertingPlayers = false;
}, 5 * b);
}
return;
}
if (streak == 0 && gameState == [Link]) {
if ([Link]([Link] - [Link]) == 2) {
var teamIn = [Link] > [Link] ? teamRed : teamBlue;
[Link](teamIn[[Link] - 1].id, [Link])
}
}
if ([Link] == [Link] && [Link] < 2) {
deactivateChooseMode();
resumeGame();
return;
}

if (capLeft) {
choosePlayer();
} else {
getSpecList([Link] <= [Link] ? teamRed[0] :
teamBlue[0]);
}
}
balanceTeams();
}

function handlePlayersTeamChange(byPlayer) {
if (chooseMode && !removingPlayers && byPlayer == null) {
if ([Link]([Link] - [Link]) == [Link]) {
deactivateChooseMode();
resumeGame();
var b = [Link];
if ([Link] > [Link]) {
for (var i = 0; i < b; i++) {
clearTimeout(insertingTimeout);
insertingPlayers = true;
setTimeout(() => {
[Link](teamSpec[0].id, [Link]);
}, 5 * i);
}
insertingTimeout = setTimeout(() => {
insertingPlayers = false;
}, 5 * b);
} else {
for (var i = 0; i < b; i++) {
clearTimeout(insertingTimeout);
insertingPlayers = true;
setTimeout(() => {
[Link](teamSpec[0].id, [Link]);
}, 5 * i);
}
insertingTimeout = setTimeout(() => {
insertingPlayers = false;
}, 5 * b);
}
return;
} else if (
([Link] == teamSize && [Link] == teamSize) ||
([Link] == [Link] && [Link] < 2)
) {
deactivateChooseMode();
resumeGame();
} else if ([Link] <= [Link] && redCaptainChoice != '') {
if (redCaptainChoice == 'top') {
[Link](teamSpec[0].id, [Link]);
} else if (redCaptainChoice == 'random') {
var r = getRandomInt([Link]);
[Link](teamSpec[r].id, [Link]);
} else {
[Link](teamSpec[[Link] - 1].id, [Link]);
}
return;
} else if ([Link] < [Link] && blueCaptainChoice != '') {
if (blueCaptainChoice == 'top') {
[Link](teamSpec[0].id, [Link]);
} else if (blueCaptainChoice == 'random') {
var r = getRandomInt([Link]);
[Link](teamSpec[r].id, [Link]);
} else {
[Link](teamSpec[[Link] - 1].id, [Link]);
}
return;
} else {
choosePlayer();
}
}
}

function handlePlayersStop(byPlayer) {
if (byPlayer == null && endGameVariable) {
if (chooseMode) {
if ([Link] == 2 * teamSize) {
chooseMode = false;
resetButton();
for (var i = 0; i < teamSize; i++) {
clearTimeout(insertingTimeout);
insertingPlayers = true;
setTimeout(() => {
randomButton();
}, 200 * i);
}
insertingTimeout = setTimeout(() => {
insertingPlayers = false;
}, 200 * teamSize);
startTimeout = setTimeout(() => {
[Link]();
}, 2000);
} else {
if (lastWinner == [Link]) {
blueToSpecButton();
} else if (lastWinner == [Link]) {
redToSpecButton();
setTimeout(() => {
swapButton();
}, 10);
} else {
resetButton();
}
clearTimeout(insertingTimeout);
insertingPlayers = true;
setTimeout(() => {
topButton();
}, 300);
insertingTimeout = setTimeout(() => {
insertingPlayers = false;
}, 300);
}
} else {
if ([Link] == 2) {
if (lastWinner == [Link]) {
swapButton();
}
startTimeout = setTimeout(() => {
[Link]();
}, 2000);
} else if ([Link] == 3 || [Link] >= 2 * teamSize + 1) {
if (lastWinner == [Link]) {
blueToSpecButton();
} else {
redToSpecButton();
setTimeout(() => {
swapButton();
}, 5);
}
clearTimeout(insertingTimeout);
insertingPlayers = true;
setTimeout(() => {
topButton();
}, 200);
insertingTimeout = setTimeout(() => {
insertingPlayers = false;
}, 300);
startTimeout = setTimeout(() => {
[Link]();
}, 2000);
} else if ([Link] == 4) {
resetButton();
clearTimeout(insertingTimeout);
insertingPlayers = true;
setTimeout(() => {
randomButton();
setTimeout(() => {
randomButton();
}, 500);
}, 500);
insertingTimeout = setTimeout(() => {
insertingPlayers = false;
}, 2000);
startTimeout = setTimeout(() => {
[Link]();
}, 2000);
} else if ([Link] == 5 || [Link] >= 2 * teamSize + 1) {
if (lastWinner == [Link]) {
blueToSpecButton();
} else {
redToSpecButton();
setTimeout(() => {
swapButton();
}, 5);
}
clearTimeout(insertingTimeout);
insertingPlayers = true;
insertingTimeout = setTimeout(() => {
insertingPlayers = false;
}, 200);
setTimeout(() => {
topButton();
}, 200);
activateChooseMode();
} else if ([Link] == 6) {
resetButton();
clearTimeout(insertingTimeout);
insertingPlayers = true;
insertingTimeout = setTimeout(() => {
insertingPlayers = false;
}, 1500);
setTimeout(() => {
randomButton();
setTimeout(() => {
randomButton();
setTimeout(() => {
randomButton();
}, 500);
}, 500);
}, 500);
startTimeout = setTimeout(() => {
[Link]();
}, 2000);
}
}
}
}

/* STATS FUNCTIONS */

/* GK FUNCTIONS */

function handleGKTeam(team) {
if (team == [Link]) {
return null;
}
let teamArray = team == [Link] ? teamRed : teamBlue;
let playerGK = [Link]((prev, current) => {
if (team == [Link]) {
return (prev?.position.x < [Link].x) ? prev : current
} else {
return (prev?.position.x > [Link].x) ? prev : current
}
}, null);
let playerCompGK = getPlayerComp(playerGK);
return playerCompGK;
}

function handleGK() {
let redGK = handleGKTeam([Link]);
if (redGK != null) {
[Link]++;
}
let blueGK = handleGKTeam([Link]);
if (blueGK != null) {
[Link]++;
}
}

function getGK(team) {
if (team == [Link]) {
return null;
}
let teamArray = team == [Link] ? [Link][0] : [Link][1];
let playerGK = [Link]((prev, current) => {
return (prev?.GKTicks > [Link]) ? prev : current
}, null);
return playerGK;
}

function getCS(scores) {
let playersNameCS = [];
let redGK = getGK([Link]);
let blueGK = getGK([Link]);
if (redGK != null && [Link] == 0) {
[Link]([Link]);
}
if (blueGK != null && [Link] == 0) {
[Link]([Link]);
}
return playersNameCS;
}
function getCSString(scores) {
let playersCS = getCS(scores);
if ([Link] == 0) {
return "🥅 No CS.\n Recuerda estamos en pruebas \n Discord:
[Link]
} else if ([Link] == 1) {
return `🥅 ${playersCS[0]} Obtuvo una CS.\n Recuerda estamos en
pruebas \n Discord: [Link]
} else {
return `🥅 ${playersCS[0]} and ${playersCS[1]} Obtuvo una cs \n Recuerda
estamos en pruebas \n Discord: [Link]
}
}

/* GLOBAL STATS FUNCTIONS */

function getLastTouchOfTheBall() {
const ballPosition = [Link]();
updateTeams();
let playerArray = [];
for (let player of players) {
if ([Link] != null) {
var distanceToBall = pointDistance([Link], ballPosition);
if (distanceToBall < triggerDistance) {
if (playSituation == [Link]) playSituation =
[Link];
[Link]([player, distanceToBall]);
}
}
}
if ([Link] != 0) {
let playerTouch = [Link]((a, b) => a[1] - b[1])[0][0];
if (lastTeamTouched == [Link] || lastTeamTouched ==
[Link]) {
if (lastTouches[0] == null || (lastTouches[0] != null &&
lastTouches[0].[Link] != [Link])) {
[Link](
new BallTouch(
playerTouch,
[Link],
getGoalGame(),
ballPosition
)
);
lastTouches[0] = checkGoalKickTouch(
[Link],
[Link] - 1,
getGoalGame()
);
lastTouches[1] = checkGoalKickTouch(
[Link],
[Link] - 2,
getGoalGame()
);
}
}
lastTeamTouched = [Link];
}
}
function getBallSpeed() {
var ballProp = [Link](0);
return [Link]([Link] ** 2 + [Link] ** 2) *
speedCoefficient;
}

function getGameStats() {
if (playSituation == [Link] && gameState == [Link]) {
lastTeamTouched == [Link] ? possession[0]++ : possession[1]++;
var ballPosition = [Link]();
ballPosition.x < 0 ? actionZoneHalf[0]++ : actionZoneHalf[1]++;
handleGK();
}
}

/* GOAL ATTRIBUTION FUNCTIONS */

function getGoalAttribution(team) {
var goalAttribution = Array(2).fill(null);
if (lastTouches[0] != null) {
if (lastTouches[0].[Link] == team) {
// Direct goal scored by player
if (lastTouches[1] != null && lastTouches[1].[Link] == team) {
goalAttribution = [lastTouches[0].player,
lastTouches[1].player];
} else {
goalAttribution = [lastTouches[0].player, null];
}
} else {
// Own goal
goalAttribution = [lastTouches[0].player, null];
}
}
return goalAttribution;
}

function getGoalString(team) {
var goalString;
var scores = [Link];
var goalAttribution = getGoalAttribution(team);
if (goalAttribution[0] != null) {
if (goalAttribution[0].team == team) {
if (goalAttribution[1] != null && goalAttribution[1].team == team)
{
goalString = `⚽ ${getTimeGame([Link])} $
{frasesGols[[Link]([Link]() * [Link])]} De $
{goalAttribution[0].name} ${frasesAsiten[[Link]([Link]() *
[Link])]} ${goalAttribution[1].name}. Velocidad de entrada : $
{[Link](2)}km/h.`;
[Link](
new Goal(
[Link],
team,
goalAttribution[0],
goalAttribution[1]
)
);
} else {
goalString = `⚽ ${getTimeGame([Link])} $
{frasesGols[[Link]([Link]() * [Link])]} De $
{goalAttribution[0].name} ! Velocidad de entrada : ${[Link](2)}km/h.`;
[Link](
new Goal([Link], team, goalAttribution[0], null)
);
}
} else {
goalString = `😂 ${getTimeGame([Link])} $
{frasesOG[[Link]([Link]() * [Link])]} $
{goalAttribution[0].name} ! Velocidad de gol : ${[Link](2)}km/h.`;
[Link](
new Goal([Link], team, goalAttribution[0], null)
);
}
} else {
goalString = `⚽ ${getTimeGame([Link])} $
{frasesGols[[Link]([Link]() * [Link])]} Gol DEL ${team ==
[Link] ? 'Rojo' : 'Azul'} Equipo ! Velocidad de gol :
${[Link](2)}km/h.`;
[Link](
new Goal([Link], team, null, null)
);
}

return goalString;
}

/* ROOM STATS FUNCTIONS */

function updatePlayerStats(player, teamStats) {


var stats = new HaxStatistics([Link]);
var pComp = getPlayerComp(player);
if ([Link](authArray[[Link]][0])) {
stats = [Link]([Link](authArray[[Link]][0]));
}
[Link]++;
if (lastWinner == teamStats) [Link]++;
[Link] = ((100 * [Link]) / ([Link] || 1)).toFixed(1) + `%`;
[Link] += getGoalsPlayer(pComp);
[Link] += getAssistsPlayer(pComp);
[Link] += getOwnGoalsPlayer(pComp);
[Link] += getCSPlayer(pComp);
[Link] += getGametimePlayer(pComp);
[Link](authArray[[Link]][0], [Link](stats));
}

function updateStats() {
if (
[Link] >= 2 * teamSize &&
(
[Link] >= (5 / 6) * [Link] ||
[Link] == [Link] ||
[Link] == [Link]
) &&
[Link] >= teamSize && [Link] >= teamSize
) {
for (let player of teamRedStats) {
updatePlayerStats(player, [Link]);
}
for (let player of teamBlueStats) {
updatePlayerStats(player, [Link]);
}
}
}

function printRankings(statKey, id = 0) {
var leaderboard = [];
statKey = statKey == "cs" ? "CS" : statKey;
for (var i = 0; i < [Link]; i++) {
var key = [Link](i);
if ([Link] == 43)
[Link]([
[Link]([Link](key)).playerName,
[Link]([Link](key))[statKey],
]);
}
if ([Link] < 5) {
if (id != 0) {
[Link](
'Todavía no se juegan suficientes juegos !',
id,
errorColor,
'bold',
[Link]
);
}
return;
}
[Link](function (a, b) { return b[1] - a[1]; });
var rankingString = `${[Link](0).toUpperCase() + [Link](1)}>
`;
for (let i = 0; i < 5; i++) {
let playerName = leaderboard[i][0];
let playerStat = leaderboard[i][1];
if (statKey == 'Tiempo jugado') playerStat = getTimeStats(playerStat);
rankingString += `#${i + 1} ${playerName} : ${playerStat}, `;
}
rankingString = [Link](0, [Link] - 2);
[Link](
rankingString,
id,
infoColor,
'bold',
[Link]
);
}

/* GET STATS FUNCTIONS */

function getGamePlayerStats(player) {
var stats = new HaxStatistics([Link]);
var pComp = getPlayerComp(player);
[Link] += getGoalsPlayer(pComp);
[Link] += getAssistsPlayer(pComp);
[Link] += getOwnGoalsPlayer(pComp);
[Link] += getGametimePlayer(pComp);
[Link] += getCSPlayer(pComp);
return stats;
}

function getGametimePlayer(pComp) {
if (pComp == null) return 0;
var timePlayer = 0;
for (let j = 0; j < [Link]; j++) {
if ([Link] < j + 1) {
timePlayer += [Link] - [Link][j];
} else {
timePlayer += [Link][j] - [Link][j];
}
}
return [Link](timePlayer);
}

function getGoalsPlayer(pComp) {
if (pComp == null) return 0;
var goalPlayer = 0;
for (let goal of [Link]) {
if ([Link] != null && [Link] === [Link]) {
if (authArray[[Link]][0] == [Link]) {
goalPlayer++;
}
}
}
return goalPlayer;
}

function getOwnGoalsPlayer(pComp) {
if (pComp == null) return 0;
var goalPlayer = 0;
for (let goal of [Link]) {
if ([Link] != null && [Link] !== [Link]) {
if (authArray[[Link]][0] == [Link]) {
goalPlayer++;
}
}
}
return goalPlayer;
}

function getAssistsPlayer(pComp) {
if (pComp == null) return 0;
var assistPlayer = 0;
for (let goal of [Link]) {
if ([Link] != null) {
if (authArray[[Link]][0] == [Link]) {
assistPlayer++;
}
}
}
return assistPlayer;
}

function getGKPlayer(pComp) {
if (pComp == null) return 0;
let GKRed = getGK([Link]);
if ([Link] == GKRed?.auth) {
return [Link];
}
let GKBlue = getGK([Link]);
if ([Link] == GKBlue?.auth) {
return [Link];
}
return [Link];
}

function getCSPlayer(pComp) {
if (pComp == null || [Link] == null) return 0;
if (getGKPlayer(pComp) == [Link] && [Link] == 0) {
return 1;
} else if (getGKPlayer(pComp) == [Link] && [Link] == 0) {
return 1;
}
return 0;
}

function actionReportCountTeam(goals, team) {


let playerActionSummaryTeam = [];
let indexTeam = team == [Link] ? 0 : 1;
let indexOtherTeam = team == [Link] ? 1 : 0;
for (let goal of goals[indexTeam]) {
if (goal[0] != null) {
if ([Link](a => a[0].id == goal[0].id)) {
let index = [Link](a => a[0].id ==
goal[0].id);
playerActionSummaryTeam[index][1]++;
} else {
[Link]([goal[0], 1, 0, 0]);
}
if (goal[1] != null) {
if ([Link](a => a[0].id == goal[1].id)) {
let index = [Link](a => a[0].id
== goal[1].id);
playerActionSummaryTeam[index][2]++;
} else {
[Link]([goal[1], 0, 1, 0]);
}
}
}
}
if (goals[indexOtherTeam].length == 0) {
let playerCS = getGK(team)?.player;
if (playerCS != null) {
if ([Link](a => a[0].id == [Link])) {
let index = [Link](a => a[0].id ==
[Link]);
playerActionSummaryTeam[index][3]++;
} else {
[Link]([playerCS, 0, 0, 1]);
}
}
}

[Link]((a, b) => (a[1] + a[2] + a[3]) - (b[1] + b[2]


+ b[3]));
return playerActionSummaryTeam;
}

/* PRINT FUNCTIONS */

function printPlayerStats(stats) {
let statsString = '';
for (let [key, value] of [Link](stats)) {
if (key == 'playerName') statsString += `${value}: `;
else {
if (key == 'Tiempo jugado') value = getTimeStats(value);
let reCamelCase = /([A-Z](?=[a-z]+)|[A-Z]+(?![a-z]))/g;
let statName = [Link](reCamelCase, ' $1').trim();
statsString += `${[Link](0).toUpperCase() +
[Link](1)}: ${value}, `;
}
}
statsString = [Link](0, [Link] - 2);
return statsString;
}

/* FETCH FUNCTIONS */

function fetchGametimeReport(game) {
var fieldGametimeRed = {
name: '🔴 **Estadísticas del equipo rojo**',
value: '⌛ __**Tiempo de juego:**__\n\n',
inline: true,
};
var fieldGametimeBlue = {
name: '🔵 **Estadísticas del equipo azul**',
value: '⌛ __**Tiempo de juego:**__\n\n',
inline: true,
};
var redTeamTimes = [Link][0].map((p) => [[Link],
getGametimePlayer(p)]);
var blueTeamTimes = [Link][1].map((p) => [[Link],
getGametimePlayer(p)]);

for (let time of redTeamTimes) {


var minutes = getMinutesReport(time[1]);
var seconds = getSecondsReport(time[1]);
[Link] += `> **${time[0].name}:** ${minutes > 0 ? `$
{minutes}m` : ''}` +
`${seconds > 0 || minutes == 0 ? `${seconds}s` : ''}\n`;
}
[Link] += `\n${[Link] - [Link] >
0 ? '\n'.repeat([Link] - [Link]) : ''
}`;
[Link] += '=====================';

for (let time of blueTeamTimes) {


var minutes = getMinutesReport(time[1]);
var seconds = getSecondsReport(time[1]);
[Link] += `> **${time[0].name}:** ${minutes > 0 ? `$
{minutes}m` : ''}` +
`${seconds > 0 || minutes == 0 ? `${seconds}s` : ''}\n`;
}
[Link] += `\n${[Link] - [Link]
> 0 ? '\n'.repeat([Link] - [Link]) : ''
}`;
[Link] += '=====================';

return [fieldGametimeRed, fieldGametimeBlue];


}

function fetchActionsSummaryReport(game) {
var fieldReportRed = {
name: '🔴 **Estadísticas del equipo rojo**',
value: '📊 __**Estadísticas de jugadores:**__\n\n',
inline: true,
};
var fieldReportBlue = {
name: '🔵 **Estadísticas del equipo azul**',
value: '📊 __**Estadísticas de jugadores:**__\n\n',
inline: true,
};
var goals = [[], []];
for (let i = 0; i < [Link]; i++) {
goals[[Link][i].team - 1].push([[Link][i].striker,
[Link][i].assist]);
}
var redActions = actionReportCountTeam(goals, [Link]);
if ([Link] > 0) {
for (let act of redActions) {
[Link] += `> **${act[0].team != [Link] ? '[OG] ' :
''}${act[0].name}:**` +
`${act[1] > 0 ? ` ${act[1]}G` : ''}` +
`${act[2] > 0 ? ` ${act[2]}A` : ''}` +
`${act[3] > 0 ? ` ${act[3]}CS` : ''}\n`;
}
}
var blueActions = actionReportCountTeam(goals, [Link]);
if ([Link] > 0) {
for (let act of blueActions) {
[Link] += `> **${act[0].team != [Link] ? '[OG]
' : ''}${act[0].name}:**` +
`${act[1] > 0 ? ` ${act[1]}G` : ''}` +
`${act[2] > 0 ? ` ${act[2]}A` : ''}` +
`${act[3] > 0 ? ` ${act[3]}CS` : ''}\n`;
}
}

[Link] += `\n${[Link] - [Link] > 0 ?


'\n'.repeat([Link] - [Link]) : ''
}`;
[Link] += '=====================';

[Link] += `\n${[Link] - [Link] > 0 ?


'\n'.repeat([Link] - [Link]) : ''
}`;
[Link] += '=====================';

return [fieldReportRed, fieldReportBlue];


}

function fetchSummaryEmbed(game) {
var fetchEndgame = [fetchGametimeReport, fetchActionsSummaryReport];
var logChannel = gameWebhook;
var fields = [
{
name: '🔴 **Estadísticas del equipo rojo**',
value: '=====================\n\n',
inline: true,
},
{
name: '🔵 **Estadísticas del equipo azul**',
value: '=====================\n\n',
inline: true,
},
];
for (let i = 0; i < [Link]; i++) {
var fieldsReport = fetchEndgame[i](game);
fields[0].value += fieldsReport[0].value + '\n\n';
fields[1].value += fieldsReport[1].value + '\n\n';
}
fields[0].value = fields[0].[Link](0, fields[0].[Link] - 2);
fields[1].value = fields[1].[Link](0, fields[1].[Link] - 2);

var possR = possession[0] / (possession[0] + possession[1]);


var possB = 1 - possR;
var possRString = (possR * 100).toFixed(0).toString();
var possBString = (possB * 100).toFixed(0).toString();
var zoneR = actionZoneHalf[0] / (actionZoneHalf[0] + actionZoneHalf[1]);
var zoneB = 1 - zoneR;
var zoneRString = (zoneR * 100).toFixed(0).toString();
var zoneBString = (zoneB * 100).toFixed(0).toString();
var win = ([Link] > [Link]) * 1 + ([Link] >
[Link]) * 2;
var objectBodyWebhook = {
embeds: [
{
title: `📝 Reporte del partido #${getIdReport()}`,
description:
`**${getTimeEmbed([Link])}** ` +
(win == 1 ? '**Equipo rojo** ' : 'Equipo rojo ') +
[Link] +
' - ' +
[Link] + (win == 2 ? ' **Equipo azul**' : '
Equipo azul') +
'\n```c\nPossession: ' + possRString + '% - ' + possBString
+ '%' +
'\nAction Zone: ' + zoneRString + '% - ' + zoneBString +
'%\n```\n\n',
color: 9567999,
fields: fields,
footer: {
text: `Grabación: ${getRecordingName(game)}`,
},
timestamp: new Date().toISOString(),
},
],
username: roomName
};
if (logChannel != '') {
fetch(logChannel, {
method: 'POST',
body: [Link](objectBodyWebhook),
headers: {
'Content-Type': 'application/json',
},
}).then((res) => res);
}
}

/* EVENTS */

/* PLAYER MOVEMENT */

[Link] = function (player) {


authArray[[Link]] = [[Link], [Link]];
if (roomWebhook != '') {
fetch(roomWebhook, {
method: 'POST',
body: [Link]({
content: `[${getDate()}] ➡️ Entro (${[Link] + 1}/$
{maxPlayers})\n**` +
`${[Link]}** [${authArray[[Link]][0]}] {$
{authArray[[Link]][1]}}`,
username: roomName,
}),
headers: {
'Content-Type': 'application/json',
},
}).then((res) => res);
}
[Link](
`👋 Bienvenido ${[Link]} !\nBienvenido al la Pub Oficial De Vehax,
Para hablar con tu equipo usa t antes de un msg !\nDiscord:
[Link]

|----------------------------------------------------------------------------------
-|
|
| |
| ██╗░░░██╗███████╗██╗░░██╗░█████╗░██╗░░██╗
|
| ██║░░░██║██╔════╝██║░░██║██╔══██╗╚██╗██╔╝
|
| ╚██╗░██╔╝█████╗░░███████║███████║░╚███╔╝░
|
| ░╚████╔╝░██╔══╝░░██╔══██║██╔══██║░██╔██╗░
|
| ░░╚██╔╝░░███████╗██║░░██║██║░░██║██╔╝╚██╗
|
| ░░░╚═╝░░░╚══════╝╚═╝░░╚═╝╚═╝░░╚═╝╚═╝░░╚═╝
|

|----------------------------------------------------------------------------------
-|

!!🏆🥳🎉VEHAX🏆🥳🎉!!

Sala Hecha Por Ney & Chelo DC:keurygcds#0000 DC: digalomipai`,


[Link],
welcomeColor,
'bold',
[Link]
);
updateTeams();
updateAdmins();
if ([Link]((auth) => auth == [Link]) != -1) {
[Link](
`El Super Admin ${[Link]} Acaba De Llegar A La Sala Para Poner
Orden En La Sala 👑 !!`,
null,
announcementColor,
'bold',
[Link]
);
[Link]([Link], true);
} else if ([Link]((a) => a[0]).findIndex((auth) => auth ==
[Link]) != -1) {
[Link](
`El administrador ${[Link]} Acaba de llegar !`,
null,
announcementColor,
'bold',
[Link]
);
[Link]([Link], true);
}
var sameAuthCheck = [Link]((p) => [Link] != [Link] &&
authArray[[Link]][0] == [Link]);
if ([Link] > 0 && !debugMode) {
var oldPlayerArray = [Link]((p) => [Link] != [Link] &&
authArray[[Link]][0] == [Link]);
for (let oldPlayer of oldPlayerArray) {
ghostKickHandle(oldPlayer, player);
}
}
handlePlayersJoin();
};

[Link] = function (changedPlayer, byPlayer) {


handleLineupChangeTeamChange(changedPlayer);
if ([Link]([Link]) && [Link] != [Link])
{
[Link]([Link], [Link]);
[Link](
`${[Link]} Esta afk ahora!`,
null,
successColor,
'bold',
[Link]
);
return;
}
updateTeams();
if (gameState != [Link]) {
if ([Link] != [Link] && [Link] <= (3 /
4) * [Link] && [Link]([Link] - [Link]) < 2) {
[Link] == [Link] ? [Link](changedPlayer) :
[Link](changedPlayer);
}
}
handleActivityPlayerTeamChange(changedPlayer);
handlePlayersTeamChange(byPlayer);
};

[Link] = function (player) {


setTimeout(() => {
if (!kickFetchVariable) {
if (roomWebhook != '') {
var stringContent = `[${getDate()}] ⬅️ Salio ($
{[Link]}/${maxPlayers})\n**${[Link]}**` +
`[${authArray[[Link]][0]}] {${authArray[[Link]]
[1]}}`;
fetch(roomWebhook, {
method: 'POST',
body: [Link]({
content: stringContent,
username: roomName,
}),
headers: {
'Content-Type': 'application/json',
},
}).then((res) => res);
}
} else kickFetchVariable = false;
}, 10);
handleLineupChangeLeave(player);
checkCaptainLeave(player);
updateTeams();
updateAdmins();
handlePlayersLeave();
};

[Link] = function (kickedPlayer, reason, ban, byPlayer) {


kickFetchVariable = true;
if (roomWebhook != '') {
var stringContent = `[${getDate()}] ⛔ ${ban ? 'BAN' : 'KICK'} ($
{[Link]}/${maxPlayers})\n` +
`**${[Link]}** [${authArray[[Link]][0]}] {$
{authArray[[Link]][1]}} was ${ban ? 'banned' : 'kicked'}` +
`${byPlayer != null ? ' by **' + [Link] + '** [' +
authArray[[Link]][0] + '] {' + authArray[[Link]][1] + '}' : ''}`
fetch(roomWebhook, {
method: 'POST',
body: [Link]({
content: stringContent,
username: roomName,
}),
headers: {
'Content-Type': 'application/json',
},
}).then((res) => res);
}
if ((ban && ((byPlayer != null &&
([Link] == [Link] || getRole(byPlayer) < [Link])) ||
getRole(kickedPlayer) == [Link])) || disableBans
) {
[Link]([Link]);
return;
}
if (byPlayer != null && getRole(byPlayer) < Role.ADMIN_PERM) {
[Link](
'No se le permite patear/prohibir a los jugadores !',
[Link],
errorColor,
'bold',
[Link]
);
[Link]([Link], false);
return;
}
if (ban) [Link]([[Link], [Link]]);
};

// Archivo de configuración de Haxball

// Configuración del sistema de spam


const spamLimit = 10; // Cantidad máxima de mensajes permitidos en un período de
tiempo
const spamTime = 10000; // Tiempo en milisegundos de un período de tiempo

// Función para detectar spam


function isSpam(player) {
// Obtiene el número de mensajes del jugador en el período de tiempo actual
const messageCount = [Link](message => [Link] >=
[Link]() - spamTime).length;

// Devuelve true si el jugador ha enviado demasiados mensajes


return messageCount >= spamLimit;
}

// Función para expulsar a un jugador por spam


function kickPlayer(player) {
// Envia un mensaje de expulsión al jugador
[Link]("Has sido expulsado por spam.");

// Expulsa al jugador de la sala


[Link](player);
}

// Evento de chat
[Link](player => {
// Verifica si el jugador está haciendo spam
if (isSpam(player)) {
// Expulsa al jugador
kickPlayer(player);
}
});

/* PLAYER ACTIVITY */

[Link] = function (player, message) {


if (gameState !== [Link] && [Link] != [Link]) {
let pComp = getPlayerComp(player);
if (pComp != null) [Link] = 0;
}
let msgArray = [Link](/ +/);
if (!hideClaimMessage || msgArray[0] != '!claim') {
if (roomWebhook != '')
fetch(roomWebhook, {
method: 'POST',
body: [Link]({
content: `[${getDate()}] 💬 CHAT\n**${[Link]}** : $
{[Link]('@', '@ ')}`,
username: roomName,
}),
headers: {
'Content-Type': 'application/json',
},
}).then((res) => res);
}
if (msgArray[0][0] == '!') {
let command = getCommand(msgArray[0].slice(1).toLowerCase());
if (command != false && commands[command].roles <= getRole(player))
commands[command].function(player, message);
else
[Link](
`El comando que intentó ingresar no existe para usted, Ingrese
'!Ayuda' para obtener los comandos disponibles para usted.`,
[Link],
errorColor,
'bold',
[Link]
);
return false;
}
if (msgArray[0].toLowerCase() == 't') {
teamChat(player, message);
return false;
}
if (msgArray[0].substring(0, 2) === '@@') {
playerChat(player, message);
return false;
}
if (chooseMode && [Link] * [Link] != 0) {
var choosingMessageCheck = chooseModeFunction(player, message);
if (choosingMessageCheck) return false;
}
if (slowMode > 0) {
var filter = slowModeFunction(player, message);
if (filter) return false;
}
if (![Link] && [Link](authArray[[Link]][0]) != null)
{
[Link](
`Tu estas Silenciado !`,
[Link],
errorColor,
'bold',
[Link]
);
return false;
}
};
[Link] = function (player) {
if (gameState !== [Link]) {
let pComp = getPlayerComp(player);
if (pComp != null) [Link] = 0;
}
};

[Link] = function (player) {


if (playSituation != [Link]) {
var ballPosition = [Link]();
if ([Link] == 0 || [Link] !=
[Link][[Link] - 1].[Link]) {
if (playSituation == [Link]) playSituation =
[Link];
lastTeamTouched = [Link];
[Link](
new BallTouch(
player,
[Link],
getGoalGame(),
ballPosition
)
);
lastTouches[0] = checkGoalKickTouch(
[Link],
[Link] - 1,
getGoalGame()
);
lastTouches[1] = checkGoalKickTouch(
[Link],
[Link] - 2,
getGoalGame()
);
}
}
};

/* llamar admin */

// Función para llamar a un administrador


function llamarAdmin(player) {
// Obtener la URL del webhook de Discord
var webhookUrl = llamaradminWebhook;

// Crear un objeto de mensaje de Discord


var message = {
content: "<@&1168273488956637234>",
embeds: [
{
title: "¡Se Ha Llamado A Un Administrador!",
description: "El jugador " + [Link] + " Ha llamado a un
administrador\n En la sala " + roomName,
color: 0xFF0000,
fields: [
{
name: "Jugador",
value: [Link],
inline: true
}
]
}
]
};

// Enviar el mensaje al webhook de Discord


fetch(webhookUrl, {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: [Link](message)
});

// Enviar un mensaje de anuncio a la sala


[Link](
`${[Link]}: Haz llamado un administrador con exito!`,
[Link],
warningColor,
'bold',
[Link]
);
[Link](
`\n En caso de que no venga entra a nuestro discord \n Usa !discord para
obtener nuestro discord`,
[Link],
moradoColor,
'bold',
[Link]
);
}

/* Anuncios */

var announcements = [
'Recuerda tené buen comportamiento para no ser vetado de la sala ✅',
'Si tienes una sugerencia o encuentras un bug entra a nuestro \n Discord
con !discord y repórtalo! 📩',
'No olvides entrar a nuestro discord oficial! ✅ \n Usar !discord o usa este
enlace \n [Link]
'Si hay un problema en la sala usa !llamar para llamar un admin \n El mal
uso de este te puede causar un Warn 🔴',
'Puedes ver tu estadisticas usando el comando \n !Yo, !Me, \n Puedes ver
las estadisticas globales con \n !games, !wins, !goals, !assists, !cs, !playtime',
'Las inscripciones para la Temporada 3 esta abiertas! 😎 \n
[Link]
'Si tu estadísticas se perdieron es posible que hubo una actualización \n
Por ahora no tenemos un sistema para guardar tus estadísticas 😞 \n Si deseas
ayudar como editor de código o programador entra a nuestro !Discord 😀'
];

var currentAnnouncement = 0;

setInterval(() => {
currentAnnouncement = [Link]([Link]() * [Link]);
[Link](
announcements[currentAnnouncement],
null,
anunciosColor,
'bold',
[Link]
);
}, 60000);

/* Slots privados */

// Establecer la contraseña
[Link]((player) => {
// Obtener el número actual de jugadores en la sala
const numPlayers = [Link]().length;

// Si el número de jugadores es igual a 15, establecer una contraseña


if (numPlayers === 15) {
[Link]("kveen32");

[Link](
"La sala llego a su maximo, Se coloco contraseña",
null,
anunciosColor,
"bold",
[Link]
);
}
});

// Quitar la contraseña
[Link]((player) => {
// Obtener el número actual de jugadores en la sala
const numPlayers = [Link]().length;

// Si el número de jugadores es menor que 15, quitar la contraseña


if (numPlayers < 15) {
[Link]("");

[Link](
"La contraseña ha sido quitada, la sala esta abierta a todos",
null,
anunciosColor,
"bold",
[Link]
);
}
});

/* GAME MANAGEMENT */

[Link] = function (byPlayer) {


clearTimeout(startTimeout);
if (byPlayer != null) clearTimeout(stopTimeout);
game = new Game();
possession = [0, 0];
actionZoneHalf = [0, 0];
gameState = [Link];
endGameVariable = false;
goldenGoal = false;
playSituation = [Link];
lastTouches = Array(2).fill(null);
lastTeamTouched = [Link];
teamRedStats = [];
teamBlueStats = [];
if ([Link] == teamSize && [Link] == teamSize) {
for (var i = 0; i < teamSize; i++) {
[Link](teamRed[i]);
[Link](teamBlue[i]);
}
}
calculateStadiumVariables();
};

[Link] = function (byPlayer) {


clearTimeout(stopTimeout);
clearTimeout(unpauseTimeout);
if (byPlayer != null) clearTimeout(startTimeout);
[Link] = [Link]();
if (
!cancelGameVariable && [Link][0].length +
[Link][1].length > 0 &&
(
([Link] != 0 &&
(([Link] >= 0.5 * [Link] &&
[Link] < 0.75 * [Link] &&
[Link] != [Link]) ||
[Link] >= 0.75 * [Link])
) ||
endGameVariable
)
) {
fetchSummaryEmbed(game);
if (fetchRecordingVariable) {
setTimeout((gameEnd) => { fetchRecording(gameEnd); }, 500, game);
}
}
cancelGameVariable = false;
gameState = [Link];
playSituation = [Link];
updateTeams();
handlePlayersStop(byPlayer);
handleActivityStop();
};

[Link] = function (byPlayer) {


if (mentionPlayersUnpause && gameState == [Link]) {
if (byPlayer != null) {
[Link](
`Juego pausado por: ${[Link]} !`,
null,
defaultColor,
'bold',
[Link]
);
} else {
[Link](
`Juego pausado !`,
null,
defaultColor,
'bold',
[Link]
);
}
}
clearTimeout(unpauseTimeout);
gameState = [Link];
};

[Link] = function (byPlayer) {


unpauseTimeout = setTimeout(() => {
gameState = [Link];
}, 2000);
if (mentionPlayersUnpause) {
if (byPlayer != null) {
[Link](
`La pausa fue quitada por: ${[Link]} !`,
null,
defaultColor,
'bold',
[Link]
);
} else {
[Link](
`Se quieto la pausa!`,
null,
defaultColor,
'bold',
[Link]
);
}
}
if (
([Link] == teamSize && [Link] == teamSize && chooseMode)
||
([Link] == [Link] && [Link] < 2 && chooseMode)
) {
deactivateChooseMode();
}
};

[Link] = function (team) {


const scores = [Link]();
[Link] = scores;
playSituation = [Link];
ballSpeed = getBallSpeed();
var goalString = getGoalString(team);
for (let player of teamRed) {
var playerComp = getPlayerComp(player);
team == [Link] ? [Link]++ :
[Link]++;
}
for (let player of teamBlue) {
var playerComp = getPlayerComp(player);
team == [Link] ? [Link]++ :
[Link]++;
}
[Link](
goalString,
null,
team == [Link] ? redColor : blueColor,
null,
[Link]
);
if (roomWebhook != '') {
fetch(roomWebhook, {
method: 'POST',
body: [Link]({
content: `[${getDate()}] ${goalString}`,
username: roomName,
}),
headers: {
'Content-Type': 'application/json',
},
}).then((res) => res);
}
if (([Link] != 0 && ([Link] == [Link] || [Link]
== [Link])) || goldenGoal) {
endGame(team);
goldenGoal = false;
stopTimeout = setTimeout(() => {
[Link]();
}, 1000);
}
};

[Link] = function () {
lastTouches = Array(2).fill(null);
lastTeamTouched = [Link];
playSituation = [Link];
};

/* MISCELLANEOUS */

[Link] = function (url) {


[Link](`${url}\nClave de dueño : ${masterPassword}`);
if (roomWebhook != '') {
fetch(roomWebhook, {
method: 'POST',
body: [Link]({
content: `[${getDate()}] 🔗 LINK ${url}\nClave de dueño : $
{masterPassword}`,
username: roomName,
}),
headers: {
'Content-Type': 'application/json',
},
}).then((res) => res);
}
};

[Link] = function (changedPlayer, byPlayer) {


updateTeams();
if (![Link] && getRole(changedPlayer) >= Role.ADMIN_TEMP) {
[Link]([Link], true);
return;
}
updateAdmins(byPlayer != null && ![Link] && [Link] ==
[Link] ? [Link] : 0);
};

[Link] = function (min, rate, burst, byPlayer) {


if (byPlayer != null) {
[Link](
`No está permitido cambiar el límite de kickrate. Debe permanecer en
"6-0-0".`,
[Link],
errorColor,
'bold',
[Link]
);
[Link](6, 0, 0);
}
};

[Link] = function (newStadiumName, byPlayer) {


if (byPlayer !== null) {
if (getRole(byPlayer) < [Link] && currentStadium != 'other') {
[Link](
`¡No puedes cambiar el estadio manualmente! Utilice los comandos
del estadio..`,
[Link],
errorColor,
'bold',
[Link]
);
stadiumCommand(emptyPlayer, `!${currentStadium}`);
} else {
[Link](
`Mapa cambiado. Una vez que haya terminado con este mapa, utilice
los comandos del estadio.`,
[Link],
infoColor,
'bold',
[Link]
);
currentStadium = 'other';
}
}
checkStadiumVariable = true;
};

[Link] = function () {
checkTime();
getLastTouchOfTheBall();
getGameStats();
handleActivity();
}

You might also like