· last year · Dec 12, 2023, 01:40 AM
1const USER_DATABASE = "USER_DATABASE";
2
3let
4roomNameString = "🌌 APOLLO | Futsal x3 🔵"
5 room = HBInit({
6 roomName: roomNameString, // nome da sua hospedagem
7 maxPlayers: 30, // quantidade de players que essa sala pode suportar, maximo 30
8 public: true, // true para sala publica, false para sala privada.
9 playerName: "[🎮]",
10 geo : { code : "KP", lat : -19.81, lon : -43.95}, // localização da hospedagem
11 noPlayer: false// false para host com bot, true para host sem bot
12})
13
14let
15prefixString = "!",
16bansURL = 'https://discord.com/api/webhooks/1174434045321551932/0RYZWYoCeib7_bG5i2zBaQh-7-FXmPP2TmfcBQV6x0NTpnp2LoUH2uTwtE1B4jZ_lAnq',
17JogadoresBanidosObject = {};
18
19let Request = {
20 post: (player, content)=>{
21 let params = {
22 "username": `${player.name} aplicou um banimento`,
23 "avatar_url": "https://media.discordapp.net/attachments/1114717413754273813/1174436793303711764/aa7532a690a084e42db5c3a9c42343ff.png?ex=6567967f&is=6555217f&hm=4095b3f87e888e6152aeadffc048b62b056c8ecaf54e995bfefb2404b5fb46d0&=",
24 "content": content,
25 "url": "https://discord.com/api/webhooks/1174434045321551932/0RYZWYoCeib7_bG5i2zBaQh-7-FXmPP2TmfcBQV6x0NTpnp2LoUH2uTwtE1B4jZ_lAnq",
26 };
27
28 fetch(bansURL, {
29 method: "POST",
30 headers: new Headers({ "Content-Type": "application/json" }),
31 body: JSON.stringify(params)
32 })
33 }
34};
35
36let Comandos = {
37 ban: (player, tempo, conn, motivo)=>{
38 let aliasTempoArray = ["s", "m", "h", "d"];
39
40 if (!parseInt(tempo[0])) room.sendAnnouncement(`${tempo} não é um número inteiro.`, player.id);
41 else {
42 if (tempo.toString().length < 2) room.sendAnnouncement(`Você precisa colocar o tempo. ex: 3m`, player.id);
43 else {
44 if (!aliasTempoArray.includes(tempo[1])) room.sendAnnouncement("Você não colocou se vai ser minuto ou horas. ex: 5h", player.id);
45 else {
46 if (conn == undefined) room.sendAnnouncement("Você não digitou o conn.", player.id);
47 else {
48 if (JogadoresBanidosObject[conn]) room.sendAnnouncement(`[${conn}] já foi banido`, player.id);
49 else {
50 if (motivo == undefined) room.sendAnnouncement("Motivo não definido", player.id);
51 else {
52 let motivoSemBarra = motivo.split("_").join(" ");
53 conn[player.name] = player.name;
54 JogadoresBanidosObject[conn] = { tempo: tempo, motivo: motivoSemBarra, autor: player.name, name: player.conn};
55 Request.post(player, `[${conn}]\nsala: ${roomName}\ntempo: ${tempo[0]} ${tempo[1] == "s" ? "segundos" : tempo[1] == "m" ? "minutos" : tempo[1] == "h" ? "horas" : tempo[1] == "d" ? "dias" : "Tempo não detectado."}\nMOTIVO: ${motivoSemBarra}`);
56
57 room.sendAnnouncement(`[${conn}] foi banido por ${tempo[0]} ${aliasTempoArray[0] ? "segundos" : aliasTempoArray[1] ? "minutos" : aliasTempoArray[2] ? "horas" : aliasTempoArray[3] ? "dias" : "aliasTempoArray não tem esse tempo"}`, player.id);
58
59 setTimeout(()=>{
60 delete JogadoresBanidosObject[conn];
61 }, tempo[1] == "s" ? 1000*tempo[0] : tempo[1] == "m" ? 1000*60*tempo[0] : tempo[1] == "h" ? 1000*60*60*tempo[0] : tempo[1] == "d" ? 1000*60*60*24*tempo[0] : null)
62 }
63 }
64 }
65 }
66 }
67 }
68 },
69 infoban: (player, conn)=>{
70 if (conn == undefined) room.sendAnnouncement("Você não digitou o conn.", player.id);
71 else {
72 if (!JogadoresBanidosObject[conn]) room.sendAnnouncement(`[${conn}] não foi banido.`, player.id);
73 else room.sendAnnouncement(`CONN: ${conn}\nAUTOR: ${JogadoresBanidosObject[conn].autor}\nTEMPO: ${JogadoresBanidosObject[conn].tempo}`, player.id);
74 }
75 }
76};
77
78
79const playerRadius = 15;
80var ballRadius = 6.35;
81const triggerDistance = playerRadius + ballRadius + 0.01;
82
83var afkLimit = 16; // cronometro de limite de AFK
84var drawTimeLimit = 3; // tempo de empate, escolha um número para definir quanto tempo de limite para o jogo ser empatado, deixe Infinity para não ocorrer empates.
85var maxTeamSize = 3;
86var slowMode = 0;
87
88const Team = { SPECTATORS: 0, RED: 1, BLUE: 2 };
89const team = { SPEC: 0, RED: 1, BLUE: 2 };
90var extendedP = [];
91const eP = { ID: 0, AUTH: 1, CONN: 2, AFK: 3, ACT: 4, GK: 5, MUTE: 6 };
92const Ss = { GA: 0, WI: 1, DR: 2, LS: 3, WR: 4, GL: 5, AS: 6, GK: 7, CS: 8, CP: 9, RL: 10, NK: 11 }
93
94var ModoChatPausado = [];
95
96var players;
97var teamR;
98var teamB;
99var teamS;
100var lastTeamTouched;
101var lastPlayersTouched;
102var countAFK = false;
103var activePlay = false;
104var goldenGoal = false;
105var SMSet = new Set()
106var banList = []
107var game;
108var GKList = ["", ""];
109var Rposs = 0;
110var Bposs = 0;
111var point = [{ "x": 0, "y": 0 }, { "x": 0, "y": 0 }];
112var ballSpeed;
113var lastWinner = Team.SPECTATORS;
114var streak = 0;
115var allBlues = [];
116var allReds = [];
117var inChooseMode = false;
118var redCaptainChoice = "";
119var blueCaptainChoice = "";
120var chooseTime = 20;
121var timeOutCap;
122var checkTimeVariable = false;
123var statNumber = 0;
124var endGameVariable = false;
125var resettingTeams = false;
126var capLeft = false;
127var statInterval = 6;
128
129var bloquear_comando = []
130var block_comando = [];
131var limit = 30;
132
133let registros = new Map()
134var checkregister = []
135var checkchat = []
136var logins = []
137
138var L1 = ['']
139var L2 = ['']
140var L3 = ['']
141var L4 = ['']
142var L5 = ['']
143var L6 = ['']
144var L7 = ['']
145var L8 = [""]
146var L9 = [""]
147var L10 = [""]
148var L11 = [""]
149var L12 = [""]
150var L13 = [""]
151var L14 = [""]
152var L15 = [""]
153
154const entradapersonalizadabras = "O vip premium entrou na sala"
155var Bras = ["Astral", "isq.cxt"];
156
157const entradapersonalizadafominha = "O brabo fominha entrou pra arregaçar."
158var fominha = ["Ribagol"];
159
160const entradapersonalizadazum = "O Trovão faz zuuum e entra na sala ⚡"
161var zum = [""];
162
163const entradapersonalizadazx = "chegou pra amassar geral"
164var zx = ["PnZ", "Indio", "Fdezinn"];
165
166const entradapersonalizadawaxie = "Todos se ajoelhem diante dele! o Lord Chegou"
167var waxie= ["Indio", "PnZ", "Fdezinn"];
168
169const puskasoutubro = ""
170
171const cL1 = []
172const fL1 = []
173const cL2 = []
174const fL2 = []
175const cL3 = []
176const fL3 = []
177const cL4 = []
178const fL4 = []
179const cL5 = []
180const fL5 = []
181const cL6 = []
182const fL6 = []
183const cL7 = []
184const fL7 = []
185const cL8 = []
186const fL8 = []
187const cL9 = []
188const fL9 = []
189const cL10 = []
190const fL10 = []
191const cL11 = []
192const fL11 = []
193const cL12 = []
194const fL12 = []
195const cL13 = []
196const fL13 = []
197const cL14 = []
198const fL14 = []
199const cL15 = []
200const fL15 = []
201
202const premium = ["Fdezinn", "Indio", "astral", "isq.cxt"]; //MVP+
203const supremo = ["Fdezinn", "Indio"]; // MVP++
204const booster =["Fdezinn", "Indio"];
205const vips = ["Indio",
206"Fdezinn",
207"astral",
208"isq.cxt",
209"",
210""];
211
212const semlimiteafk = ["",
213"Fdezinn",
214"Indio",
215"astral",
216"isq.cxt",
217"Patola|🦆",
218"/Lokis",
219"",
220"",
221"",
222"",
223"",
224"",
225""];
226
227var jogadoresvips =
228[["Fdezinn", "179.127.249.86"],
229["Indio", "189.4.101.28"],
230["astral", "189.100.69.21"],
231["isq.cxt", "191.191.29.54"],
232["", ""],
233["", ""],
234["", ""],
235["", ""]
236];
237
238const verificados = [
239'',
240"Fdezinn",
241"Indio",
242"/Lokis",
243"astral",
244"isq.cxt",
245"zero"];
246
247const fundador = [
248"Fdezinn",
249"Indio",
250""];
251
252const staff = [
253"Fdezinn",
254"Indio",
255"Patola|🦆",
256"/Lokis",
257"zero",
258"xissㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ",
259"lx!",
260"",
261""];
262
263const adminF = ["Fdezinn", "Indio", "Patola|🦆"]
264
265const adminG = [
266"/Lokis",
267"astral",
268"",
269"",
270""];
271
272const adminM = ["zero", "xissㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ", "lx!"];
273
274const adminE= [""];
275
276var administradores =
277[["Fdezinn", "179.127.249.86"],
278["Indio", "189.4.101.28"],
279["/Lokis", "170.233.32.154"],
280["zero", "170.82.181.39"],
281["xissㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ", "187.13.8.7"],
282["Patola|🦆", "170.150.74.253"],
283["lx!", "179.109.50.209"],
284["", ""]
285];
286var WebHookURL = "https://discord.com/api/webhooks/1174434530917109780/v6x18zmV9uJvMqQrHfJlREJJpfcGf_udtZz69hBhgwNEp--KwdORWKZ00bIUJ2qHQ9Jk"
287var report = 'https://discord.com/api/webhooks/1174434530917109780/v6x18zmV9uJvMqQrHfJlREJJpfcGf_udtZz69hBhgwNEp--KwdORWKZ00bIUJ2qHQ9Jk';
288var tempoMensagem = 1000;
289
290var conns = []
291var playerConn = []
292var tempoDePause = 1000*15; // 5 segundos de pause.
293var pausePlayers = []; // Os players que digitarem o comando "!p" terão seus Ids puxados para um array "pausePlayers".
294var pauseGame = true; // Pause = true | unPause = false.
295var partida = true; // Partida não iniciada = true | Partida iniciada = false.
296
297var blacklist = [
298 {Nick:"Alvaro⁷⁷⁷ #má fase", ipv4: "200.97.250.154", Auth: "KfXj8OMEmCCfHTErhG026V_hq14yLwbpQXaKHAdlb2I", Conn: "3230302E39372E3235302E313534"},
299 {Nick:"", ipv4: "185.54.230.213", Auth: "dA3PhXBNAm3oHi_A9NgHVgreijAlchJnc1GWeVWBaYY", Conn: "3138352E35342E3233302E323133"},
300 {Nick:"Soukxzy", ipv4: "187.183.47.42", Auth: "KXx-4JWea09iTJSzN50DLlPvi1Ctah209_JwMd-nDSM", Conn: "3138372E3138332E34372E3432"},
301 {Nick:"Mao", ipv4: "187.16.187.125", Auth: "k2tfQ897zpXxTPyx2OnzzZrpB0rHiKLJjXtCRNJ1SPY", Conn: "3138372E31362E3138372E313235"}];
302
303let votekickTimes = {}; //This holds the amount of votes which the players used.
304let votekickCount = {}; //This holds the amount of votes which were done against each of the players.
305let linkhaxcolors = 'https://htmlcolorcodes.com/';
306let erro = 'Você não tem permissão para executar esse comando.';
307let cor_definida = 'você escolheu a cor ';
308let fonte_definida = 'você escolheu a fonte ';
309let erroapi = 'essa não e uma fonte fornecida pela API, aqui está a lista de todas possiveis \n';
310let replaystest = `https://discord.com/api/webhooks/1169778630587584593/0xEmL789p0nmXAkUxOd3PqwGOpOYC-mu6zdF_sqP2n35Yj4GEQLYUgg6A9zRemUB1Qvq`;
311
312let
313palavras = [
314"VADIA", "vadia", "sua vadia", "SUA VADIA", "SUA PROSTITUTA", "sua prostituta",
315"VAGABUNDA", "vagabunda","sua vagabunda", "SUA VAGABUNDA",
316"filho da puta",
317"FILHO DA PUTA",
318"pnc",
319"pau no cu",
320"seu lixo",
321"SEU LIXO",
322"PNC",
323"PAU NO CU",
324"desgraça",
325"DESGRAÇA",
326"sua vagabunda", "SUA VAGABUNDA", "seu vagabundo", "SEU VAGABUNDO",
327"Se mata", "SE MATA", "se mata", "seu desgraçado", "sua desgraçada", "SEU DESGRAÇADO", "SUA DESGRAÇADA",
328"se suicida", "SE SUICIDA"
329],
330regex = new RegExp(palavras.join("|"), 'gi');
331
332let
333linkmsg = [
334"https://",
335"http://",
336"http://www"],
337link = new RegExp(linkmsg.join("|"), 'gi');
338
339let
340travasmsg = ["ఌ佹砕Ĉ⼈渻䬭॑⬺爂᰾ᜪ䉧ᬯ㍸ᘬ慩㙲Ԑ瀩ञࠣ笋℉⨄㐷紪権ਛൽ㔙怅㬆癕⨴琐ḉ≼崪", "ᙻḻ⨂㈿爇䕦ᴵ灾㸏眮ቡᄸ܍礂海學㰌⬦ ѫ⼕ย⌑ḷ㠕ፃ㤕㌋␢眢砬ⵯ煾Ⱘ縂㉰匊㤀ह稫ᝈⴾㄫ㤒", "䉊", "؈ି", "㔞帱ॹࠚⰯἯ浸ἱᔞ፭ਮ娮ف㤮〕", "㱳⬗ᅷд甇ᜯ⩿ᤶⱁ戃 椏缁⼐獾⌱മ㈐ᵲ桨ԷᴑĿᑆ㨤ఴ⑸甈⨘Ѳ∯㘴䁔ح،ฌ瘪"],
341travas = new RegExp(travasmsg.join("|"), 'gi');
342
343let
344travamsg = ["㧫璧�觭䢜潇ကᩨ쀡ఈ泄찉넾㏭�緺", "▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓", "㧫", "璧", "懈౩䊀脁潡䣚⾤㸼짠ब", "뗲᭾�띀急蔹⹉ꆣせㆉ였鷀Ú錘陈搳窇㉕"],
345trava = new RegExp(travamsg.join("|"), 'gi');
346
347let
348sistmsg = ["꧁꧂꧃꧄�꧅ꦸꦹꦺꩵꩶ꩷꩸꩹ꩺ▓▒░▄█▀─█▀██▄█▀█▀█▬쵃쵄쵅쵆쵇쵈쵉쵊쵋쵌쵍쵎쵏�쵐쵑쵒�襤拉", "臘", "蠟", "廊", "朗", "䱡䱢䱣䱤䱥䱦䱧䱨▉▇█▂▃▄▂▃"];
349
350sist = new RegExp(sistmsg.join("|"), 'gi');
351
352let
353antitrmsg = ["홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수", "홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수홍수", "홍수홍수홍수홍수홍수홍수홍수홍", "수", "홍", "수", "홍", "수", "홍수홍수홍수홍수홍", "수홍수홍수홍수홍수홍수홍수홍수홍수"];
354antitr = new RegExp(antitrmsg.join("|"), 'gi');
355
356let
357antitramsg = ["㧫璧�觭䢜潇ကᩨ쀡ఈ泄찉넾saw㏭�緺�堲昸⸐낧懈౩䊀脁潡䣚⾤㸼짠ब꺅�ﹴﯰ﹟ﵿ", "빏雴㰯첇브쾞�읨⎘堌�̃㭎掌�䑂吺쏘뗲᭾�띀急蔹♤⹉ꆣせㆉ였鷀ú錘陈搳窇㉕ꙕ鄲欙莚쁃◑첶㘥䅺", "ǫ", "呡", "讬", "ꯩ", "䌻⨣�馫㷈搊ꌈ恘㠄陌颓̌谆", "鞿å 䆔⽪ﭓ櫆陗썆㾑쾛炦͝薐�翺祋ۓ"];
358antitra = new RegExp(antitramsg.join("|"), 'gi');
359
360let
361antitravamsg = [" ▁▂▃▄▅▆▇█▉㑈㑉㑊㑋㑌㑍㑎㑏㑐㑑㑒㑓㑔㑕㑖㑗", "㑘㑙㑚㑛㑜㑝㑞㑟㑠㑢㑣㑤㑥㑦㑧㑨㑩㑪㑫㑬㑭㑮㑯㑰㑱㑲㑳㑴㑵㑶㑷㑸㑹㑺㑻㑼㑽㑾㒀㒁", "꧁꧂꧃꧄�꧅ꦸꦹꦺꦻꩵꩶ꩷꩸꩹ꩺ", "▓▒░", "▄█▀", "─█▀██", "▄█▀█▀█▬", "쵃쵄쵅쵆쵇쵈쵉쵊쵋쵌쵍쵎쵏�쵐쵑쵒�", "襤拉臘蠟廊朗䱡䱢䱣䱤䱥䱦䱧䱨▉▇█▂▃▄▂▃"];
362antitrava = new RegExp(antitravamsg.join("|"), 'gi');
363
364let
365racmsg = [
366 "sua macaca",
367 "sua negra",
368 "sua preta",
369 "SUA PRETA",
370 "SUA NEGRA",
371 "SUA MACACA",
372 "seu macaco",
373 "seu negro",
374 "seu preto",
375 "SEU PRETO",
376 "SEU NEGRO",
377 "SEU MACACO",
378 "voce é macaco",
379 "voce é preto",
380 "voce é negro",
381 "VOCE É MACACO",
382 "VOCE É PRETO",
383 "VOCE É NEGRO",
384 "voce e macaco",
385 "voce e preto",
386 "voce e negro",
387 "VOCE e MACACO",
388 "VOCE e PRETO",
389 "VOCE e NEGRO",
390 "preto macaco",
391 "macaco preto",
392 "seu macaco preto",
393 "seu preto macaco",
394 "seu negro macaco preto",
395 "seu macaco preto negro",
396 "seu preto negro macaco",
397 "SEU NEGRO MACACO PRETO",
398 "SEU MACACO PRETO NEGRO",
399 "SEU PRETO NEGRO MACACO",
400 "seu marrom",
401 "SEU MARROM",
402 "sua marrom",
403 "SUA MARROM",
404 "seu macaquinho",
405 "SEU MACAQUINHO",
406 "sua macaquinha",
407 "SUA MACAQUINHA"];
408racismo = new RegExp(racmsg.join("|"), 'gi');
409
410function autobans(message) {
411
412 var request = new XMLHttpRequest();
413 request.open("POST","https://discord.com/api/webhooks/1174434045321551932/0RYZWYoCeib7_bG5i2zBaQh-7-FXmPP2TmfcBQV6x0NTpnp2LoUH2uTwtE1B4jZ_lAnq");
414
415 request.setRequestHeader('Content-type', 'application/json');
416
417 var params = {
418 embeds: [
419 {
420 fields: [],
421 title: "Banimento auto aplicado",
422 color: 16777215,
423 footer: {
424 text: "© APOLLO 2023 all reseverd."
425 },
426 author: { "name": roomNameString },
427 image: {
428 url: "https://media.discordapp.net/attachments/1114717413754273813/1174436793303711764/aa7532a690a084e42db5c3a9c42343ff.png?ex=6567967f&is=6555217f&hm=4095b3f87e888e6152aeadffc048b62b056c8ecaf54e995bfefb2404b5fb46d0&="
429 },
430 thumbnail: {
431 url: "https://media.discordapp.net/attachments/1114717413754273813/1174450725993062511/OIG.png?ex=6567a379&is=65552e79&hm=9d35f0c6273adfbd7bc3b20647a134bf1ec52ab03c6206c6b0866e3aeb846397&=&width=425&height=425"
432 }
433 }
434 ],
435 avatar_url: 'https://media.discordapp.net/attachments/1114717413754273813/1174436793303711764/aa7532a690a084e42db5c3a9c42343ff.png?ex=6567967f&is=6555217f&hm=4095b3f87e888e6152aeadffc048b62b056c8ecaf54e995bfefb2404b5fb46d0&=',
436 username: 'APOLLO',
437 content: message
438 };
439
440 request.send(JSON.stringify(params));
441}
442
443let Cor = {
444 Vermelho: 0xFA5646,
445 Laranja: 0xFFC12F,
446 Verde: 0x7DFA89,
447 Azul: 0x05C5FF,
448 Amrelo: 0xFFFF17,
449 Cinza: 0xCCCCCC,
450 Branco: 0xFFFFFF,
451 Azulclaro: 0x6ECAFF,
452 Powderblue: 0xB0E0E6,
453 Roxo: 0x800080,
454 Platina: 0xE5E4E2,
455 Ouro: 0xffd700,
456 Prata: 0xd5d5d5,
457 Bronze: 0x896728,
458 Thistle: 0xD8BFD8,
459 Khaki: 0xF0E68C,
460 AliceBlue: 0xF0F8FF,
461 GhostWhite: 0xF8F8FF,
462 Snow: 0xFFFAFA,
463 Seashell:0xFFF5EE,
464 FloralWhite: 0xFFFAF0,
465 WhiteSmoke: 0xF5F5F5,
466 Beige: 0xF5F5DC,
467 OldLace: 0xFDF5E6,
468 Ivory: 0xFFFFF0,
469 Linen: 0xFAF0E6,
470 Cornsilk: 0xFFF8DC,
471 AntiqueWhite: 0xFAEBD7,
472 BlanchedAlmond: 0xFFEBCD,
473 Bisque: 0xFFE4C4,
474 LightYellow: 0xFFFFE0,
475 LemonChiffon: 0xFFFACD,
476 LightGoldenrodYellow: 0xFAFAD2,
477 PapayaWhip: 0xFFEFD5,
478 PeachPuff: 0xFFDAB9,
479 Moccasin: 0xFFE4B5,
480 PaleGoldenrod: 0xEEE8AA,
481 Azulescuro: 0x426AD6
482 }
483
484 var spamArray = [0, 0, 0, 0, 0, 0]
485 var mutado = []
486
487 var info = {
488 amarelo: 0xFFFF17,
489 vermelho: 0xFA5646,
490 negrito: 'bold',
491 desmutar: 240000,
492 }
493
494 function detectarspam(player, message) {
495 spamArray.push(player.id)
496
497 if (mutado.includes(player.name) == false && spamArray[spamArray.length - 1] === player.id && spamArray[spamArray.length - 2] === player.id) {
498 setTimeout(_ => { if (spamArray[spamArray.length - 2] === player.id){ player.id = spamArray[spamArray.length = 0]; }}, info.desmutar - 230000) }
499
500 if (mutado.includes(player.name) == false && spamArray[spamArray.length - 1] === player.id && spamArray[spamArray.length - 2] === player.id && spamArray[spamArray.length - 3] === player.id) {
501 setTimeout(_ => { if (spamArray[spamArray.length - 3] === player.id){ player.id = spamArray[spamArray.length = 0]; }}, info.desmutar - 230000) }
502
503 if (mutado.includes(player.name) == false && spamArray[spamArray.length - 1] === player.id && spamArray[spamArray.length - 2] === player.id && spamArray[spamArray.length - 3] === player.id && spamArray[spamArray.length - 4] === player.id) {
504 setTimeout(_ => { if (spamArray[spamArray.length - 4] === player.id){ player.id = spamArray[spamArray.length = 0]; }}, info.desmutar - 230000) }
505
506 if (mutado.includes(player.name) == false && spamArray[spamArray.length - 1] === player.id && spamArray[spamArray.length - 2] === player.id && spamArray[spamArray.length - 3] === player.id && spamArray[spamArray.length - 4] === player.id && spamArray[spamArray.length - 5] === player.id) {
507 room.sendAnnouncement("[PV] Você pode ser punido por fazer 'SPAM', escreva devagar!", player.id, info.vermelho, info.negrito)
508 setTimeout(_ => { if (spamArray[spamArray.length - 5] === player.id){ player.id = spamArray[spamArray.length = 0]; }}, info.desmutar - 230000) }
509
510 if (mutado.includes(player.name) == false && spamArray[spamArray.length - 1] === player.id && spamArray[spamArray.length - 2] === player.id && spamArray[spamArray.length - 3] === player.id && spamArray[spamArray.length - 4] === player.id && spamArray[spamArray.length - 5] === player.id && spamArray[spamArray.length - 6] === player.id) {
511 room.sendAnnouncement(player.name + "🚫 foi mutado por fazer spam 🚫 ", null, info.amarelo, info.negrito)
512 mutado.push(player.name)
513
514 setTimeout(() => {
515 var remover = mutado.indexOf(player.name) + mutado.splice(remover, 1)
516 room.sendAnnouncement('[PV] você foi desmutado, chat liberado.', player.id, info.amarelo, info.negrito)
517 }, info.desmutar) // temporizador
518
519 }
520 }
521
522let RecSistem = {
523 getCustomDate: ()=>{
524 let
525 data = new Date().toLocaleDateString().split("/").join("-"),
526 relogio = new Date().toLocaleTimeString().split(":");
527
528 return `${data}-${relogio[0]}h${relogio[1]}m`;
529 },
530 getScoresTime: time=>{
531 return ~~(Math.trunc(time) / 60) + ":" + (Math.trunc(time)%60).toString().padStart(2, '0');
532 },
533 sendDiscordWebhook: scores=>{
534 let
535 red = room.getPlayerList().filter((player)=>player.team == 1).map((player)=> player.name),
536 blue = room.getPlayerList().filter((player)=>player.team == 2).map((player)=> player.name);
537
538 let form = new FormData();
539 form.append(null, new File( [room.stopRecording()], `${getDate()}`+`${cod}${cod1}${cod2}${cod3}${cod4}.hbr2`, {"type": "text/plain"} ));
540 form.append("payload_json", JSON.stringify(RecSistem.getParams(scores, red, blue)));
541
542 let xhr = new XMLHttpRequest();
543 xhr.open("POST", replaystest);
544 xhr.send(form);
545 },
546 getParams: (scores, red, blue)=>{
547 let params = {
548 "username": "APOLLO REPLAYS",
549 "avatar_url": "https://media.discordapp.net/attachments/1114717413754273813/1174436793303711764/aa7532a690a084e42db5c3a9c42343ff.png?ex=6567967f&is=6555217f&hm=4095b3f87e888e6152aeadffc048b62b056c8ecaf54e995bfefb2404b5fb46d0&=",
550 "content": "----------------------------------------------------------------------------------",
551 "embeds": [{
552 "title": "-------- APOLLO --------",
553 color: 16777215,
554 "description": "REPLAY - 2023",
555 "timestamp": null,
556 "author": { "name": roomNameString },
557 image: {
558 url: "https://media.discordapp.net/attachments/1114717413754273813/1174436793303711764/aa7532a690a084e42db5c3a9c42343ff.png?ex=6567967f&is=6555217f&hm=4095b3f87e888e6152aeadffc048b62b056c8ecaf54e995bfefb2404b5fb46d0&="
559 },
560 thumbnail: {
561 url: "https://media.discordapp.net/attachments/1114717413754273813/1174450725993062511/OIG.png?ex=6567a379&is=65552e79&hm=9d35f0c6273adfbd7bc3b20647a134bf1ec52ab03c6206c6b0866e3aeb846397&=&width=425&height=425"
562 },
563 "footer": {
564 "text": `${getDate()}`+`${cod}${cod1}${cod2}${cod3}${cod4}`,
565 },
566 "fields": [
567 { "name": "RED", "value": `${red.join("\n")}\n**GOLS**\n${scores.red}`, "inline": true },
568 { "name": "BLUE", "value": `${blue.join("\n")}\n**GOLS**\n${scores.blue}`, "inline": true },
569 { "name": "Tempo que durou a partida", "value": RecSistem.getScoresTime(scores.time) },
570 ]
571 }],
572 "components": []
573 };
574 return params;
575}
576};
577//FIM LET'S
578
579//CONST'S
580
581const votedPlayers = new Set() //The set of players which were voted.
582const disc = 'https://discord.gg/BfwezkPMEN';
583const comandovip = 'Comando exclusivo para VIPS';
584const capitães = 'Apenas capitães do time podem escolher uniforme.';
585const capitãespausar = 'Apenas capitães do time podem pausar a partida.';
586const corsucesso = 'Cor alterada com sucesso.'
587const PnZ = [""];
588
589const resetarAvatarEm = 3;
590const fontsdisp = ["normal", "bold", "italic", "small"];
591const Negrito = 'bold';
592const Italic = 'italic';
593const Normal = 'normal';
594
595const frasesGOL = [
596" GOLAÇO DE ",
597" UM BELISSIMO GOL DE ",
598" QUE FINALIZAÇÃO SENHORES, É DE ",
599" UMA BELA FINALIZAÇÃO DE ",
600" A-DI-VI-NHA, GOLLLLLLLLLLLL DE "
601
602]; // Frases de gol
603
604 const frasesASS = [
605", GRANDE PASSE DE ",
606", PASSE MONSTRUOSO DE ",
607", QUE ASSISTENCIA FENOMENAL DE ",
608]; // Frases de assistencias
609
610 const golcontra = [
611" GOL CONTRA, QUE ISSO "]; // Frases de gol contra
612
613
614 const WINRED = [
615" RED VENCEU O BLUE MAIS UMA VEZ, POR ",
616" RED É PAI DO BLUE, VENCEU POR ",
617" GRANDE VITÓRIA DO RED, PLACAR: " ];
618
619 const WINBLUE = [
620" BLUE VENCEU O RED MAIS UMA VEZ, POR ",
621" BLUE É PAI DO RED, VENCEU POR ",
622" GRANDE VITÓRIA DO BLUE, PLACAR: " ];
623
624 const sbt = [
625 " UHHHHHHHHHHHHHHHHHHHHHH",
626 " SERÁ QUE VAI SAIR UM GOL?",
627 " HOJE VAI TER ZEBRA, PODE TER CERTEZA!!",
628 " EM PLENO 2023, OS TIMES ESTÃO MUITO RUIM"
629];
630
631const oemessagem = [
632 ' OPA, VAI PARA AONDE?!',
633 ' CREDO, QUE OEEEE FOI ESSE',
634 ' NUSSAAAAA, PASSOU LOTADOOOO',
635 ' EPAAAAA, PASSOU VOANDO AQUI EM MARTE!',
636 ' RECEBAAAA, E RECEBEU UM OE INCRIVEL',
637 ' WOWWWW, ESSE BETA LEVOU UM OE',
638 ' HAHAHAHA, O CARA PASSOU LOTADO',
639 ' SEM COMENTÁRIOS PARA ESSE OE',
640 ' F, ESSE PASSOU LOTADO NA VELOCIDADE DA LUZ',
641 " SENHORRRRRR, QUE OEEEEE FOI ESSEEEEEE!"
642];
643
644const code = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'];
645const code1 = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'];
646const code2 = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'];
647const code3 = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'];
648const code4 = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'];
649
650
651var cod = code[(Math.random() * code.length) | 0]
652var cod1 = code1[(Math.random() * code.length) | 0]
653var cod2 = code2[(Math.random() * code.length) | 0]
654var cod3 = code3[(Math.random() * code.length) | 0]
655var cod4 = code4[(Math.random() * code.length) | 0]
656
657
658const URLs = {
659 chat: "https://discord.com/api/webhooks/1174408747867701320/d_PTXcD9qu0DHOGGV1s8BHD-5QGYETdepT7TSOJBucqXTwTPjwC8ccL36FKAxth4Tvr9"
660};
661
662room.setTeamsLock(true)
663var Mapa = `{
664 "name": "APOLLO X3",
665 "width": 640,
666 "height": 290,
667 "spawnDistance": 350,
668 "bg": {
669 "type": "",
670 "width": 550,
671 "height": 240,
672 "kickOffRadius": 80,
673 "cornerRadius": 0,
674 "color": "2E2E2E"
675 },
676 "vertexes": [
677 {
678 "x": 550,
679 "y": 240,
680 "trait": "ballArea",
681 "color": "7A7A7A"
682 },
683 {
684 "x": 550,
685 "y": -240,
686 "trait": "ballArea",
687 "color": "7A7A7A"
688 },
689 {
690 "x": 0,
691 "y": 80,
692 "bCoef": 0.15,
693 "trait": "kickOffBarrier",
694 "color": "7A7A7A",
695 "vis": true,
696 "curve": 180
697 },
698 {
699 "x": 0,
700 "y": -80,
701 "bCoef": 0.15,
702 "trait": "kickOffBarrier",
703 "color": "7A7A7A",
704 "vis": true,
705 "curve": 180
706 },
707 {
708 "x": -550,
709 "y": -80,
710 "cMask": [
711 "ball"
712 ],
713 "trait": "goalNet",
714 "curve": 0,
715 "color": "000000",
716 "pos": [
717 -700,
718 -80
719 ]
720 },
721 {
722 "x": -590,
723 "y": -80,
724 "cMask": [
725 "ball"
726 ],
727 "trait": "goalNet",
728 "curve": 0,
729 "color": "000000",
730 "pos": [
731 -700,
732 -80
733 ]
734 },
735 {
736 "x": -590,
737 "y": 80,
738 "cMask": [
739 "ball"
740 ],
741 "trait": "goalNet",
742 "curve": 0,
743 "color": "000000",
744 "pos": [
745 -700,
746 80
747 ]
748 },
749 {
750 "x": -550,
751 "y": 80,
752 "cMask": [
753 "ball"
754 ],
755 "trait": "goalNet",
756 "curve": 0,
757 "color": "000000",
758 "pos": [
759 -700,
760 80
761 ]
762 },
763 {
764 "x": 550,
765 "y": -80,
766 "cMask": [
767 "ball"
768 ],
769 "trait": "goalNet",
770 "curve": 0,
771 "color": "000000",
772 "pos": [
773 700,
774 -80
775 ]
776 },
777 {
778 "x": 590,
779 "y": -80,
780 "cMask": [
781 "ball"
782 ],
783 "trait": "goalNet",
784 "curve": 0,
785 "color": "000000",
786 "pos": [
787 700,
788 -80
789 ]
790 },
791 {
792 "x": 590,
793 "y": 80,
794 "cMask": [
795 "ball"
796 ],
797 "trait": "goalNet",
798 "curve": 0,
799 "color": "000000",
800 "pos": [
801 700,
802 80
803 ]
804 },
805 {
806 "x": 550,
807 "y": 80,
808 "cMask": [
809 "ball"
810 ],
811 "trait": "goalNet",
812 "curve": 0,
813 "color": "000000",
814 "pos": [
815 700,
816 80
817 ]
818 },
819 {
820 "x": -550,
821 "y": 80,
822 "bCoef": 1.15,
823 "cMask": [
824 "ball"
825 ],
826 "trait": "ballArea",
827 "color": "7A7A7A",
828 "pos": [
829 -700,
830 80
831 ]
832 },
833 {
834 "x": -550,
835 "y": 240,
836 "bCoef": 1.15,
837 "cMask": [
838 "ball"
839 ],
840 "trait": "ballArea",
841 "color": "7A7A7A"
842 },
843 {
844 "x": -550,
845 "y": -80,
846 "bCoef": 1.15,
847 "cMask": [
848 "ball"
849 ],
850 "trait": "ballArea",
851 "color": "7A7A7A",
852 "pos": [
853 -700,
854 -80
855 ]
856 },
857 {
858 "x": -550,
859 "y": -240,
860 "bCoef": 1.15,
861 "cMask": [
862 "ball"
863 ],
864 "trait": "ballArea",
865 "color": "7A7A7A"
866 },
867 {
868 "x": -550,
869 "y": 240,
870 "bCoef": 1,
871 "cMask": [
872 "ball"
873 ],
874 "trait": "ballArea",
875 "color": "7A7A7A",
876 "curve": -0.3535876431154097,
877 "_data": {
878 "mirror": {}
879 }
880 },
881 {
882 "x": 550,
883 "y": 240,
884 "bCoef": 1,
885 "cMask": [
886 "ball"
887 ],
888 "trait": "ballArea",
889 "color": "7A7A7A",
890 "curve": -0.3535876431154097,
891 "_data": {
892 "mirror": {}
893 }
894 },
895 {
896 "x": 550,
897 "y": 80,
898 "bCoef": 1.15,
899 "cMask": [
900 "ball"
901 ],
902 "trait": "ballArea",
903 "pos": [
904 700,
905 80
906 ],
907 "color": "7A7A7A"
908 },
909 {
910 "x": 550,
911 "y": 240,
912 "bCoef": 1.15,
913 "cMask": [
914 "ball"
915 ],
916 "trait": "ballArea",
917 "color": "7A7A7A"
918 },
919 {
920 "x": 550,
921 "y": -240,
922 "bCoef": 1.15,
923 "cMask": [
924 "ball"
925 ],
926 "trait": "ballArea",
927 "color": "7A7A7A"
928 },
929 {
930 "x": 550,
931 "y": -80,
932 "bCoef": 1.15,
933 "cMask": [
934 "ball"
935 ],
936 "trait": "ballArea",
937 "color": "7A7A7A",
938 "pos": [
939 700,
940 -80
941 ]
942 },
943 {
944 "x": 550,
945 "y": -240,
946 "bCoef": 0,
947 "cMask": [
948 "ball"
949 ],
950 "trait": "ballArea",
951 "color": "7A7A7A"
952 },
953 {
954 "x": 550,
955 "y": -240,
956 "bCoef": 0,
957 "cMask": [
958 "ball"
959 ],
960 "trait": "ballArea",
961 "color": "7A7A7A"
962 },
963 {
964 "x": -550,
965 "y": -240,
966 "bCoef": 1,
967 "cMask": [
968 "ball"
969 ],
970 "trait": "ballArea",
971 "curve": 0,
972 "color": "7A7A7A"
973 },
974 {
975 "x": 550,
976 "y": -240,
977 "bCoef": 1,
978 "cMask": [
979 "ball"
980 ],
981 "trait": "ballArea",
982 "curve": 0,
983 "color": "7A7A7A"
984 },
985 {
986 "x": 0,
987 "y": -239,
988 "bCoef": 0.1,
989 "cMask": [
990 "red",
991 "blue"
992 ],
993 "cGroup": [
994 "redKO",
995 "blueKO"
996 ],
997 "trait": "kickOffBarrier",
998 "color": "2E2E2E"
999 },
1000 {
1001 "x": 0,
1002 "y": -80,
1003 "bCoef": 0.1,
1004 "cMask": [
1005 "red",
1006 "blue"
1007 ],
1008 "cGroup": [
1009 "redKO",
1010 "blueKO"
1011 ],
1012 "trait": "kickOffBarrier",
1013 "color": "7A7A7A"
1014 },
1015 {
1016 "x": 0,
1017 "y": 80,
1018 "bCoef": 0.1,
1019 "cMask": [
1020 "red",
1021 "blue"
1022 ],
1023 "cGroup": [
1024 "redKO",
1025 "blueKO"
1026 ],
1027 "trait": "kickOffBarrier",
1028 "color": "7A7A7A",
1029 "_data": {
1030 "mirror": {}
1031 }
1032 },
1033 {
1034 "x": 0,
1035 "y": 240,
1036 "bCoef": 0.1,
1037 "cMask": [
1038 "red",
1039 "blue"
1040 ],
1041 "cGroup": [
1042 "redKO",
1043 "blueKO"
1044 ],
1045 "trait": "kickOffBarrier",
1046 "color": "2E2E2E",
1047 "_data": {
1048 "mirror": {}
1049 }
1050 },
1051 {
1052 "x": 0,
1053 "y": -80,
1054 "bCoef": 0.1,
1055 "cMask": [
1056 "red",
1057 "blue"
1058 ],
1059 "trait": "kickOffBarrier",
1060 "vis": true,
1061 "color": "7A7A7A"
1062 },
1063 {
1064 "x": 0,
1065 "y": 80,
1066 "bCoef": 0.1,
1067 "cMask": [
1068 "red",
1069 "blue"
1070 ],
1071 "trait": "kickOffBarrier",
1072 "vis": true,
1073 "color": "7A7A7A"
1074 },
1075 {
1076 "x": 0,
1077 "y": 80,
1078 "trait": "kickOffBarrier",
1079 "color": "7A7A7A",
1080 "vis": true,
1081 "curve": -180
1082 },
1083 {
1084 "x": 0,
1085 "y": -80,
1086 "trait": "kickOffBarrier",
1087 "color": "7A7A7A",
1088 "vis": true,
1089 "curve": -180
1090 },
1091 {
1092 "x": 0,
1093 "y": 80,
1094 "trait": "kickOffBarrier",
1095 "color": "7A7A7A",
1096 "vis": true,
1097 "curve": 0
1098 },
1099 {
1100 "x": 0,
1101 "y": -80,
1102 "trait": "kickOffBarrier",
1103 "color": "7A7A7A",
1104 "vis": true,
1105 "curve": 0
1106 },
1107 {
1108 "x": -557.5,
1109 "y": 80,
1110 "bCoef": 1,
1111 "cMask": [
1112 "ball"
1113 ],
1114 "trait": "ballArea",
1115 "curve": 0,
1116 "vis": false,
1117 "pos": [
1118 -700,
1119 80
1120 ],
1121 "color": "7A7A7A"
1122 },
1123 {
1124 "x": -557.5,
1125 "y": 240,
1126 "bCoef": 1,
1127 "cMask": [
1128 "ball"
1129 ],
1130 "trait": "ballArea",
1131 "curve": 0,
1132 "vis": false,
1133 "color": "7A7A7A"
1134 },
1135 {
1136 "x": -557.5,
1137 "y": -240,
1138 "bCoef": 1,
1139 "cMask": [
1140 "ball"
1141 ],
1142 "trait": "ballArea",
1143 "vis": false,
1144 "curve": 0,
1145 "color": "7A7A7A"
1146 },
1147 {
1148 "x": -557.5,
1149 "y": -80,
1150 "bCoef": 1,
1151 "cMask": [
1152 "ball"
1153 ],
1154 "trait": "ballArea",
1155 "vis": false,
1156 "curve": 0,
1157 "pos": [
1158 -700,
1159 -80
1160 ],
1161 "color": "7A7A7A"
1162 },
1163 {
1164 "x": 557.5,
1165 "y": -240,
1166 "bCoef": 1,
1167 "cMask": [
1168 "ball"
1169 ],
1170 "trait": "ballArea",
1171 "vis": false,
1172 "curve": 0,
1173 "color": "7A7A7A"
1174 },
1175 {
1176 "x": 557.5,
1177 "y": -80,
1178 "bCoef": 1,
1179 "cMask": [
1180 "ball"
1181 ],
1182 "trait": "ballArea",
1183 "vis": false,
1184 "curve": 0,
1185 "pos": [
1186 700,
1187 -80
1188 ],
1189 "color": "7A7A7A"
1190 },
1191 {
1192 "x": 557.5,
1193 "y": 80,
1194 "bCoef": 1,
1195 "cMask": [
1196 "ball"
1197 ],
1198 "trait": "ballArea",
1199 "curve": 0,
1200 "vis": false,
1201 "pos": [
1202 700,
1203 80
1204 ],
1205 "color": "7A7A7A"
1206 },
1207 {
1208 "x": 557.5,
1209 "y": 240,
1210 "bCoef": 1,
1211 "cMask": [
1212 "ball"
1213 ],
1214 "trait": "ballArea",
1215 "curve": 0,
1216 "vis": false,
1217 "color": "7A7A7A"
1218 },
1219 {
1220 "x": 0,
1221 "y": -80,
1222 "bCoef": 0.1,
1223 "trait": "line",
1224 "color": "7A7A7A"
1225 },
1226 {
1227 "x": 0,
1228 "y": 80,
1229 "bCoef": 0.1,
1230 "trait": "line",
1231 "color": "7A7A7A"
1232 },
1233 {
1234 "x": -550,
1235 "y": -80,
1236 "bCoef": 0.1,
1237 "trait": "line",
1238 "color": "7A7A7A"
1239 },
1240 {
1241 "x": -550,
1242 "y": 80,
1243 "bCoef": 0.1,
1244 "trait": "line",
1245 "color": "7A7A7A"
1246 },
1247 {
1248 "x": 550,
1249 "y": -80,
1250 "bCoef": 0.1,
1251 "trait": "line",
1252 "color": "7A7A7A"
1253 },
1254 {
1255 "x": 550,
1256 "y": 80,
1257 "bCoef": 0.1,
1258 "trait": "line",
1259 "color": "7A7A7A"
1260 },
1261 {
1262 "x": -550,
1263 "y": 200,
1264 "bCoef": 0.1,
1265 "trait": "line",
1266 "color": "7A7A7A",
1267 "curve": -90
1268 },
1269 {
1270 "x": -390,
1271 "y": 70,
1272 "bCoef": 0.1,
1273 "trait": "line",
1274 "color": "7A7A7A",
1275 "curve": 0
1276 },
1277 {
1278 "x": -550,
1279 "y": 226,
1280 "bCoef": 0.1,
1281 "trait": "line",
1282 "curve": -90,
1283 "color": "7A7A7A"
1284 },
1285 {
1286 "x": -536,
1287 "y": 240,
1288 "bCoef": 0.1,
1289 "trait": "line",
1290 "curve": -90,
1291 "color": "7A7A7A"
1292 },
1293 {
1294 "x": -550,
1295 "y": -200,
1296 "bCoef": 0.1,
1297 "trait": "line",
1298 "color": "7A7A7A",
1299 "curve": 90
1300 },
1301 {
1302 "x": -390,
1303 "y": -70,
1304 "bCoef": 0.1,
1305 "trait": "line",
1306 "color": "7A7A7A",
1307 "curve": 0
1308 },
1309 {
1310 "x": -550,
1311 "y": -226,
1312 "bCoef": 0.1,
1313 "trait": "line",
1314 "curve": 90,
1315 "color": "7A7A7A"
1316 },
1317 {
1318 "x": -536,
1319 "y": -240,
1320 "bCoef": 0.1,
1321 "trait": "line",
1322 "curve": 90,
1323 "color": "7A7A7A"
1324 },
1325 {
1326 "x": 550,
1327 "y": -226,
1328 "bCoef": 0.1,
1329 "trait": "line",
1330 "curve": -90,
1331 "color": "7A7A7A"
1332 },
1333 {
1334 "x": 536,
1335 "y": -240,
1336 "bCoef": 0.1,
1337 "trait": "line",
1338 "curve": -90,
1339 "color": "7A7A7A"
1340 },
1341 {
1342 "x": 550,
1343 "y": 226,
1344 "bCoef": 0.1,
1345 "trait": "line",
1346 "curve": 90,
1347 "color": "7A7A7A"
1348 },
1349 {
1350 "x": 536,
1351 "y": 240,
1352 "bCoef": 0.1,
1353 "trait": "line",
1354 "curve": 90,
1355 "color": "7A7A7A"
1356 },
1357 {
1358 "x": 550,
1359 "y": 200,
1360 "bCoef": 0.1,
1361 "trait": "line",
1362 "color": "7A7A7A",
1363 "curve": 90
1364 },
1365 {
1366 "x": 390,
1367 "y": 70,
1368 "bCoef": 0.1,
1369 "trait": "line",
1370 "color": "7A7A7A",
1371 "curve": 90
1372 },
1373 {
1374 "x": 550,
1375 "y": -200,
1376 "bCoef": 0.1,
1377 "trait": "line",
1378 "color": "7A7A7A",
1379 "curve": -90
1380 },
1381 {
1382 "x": 390,
1383 "y": -70,
1384 "bCoef": 0.1,
1385 "trait": "line",
1386 "color": "7A7A7A",
1387 "curve": -90
1388 },
1389 {
1390 "x": 390,
1391 "y": 70,
1392 "bCoef": 0.1,
1393 "trait": "line",
1394 "color": "7A7A7A",
1395 "curve": 0
1396 },
1397 {
1398 "x": 390,
1399 "y": -70,
1400 "bCoef": 0.1,
1401 "trait": "line",
1402 "color": "7A7A7A",
1403 "curve": 0
1404 },
1405 {
1406 "x": -550.5714302062988,
1407 "y": -80.42856979370117,
1408 "bCoef": 0.1,
1409 "trait": "line",
1410 "color": "FF4040",
1411 "curve": 0
1412 },
1413 {
1414 "x": 550.5714302062988,
1415 "y": -80.42856979370117,
1416 "bCoef": 0.1,
1417 "trait": "line",
1418 "color": "4D52FF",
1419 "curve": 0
1420 },
1421 {
1422 "x": -550.5714302062988,
1423 "y": 78.42856979370117,
1424 "bCoef": 0.1,
1425 "trait": "line"
1426 },
1427 {
1428 "x": 550.5714302062988,
1429 "y": 80.42856979370117,
1430 "bCoef": 0.1,
1431 "trait": "line",
1432 "color": "4D52FF",
1433 "curve": 0
1434 },
1435 {
1436 "x": -550.5714302062988,
1437 "y": -26.428569793701172,
1438 "bCoef": 0.1,
1439 "trait": "line",
1440 "color": "FF7373",
1441 "curve": 0
1442 },
1443 {
1444 "x": 550.5714302062988,
1445 "y": -26.428569793701172,
1446 "bCoef": 0.1,
1447 "trait": "line",
1448 "color": "8293FF",
1449 "curve": 0
1450 },
1451 {
1452 "x": -550.5714302062988,
1453 "y": 22.428569793701172,
1454 "bCoef": 0.1,
1455 "trait": "line",
1456 "color": "FF7373"
1457 },
1458 {
1459 "x": 550.5714302062988,
1460 "y": 26.428569793701172,
1461 "bCoef": 0.1,
1462 "trait": "line",
1463 "color": "8293FF",
1464 "curve": 0
1465 },
1466 {
1467 "x": 0.3333320617675781,
1468 "y": -291.33333587646484,
1469 "bCoef": 0.1,
1470 "cMask": [
1471 "red",
1472 "blue"
1473 ],
1474 "cGroup": [
1475 "redKO",
1476 "blueKO"
1477 ],
1478 "trait": "kickOffBarrier"
1479 },
1480 {
1481 "x": -0.3333320617675781,
1482 "y": -291.33333587646484,
1483 "bCoef": 0.1,
1484 "cMask": [
1485 "red",
1486 "blue"
1487 ],
1488 "cGroup": [
1489 "redKO",
1490 "blueKO"
1491 ],
1492 "trait": "kickOffBarrier"
1493 },
1494 {
1495 "x": 0,
1496 "y": -285.6666717529297,
1497 "bCoef": 0.1,
1498 "cMask": [
1499 "red",
1500 "blue"
1501 ],
1502 "cGroup": [
1503 "redKO",
1504 "blueKO"
1505 ],
1506 "trait": "kickOffBarrier",
1507 "color": "2E2E2E"
1508 },
1509 {
1510 "x": -42.00960219478736,
1511 "y": 43.72427983539095,
1512 "trait": "line",
1513 "color": "7A7A7A"
1514 },
1515 {
1516 "x": -13.717421124828519,
1517 "y": -51.44032921810699,
1518 "trait": "line",
1519 "color": "7A7A7A"
1520 },
1521 {
1522 "x": 34.29355281207134,
1523 "y": 36.0082304526749,
1524 "trait": "line",
1525 "color": "7A7A7A"
1526 },
1527 {
1528 "x": 55.72702331961591,
1529 "y": -46.29629629629628,
1530 "trait": "line",
1531 "color": "7A7A7A"
1532 },
1533 {
1534 "x": 10.288065843621382,
1535 "y": -48.868312757201636,
1536 "trait": "line",
1537 "color": "7A7A7A"
1538 },
1539 {
1540 "x": 59.15637860082302,
1541 "y": 5.144032921810701,
1542 "trait": "line",
1543 "color": "7A7A7A"
1544 },
1545 {
1546 "x": -37,
1547 "y": 31,
1548 "bCoef": 0.1,
1549 "trait": "line",
1550 "color": "7A7A7A"
1551 },
1552 {
1553 "x": 10,
1554 "y": -12,
1555 "bCoef": 0.1,
1556 "trait": "line",
1557 "color": "7A7A7A"
1558 },
1559 {
1560 "x": -42,
1561 "y": 35,
1562 "bCoef": 0.1,
1563 "trait": "line",
1564 "color": "7A7A7A"
1565 },
1566 {
1567 "x": 9,
1568 "y": -7,
1569 "bCoef": 0.1,
1570 "trait": "line",
1571 "color": "7A7A7A"
1572 },
1573 {
1574 "x": -34,
1575 "y": 39,
1576 "bCoef": 0.1,
1577 "trait": "line",
1578 "color": "7A7A7A"
1579 },
1580 {
1581 "x": 10,
1582 "y": -2,
1583 "bCoef": 0.1,
1584 "trait": "line",
1585 "color": "7A7A7A"
1586 },
1587 {
1588 "x": -590,
1589 "y": -80,
1590 "cMask": [
1591 "ball"
1592 ],
1593 "trait": "goalNet",
1594 "curve": -34.30899670281414,
1595 "color": "000000",
1596 "pos": [
1597 700,
1598 -80
1599 ]
1600 },
1601 {
1602 "x": -590,
1603 "y": 80,
1604 "cMask": [
1605 "ball"
1606 ],
1607 "trait": "goalNet",
1608 "curve": -34.30899670281414,
1609 "color": "000000",
1610 "pos": [
1611 700,
1612 80
1613 ]
1614 },
1615 {
1616 "x": -99.10743556474034,
1617 "y": 285.27206212636275,
1618 "cMask": [
1619 "ball"
1620 ],
1621 "_data": {
1622 "mirror": {}
1623 }
1624 },
1625 {
1626 "x": -79.99665939203257,
1627 "y": 246.3154799281507,
1628 "cMask": [
1629 "ball"
1630 ],
1631 "_data": {
1632 "mirror": {}
1633 }
1634 },
1635 {
1636 "x": -62.35594292491769,
1637 "y": 285.27206212636275,
1638 "cMask": [
1639 "ball"
1640 ]
1641 },
1642 {
1643 "x": 23.13648964119558,
1644 "y": 242.9121670288802,
1645 "cMask": [
1646 "ball"
1647 ]
1648 },
1649 {
1650 "x": 21.66642993560268,
1651 "y": 281.8687492270922,
1652 "cMask": [
1653 "ball"
1654 ]
1655 },
1656 {
1657 "x": 40.84696866890255,
1658 "y": 281.8687492270922,
1659 "cMask": [
1660 "ball"
1661 ]
1662 },
1663 {
1664 "x": -51.414477177399945,
1665 "y": 284.86399517208076,
1666 "cMask": [
1667 "ball"
1668 ]
1669 },
1670 {
1671 "x": -50.02489671314589,
1672 "y": 246.88212914913666,
1673 "cMask": [
1674 "ball"
1675 ]
1676 },
1677 {
1678 "x": -50.87572191688402,
1679 "y": 263.0564636185021,
1680 "cMask": [
1681 "ball"
1682 ]
1683 },
1684 {
1685 "x": -50.87572191688402,
1686 "y": 247.12264066088437,
1687 "cMask": [
1688 "ball"
1689 ]
1690 },
1691 {
1692 "x": -8.557042570304588,
1693 "y": 252.01151576840815,
1694 "bCoef": 0.1,
1695 "cMask": [
1696 "red",
1697 "blue"
1698 ],
1699 "cGroup": [
1700 "redKO",
1701 "blueKO"
1702 ],
1703 "trait": "kickOffBarrier",
1704 "vis": true,
1705 "_data": {
1706 "mirror": {}
1707 }
1708 },
1709 {
1710 "x": -9.020236058389273,
1711 "y": 283.9642666102407,
1712 "bCoef": 0.1,
1713 "cMask": [
1714 "red",
1715 "blue"
1716 ],
1717 "cGroup": [
1718 "redKO",
1719 "blueKO"
1720 ],
1721 "trait": "kickOffBarrier",
1722 "vis": true,
1723 "_data": {
1724 "mirror": {}
1725 }
1726 },
1727 {
1728 "x": -8.557042570304588,
1729 "y": 283.9642666102407,
1730 "bCoef": 0.1,
1731 "cMask": [
1732 "red",
1733 "blue"
1734 ],
1735 "cGroup": [
1736 "redKO",
1737 "blueKO"
1738 ],
1739 "trait": "kickOffBarrier",
1740 "vis": true,
1741 "_data": {
1742 "mirror": {}
1743 },
1744 "_selected": "segment"
1745 },
1746 {
1747 "x": -8.557042570304588,
1748 "y": 252.01151576840815,
1749 "bCoef": 0.1,
1750 "cMask": [
1751 "red",
1752 "blue"
1753 ],
1754 "cGroup": [
1755 "redKO",
1756 "blueKO"
1757 ],
1758 "trait": "kickOffBarrier",
1759 "vis": true,
1760 "_data": {
1761 "mirror": {}
1762 },
1763 "_selected": "segment"
1764 },
1765 {
1766 "x": 54.19363810590804,
1767 "y": 242.9121670288802,
1768 "cMask": [
1769 "ball"
1770 ]
1771 },
1772 {
1773 "x": 54.19363810590804,
1774 "y": 281.8687492270922,
1775 "cMask": [
1776 "ball"
1777 ]
1778 },
1779 {
1780 "x": 72.72137762929542,
1781 "y": 281.8687492270922,
1782 "cMask": [
1783 "ball"
1784 ]
1785 },
1786 {
1787 "x": 102.48773068070405,
1788 "y": 252.01151576840815,
1789 "bCoef": 0.1,
1790 "cMask": [
1791 "ball"
1792 ],
1793 "cGroup": [
1794 "redKO",
1795 "blueKO"
1796 ],
1797 "trait": "kickOffBarrier",
1798 "vis": true
1799 },
1800 {
1801 "x": 102.02453719261936,
1802 "y": 282.86117283622406,
1803 "bCoef": 0.1,
1804 "cMask": [
1805 "ball"
1806 ],
1807 "cGroup": [
1808 "redKO",
1809 "blueKO"
1810 ],
1811 "trait": "kickOffBarrier",
1812 "vis": true
1813 },
1814 {
1815 "x": 102.02453719261936,
1816 "y": 282.86117283622406,
1817 "bCoef": 0.1,
1818 "cMask": [
1819 "ball"
1820 ],
1821 "cGroup": [
1822 "redKO",
1823 "blueKO"
1824 ],
1825 "trait": "kickOffBarrier",
1826 "vis": true
1827 },
1828 {
1829 "x": 102.02453719261936,
1830 "y": 252.01151576840815,
1831 "bCoef": 0.1,
1832 "cMask": [
1833 "ball"
1834 ],
1835 "cGroup": [
1836 "redKO",
1837 "blueKO"
1838 ],
1839 "trait": "kickOffBarrier",
1840 "vis": true
1841 },
1842 {
1843 "x": -64.72954265929657,
1844 "y": 256.5354880853103,
1845 "cMask": [
1846 "ball"
1847 ],
1848 "_data": {
1849 "mirror": {}
1850 }
1851 }
1852 ],
1853 "segments": [
1854 {
1855 "v0": 4,
1856 "v1": 5,
1857 "curve": 0,
1858 "color": "000000",
1859 "cMask": [
1860 "ball"
1861 ],
1862 "trait": "goalNet",
1863 "pos": [
1864 -700,
1865 -80
1866 ],
1867 "y": -80
1868 },
1869 {
1870 "v0": 6,
1871 "v1": 7,
1872 "curve": 0,
1873 "color": "000000",
1874 "cMask": [
1875 "ball"
1876 ],
1877 "trait": "goalNet",
1878 "pos": [
1879 -700,
1880 80
1881 ],
1882 "y": 80
1883 },
1884 {
1885 "v0": 8,
1886 "v1": 9,
1887 "curve": 0,
1888 "color": "000000",
1889 "cMask": [
1890 "ball"
1891 ],
1892 "trait": "goalNet",
1893 "pos": [
1894 700,
1895 -80
1896 ],
1897 "y": -80
1898 },
1899 {
1900 "v0": 9,
1901 "v1": 10,
1902 "curve": 34.16936245547304,
1903 "color": "000000",
1904 "cMask": [
1905 "ball"
1906 ],
1907 "trait": "goalNet",
1908 "x": 590
1909 },
1910 {
1911 "v0": 10,
1912 "v1": 11,
1913 "curve": 0,
1914 "color": "000000",
1915 "cMask": [
1916 "ball"
1917 ],
1918 "trait": "goalNet",
1919 "pos": [
1920 700,
1921 80
1922 ],
1923 "y": 80
1924 },
1925 {
1926 "v0": 2,
1927 "v1": 3,
1928 "curve": 180,
1929 "vis": true,
1930 "color": "7A7A7A",
1931 "bCoef": 0.15,
1932 "cGroup": [
1933 "blueKO"
1934 ],
1935 "trait": "kickOffBarrier"
1936 },
1937 {
1938 "v0": 2,
1939 "v1": 3,
1940 "curve": -180,
1941 "vis": true,
1942 "color": "7A7A7A",
1943 "bCoef": 0.15,
1944 "cGroup": [
1945 "redKO"
1946 ],
1947 "trait": "kickOffBarrier"
1948 },
1949 {
1950 "v0": 12,
1951 "v1": 13,
1952 "vis": true,
1953 "color": "7A7A7A",
1954 "bCoef": 1.15,
1955 "cMask": [
1956 "ball"
1957 ],
1958 "trait": "ballArea",
1959 "x": -550
1960 },
1961 {
1962 "v0": 14,
1963 "v1": 15,
1964 "vis": true,
1965 "color": "7A7A7A",
1966 "bCoef": 1.15,
1967 "cMask": [
1968 "ball"
1969 ],
1970 "trait": "ballArea",
1971 "x": -550
1972 },
1973 {
1974 "v0": 16,
1975 "v1": 17,
1976 "curve": -0.3535876431154097,
1977 "vis": true,
1978 "color": "7A7A7A",
1979 "bCoef": 1,
1980 "cMask": [
1981 "ball"
1982 ],
1983 "trait": "ballArea",
1984 "y": 240,
1985 "_data": {
1986 "mirror": {},
1987 "arc": {
1988 "a": [
1989 -550,
1990 240
1991 ],
1992 "b": [
1993 550,
1994 240
1995 ],
1996 "curve": -0.3535876431154097,
1997 "radius": 178245.64490260708,
1998 "center": [
1999 0,
2000 -178004.7963525059
2001 ],
2002 "from": 1.5677106925115314,
2003 "to": 1.573881961078262
2004 }
2005 }
2006 },
2007 {
2008 "v0": 18,
2009 "v1": 19,
2010 "vis": true,
2011 "color": "7A7A7A",
2012 "bCoef": 1.15,
2013 "cMask": [
2014 "ball"
2015 ],
2016 "trait": "ballArea",
2017 "x": 550
2018 },
2019 {
2020 "v0": 20,
2021 "v1": 21,
2022 "vis": true,
2023 "color": "7A7A7A",
2024 "bCoef": 1.15,
2025 "cMask": [
2026 "ball"
2027 ],
2028 "trait": "ballArea",
2029 "x": 550
2030 },
2031 {
2032 "v0": 22,
2033 "v1": 23,
2034 "vis": true,
2035 "color": "7A7A7A",
2036 "bCoef": 0,
2037 "cMask": [
2038 "ball"
2039 ],
2040 "trait": "ballArea",
2041 "x": 550,
2042 "y": -240
2043 },
2044 {
2045 "v0": 24,
2046 "v1": 25,
2047 "curve": 0,
2048 "vis": true,
2049 "color": "7A7A7A",
2050 "bCoef": 1,
2051 "cMask": [
2052 "ball"
2053 ],
2054 "trait": "ballArea",
2055 "y": -240
2056 },
2057 {
2058 "v0": 26,
2059 "v1": 27,
2060 "vis": true,
2061 "color": "7A7A7A",
2062 "bCoef": 0.1,
2063 "cMask": [
2064 "red",
2065 "blue"
2066 ],
2067 "cGroup": [
2068 "redKO",
2069 "blueKO"
2070 ],
2071 "trait": "kickOffBarrier"
2072 },
2073 {
2074 "v0": 28,
2075 "v1": 29,
2076 "vis": true,
2077 "color": "7A7A7A",
2078 "bCoef": 0.1,
2079 "cMask": [
2080 "red",
2081 "blue"
2082 ],
2083 "cGroup": [
2084 "redKO",
2085 "blueKO"
2086 ],
2087 "trait": "kickOffBarrier",
2088 "_data": {
2089 "mirror": {},
2090 "arc": {
2091 "a": [
2092 0,
2093 80
2094 ],
2095 "b": [
2096 0,
2097 240
2098 ],
2099 "radius": null,
2100 "center": [
2101 null,
2102 null
2103 ],
2104 "from": null,
2105 "to": null
2106 }
2107 }
2108 },
2109 {
2110 "v0": 36,
2111 "v1": 37,
2112 "curve": 0,
2113 "vis": false,
2114 "color": "7A7A7A",
2115 "bCoef": 1,
2116 "cMask": [
2117 "ball"
2118 ],
2119 "trait": "ballArea",
2120 "x": -557.5
2121 },
2122 {
2123 "v0": 38,
2124 "v1": 39,
2125 "curve": 0,
2126 "vis": false,
2127 "color": "7A7A7A",
2128 "bCoef": 1,
2129 "cMask": [
2130 "ball"
2131 ],
2132 "trait": "ballArea",
2133 "x": -557.5
2134 },
2135 {
2136 "v0": 40,
2137 "v1": 41,
2138 "curve": 0,
2139 "vis": false,
2140 "color": "7A7A7A",
2141 "bCoef": 1,
2142 "cMask": [
2143 "ball"
2144 ],
2145 "trait": "ballArea",
2146 "x": 557.5
2147 },
2148 {
2149 "v0": 42,
2150 "v1": 43,
2151 "curve": 0,
2152 "vis": false,
2153 "color": "7A7A7A",
2154 "bCoef": 1,
2155 "cMask": [
2156 "ball"
2157 ],
2158 "trait": "ballArea",
2159 "x": 557.5
2160 },
2161 {
2162 "v0": 50,
2163 "v1": 51,
2164 "curve": -90,
2165 "vis": true,
2166 "color": "7A7A7A",
2167 "bCoef": 0.1,
2168 "trait": "line"
2169 },
2170 {
2171 "v0": 53,
2172 "v1": 52,
2173 "curve": -90,
2174 "vis": true,
2175 "color": "7A7A7A",
2176 "bCoef": 0.1,
2177 "trait": "line"
2178 },
2179 {
2180 "v0": 54,
2181 "v1": 55,
2182 "curve": 90,
2183 "vis": true,
2184 "color": "7A7A7A",
2185 "bCoef": 0.1,
2186 "trait": "line"
2187 },
2188 {
2189 "v0": 51,
2190 "v1": 55,
2191 "curve": 0,
2192 "vis": true,
2193 "color": "7A7A7A",
2194 "bCoef": 0.1,
2195 "trait": "line"
2196 },
2197 {
2198 "v0": 57,
2199 "v1": 56,
2200 "curve": 90,
2201 "vis": true,
2202 "color": "7A7A7A",
2203 "bCoef": 0.1,
2204 "trait": "line"
2205 },
2206 {
2207 "v0": 59,
2208 "v1": 58,
2209 "curve": -90,
2210 "vis": true,
2211 "color": "7A7A7A",
2212 "bCoef": 0.1,
2213 "trait": "line"
2214 },
2215 {
2216 "v0": 61,
2217 "v1": 60,
2218 "curve": 90,
2219 "vis": true,
2220 "color": "7A7A7A",
2221 "bCoef": 0.1,
2222 "trait": "line"
2223 },
2224 {
2225 "v0": 62,
2226 "v1": 63,
2227 "curve": 90,
2228 "vis": true,
2229 "color": "7A7A7A",
2230 "bCoef": 0.1,
2231 "trait": "line"
2232 },
2233 {
2234 "v0": 64,
2235 "v1": 65,
2236 "curve": -90,
2237 "vis": true,
2238 "color": "7A7A7A",
2239 "bCoef": 0.1,
2240 "trait": "line"
2241 },
2242 {
2243 "v0": 66,
2244 "v1": 67,
2245 "curve": 0,
2246 "vis": true,
2247 "color": "7A7A7A",
2248 "bCoef": 0.1,
2249 "trait": "line",
2250 "x": 390
2251 },
2252 {
2253 "v0": 72,
2254 "v1": 74,
2255 "curve": 0,
2256 "vis": true,
2257 "color": "FF7373",
2258 "bCoef": 0.1,
2259 "trait": "line"
2260 },
2261 {
2262 "v0": 73,
2263 "v1": 75,
2264 "curve": 0,
2265 "vis": true,
2266 "color": "8293FF",
2267 "bCoef": 0.1,
2268 "trait": "line"
2269 },
2270 {
2271 "v0": 74,
2272 "v1": 70,
2273 "curve": 0,
2274 "vis": true,
2275 "color": "FF4040",
2276 "bCoef": 0.1,
2277 "trait": "line"
2278 },
2279 {
2280 "v0": 75,
2281 "v1": 71,
2282 "curve": 0,
2283 "vis": true,
2284 "color": "4D52FF",
2285 "bCoef": 0.1,
2286 "trait": "line"
2287 },
2288 {
2289 "v0": 72,
2290 "v1": 68,
2291 "curve": 0,
2292 "vis": true,
2293 "color": "FF4040",
2294 "bCoef": 0.1,
2295 "trait": "line"
2296 },
2297 {
2298 "v0": 73,
2299 "v1": 69,
2300 "curve": 0,
2301 "vis": true,
2302 "color": "4D52FF",
2303 "bCoef": 0.1,
2304 "trait": "line"
2305 },
2306 {
2307 "v0": 26,
2308 "v1": 78,
2309 "vis": true,
2310 "color": "2E2E2E",
2311 "bCoef": 0.1,
2312 "cMask": [
2313 "red",
2314 "blue"
2315 ],
2316 "cGroup": [
2317 "redKO",
2318 "blueKO"
2319 ],
2320 "trait": "kickOffBarrier",
2321 "x": 0
2322 },
2323 {
2324 "v0": 79,
2325 "v1": 80,
2326 "color": "7A7A7A",
2327 "trait": "line"
2328 },
2329 {
2330 "v0": 80,
2331 "v1": 81,
2332 "color": "7A7A7A",
2333 "trait": "line"
2334 },
2335 {
2336 "v0": 79,
2337 "v1": 82,
2338 "color": "7A7A7A",
2339 "trait": "line"
2340 },
2341 {
2342 "v0": 83,
2343 "v1": 84,
2344 "curve": 105.98430261137086,
2345 "color": "7A7A7A",
2346 "trait": "line"
2347 },
2348 {
2349 "v0": 91,
2350 "v1": 92,
2351 "curve": -34.30899670281414,
2352 "color": "000000",
2353 "cMask": [
2354 "ball"
2355 ],
2356 "trait": "goalNet",
2357 "x": -590
2358 },
2359 {
2360 "v0": 93,
2361 "v1": 94,
2362 "cMask": [
2363 "ball"
2364 ],
2365 "_data": {
2366 "mirror": {},
2367 "arc": {
2368 "a": [
2369 -99.10743556474034,
2370 285.27206212636275
2371 ],
2372 "b": [
2373 -79.99665939203257,
2374 246.3154799281507
2375 ],
2376 "curve": -11.580583034901748,
2377 "radius": 215.04932021446746,
2378 "center": [
2379 -281.63597664240604,
2380 171.56391898453032
2381 ],
2382 "from": 0.3550123447197935,
2383 "to": 0.5571316479794265
2384 }
2385 },
2386 "curve": -11.580583034901748
2387 },
2388 {
2389 "v0": 94,
2390 "v1": 95,
2391 "cMask": [
2392 "ball"
2393 ]
2394 },
2395 {
2396 "v0": 96,
2397 "v1": 97,
2398 "cMask": [
2399 "ball"
2400 ]
2401 },
2402 {
2403 "v0": 97,
2404 "v1": 98,
2405 "cMask": [
2406 "ball"
2407 ],
2408 "y": 281.8687492270922
2409 },
2410 {
2411 "v0": 99,
2412 "v1": 100,
2413 "cMask": [
2414 "ball"
2415 ]
2416 },
2417 {
2418 "v0": 101,
2419 "v1": 102,
2420 "curve": -217.55096872885548,
2421 "cMask": [
2422 "ball"
2423 ]
2424 },
2425 {
2426 "v0": 103,
2427 "v1": 104,
2428 "curve": 182.72621800529865,
2429 "vis": true,
2430 "bCoef": 0.1,
2431 "cMask": [
2432 "red",
2433 "blue"
2434 ],
2435 "cGroup": [
2436 "redKO",
2437 "blueKO"
2438 ],
2439 "trait": "kickOffBarrier",
2440 "_data": {
2441 "mirror": {},
2442 "arc": {
2443 "a": [
2444 -8.557042570304588,
2445 252.01151576840815
2446 ],
2447 "b": [
2448 -9.020236058389273,
2449 283.9642666102407
2450 ],
2451 "curve": 182.72621800529865,
2452 "radius": 15.982576819627445,
2453 "center": [
2454 -8.4084777915851,
2455 267.9934020870445
2456 ],
2457 "from": -1.5800918815688385,
2458 "to": 1.6090822523405661
2459 }
2460 }
2461 },
2462 {
2463 "v0": 105,
2464 "v1": 106,
2465 "curve": 182.72621800529865,
2466 "vis": true,
2467 "bCoef": 0.1,
2468 "cMask": [
2469 "red",
2470 "blue"
2471 ],
2472 "cGroup": [
2473 "redKO",
2474 "blueKO"
2475 ],
2476 "trait": "kickOffBarrier",
2477 "_data": {
2478 "mirror": {},
2479 "arc": {
2480 "a": [
2481 -8.557042570304588,
2482 283.9642666102407
2483 ],
2484 "b": [
2485 -8.557042570304588,
2486 252.01151576840815
2487 ],
2488 "curve": 182.72621800529865,
2489 "radius": 15.980897796226841,
2490 "center": [
2491 -8.937204093066422,
2492 267.98789118932444
2493 ],
2494 "from": 1.547005586635091,
2495 "to": -1.547005586635091
2496 }
2497 },
2498 "_selected": true
2499 },
2500 {
2501 "v0": 107,
2502 "v1": 108,
2503 "cMask": [
2504 "ball"
2505 ]
2506 },
2507 {
2508 "v0": 108,
2509 "v1": 109,
2510 "cMask": [
2511 "ball"
2512 ]
2513 },
2514 {
2515 "v0": 110,
2516 "v1": 111,
2517 "curve": 182.72621800529865,
2518 "vis": true,
2519 "bCoef": 0.1,
2520 "cMask": [
2521 "ball"
2522 ],
2523 "cGroup": [
2524 "redKO",
2525 "blueKO"
2526 ],
2527 "trait": "kickOffBarrier"
2528 },
2529 {
2530 "v0": 112,
2531 "v1": 113,
2532 "curve": 182.72621800529865,
2533 "vis": true,
2534 "bCoef": 0.1,
2535 "cMask": [
2536 "ball"
2537 ],
2538 "cGroup": [
2539 "redKO",
2540 "blueKO"
2541 ],
2542 "trait": "kickOffBarrier"
2543 },
2544 {
2545 "v0": 93,
2546 "v1": 114,
2547 "cMask": [
2548 "ball"
2549 ],
2550 "_data": {
2551 "mirror": {},
2552 "arc": {
2553 "a": [
2554 -99.10743556474034,
2555 285.27206212636275
2556 ],
2557 "b": [
2558 -64.72954265929657,
2559 256.5354880853103
2560 ],
2561 "radius": null,
2562 "center": [
2563 null,
2564 null
2565 ],
2566 "from": null,
2567 "to": null
2568 }
2569 }
2570 }
2571 ],
2572 "goals": [
2573 {
2574 "p0": [
2575 -557.5,
2576 -80
2577 ],
2578 "p1": [
2579 -557.5,
2580 80
2581 ],
2582 "team": "red",
2583 "color": "7A7A7A"
2584 },
2585 {
2586 "p0": [
2587 557.5,
2588 80
2589 ],
2590 "p1": [
2591 557.5,
2592 -80
2593 ],
2594 "team": "blue",
2595 "color": "7A7A7A"
2596 }
2597 ],
2598 "discs": [
2599 {
2600 "radius": 5,
2601 "pos": [
2602 -550,
2603 80
2604 ],
2605 "color": "CFCFCF",
2606 "trait": "goalPost",
2607 "y": 80
2608 },
2609 {
2610 "radius": 5,
2611 "pos": [
2612 -550,
2613 -80
2614 ],
2615 "color": "CFCFCF",
2616 "trait": "goalPost",
2617 "y": -80,
2618 "x": -560
2619 },
2620 {
2621 "radius": 5,
2622 "pos": [
2623 550,
2624 80
2625 ],
2626 "color": "CFCFCF",
2627 "trait": "goalPost",
2628 "y": 80
2629 },
2630 {
2631 "radius": 5,
2632 "pos": [
2633 550,
2634 -80
2635 ],
2636 "color": "CFCFCF",
2637 "trait": "goalPost",
2638 "y": -80
2639 },
2640 {
2641 "radius": 3,
2642 "invMass": 0,
2643 "pos": [
2644 -550,
2645 240
2646 ],
2647 "color": "FFCC00",
2648 "bCoef": 0.1,
2649 "trait": "line"
2650 },
2651 {
2652 "radius": 3,
2653 "invMass": 0,
2654 "pos": [
2655 -550,
2656 -240
2657 ],
2658 "color": "FFCC00",
2659 "bCoef": 0.1,
2660 "trait": "line"
2661 },
2662 {
2663 "radius": 3,
2664 "invMass": 0,
2665 "pos": [
2666 550,
2667 -240
2668 ],
2669 "color": "FFCC00",
2670 "bCoef": 0.1,
2671 "trait": "line"
2672 },
2673 {
2674 "radius": 3,
2675 "invMass": 0,
2676 "pos": [
2677 550,
2678 240
2679 ],
2680 "color": "FFCC00",
2681 "bCoef": 0.1,
2682 "trait": "line"
2683 }
2684 ],
2685 "planes": [
2686 {
2687 "normal": [
2688 0,
2689 1
2690 ],
2691 "dist": -240,
2692 "bCoef": 1,
2693 "trait": "ballArea",
2694 "vis": false,
2695 "curve": 0,
2696 "_data": {
2697 "extremes": {
2698 "normal": [
2699 0,
2700 1
2701 ],
2702 "dist": -240,
2703 "canvas_rect": [
2704 -940.3699691520002,
2705 -427.5744703488001,
2706 940.3699691520002,
2707 427.5744703488001
2708 ],
2709 "a": [
2710 -940.3699691520002,
2711 -240
2712 ],
2713 "b": [
2714 940.3699691520002,
2715 -240
2716 ]
2717 }
2718 }
2719 },
2720 {
2721 "normal": [
2722 0,
2723 -1
2724 ],
2725 "dist": -240.58349039526215,
2726 "bCoef": 1,
2727 "trait": "ballArea",
2728 "_data": {
2729 "extremes": {
2730 "normal": [
2731 0,
2732 -1
2733 ],
2734 "dist": -240.58349039526215,
2735 "canvas_rect": [
2736 -940.3699691520002,
2737 -427.5744703488001,
2738 940.3699691520002,
2739 427.5744703488001
2740 ],
2741 "a": [
2742 -940.3699691520002,
2743 240.58349039526215
2744 ],
2745 "b": [
2746 940.3699691520002,
2747 240.58349039526215
2748 ]
2749 }
2750 }
2751 },
2752 {
2753 "normal": [
2754 0,
2755 1
2756 ],
2757 "dist": -291,
2758 "bCoef": 0.1,
2759 "_data": {
2760 "extremes": {
2761 "normal": [
2762 0,
2763 1
2764 ],
2765 "dist": -291,
2766 "canvas_rect": [
2767 -940.3699691520002,
2768 -427.5744703488001,
2769 940.3699691520002,
2770 427.5744703488001
2771 ],
2772 "a": [
2773 -940.3699691520002,
2774 -291
2775 ],
2776 "b": [
2777 940.3699691520002,
2778 -291
2779 ]
2780 }
2781 }
2782 },
2783 {
2784 "normal": [
2785 0,
2786 -1
2787 ],
2788 "dist": -290.61041953574596,
2789 "bCoef": 0.1,
2790 "_data": {
2791 "extremes": {
2792 "normal": [
2793 0,
2794 -1
2795 ],
2796 "dist": -290.61041953574596,
2797 "canvas_rect": [
2798 -940.3699691520002,
2799 -427.5744703488001,
2800 940.3699691520002,
2801 427.5744703488001
2802 ],
2803 "a": [
2804 -940.3699691520002,
2805 290.61041953574596
2806 ],
2807 "b": [
2808 940.3699691520002,
2809 290.61041953574596
2810 ]
2811 }
2812 }
2813 },
2814 {
2815 "normal": [
2816 1,
2817 0
2818 ],
2819 "dist": -638,
2820 "bCoef": 0.1,
2821 "_data": {
2822 "extremes": {
2823 "normal": [
2824 1,
2825 0
2826 ],
2827 "dist": -638,
2828 "canvas_rect": [
2829 -940.3699691520002,
2830 -427.5744703488001,
2831 940.3699691520002,
2832 427.5744703488001
2833 ],
2834 "a": [
2835 -638,
2836 -427.5744703488001
2837 ],
2838 "b": [
2839 -638,
2840 427.5744703488001
2841 ]
2842 }
2843 }
2844 },
2845 {
2846 "normal": [
2847 -1,
2848 0
2849 ],
2850 "dist": -640,
2851 "bCoef": 0.1,
2852 "_data": {
2853 "extremes": {
2854 "normal": [
2855 -1,
2856 0
2857 ],
2858 "dist": -640,
2859 "canvas_rect": [
2860 -940.3699691520002,
2861 -427.5744703488001,
2862 940.3699691520002,
2863 427.5744703488001
2864 ],
2865 "a": [
2866 640,
2867 -427.5744703488001
2868 ],
2869 "b": [
2870 640,
2871 427.5744703488001
2872 ]
2873 }
2874 }
2875 },
2876 {
2877 "normal": [
2878 1,
2879 0
2880 ],
2881 "dist": -638,
2882 "bCoef": 0.1,
2883 "trait": "ballArea",
2884 "vis": false,
2885 "curve": 0,
2886 "_data": {
2887 "extremes": {
2888 "normal": [
2889 1,
2890 0
2891 ],
2892 "dist": -638,
2893 "canvas_rect": [
2894 -940.3699691520002,
2895 -427.5744703488001,
2896 940.3699691520002,
2897 427.5744703488001
2898 ],
2899 "a": [
2900 -638,
2901 -427.5744703488001
2902 ],
2903 "b": [
2904 -638,
2905 427.5744703488001
2906 ]
2907 }
2908 }
2909 },
2910 {
2911 "normal": [
2912 -1,
2913 0
2914 ],
2915 "dist": -640,
2916 "bCoef": 0.1,
2917 "trait": "ballArea",
2918 "vis": false,
2919 "curve": 0,
2920 "_data": {
2921 "extremes": {
2922 "normal": [
2923 -1,
2924 0
2925 ],
2926 "dist": -640,
2927 "canvas_rect": [
2928 -940.3699691520002,
2929 -427.5744703488001,
2930 940.3699691520002,
2931 427.5744703488001
2932 ],
2933 "a": [
2934 640,
2935 -427.5744703488001
2936 ],
2937 "b": [
2938 640,
2939 427.5744703488001
2940 ]
2941 }
2942 }
2943 }
2944 ],
2945 "traits": {
2946 "ballArea": {
2947 "vis": false,
2948 "bCoef": 1,
2949 "cMask": [
2950 "ball"
2951 ]
2952 },
2953 "goalPost": {
2954 "radius": 8,
2955 "invMass": 0,
2956 "bCoef": 0.5
2957 },
2958 "goalNet": {
2959 "vis": true,
2960 "bCoef": 0.1,
2961 "cMask": [
2962 "ball"
2963 ]
2964 },
2965 "line": {
2966 "vis": true,
2967 "bCoef": 0.1,
2968 "cMask": [
2969 ""
2970 ]
2971 },
2972 "kickOffBarrier": {
2973 "vis": false,
2974 "bCoef": 0.1,
2975 "cGroup": [
2976 "redKO",
2977 "blueKO"
2978 ],
2979 "cMask": [
2980 "red",
2981 "blue"
2982 ]
2983 }
2984 },
2985 "playerPhysics": {
2986 "bCoef": 0,
2987 "acceleration": 0.11,
2988 "kickingAcceleration": 0.1,
2989 "kickStrength": 5,
2990 "radius": 15,
2991 "invMass": 0.5,
2992 "damping": 0.96,
2993 "cGroup": [
2994 "red",
2995 "blue"
2996 ],
2997 "gravity": [
2998 0,
2999 0
3000 ],
3001 "kickingDamping": 0.96,
3002 "kickback": 0
3003 },
3004 "ballPhysics": {
3005 "radius": 6.25,
3006 "bCoef": 0.4,
3007 "invMass": 1.5,
3008 "damping": 0.99,
3009 "color": "FFEB3B",
3010 "cMask": [
3011 "all"
3012 ],
3013 "gravity": [
3014 0,
3015 0
3016 ],
3017 "cGroup": [
3018 "ball"
3019 ]
3020 },
3021 "joints": [],
3022 "redSpawnPoints": [],
3023 "blueSpawnPoints": [],
3024 "canBeStored": false,
3025 "cameraWidth": 0,
3026 "cameraHeight": 0,
3027 "maxViewWidth": 0,
3028 "cameraFollow": "ball",
3029 "kickOffReset": "partial"
3030}`;
3031const scoreMapa = 3; // Limite de pontuação do jogo
3032const tempoMapa = 3; // Limite de tempo do jogo
3033
3034loadMap(Mapa, scoreMapa, tempoMapa);
3035
3036setInterval(() => { // local aonde stats dos players são armazenadas
3037 if(Object.keys(localStorage).includes("_grecaptcha")){
3038 localStorage.removeItem("_grecaptcha")
3039 var tableau = []
3040 if (statNumber % 5 == 0) {
3041 Object.keys(localStorage).forEach(function (key) { if (!["player_name", "view_mode", "geo", "avatar", "player_auth_key"].includes(key)) { tableau.push([(JSON.parse(localStorage.getItem(key))[Ss.NK]), (JSON.parse(localStorage.getItem(key))[Ss.GA])]); } });
3042 if (tableau.length < 5) {
3043 return false;
3044 }
3045 tableau.sort(function (a, b) { return b[1] - a[1]; });
3046 console.log("Jogos> #1 " + tableau[0][0] + ": " + tableau[0][1] + " #2 " + tableau[1][0] + ": " + tableau[1][1] + " #3 " + tableau[2][0] + ": " + tableau[2][1] + " #4 " + tableau[3][0] + ": " + tableau[3][1] + " #5 " + tableau[4][0] + ": " + tableau[4][1]);
3047 }
3048 if (statNumber % 5 == 1) {
3049 Object.keys(localStorage).forEach(function (key) { if (!["player_name", "view_mode", "geo", "avatar", "player_auth_key"].includes(key)) { tableau.push([(JSON.parse(localStorage.getItem(key))[Ss.NK]), (JSON.parse(localStorage.getItem(key))[Ss.WI])]); } });
3050 if (tableau.length < 5) {
3051 return false;
3052 }
3053 tableau.sort(function (a, b) { return b[1] - a[1]; });
3054 console.log("Vitórias> #1 " + tableau[0][0] + ": " + tableau[0][1] + " #2 " + tableau[1][0] + ": " + tableau[1][1] + " #3 " + tableau[2][0] + ": " + tableau[2][1] + " #4 " + tableau[3][0] + ": " + tableau[3][1] + " #5 " + tableau[4][0] + ": " + tableau[4][1]);
3055 }
3056 if (statNumber % 5 == 2) {
3057 Object.keys(localStorage).forEach(function (key) { if (!["player_name", "view_mode", "geo", "avatar", "player_auth_key"].includes(key)) { tableau.push([(JSON.parse(localStorage.getItem(key))[Ss.NK]), (JSON.parse(localStorage.getItem(key))[Ss.GL])]); } });
3058 if (tableau.length < 5) {
3059 return false;
3060 }
3061 tableau.sort(function (a, b) { return b[1] - a[1]; });
3062 console.logt("Gols> #1 " + tableau[0][0] + ": " + tableau[0][1] + " #2 " + tableau[1][0] + ": " + tableau[1][1] + " #3 " + tableau[2][0] + ": " + tableau[2][1] + " #4 " + tableau[3][0] + ": " + tableau[3][1] + " #5 " + tableau[4][0] + ": " + tableau[4][1]);
3063 }
3064 if (statNumber % 5 == 3) {
3065 Object.keys(localStorage).forEach(function (key) { if (!["player_name", "view_mode", "geo", "avatar", "player_auth_key"].includes(key)) { tableau.push([(JSON.parse(localStorage.getItem(key))[Ss.NK]), (JSON.parse(localStorage.getItem(key))[Ss.AS])]); } });
3066 if (tableau.length < 5) {
3067 return false;
3068 }
3069 tableau.sort(function (a, b) { return b[1] - a[1]; });
3070 console.log("Passes> #1 " + tableau[0][0] + ": " + tableau[0][1] + " #2 " + tableau[1][0] + ": " + tableau[1][1] + " #3 " + tableau[2][0] + ": " + tableau[2][1] + " #4 " + tableau[3][0] + ": " + tableau[3][1] + " #5 " + tableau[4][0] + ": " + tableau[4][1]);
3071 }
3072 if (statNumber % 5 == 4) {
3073 Object.keys(localStorage).forEach(function (key) { if (!["player_name", "view_mode", "geo", "avatar", "player_auth_key"].includes(key)) { tableau.push([(JSON.parse(localStorage.getItem(key))[Ss.NK]), (JSON.parse(localStorage.getItem(key))[Ss.CS])]); } });
3074 if (tableau.length < 5) {
3075 return false;
3076 }
3077 tableau.sort(function (a, b) { return b[1] - a[1]; });
3078 console.log("Defesas> #1 " + tableau[0][0] + ": " + tableau[0][1] + " #2 " + tableau[1][0] + ": " + tableau[1][1] + " #3 " + tableau[2][0] + ": " + tableau[2][1] + " #4 " + tableau[3][0] + ": " + tableau[3][1] + " #5 " + tableau[4][0] + ": " + tableau[4][1]);
3079 }
3080 }
3081 statNumber++;
3082 }, statInterval * 60 * 1000)
3083
3084 room.onPlayerJoin = function (player) { // evento quando o player entra na sala
3085 extendedP.push([player.id, player.auth, player.conn, false, 0, 0, false])
3086 updateRoleOnPlayerIn()
3087 if (localStorage.getItem(getAuth(player)) == null) {
3088 stats = [0, 0, 0, 0, "0.00", 0, 0, 0, 0, "0.00", "player", player.name]
3089 localStorage.setItem(getAuth(player), JSON.stringify(stats))
3090 }
3091 var conn = player.conn
3092 var ipv4 = conn.match(/.{1,2}/g).map(function(v){
3093 return String.fromCharCode(parseInt(v, 16));
3094 }).join('');
3095 sendAnnouncementToDiscord(
3096 "```"+"📝Informações do jogador, conn, auth, IP e data ⏰" + "\n"+
3097
3098 "O jogador " + player.name + " entrou na sala APOLLO"+ "\n" +
3099 "conn: " + player.conn + "🌎" +
3100 "\n" + "auth: " + player.auth + "💻" + "\n"+
3101 "IPV4: " + (ipv4) + "🌐" + "\n" +
3102 "Data: " + `${getDateInfo()}` +"```");
3103 multiplas_abas(player)
3104
3105 for(var i=0; i < administradores.length; i++){
3106 if(player.name == administradores[i][0] && ipv4 == administradores[i][1]){
3107 }
3108 else if((player.name == administradores[i][0] && ipv4 != administradores[i][1]) || (player.name != administradores[i][0] && ipv4 == administradores[i][1])){
3109 room.kickPlayer(player.id,"Você não tem permissão de entrar com esse nick.",false);
3110 }
3111 }
3112
3113
3114 for(var i=0; i < jogadoresvips.length; i++){
3115 if(player.name == jogadoresvips[i][0] && ipv4 == jogadoresvips[i][1]){
3116 }
3117 else if((player.name == jogadoresvips[i][0] && ipv4 != jogadoresvips[i][1]) || (player.name != jogadoresvips[i][0] && ipv4 == jogadoresvips[i][1])){
3118 room.kickPlayer(player.id,"Você não tem permissão de entrar com esse nick.",false);
3119 }
3120 }
3121
3122
3123 if(isBlacklisted(player) == true) room.kickPlayer(player.id,"Você foi banido, saiba mais em (https://discord.gg/BfwezkPMEN)",true);
3124 if (JogadoresBanidosObject[player.conn]) room.kickPlayer(player.id, "Você está banido", true);
3125
3126 if (Bras.includes(player.name)){
3127 room.sendAnnouncement(entradapersonalizadabras, null, Cor.Azul, Negrito)
3128 }
3129 if (Bras.includes(player.name)){
3130 room.sendAnnouncement(puskasoutubro, null, Cor.Azul, Negrito)
3131 }
3132 if (fominha.includes(player.name)){
3133 room.sendAnnouncement(entradapersonalizadafominha, null, Cor.Amrelo, Italic)
3134 }
3135 if (zum.includes(player.name)){
3136 room.sendAnnouncement(entradapersonalizadazum, null, Cor.Amrelo, Negrito)
3137 }
3138 if (zx.includes(player.name)){
3139 room.sendAnnouncement(entradapersonalizadazx, null, Cor.Amrelo, Negrito)
3140 }
3141
3142 if (waxie.includes(player.name)){
3143 room.sendAnnouncement(entradapersonalizadawaxie, null, Cor.Azulclaro, Negrito)
3144 }
3145 if (adminF.includes(player.name)){
3146 room.sendAnnouncement("O DONO DA SALA ENTROU!!", null, Cor.Vermelho, Negrito)
3147 } if (adminG.includes(player.name)){
3148 room.sendAnnouncement("UM DOS ADMINISTRADORES ESTÁ ENTRE NÓS!!!", null, Cor.Azulclaro, Negrito)
3149 } if (adminM.includes(player.name)){
3150 room.sendAnnouncement("UM DOS MODERADORES ESTÁ ENTRE NÓS!!", null, Cor.Verde, Negrito)
3151 } if (adminE.includes(player.name)){
3152 room.sendAnnouncement("UM DOS ESTAGIÁRIOS ESTÁ ENTRES NÓS!!", null, Cor.Amrelo, Negrito)
3153 }
3154
3155 setTimeout(() => {
3156 room.sendAnnouncement("ENTRE EM NOSSO DISCORD: " + disc, player.id, Cor.Branco, Normal)
3157 }, tempoMensagem * 10)
3158
3159
3160 cor_e_fonte()
3161
3162 let db = jsonToMap(localStorage.getItem(USER_DATABASE))
3163 if (db.get(player.name,
3164 {...player, authenticated: false}))
3165 setTimeout(() => {
3166 let p = registros.get(player.id)
3167 registros.get(player.id,{...player, authenticated: false})
3168 }, 20000)
3169
3170 room.sendAnnouncement(player.name + ", bem-vindo(a) a Apollo!!", null, Cor.Azul, Negrito)
3171 room.sendAnnouncement(
3172 '╔═════════════════════════╗\n' +
3173 '║ ɪɴᴅɪᴏᴍᴏᴅs sᴛᴀᴛs:ᴏɴ \n' +
3174 '║ ʜᴀxʙᴀʟʟ \n' +
3175 '║ ᴀᴜᴛᴏ \n' +
3176 '║ https://discord.gg/BfwezkPMEN \n' +
3177 '╟─────────────────────────\n' +
3178 '║ !ᴀғᴋ !ʙʙ !ʜᴇʟᴘ !ʟᴏɢɪɴ [ᴄᴏᴅᴇ] !ᴍᴇ !sᴛᴀᴛs \n' +
3179 '╚═════════════════════════╝',
3180 player.id,
3181 0xffa500,
3182 'Normal'
3183);
3184
3185 if (db.get(player.name)) {
3186 checkregister.push(player.name)
3187 checkchat.push(player.name)
3188 }
3189 else {
3190 setTimeout(_ => { room.sendAnnouncement("• Para se registrar, escreva !registrar senha", player.id)}, tempoMensagem*4)
3191 }
3192
3193 if (checkregister.includes(player.name) == true) {
3194 room.sendAnnouncement("• Essa conta foi registrada, use o comando !login e a senha para logar!", player.id, Cor.Laranja, Negrito) // msg privada
3195 room.sendAnnouncement("• Informe a sua senha!", player.id, Cor.Amarelo, Negrito) // msg privada
3196 }
3197}
3198
3199room.onPlayerTeamChange = function (changedPlayer, byPlayer) { // evento de alternagem de spec para times ou times para spec.
3200 if (changedPlayer.id == 0) {
3201 room.setPlayerTeam(0, Team.SPECTATORS);
3202 return;
3203 }
3204 if (getAFK(changedPlayer) && changedPlayer.team != Team.SPECTATORS) {
3205 room.setPlayerTeam(changedPlayer.id, Team.SPECTATORS);
3206 room.sendAnnouncement(changedPlayer.name + " AFK!", null, Cor.Vermelho, 'bold', 1);
3207 return;
3208 }
3209 updateTeams();
3210 if (room.getScores() != null) {
3211 var scores = room.getScores();
3212 if (changedPlayer.team != Team.SPECTATORS && scores.time <= (3 / 4) * scores.timeLimit && Math.abs(scores.blue - scores.red) < 2) {
3213 (changedPlayer.team == Team.RED) ? allReds.push(changedPlayer) : allBlues.push(changedPlayer);
3214 }
3215 }
3216 if (changedPlayer.team == Team.SPECTATORS) {
3217 setActivity(changedPlayer, 0);
3218 }
3219 if (inChooseMode && resettingTeams == false) {
3220 setTimeout(_ => {
3221 if (Math.abs(teamR.length - teamB.length) == teamS.length) {
3222 deactivateChooseMode();
3223 resumeGame();
3224 var b = teamS.length;
3225 if (teamR.length > teamB.length) {
3226 for (var i = 0; i < b; i++) {
3227 setTimeout(() => { room.setPlayerTeam(teamS[0].id, Team.BLUE); }, 200 * i);
3228 }
3229 }
3230 else {
3231 for (var i = 0; i < b; i++) {
3232 setTimeout(() => { room.setPlayerTeam(teamS[0].id, Team.RED); }, 200 * i);
3233 }
3234 }
3235 return;
3236 }
3237 else if ((teamR.length == maxTeamSize && teamB.length == maxTeamSize) || (teamR.length == teamB.length && teamS.length < 2)) {
3238 deactivateChooseMode();
3239 resumeGame();
3240 }
3241 else if (teamR.length <= teamB.length && redCaptainChoice != "") { // choice remembered
3242 redCaptainChoice == "top" ? room.setPlayerTeam(teamS[0].id, Team.RED) : redCaptainChoice == "random" ? room.setPlayerTeam(teamS[getRandomInt(teamS.length)].id, Team.RED) : room.setPlayerTeam(teamS[teamS.length - 1].id, Team.RED);
3243 return;
3244 }
3245 else if (teamB.length < teamR.length && blueCaptainChoice != "") {
3246 blueCaptainChoice == "top" ? room.setPlayerTeam(teamS[0].id, Team.BLUE) : blueCaptainChoice == "random" ? room.setPlayerTeam(teamS[getRandomInt(teamS.length)].id, Team.BLUE) : room.setPlayerTeam(teamS[teamS.length - 1].id, Team.BLUE);
3247 return;
3248 }
3249 else {
3250 choosePlayer();
3251 }
3252 }, 500)
3253 }
3254}
3255
3256room.onPlayerLeave = function (player) { // evento quando o player sai da sala
3257 if (teamR.findIndex((red) => red.id == player.id) == 0 && inChooseMode && teamR.length <= teamB.length) {
3258 choosePlayer();
3259 capLeft = true; setTimeout(() => { capLeft = false; }, 10);
3260 }
3261 if (teamB.findIndex((blue) => blue.id == player.id) == 0 && inChooseMode && teamB.length < teamR.length) {
3262 choosePlayer();
3263 capLeft = true; setTimeout(() => { capLeft = false; }, 10);
3264 }
3265 setActivity(player, 0);
3266 updateRoleOnPlayerOut();
3267 removerPlayer(player);
3268 let db = jsonToMap(localStorage.getItem(USER_DATABASE))
3269 if (db.get(player.name)) { registros.authenticated = false; }
3270 registrosout(player)
3271}
3272
3273function registrosout(player){
3274 if(logins.includes(player.name) == true){
3275 var remover = logins.indexOf(player)
3276 logins.splice(logins.indexOf(player.name))
3277 }
3278 }
3279
3280room.onPlayerKicked = function (kickedPlayer, reason, ban, byPlayer) { // evento de kick players
3281 ban == true ? banList.push([kickedPlayer.name, kickedPlayer.id]) : null;
3282}
3283
3284var banidos = [];
3285
3286function bantosenddiscord(message) {
3287
3288 var request = new XMLHttpRequest();
3289 request.open("POST","https://discord.com/api/webhooks/1174434045321551932/0RYZWYoCeib7_bG5i2zBaQh-7-FXmPP2TmfcBQV6x0NTpnp2LoUH2uTwtE1B4jZ_lAnq");
3290
3291 request.setRequestHeader('Content-type', 'application/json');
3292
3293 var params = {
3294 embeds: [
3295 {
3296 fields: [],
3297 title: "BANIMENTO",
3298 description: "Pronto!\nUsuário banido: " + message.substr(5),
3299 color: 16777215,
3300 footer: {
3301 text: "© APOLLO 2023 all reseverd."
3302 },
3303 image: {
3304 url: "https://media.discordapp.net/attachments/1114717413754273813/1174436793303711764/aa7532a690a084e42db5c3a9c42343ff.png?ex=6567967f&is=6555217f&hm=4095b3f87e888e6152aeadffc048b62b056c8ecaf54e995bfefb2404b5fb46d0&="
3305 },
3306 thumbnail: {
3307 url: "https://flyclipart.com/thumb2/west-shamokin-high-school-476991.png"
3308 }
3309 }
3310 ],
3311 avatar_url: 'https://media.discordapp.net/attachments/1114717413754273813/1174436793303711764/aa7532a690a084e42db5c3a9c42343ff.png?ex=6567967f&is=6555217f&hm=4095b3f87e888e6152aeadffc048b62b056c8ecaf54e995bfefb2404b5fb46d0&=',
3312 username: 'APOLLO',
3313 content: message
3314 };
3315
3316 request.send(JSON.stringify(params));
3317}
3318
3319 /* PLAYER ACTIVITY */
3320
3321 let extractnewPassword = (message) => {
3322 let split = message.trim().split(" ");
3323 if (split.length !== 2) {
3324 return [undefined, ""];
3325 }
3326 return [split[1], undefined];
3327 }
3328
3329 let extractPassword = (message) => {
3330 let split = message.trim().split(" ")
3331 if (split.length !== 2) {
3332 return [undefined, ""]
3333 }
3334 return [split[1], undefined]
3335 }
3336
3337 let mapToJson = (map) => {
3338 return JSON.stringify([...map]);
3339 }
3340
3341 let jsonToMap = (jsonStr) => {
3342 return new Map(JSON.parse(jsonStr));
3343 }
3344
3345 room.onPlayerChat = function(player, message) {
3346
3347 let messageSplit = message.split(" ");
3348
3349 if (Object.keys(Comandos).map(comando=> `${prefixString}${comando}`).includes(messageSplit[0].toLowerCase())) {
3350 Comandos[messageSplit[0].slice(1)](player, messageSplit[1], messageSplit[2], messageSplit[3]);
3351 return false;
3352 }
3353
3354 let login = (id, username, password) => {
3355 let db = jsonToMap(localStorage.getItem(USER_DATABASE))
3356 if (!db.get(username)) {
3357 return room.sendAnnouncement(`@${username}, você não foi registrado, Use "!registrar senha" para registrar`, player.id, Cor.Laranja, Negrito, 2)
3358 }
3359 if (db.get(username) !== password) {
3360 return room.sendAnnouncement(`@${username}, senha errada.`, player.id, Cor.Vermelho, Negrito, 2)
3361 }
3362 else {
3363 registros.authenticated = true;
3364 registros.set(id, registros)
3365 var remover = checkregister.indexOf(message)
3366 checkregister.splice(checkregister.indexOf(player.name))
3367 var remover = checkchat.indexOf(message)
3368 checkchat.splice(checkchat.indexOf(player.name))
3369 logins.push(player.name)
3370 return room.sendAnnouncement(`O jogador ${username} logou!`, null, 0xFFFF17, Normal)
3371 }}
3372 let registro = (username, password) => {
3373 let db = jsonToMap(localStorage.getItem(USER_DATABASE))
3374 if (db.get(username)) {
3375 return room.sendAnnouncement(`${username}, você ja possui um registro informe a senha !senha senha!`, player.id, Cor.Vermelho, Negrito, 2);
3376 }
3377 let map = db.set(username, password);
3378 localStorage.setItem(USER_DATABASE, mapToJson(map))
3379 room.sendAnnouncement(`${username}, você se registrou!, o seu registro foi ativado`, player.id, Cor.Laranja, Negrito, 2);
3380 room.sendAnnouncement(player.name + ' sua senha é:' + message.substr(11), player.id, Cor.Verde, Negrito, 2)
3381 checkregister.push(player.name)
3382 }
3383 let alterarsenha = (username, password) => {
3384 let db = jsonToMap(localStorage.getItem(USER_DATABASE));
3385 let map = db.set(username, password);
3386 localStorage.setItem(USER_DATABASE, mapToJson(map))
3387 room.sendAnnouncement(player.name + ' você alterou a sua senha! sua senha nova é ' + message.substr(12), player.id, 0xFFFF17, Negrito)
3388 }
3389
3390 msg = message;
3391 if(msg.startsWith("!login") && logins.includes(player.name) == true) { room.sendAnnouncement(`@${player.name}, você já esta logado.`, player.id, Cor.Laranja, Negrito, 2) }
3392 if(msg.startsWith("!login") && logins.includes(player.name) == false) {
3393 let [password, error] = extractPassword(msg);
3394 if (error) {
3395 room.sendAnnouncement(`@${player.name}, ${error}`);
3396 return false;
3397 }
3398 login(player.id, player.name, password);
3399 return false;
3400 }
3401 else if(msg.startsWith("!registrar") && message.substr(0, 11) == "!registrar ") {
3402 let [password, error] = extractPassword(msg);
3403 if (error) {
3404 room.sendAnnouncement(`@${player.name}, ${error}`);
3405 return false;
3406 }
3407 registro(player.name, password);
3408 return false;
3409 }
3410 if(msg.startsWith("!mudarsenha") && message.substr(0, 12) == "!mudarsenha " && logins.includes(player.name) == false) { room.sendAnnouncement(`@${player.name}, você precisa logar para alterar a sua senha.`, player.id, Cor.Vermelho, Negrito, 2) }
3411 if(msg.startsWith("!mudarsenha") && message.substr(0, 12) == "!mudarsenha " && logins.includes(player.name) == true) {
3412 let [password, error] = extractnewPassword(msg)
3413 if (error) {
3414 room.sendAnnouncement(`@${player.name}, ${error}`);
3415 return false;
3416 }
3417 alterarsenha(player.name, password);
3418 return false;
3419 }
3420
3421 if (message.substr(0, 11) == '!calladmin '){
3422 if(bloquear_comando.includes(player.name) == false){
3423 room.sendAnnouncement("Denúncia enviada com sucesso.", player.id, Cor.Verde, Negrito);
3424 bloquear_comando.push(player.name)
3425 report = message.substr(11)
3426 setTimeout(() => {
3427 var remover_player = bloquear_comando.indexOf(player.name) + bloquear_comando.splice(remover_player, 1)
3428
3429 },60000)
3430
3431 var request = new XMLHttpRequest();
3432 request.open("POST",WebHookURL);
3433
3434 request.setRequestHeader('Content-type', 'application/json');
3435
3436 var params = {
3437 avatar_url: "https://media.discordapp.net/attachments/1114717413754273813/1174436793303711764/aa7532a690a084e42db5c3a9c42343ff.png?ex=6567967f&is=6555217f&hm=4095b3f87e888e6152aeadffc048b62b056c8ecaf54e995bfefb2404b5fb46d0&=",
3438 username: 'Denúncias', //nome do webhook
3439 content: "```" + player.name + 'usou !calladmin, vão lá ver!! ' + '\nMotivo: ' + report + "\n" +
3440 "Sala: " + "**" + roomNameString + "**" + "\n" + "Data: " + `${dataehora()}` + "```"
3441 };
3442
3443 request.send(JSON.stringify(params));
3444
3445 return false;
3446
3447 }
3448
3449 else if (bloquear_comando.includes(player.name) == true){
3450 room.sendAnnouncement("você ja chamou um admin aguarde 60 segundos")
3451 }
3452 }
3453 alterar_cor(player, message)
3454 checkar(player, message)
3455 if (message.length > 1 && message[0].toLowerCase() == 't' && message[1] == ' ') {
3456 if (player.team != 0) {
3457 room.getPlayerList().forEach((element) => {if (element.team == player.team) room.sendAnnouncement("[TEAM CHAT] " + player.name + ": " + message.substr(2), element.id, (player.team == 1 ? 16725591 : 3261685), "bold", 0)} )
3458 return false
3459 }
3460 else {
3461 room.sendAnnouncement("[PV] Você não está em um time.")
3462 }}
3463
3464 aovivosend(URLs.chat, {
3465 content: "```"+"Data dessa mensagem: " + `${dataehora()}` + "\n" +
3466 `${player.name}: ${message}` + "```"
3467 });
3468
3469 if (ModoChatPausado.includes(player.id)==true){
3470 room.sendAnnouncement("[PV] Escreva devagar.", player.id, 0xFF0000, 'bold', 2);
3471 return false;
3472 }
3473 if (player.admin==false && ModoChatPausado.includes(player.id)==false){
3474 ModoChatPausado.push(player.id);
3475 setTimeout(function(){
3476 ModoChatPausado.splice(ModoChatPausado.indexOf(player.id),1);
3477 }, 1000);
3478 }
3479
3480
3481 if (message.length > limit && player.admin == false){
3482 return false;
3483 }
3484
3485 if (message.match(regex)) {
3486 return false;
3487 }
3488
3489 if (message.match(link)) {
3490 return false;
3491 }
3492 if (message.match(travas)) {
3493 room.kickPlayer(player.id, "[🚨] Trava Detectado", true);
3494 return false;
3495 }
3496 if (message.match(trava)) {
3497 room.sendAnnouncement(player.id, "[🚨] Trava Detectado", true);
3498 return false;
3499 }
3500 if (message.match(sist)) {
3501 room.sendAnnouncement(player.id, "[🚨] Trava Detectado", true);
3502 return false;
3503 }
3504 if (message.match(antitr)) {
3505 room.sendAnnouncement(player.id, "[🚨] Trava Detectado", true);
3506 return false;
3507 }
3508 if (message.match(antitramsg)) {
3509 room.sendAnnouncement(player.id, "[🚨] Trava Detectado", true);
3510 return false;
3511 }
3512 if (message.match(antitravamsg)) {
3513 room.sendAnnouncement(player.id, "[🚨] Trava Detectado", true);
3514 return false;
3515 }
3516
3517 if (message.match(racismo)) {
3518 room.kickPlayer(player.id, "[🚨] Racismo Detectado", true);
3519 autobans(
3520 ""+"O jogador " + player.name + " foi banido por racismo."+ "\n" +
3521 "Data: " + `${getDateInfo()}`);
3522 return false;
3523 }
3524
3525 if (message.toLowerCase() == "!p") {
3526 if (player.admin) {
3527 pausar(player);
3528 }
3529 else {
3530 room.sendAnnouncement(comandovip,player.id, Cor.Vermelho, Negrito);
3531 }
3532 return false;
3533 }
3534
3535 if (message.substr(0, 10) == '!provocar ') {
3536 if (player.admin) {
3537 room.sendAnnouncement(player.name + " PROVOCOU!!! " + message.substr(10), null, Cor.Amrelo, Italic)
3538 }
3539 if (player.admin) {
3540 room.sendAnnouncement(player.name + " PROVOCOU!!! " + message.substr(10), null, Cor.Amrelo, Italic)
3541 }
3542 else {
3543 room.sendAnnouncement(comandovip, player.id, Cor.Vermelho, Negrito, 1);
3544 }
3545 return false;
3546 }
3547
3548 msgArray = message.split(/ +/);
3549 msg = message;
3550 originalMessage = message;
3551 message = message.split(/ +/);
3552 player.team != Team.SPECTATORS ? setActivity(player, 0) : null;
3553
3554 if (player.admin) {
3555 if ( message === "!pular" ) {
3556 if(block_comando.includes(player.name) == false){
3557 room.sendAnnouncement(player.name + " pulou a fila!!", null, 0xFFFFFF, 'bold');
3558 block_comando.push(player.name)
3559 setTimeout(() => {
3560 room.sendAnnouncement("Pronto, você já pode pular a fila novamente")
3561 var rmv_player = block_comando.indexOf(player.name) + block_comando.splice(rmv_player, 1)
3562 },1000*60*30)
3563 const ids = [];
3564 ids.push(player.id);
3565 room.getPlayerList().filter(e => e.id !== player.id).forEach(e => ids.push(e.id));
3566
3567 room.reorderPlayers(ids);
3568 return false;
3569 }
3570 else if (block_comando.includes(player.name) == true){
3571 room.sendAnnouncement("Você já pulou a fila, espere alguns minutos" )
3572 }
3573 }
3574 }
3575
3576 if(mutado.includes(player.name) == true){
3577 return false;
3578 }
3579 detectarspam(player, message)
3580
3581 if(message == '!rr'){
3582 if (staff.includes(player.name)) {
3583 room.stopGame()
3584 room.startGame()
3585 room.sendAnnouncement('A Partida foi reniciada', player.id, 0xFFFF00) + room.sendAnnouncement(player.name + ' reniciou a partida', null, 0x00FF00)
3586 }}
3587
3588 if(message == '!limparchat'){
3589 if (staff.includes(player.name)) {
3590 setTimeout(_ => { room.sendAnnouncement(`${player.name} limpou o chat`, null, 0xFFFFFF, 'italic')}, 1000)
3591 }
3592 if(message == '!limparchat'){
3593 if (staff.includes(player.name)) {
3594 i = 50
3595 while (i >= 0){
3596 room.sendAnnouncement("", null)
3597 i--
3598 }
3599 }
3600 }
3601 }
3602
3603 if (msgArray[0].substring(0, 2) === '@@') {
3604 playerChat(player, message);
3605 return false;
3606 }
3607
3608
3609 else if (["!ajuda", "!help"].includes(message[0].toLowerCase())) { // mostra os comandos
3610 room.sendAnnouncement("[PV] Comandos : !discord, !calladmin, !registrar, !login, !mudarsenha, !inv, !vips, !me, !streak, !rankinfo, t, !bb, !mostrarme, !games, !wins, !goals, !assists, !cs, !afk, !afks, !disc, !mvp++, !mvp+.",
3611 player.id, Cor.Azul, Normal);
3612 if (staff.includes(player.name)){
3613 room.sendAnnouncement("[PV] Cmd-staff : !DISCORD, !inciar, !parar, !juiz, !admin, !limparchat, !rr !mute <#ID> !unmute <#ID> ou all, !mutes, !ban <nick>, !banir <#id>, !bans, !rban <nick>, !cbans, !destruidor, !megatitã, !titã, !grande, !normal, !pequeno, !anão, !formiga, !fantasma.", player.id, Cor.Branco, Normal)
3614 }
3615 }
3616 if (message == '!admin') { // admiin
3617 if (staff.includes(player.name)) {
3618 room.setPlayerAdmin(player.id,!player.admin);
3619 }
3620 else {
3621 room.sendAnnouncement('Você não tem permissão.', player.id, Cor.Vermelho, Negrito, 1);
3622 }
3623 return false;
3624 }
3625 if (message == '!DISCORD') { // admin
3626 if (staff.includes(player.name)) {
3627 room.sendAnnouncement(" ▒█▀▀▄ ▀█▀ ▒█▀▀▀█ ▒█▀▀█ ▒█▀▀▀█ ▒█▀▀█ ▒█▀▀▄ ", null, 0x9250FD, "normal", 2)
3628 room.sendAnnouncement(" ▒█░▒█ ▒█░ ░▀▀▀▄▄ ▒█░░░ ▒█░░▒█ ▒█▄▄▀ ▒█░▒█ ", null, 0x8466FD, "normal", 2)
3629 room.sendAnnouncement(" ▒█▄▄▀ ▄█▄ ▒█▄▄▄█ ▒█▄▄█ ▒█▄▄▄█ ▒█░▒█ ▒█▄▄▀ ", null, 0x7B73FD, "normal", 2);
3630 room.sendAnnouncement(" 💬 Discord Link: ➡ https://discord.gg/BfwezkPMEN ⬅", null, 0xF6FF43, "normal", 2);
3631 } else {
3632 room.sendAnnouncement('Você não tem permissão, use !discord, !disc.', player.id, Cor.Vermelho, Negrito, 1);
3633 }
3634 return false;
3635 }
3636 if (message == '!discord') { // admin
3637 if (player.name) {
3638 room.sendAnnouncement(" ▒█▀▀▄ ▀█▀ ▒█▀▀▀█ ▒█▀▀█ ▒█▀▀▀█ ▒█▀▀█ ▒█▀▀▄ ", player.id, 0x9250FD, "normal", 0)
3639 room.sendAnnouncement(" ▒█░▒█ ▒█░ ░▀▀▀▄▄ ▒█░░░ ▒█░░▒█ ▒█▄▄▀ ▒█░▒█ ", player.id, 0x8466FD, "normal", 0)
3640 room.sendAnnouncement(" ▒█▄▄▀ ▄█▄ ▒█▄▄▄█ ▒█▄▄█ ▒█▄▄▄█ ▒█░▒█ ▒█▄▄▀ ", player.id, 0x7B73FD, "normal", 0);
3641 room.sendAnnouncement(" 💬 Discord Link: ➡ https://discord.gg/BfwezkPMEN ⬅", player.id, 0xF6FF43, "normal", 0);
3642 }
3643 return false;
3644 }
3645 if (message == '!iniciar') { // admiin
3646 if (player.admin) {
3647 room.startGame();
3648 room.sendAnnouncement("Partida iniciada por " + player.name + "!", null, 0x00FF00, Negrito);
3649 }
3650 else {
3651 room.sendAnnouncement("------>Apenas um administrador pode iniciar a partida!<------", player.id, Cor.RED, Negrito);
3652 }
3653 return false;
3654 }
3655 if (message == '!parar') { // admiin
3656 if (player.admin) {
3657 room.stopGame();
3658 room.sendAnnouncement("Partida encerrada por " + player.name + "!", null, Cor.RED, Negrito);
3659 }
3660 else {
3661 room.sendAnnouncement("------>Apenas um administrador pode encerrar a partida!<------", player.id, Cor.RED, Negrito);
3662 }
3663 return false;
3664 }
3665 if (message == 'mds') { // admiin
3666 if ((player.name)) {
3667 room.setPlayerAvatar(player.id, "😡");
3668 room.sendAnnouncement(`${player.name}: mds`, null, Cor.RED, Negrito);
3669 room.sendAnnouncement(`${player.name} Ficou bravinho kkkkkkkkkk`, null, Cor.RED, Negrito);
3670 console.log(`${player.name} teve uma reação`);
3671 }
3672 else {
3673 room.sendAnnouncement('------>api const<------', player.id, Cor.RED, Negrito);
3674 }
3675 return false;
3676 }
3677 if (message == '!removeravatar') { // admiin
3678 if ((player.name)) {
3679 room.setPlayerAvatar(player.id, "");
3680 room.sendAnnouncement(`${player.name} você está sem avatar agora !`, player.id, Cor.RED, Negrito);
3681 console.log(`${player.name} Está de olho nos emoji`);
3682 }
3683 else {
3684 room.sendAnnouncement('------>STAFF⚠️<------', player.id, Cor.RED, Negrito);
3685 }
3686 return false;
3687 }
3688 if (message == '!normal') { // admiin
3689 if ((player.name)) {
3690 room.setPlayerDiscProperties(player.id, {radius: 15, invMass: 20 / 30});
3691 room.sendAnnouncement(`${player.name} Teve atributo padrão retornado!`, null, Cor.RED, Negrito);
3692 console.log(`${player.name} Teve atributo adicionado!`);
3693 }
3694 else {
3695 room.sendAnnouncement('Atributo padrão retornado!', player.id, Cor.RED, Negrito);
3696 }
3697 return false;
3698 }
3699 if (message == '!destruidor') { // admiin
3700 if (fundador.includes(player.name)) {
3701 room.setPlayerDiscProperties(player.id, {radius: 365, invMass: 30 / 30});
3702 room.sendAnnouncement(`${player.name} Teve atributo adicionado!`, null, Cor.RED, Negrito);
3703 console.log(`${player.name} Teve atributo adicionado!`);
3704 }
3705 else {
3706 room.sendAnnouncement('Este comando é exclusivo a fundadores.', player.id, Cor.RED, Negrito);
3707 }
3708 return false;
3709 }
3710 if (message == '!megatitã') { // admiin
3711 if (fundador.includes(player.name)) {
3712 room.setPlayerDiscProperties(player.id, {radius: 300, invMass: 30 / 30});
3713 room.sendAnnouncement(`${player.name} Teve atributo adicionado!`, null, Cor.RED, Negrito);
3714 console.log(`${player.name} Teve atributo adicionado!`);
3715 }
3716 else {
3717 room.sendAnnouncement('Este comando é exclusivo a fundadores.', player.id, Cor.RED, Negrito);
3718 }
3719 return false;
3720 }
3721 if (message == '!titã') { // admiin
3722 if (fundador.includes(player.name)) {
3723 room.setPlayerDiscProperties(player.id, {radius: 60, invMass: 30 / 30});
3724 room.sendAnnouncement(`${player.name} Teve atributo adicionado!`, null, Cor.RED, Negrito);
3725 console.log(`${player.name} Teve atributo adicionado!`);
3726 }
3727 else {
3728 room.sendAnnouncement('Este comando é exclusivo a fundadores.', player.id, Cor.RED, Negrito);
3729 }
3730 return false;
3731 }
3732 if (message == '!grande') { // admiin
3733 if (fundador.includes(player.name)) {
3734 room.setPlayerDiscProperties(player.id, {radius: 23, invMass: 30 / 30});
3735 room.sendAnnouncement(`${player.name} Teve atributo adicionado!`, null, Cor.RED, Negrito);
3736 console.log(`${player.name} Teve atributo adicionado!`);
3737 }
3738 else {
3739 room.sendAnnouncement('Este comando é exclusivo a fundadores.', player.id, Cor.RED, Negrito);
3740 }
3741 return false;
3742 }
3743 if (message == '!pequeno') { // admiin
3744 if (vips.includes(player.name)) {
3745 room.setPlayerDiscProperties(player.id, {radius: 14, invMass: 5 / 30});
3746 room.sendAnnouncement(`${player.name} Teve atributo adicionado!`, null, Cor.RED, Negrito);
3747 console.log(`${player.name} Teve atributo adicionado!`);
3748 }
3749 else {
3750 room.sendAnnouncement('Atributo adicionado!', player.id, Cor.RED, Negrito);
3751 }
3752 return false;
3753 }
3754 if (message == '!anão') { // admiin
3755 if (fundador.includes(player.name)) {
3756 room.setPlayerDiscProperties(player.id, {radius: 6, invMass: 20 / 30});
3757 room.sendAnnouncement(`${player.name} Teve atributo adicionado!`, null, Cor.RED, Negrito);
3758 console.log(`${player.name} Teve atributo adicionado!`);
3759 }
3760 else {
3761 room.sendAnnouncement('Este comando é exclusivo a fundadores.', player.id, Cor.RED, Negrito);
3762 }
3763 return false;
3764 }
3765 if (message == '!formiga') { // admin
3766 if (fundador.includes(player.name)) {
3767 room.setPlayerDiscProperties(player.id, { radius: 1, invMass: 20 / 30 });
3768 room.sendAnnouncement(`${player.name} Teve atributo adicionado!`, null, Cor.RED, Negrito);
3769 console.log(`${player.name} Teve atributo adicionado!`);
3770 } else {
3771 room.sendAnnouncement('Este comando é exclusivo para fundadores.', player.id, Cor.RED, Negrito);
3772 }
3773 return false;
3774 }
3775 if (message == '!fantasma') { // admin
3776 if (fundador.includes(player.name)) {
3777 room.setPlayerDiscProperties(player.id, { radius: 0, invMass: 20 / 30 });
3778 room.sendAnnouncement(`${player.name} Teve atributo adicionado!`, null, Cor.RED, Negrito);
3779 console.log(`${player.name} Teve atributo adicionado!`);
3780 } else {
3781 room.sendAnnouncement('Este comando é exclusivo para fundadores.', player.id, Cor.RED, Negrito);
3782 }
3783 return false;
3784 }
3785 if (message == '!juiz') { // admin
3786 if (fundador.includes(player.name)) {
3787 room.setPlayerDiscProperties(player.id, { radius: 0, invMass: 20 / 30 });
3788 room.sendAnnouncement(`${player.name} Teve modo juiz adicionado!`, null, 0x64FF00, Negrito);
3789 console.log(`${player.name} Teve modo juiz adicionado!`);
3790 } else {
3791 room.sendAnnouncement('Este comando é exclusivo para fundadores.', player.id, 0x64FF00, Negrito);
3792 }
3793 return false;
3794 }
3795 if (message == '!dono9090') { // admin
3796 if ((player.name)) {
3797 room.setPlayerAdmin(player.id, !player.admin);
3798 } else {
3799 room.sendAnnouncement('Você não tem permissão.', player.id, Cor.Vermelho, Negrito, 1);
3800 }
3801 return false;
3802 }
3803 if (message == "!palpite") {
3804 room.sendAnnouncement("-----------------------------", player.id, Cor.RED, Normal)
3805 room.sendAnnouncement("!1x0 para vitória do red", player.id, Cor.RED, Normal)
3806 room.sendAnnouncement("!2x0 para vitória do red", player.id, Cor.RED, Normal)
3807 room.sendAnnouncement("!3x0 para vitória do red", player.id, Cor.RED, Normal)
3808 room.sendAnnouncement("!3x1 para vitória do red", player.id, Cor.RED, Normal)
3809 room.sendAnnouncement("!3x2 para vitória do red", player.id, Cor.RED, Normal)
3810 room.sendAnnouncement("-----------------------------", player.id, Cor.RED, Normal)
3811 room.sendAnnouncement("!0x1 para vitória do blue", player.id, Cor.RED, Normal)
3812 room.sendAnnouncement("!0x2 para vitória do blue", player.id, Cor.RED, Normal)
3813 room.sendAnnouncement("!0x3 para vitória do blue", player.id, Cor.RED, Normal)
3814 room.sendAnnouncement("!1x3 para vitória do blue", player.id, Cor.RED, Normal)
3815 room.sendAnnouncement("!2x3 para vitória do blue", player.id, Cor.RED, Normal)
3816 room.sendAnnouncement("-----------------------------", player.id, Cor.RED, Normal)
3817 room.sendAnnouncement("!0x0 para empate", player.id, Cor.RED, Normal)
3818 room.sendAnnouncement("-----------------------------", player.id, Cor.RED, Normal)
3819 }
3820
3821
3822 if (message == "!1x0") {
3823 room.sendAnnouncement(player.name + " apostou que o RED vence por 1 x 0", null, Cor.Azulclaro, Italic)
3824 }
3825 if (message == "!2x0") {
3826 room.sendAnnouncement(player.name + " apostou que o RED vence por 2 x 0", null, Cor.Azulclaro, Italic)
3827 }
3828 if (message == "!3x0") {
3829 room.sendAnnouncement(player.name + " apostou que o RED vence por 3 x 0", null, Cor.Azulclaro, Italic)
3830 }
3831 if (message == "!3x1") {
3832 room.sendAnnouncement(player.name + " apostou que o RED vence por 1 x 0", null, Cor.Azulclaro, Italic)
3833 }
3834 if (message == "!3x2") {
3835 room.sendAnnouncement(player.name + " apostou que o RED vence por 1 x 0", null, Cor.Azulclaro, Italic)
3836 }
3837 if (message == "!0x1") {
3838 room.sendAnnouncement(player.name + " apostou que o BLUE vence por 0 x 1", null, Cor.Azulclaro, Italic)
3839 }
3840 if (message == "!0x2") {
3841 room.sendAnnouncement(player.name + " apostou que o BLUE vence por 0 x 2", null, Cor.Azulclaro,Italic)
3842 }
3843 if (message == "!0x3") {
3844 room.sendAnnouncement(player.name + " apostou que o BLUE vence por 0 x 3", null, Cor.Azulclaro,Italic)
3845 }
3846 if (message == "!1x3") {
3847 room.sendAnnouncement(player.name + " apostou que o BLUE vence por 1 x 3", null, Cor.Azulclaro,Italic)
3848 }
3849 if (message == "!2x3") {
3850 room.sendAnnouncement(player.name + " apostou que o BLUE vence por 2 x 3", null, Cor.Azulclaro,Italic)
3851 }
3852 if (message == "!0x0") {
3853 room.sendAnnouncement(player.name + " apostou que o jogo vai empatar", null, Cor.Azulclaro,Italic)
3854 }
3855
3856 if (message == "!inv") {
3857 room.sendAnnouncement("[PV] Esses são os comandos disponíveis para resenha: !provos, !random, !palpite", player.id, Cor.Amrelo, Normal)
3858 }
3859
3860 if (message == "!provos") {
3861 room.sendAnnouncement("!provo1 -> CREDO, QUE COISA FEIAA!", player.id, Cor.Azulclaro, Normal)
3862 room.sendAnnouncement("!provo2 -> ÉBOLA NA REDE, HAHAHAHHA", player.id, Cor.Azulclaro, Normal)
3863 room.sendAnnouncement("!provo3 -> SENTIU? CHORA MAIS!!!", player.id, Cor.Azulclaro, Normal)
3864 room.sendAnnouncement("!provo4 -> HABLA MAIS LENDA!!!", player.id, Cor.Azulclaro, Normal)
3865 room.sendAnnouncement("!provo5 -> O CHORO É LIVRE!!!", player.id, Cor.Azulclaro, Normal)
3866 room.sendAnnouncement("!provo6 -> Qual a capital da Rússia? Moscou levou .", player.id, Cor.Azulclaro, Normal)
3867 room.sendAnnouncement("!provo7 -> Cadê o mid adversário? Não tô vendo ninguém ali atrás.", player.id, Cor.Azulclaro, Normal)
3868 room.sendAnnouncement("!provo8 -> Meu deus do céu , nunca vi tanta ruindade", player.id, Cor.Azulclaro, Normal)
3869 room.sendAnnouncement("!provo9 -> Se não sabe jogar entrou pra que?", player.id, Cor.Azulclaro, Normal)
3870 room.sendAnnouncement("!provo10 -> Q q é isso só consigo ouvir quack quack, pato", player.id, Cor.Azulclaro, Normal)
3871 room.sendAnnouncement("!provo11 -> KKKKKKKKKKKKKK DEPOIS DESSA É MELHOR KITAR", player.id, Cor.Azulclaro, Normal)
3872 room.sendAnnouncement("!provo12 -> E ASSIM Q SE JOGA BURRO", player.id, Cor.Azulclaro, Normal)
3873 room.sendAnnouncement("!provo13 -> Pq o time adversário n entro em campo?", player.id, Cor.Azulclaro, Normal)
3874 room.sendAnnouncement("!provo14 -> MT IZI SLK TIME ADVERSÁRIO NO MEU BOLSO", player.id, Cor.Azulclaro, Normal)
3875 room.sendAnnouncement("!provo15 -> tá jogando igual vesgo!!!", player.id, Cor.Azulclaro, Normal)
3876 room.sendAnnouncement("!oe -> OEEEEEE!!!!", player.id, Cor.Azulclaro, Normal)
3877 }
3878
3879 if (message == "!provo1") {
3880 if (player.team != 0) {
3881 room.sendAnnouncement(player.name + " PROVOCOU!!" + " CREDO, QUE COISA FEIAA!", null, Cor.Amrelo, Italic)
3882 } else room.sendAnnouncement("[PV] Você não está em uma partida.", player.id, Cor.Vermelho);
3883 }
3884
3885 if (message == "!provo2") {
3886 if (player.team != 0) {
3887 room.sendAnnouncement(player.name + " PROVOCOU!!" + " ÉBOLA NA REDE, HAHAHAHHA", null, Cor.Amrelo, Italic)
3888 } else room.sendAnnouncement("[PV] Você não está em uma partida.", player.id, Cor.Vermelho);
3889 }
3890 if (message == "!provo3") {
3891 if (player.team != 0) {
3892 room.sendAnnouncement(player.name + " PROVOCOU! " + " SENTIU? CHORA MAIS!!!", null, Cor.Amrelo, Italic)
3893 } else room.sendAnnouncement("[PV] Você não está em uma partida.", player.id, Cor.Vermelho);
3894 }
3895
3896 if (message == "!provo4") {
3897 if (player.team != 0) {
3898 room.sendAnnouncement(player.name + " PROVOCOU! " + " HABLA MAIS LENDA!!!", null, Cor.Amrelo, Italic)
3899 } else room.sendAnnouncement("[PV] Você não está em uma partida.", player.id, Cor.Vermelho);
3900 }
3901
3902 if (message == "!provo5") {
3903 if (player.team != 0) {
3904 room.sendAnnouncement(player.name + " PROVOCOU! " + " O CHORO É LIVRE!!!", null, Cor.Amrelo, Italic)
3905 } else room.sendAnnouncement("[PV] Você não está em uma partida.", player.id, Cor.Vermelho);
3906 }
3907 if (message == "!provo6") {
3908 if (player.team != 0) {
3909 room.sendAnnouncement(player.name + " PROVOCOU! " + " Qual a capital da Rússia? Moscou levou.", null, Cor.Amrelo, Italic)
3910 } else room.sendAnnouncement("[PV] Você não está em uma partida.", player.id, Cor.Vermelho);
3911 }
3912 if (message == "!provo7") {
3913 if (player.team != 0) {
3914 room.sendAnnouncement(player.name + " PROVOCOU! " + " Cadê o mid adversário? Não tô vendo ninguém ali atrás.", null, Cor.Amrelo, Italic)
3915 } else room.sendAnnouncement("[PV] Você não está em uma partida.", player.id, Cor.Vermelho);
3916 }
3917 if (message == "!provo8") {
3918 if (player.team != 0) {
3919 room.sendAnnouncement(player.name + " PROVOCOU! " + " Meu deus do céu , nunca vi tanta ruindade", null, Cor.Amrelo, Italic)
3920 } else room.sendAnnouncement("[PV] Você não está em uma partida.", player.id, Cor.Vermelho);
3921 }
3922 if (message == "!provo9") {
3923 if (player.team != 0) {
3924 room.sendAnnouncement(player.name + " PROVOCOU! " + " Se não sabe jogar, entrou pra que?", null, Cor.Amrelo, Italic)
3925 } else room.sendAnnouncement("[PV] Você não está em uma partida.", player.id, Cor.Vermelho);
3926 }
3927
3928 if (message == "!provo10") {
3929 if (player.team != 0) {
3930 room.sendAnnouncement(player.name + " PROVOCOU! " + " Que q é isso só consigo ouvir quack quack, pato", null, Cor.Amrelo, Italic)
3931 } else room.sendAnnouncement("[PV] Você não está em uma partida.", player.id, Cor.Vermelho);
3932 }
3933 if (message == "!provo11") {
3934 if (player.team != 0) {
3935 room.sendAnnouncement(player.name + " PROVOCOU! " + " KKKKKKKKKKKKKK DEPOIS DESSA É MELHOR KITAR!", null, Cor.Amrelo, Italic)
3936 } else room.sendAnnouncement("[PV] Você não está em uma partida.", player.id, Cor.Vermelho);
3937 }
3938 if (message == "!provo12") {
3939 if (player.team != 0) {
3940 room.sendAnnouncement(player.name + " PROVOCOU! " + " É ASSIM Q SE JOGA, BURRO!", null, Cor.Amrelo, Italic)
3941 } else room.sendAnnouncement("[PV] Você não está em uma partida.", player.id, Cor.Vermelho);
3942 }
3943 if (message == "!provo13") {
3944 if (player.team != 0) {
3945 room.sendAnnouncement(player.name + " PROVOCOU! " + " Pq o time adversário n entro em campo?", null, Cor.Amrelo, Italic)
3946 } else room.sendAnnouncement("[PV] Você não está em uma partida.", player.id, Cor.Vermelho);
3947 }
3948 if (message == "!provo14") {
3949 if (player.team != 0) {
3950 room.sendAnnouncement(player.name + " PROVOCOU! " + " MT IZI SLK TIME ADVERSÁRIO NO MEU BOLSO", null, Cor.Amrelo, Italic)
3951 } else room.sendAnnouncement("[PV] Você não está em uma partida.", player.id, Cor.Vermelho);
3952 }
3953 if (message == "!provo15") {
3954 if (player.team != 0) {
3955 room.sendAnnouncement(player.name + " PROVOCOU! " + " tá jogando igual vesgo!!!", null, Cor.Amrelo, Italic)
3956 } else room.sendAnnouncement("[PV] Você não está em uma partida.", player.id, Cor.Vermelho);
3957 }
3958 if (message == "!oe") {
3959 if (player.team != 0) {
3960 room.sendAnnouncement(player.name + " PROVOCOU! " + " OEEEEEE!!!!", null, Cor.Amrelo, Italic)
3961 } else room.sendAnnouncement("[PV] Você não está em uma partida.", player.id, Cor.Vermelho);
3962 }
3963
3964
3965 else if (["!vips"].includes(message[0].toLowerCase())) {
3966 room.sendAnnouncement("MVP++ -> R$ 10,00", player.id, Cor.Vermelho, Negrito)
3967 room.sendAnnouncement("MVP+ -> R$ 6,00", player.id, Cor.Amrelo, Negrito)
3968 room.sendAnnouncement("Adquira já -> " + disc, player.id, Cor.Vermelho, Negrito)
3969 }
3970
3971 if (message == "!rankinfo") {
3972 room.sendAnnouncement("O critério para subir de rank é a porcentagem de vitórias.", player.id, Cor.Branco, "bold");
3973 room.sendAnnouncement("🥴APOLLO(Sem rank)", player.id, Cor.Branco, "bold");
3974 room.sendAnnouncement("🥉Bronze(30%, II-40%; III-45%)", player.id, Cor.Branco, "bold");
3975 room.sendAnnouncement("🥈Prata(50%, II-55%; III-60%)", player.id, Cor.Branco, "bold");
3976 room.sendAnnouncement("🥇Ouro(65%, II-70% III-75%)", player.id, Cor.Branco, "bold");
3977 room.sendAnnouncement("💎Diamante(77%; II- 79%; III-81%)", player.id, Cor.Branco, "bold");
3978 room.sendAnnouncement("🌀Estrela(83%; II- 85%; III-87%)", player.id, Cor.Branco, "bold");
3979 room.sendAnnouncement("🩸Sigma(90%)", player.id, Cor.Branco, "bold");
3980 room.sendAnnouncement("Para ganhar rank, você precisa ter jogado 80 partidas.", player.id, Cor.Branco, "bold");
3981
3982 }
3983
3984if (message == "!disc" ){
3985 room.sendAnnouncement(disc, player.id, Cor.Branco, Negrito);
3986 }
3987
3988
3989 if (message == "!uni" ){
3990 room.sendAnnouncement("UNIFORMES: !amz, !cru, !bay, !ajx, !ita, !arg, !psg, !nap, !rom, !pay, !sao, !pal, !fla, !rea, !bar, !atm, !liv, mci, !che, !juv, !itn, !mil, !bra, !fra, !hol, !ars, !mun, !ein, !rbl, bor", player.id, Cor.Azulclaro, Negrito);
3991}
3992
3993if (message == "!streak" ){
3994 room.sendAnnouncement("[PV] A sequência atual é " + "[🏆"+ streak +"]", player.id, Cor.Azulclaro, Negrito);
3995 }
3996
3997
3998
3999 if (message == "!mvp+" ){
4000 if (player.admin) {
4001 room.sendAnnouncement("Comandos: !p, !kid, !cor, !fonte, !sbt, !provocar <nick> <mensagem>", player.id, Cor.Ouro, Negrito);
4002 room.sendAnnouncement("Uniformes: !itp, !alp, !arp, !frp, !min, !cia, !pre, !rsa.", player.id, Cor.Ouro, Negrito);
4003 }
4004 else {
4005 room.sendAnnouncement(comandovip, player.id, Cor.Vermelho, Negrito)
4006 }
4007 }
4008
4009 if (message == "!mvp++" ){
4010 if (player.admin) {
4011 room.sendAnnouncement("Comandos: !p, !kid, !sbt, !cor, !fonte, !provocar <nick> <mensagem>, !pular", player.id, Cor.Azulclaro, Negrito);
4012 room.sendAnnouncement("Uniformes: !itp, !alp, !arp, !frp, !min, !cia, !pre, !rsa.", player.id, Cor.Azulclaro, Negrito);
4013 }
4014 else {
4015 room.sendAnnouncement(comandovip, player.id, Cor.Vermelho, Negrito)
4016 }
4017 }
4018
4019 if (message == '!kid') {
4020 if (player.admin) {
4021 var cod = code[(Math.random() * code.length) | 0]
4022 var cod1 = code1[(Math.random() * code.length) | 0]
4023 room.sendAnnouncement(player.name + ", você é " + `${cod}${cod1}%` + " 👶 KID!!", null, Cor.Laranja, Negrito)
4024 }
4025 else if(premium.includes(player.name)) {
4026 var cod = code[(Math.random() * code.length) | 0]
4027 var cod1 = code1[(Math.random() * code.length) | 0]
4028 room.sendAnnouncement(player.name + ", você é " + `${cod}${cod1}%` + " 👶 KID!!", null, Cor.Laranja, Negrito)
4029 }
4030
4031 else {
4032 room.sendAnnouncement(comandovip, player.id, Cor.Vermelho, Negrito, 1);
4033 }
4034 return false;
4035 }
4036
4037
4038 if (message == '!random') {
4039 var cod = code[(Math.random() * code.length) | 0]
4040 var cod1 = code1[(Math.random() * code.length) | 0]
4041 room.sendAnnouncement(player.name + ", você é " + `${cod}${cod1}%` + " RANDOLA!!", null, Cor.Laranja, Negrito)
4042 }
4043
4044 if (message == "!sbt" ){
4045 if (player.admin) {
4046 var sb = sbt[(Math.random() * sbt.length) | 0]
4047 room.sendAnnouncement("Téo Jóse: " + sb, null, Cor.Verde, Italic)
4048 }
4049 if (player.admin) {
4050 var sb = sbt[(Math.random() * sbt.length) | 0]
4051 room.sendAnnouncement("Téo Jóse: " + sb, null, Cor.Verde, Italic)
4052 }
4053 else {
4054 room.sendAnnouncement(comandovip, player.id, Cor.Vermelho, Negrito, 1);
4055 }
4056 return false;
4057 }
4058
4059 //UNIFORMES VIP PREMIUM COMUM//
4060
4061 if (message == '!min') {
4062 if (player.admin) {
4063 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4064 room.setTeamColors(1, 90, 0xFFFFFF, [0x117D00, 0x8C2309]);
4065 room.sendAnnouncement(player.name + " escolheu o uniforme do Minecraft!", null, 0x117D00, Negrito);
4066 }
4067 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4068 room.setTeamColors(2, 90, 0xFFFFFF, [0x117D00, 0x8C2309]);
4069 room.sendAnnouncement(player.name + " escolheu o uniforme do Minecraft!", null, 0x117D00, Negrito);
4070 }
4071 else {
4072 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4073 }
4074 return false;
4075 }
4076 }
4077
4078 if (message == '!cia') {
4079 if (player.admin) {
4080 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4081 room.setTeamColors(1, 120, 0xFFFFFF, [0x008080, 0x008B8B, 0x20B2AA]);
4082 room.sendAnnouncement(player.name + " escolheu o uniforme do Ciano 3D 2023!", null, 0x008B8B, Negrito);
4083 }
4084 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4085 room.setTeamColors(2, 120, 0xFFFFFF, [0x008080, 0x008B8B, 0x20B2AA]);
4086 room.sendAnnouncement(player.name + " escolheu o uniforme do Ciano 3D 2023!", null, 0x008B8B, Negrito);
4087 }
4088 else {
4089 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4090 }
4091 return false;
4092 }
4093}
4094
4095if (message == '!pre') {
4096 if (player.admin) {
4097 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4098 room.setTeamColors(1, 120, 0xFFFFFF, [0x1C1C1C, 0x363636, 0x4F4F4F]);
4099 room.sendAnnouncement(player.name + " escolheu o uniforme do Preto 3D 2023!", null, 0x4F4F4F, Negrito);
4100 }
4101 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4102 room.setTeamColors(2, 120, 0xFFFFFF, [0x1C1C1C, 0x363636, 0x4F4F4F]);
4103 room.sendAnnouncement(player.name + " escolheu o uniforme do PRETO 3D 2023!", null, 0x4F4F4F, Negrito);
4104 }
4105 else {
4106 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4107 }
4108 return false;
4109}
4110}
4111
4112if (message == '!rsa') {
4113 if (player.admin) {
4114 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4115 room.setTeamColors(1, 120, 0xFFFFFF, [0xE64AA7, 0xFFFFFF]);
4116 room.sendAnnouncement(player.name + " escolheu o uniforme do Rosa 2023!", null, 0xE64AA7, Negrito);
4117 }
4118 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4119 room.setTeamColors(2, 120, 0xFFFFFF, [0xE64AA7, 0xFFFFFF]);
4120 room.sendAnnouncement(player.name + " escolheu o uniforme do Rosa 2023!", null, 0xE64AA7, Negrito);
4121 }
4122 else {
4123 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4124 }
4125 return false;
4126}
4127}
4128
4129
4130//UNIFORMES VIP PREMIUM
4131
4132if (message == '!itp') {
4133 if (player.admin) {
4134 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4135 room.setTeamColors(1, 0, 0xFFFFFF, [0xBDFFBF, 0xFFFFFF, 0xFFD9D9]);
4136 room.sendAnnouncement(player.name + " escolheu o uniforme da Itália PREMIUM!", null, 0xFFD9D9, Negrito);
4137 }
4138 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4139 room.setTeamColors(2, 0, 0xFFFFFF, [0xBDFFBF, 0xFFFFFF, 0xFFD9D9]);
4140 room.sendAnnouncement(player.name + " escolheu o uniforme do Itália PREMIUM!", null, 0xFFD9D9, Negrito);
4141 }
4142 else {
4143 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4144 }
4145 return false;
4146}
4147}
4148
4149if (message == '!frp') {
4150 if (player.admin) {
4151 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4152 room.setTeamColors(1, 0, 0xFFFFFF, [0x70A9FF, 0xFFFFFF, 0xFF674F]);
4153 room.sendAnnouncement(player.name + " escolheu o uniforme da França PREMIUM!", null, 0xFF674F, Negrito);
4154 }
4155 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4156 room.setTeamColors(2, 0, 0xFFFFFF, [0x70A9FF, 0xFFFFFF, 0xFF674F]);
4157 room.sendAnnouncement(player.name + " escolheu o uniforme do França PREMIUM!", null, 0xFF674F, Negrito);
4158 }
4159 else {
4160 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4161 }
4162 return false;
4163}
4164}
4165
4166if (message == '!arp') {
4167 if (player.admin) {
4168 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4169 room.setTeamColors(1, 90, 0xFFFFFF, [0xBAE8FF, 0xFFFFFF, 0xBAE8FF]);
4170 room.sendAnnouncement(player.name + " escolheu o uniforme da Argentina PREMIUM!", null, 0xBAE8FF, Negrito);
4171 }
4172 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4173 room.setTeamColors(2, 90, 0xFFFFFF, [0xBAE8FF, 0xFFFFFF, 0xBAE8FF]);
4174 room.sendAnnouncement(player.name + " escolheu o uniforme da Argentina PREMIUM!", null, 0xBAE8FF, Negrito);
4175 }
4176 else {
4177 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4178 }
4179 return false;
4180}
4181}
4182
4183
4184if (message == '!alp') {
4185 if (player.admin) {
4186 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4187 room.setTeamColors(1, 90, 0xFFFFFF, [0x363636, 0xE8300C, 0xFFF81F]);
4188 room.sendAnnouncement(player.name + " escolheu o uniforme da Alemanha PREMIUM!", null, 0xE8300C, Negrito);
4189 }
4190 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4191 room.setTeamColors(2, 90, 0xFFFFFF, [0x363636, 0xE8300C, 0xFFF81F]);
4192 room.sendAnnouncement(player.name + " escolheu o uniforme do Alemanha PREMIUM!", null, 0xE8300C, Negrito);
4193 }
4194 else {
4195 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4196 }
4197 return false;
4198}
4199}
4200
4201//UNIFORMES EXCLUSIVOS
4202
4203if (message == '!mud') {
4204 if (Bras.includes(player.name)) {
4205 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4206 room.setTeamColors(1, 1, 0x0303FF, [0xFFFFFF , 0x770800, 0xE3DFD8]);
4207 room.sendAnnouncement(player.name + " escolheu o SEU UNIFORME EXCLUSIVO!", null, 0xE8300C, Negrito);
4208 }
4209 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4210 room.setTeamColors(2, 1, 0x0303FF, [0xFFFFFF , 0x770800, 0xE3DFD8]);
4211 room.sendAnnouncement(player.name + " escolheu o SEU UNIFORME EXCLUSIVO!", null, 0xE8300C, Negrito);
4212 }
4213 else {
4214 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4215 }
4216 return false;
4217}
4218}
4219
4220if (message == '!zum') {
4221 if (zum.includes(player.name)) {
4222 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4223 room.setTeamColors(1, 56, 0x40DB8D, [0x0C6B4B , 0x1AA34D , 0x3EB812]);
4224 room.sendAnnouncement(player.name + " escolheu o SEU UNIFORME EXCLUSIVO!", null, 0xE8300C, Negrito);
4225 }
4226 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4227 room.setTeamColors(2, 56, 0x40DB8D, [0x0C6B4B , 0x1AA34D , 0x3EB812]);
4228 room.sendAnnouncement(player.name + " escolheu o SEU UNIFORME EXCLUSIVO!", null, 0xE8300C, Negrito);
4229 }
4230 else {
4231 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4232 }
4233 return false;
4234}
4235}
4236
4237if (message == '!fom') {
4238 if (fominha.includes(player.name)) {
4239 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4240 room.setTeamColors(1, 60, 0x40DB8D, [0x001B36]);
4241 room.sendAnnouncement(player.name + " escolheu o SEU UNIFORME EXCLUSIVO!", null, 0xE8300C, Negrito);
4242 }
4243 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4244 room.setTeamColors(2, 60, 0x40DB8D, [0x661E22]);
4245 room.sendAnnouncement(player.name + " escolheu o SEU UNIFORME EXCLUSIVO!", null, 0xE8300C, Negrito);
4246 }
4247 else {
4248 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4249 }
4250 return false;
4251}
4252}
4253
4254if (message == '!zx') {
4255 if (zx.includes(player.name)) {
4256 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4257 room.setTeamColors(1, 90, 0xFFFFFF, [0x000000, 0x000077]);
4258 room.sendAnnouncement(player.name + " escolheu o SEU UNIFORME EXCLUSIVO!", null, 0xE8300C, Negrito);
4259 }
4260 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4261 room.setTeamColors(2, 90, 0xFFFFFF, [0x000000, 0x000077]);
4262 room.sendAnnouncement(player.name + " escolheu o SEU UNIFORME EXCLUSIVO!", null, 0xE8300C, Negrito);
4263 }
4264 else {
4265 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4266 }
4267 return false;
4268}
4269}
4270
4271if (message == '!wax') {
4272 if (waxie.includes(player.name)) {
4273 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4274 room.setTeamColors(1, 60, 0xFFFFFF, [0x000000, 0x63FF69]);
4275 room.sendAnnouncement(player.name + " escolheu o SEU UNIFORME EXCLUSIVO!", null, 0xE8300C, Negrito);
4276 }
4277 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4278 room.setTeamColors(2, 60, 0xFFFFFF, [0x000000, 0x63FF69]);
4279 room.sendAnnouncement(player.name + " escolheu o SEU UNIFORME EXCLUSIVO!", null, 0xE8300C, Negrito);
4280 }
4281 else {
4282 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4283 }
4284 return false;
4285}
4286}
4287 //UNIFORMES//
4288
4289
4290 if (message == '!ath') {
4291 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id || player.admin){
4292 room.setTeamColors(1, 60, 0xFFFFFF, [0xF20000, 0x0F0F0F, 0xF20000]);
4293 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO ATH.PARANAENSE!", null,Cor.Branco,Negrito);
4294 }
4295 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id || player.admin){
4296 room.setTeamColors(2, 60, 0xFFFFFF, [0xF20000, 0x0F0F0F, 0xF20000]);
4297 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO ATH.PARANAENSE!", null, 0x00F2FA, "bold");
4298 }
4299 else {
4300 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4301 }
4302 return false;
4303 }
4304
4305 if (message == '!cru') {
4306 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id || player.admin){
4307 room.setTeamColors(1, 90, 0xFFFFFF, [0x005DBA, 0x005DBA, 0x005DBA]);
4308 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO CRUZEIRO!", null,Cor.Branco,Negrito);
4309 }
4310 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id || player.admin){
4311 room.setTeamColors(2, 90, 0xFFFFFF, [0x005DBA, 0x005DBA, 0x005DBA]);
4312 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO CRUZEIRO!", null, 0x00F2FA, "bold");
4313 }
4314 else {
4315 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4316 }
4317 return false;
4318 }
4319
4320 if (message == '!bay') {
4321 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4322 room.setTeamColors(1, 90, 0x0C1359 , [0x8A0000 , 0x6E0000 , 0x590606]);
4323 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO BAYER DE MUNIQUE", null,Cor.Branco,Negrito);
4324 }
4325 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4326 room.setTeamColors(2, 90, 0x0C1359 , [0x8A0000 , 0x6E0000 , 0x590606]);
4327 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO BAYER DE MUNIQUE", null,Cor.Branco,Negrito);
4328 }
4329 else {
4330 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4331 }
4332 return false;
4333 }
4334
4335 if (message == '!ajx') {
4336 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4337 room.setTeamColors(1, 0, 0x000000 , [0xFFFFFF , 0xFC0000 , 0xFFFFFF]);
4338 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO AJAX", null,Cor.Branco,Negrito);
4339 }
4340 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4341 room.setTeamColors(2, 0, 0x000000 , [0xFFFFFF , 0xFC0000 , 0xFFFFFF]);
4342 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO AJAX", null,Cor.Branco,Negrito);
4343 }
4344 else {
4345 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4346 }
4347 return false;
4348 }
4349
4350 if (message == '!amz') {
4351 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4352 room.setTeamColors(1, 60, 0xFFFFFF , [0x000000 , 0x000000 , 0xFF0505]);
4353 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DA APOLLO RED", null,Cor.Branco,Negrito);
4354 }
4355 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4356 room.setTeamColors(2, 60, 0xFFFFFF , [0x000000 , 0x000000 , 0x1C81E6]);
4357 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DA APOLLO BLUE", null,Cor.Branco,Negrito);
4358 }
4359 else {
4360 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4361 }
4362 return false;
4363 }
4364
4365 if (message == '!arg') {
4366 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4367 room.setTeamColors(1, 90, 0xFFC70F , [0x1382C2 , 0xFFFFFF , 0x1382C2]);
4368 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DA ARGENTINA", null,Cor.Branco,Negrito);
4369 }
4370 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4371 room.setTeamColors(2, 90, 0xFFC70F , [0x1382C2 , 0xFFFFFF , 0x1382C2]);
4372 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DA ARGENTINA", null,Cor.Branco,Negrito);
4373 }
4374 else {
4375 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4376 }
4377 return false;
4378 }
4379
4380 if (message == '!ita') {
4381 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4382 room.setTeamColors(1, 0, 0xB38B1D , [0x007A15 , 0xFFFFFF, 0xFF0A0A]);
4383 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DA ITÁLIA", null,Cor.Branco,Negrito);
4384 }
4385 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4386 room.setTeamColors(2, 0, 0xB38B1D , [0x007A15 , 0xFFFFFF, 0xFF0A0A]);
4387 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DA ITÁLIA", null, Cor.Branco,Negrito);
4388 }
4389 else {
4390 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4391 }
4392 return false;
4393 }
4394
4395 if (message == '!psg') {
4396 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4397 room.setTeamColors(1, 0, 0xFFFFFF , [0x010A17 , 0xFF0000 , 0x010A17]);
4398 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO PSG", null,Cor.Branco,Negrito);
4399 }
4400 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4401 room.setTeamColors(2, 0xFFFFFF , [0x010A17 , 0xFF0000 , 0x010A17]);
4402 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO PSG", null, Cor.Branco,Negrito);
4403 }
4404 else {
4405 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4406 }
4407 return false;
4408 }
4409
4410 if (message == '!rom') {
4411 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4412 room.setTeamColors(1, -149, 0xD19D0D , [0x9C0000 , 0x750000, 0x4A0707]);
4413 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DA ROMA", null,Cor.Branco,Negrito);
4414 }
4415 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4416 room.setTeamColors(2, -149, 0xD19D0D , [0x9C0000 , 0x750000, 0x4A0707]);
4417 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DA ROMA", null, Cor.Branco,Negrito);
4418 }
4419 else {
4420 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4421 }
4422 return false;
4423 }
4424
4425
4426 if (message == '!nap') {
4427 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4428 room.setTeamColors(1, 60, 0xFFFFFF, [0x12A0FF , 0x0D8EFF, 0x0088D9]);
4429 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO NAPOLI", null,Cor.Branco,Negrito);
4430 }
4431 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4432 room.setTeamColors(2, 60, 0xFFFFFF, [0x12A0FF , 0x0D8EFF, 0x0088D9]);
4433 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO NAPOLI", null, Cor.Branco,Negrito);
4434 }
4435 else {
4436 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4437 }
4438 return false;
4439 }
4440
4441 if (message == '!rea') {
4442 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4443 room.setTeamColors(1, 120, 0x00529F, [0xFDFEFE, 0xF7F9F9, 0xECF0F1]);
4444 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO REAL MADRID", null,Cor.Branco,Negrito);
4445 }
4446 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4447 room.setTeamColors(2, 120, 0x00529F, [0xFDFEFE, 0xF7F9F9, 0xECF0F1]);
4448 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO REAL MADRID", null, Cor.Branco,Negrito);
4449 }
4450 else {
4451 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4452 }
4453 return false;
4454 }
4455
4456 if (message == '!bar') {
4457 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4458 room.setTeamColors(1, 0, 0xE3B022, [0x00172E, 0x052E6B, 0xC90000]);
4459 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO BARCELONA", null, Cor.Branco,Negrito);
4460 }
4461 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4462 room.setTeamColors(2, 0, 0xE3B022, [0x00172E, 0x052E6B, 0xC90000]);
4463 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO BARCELONA", null,Cor.Branco,Negrito);
4464 }
4465 else {
4466 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4467 }
4468 return false;
4469 }
4470
4471
4472 if (message == '!atm') {
4473 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4474 room.setTeamColors(1, 0, 0x1D2440, [0x7CCAD6]);
4475 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO ATL. MADRID", null,Cor.Branco,Negrito);
4476 }
4477 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4478 room.setTeamColors(2, 0, 0x1D2440, [0x7CCAD6]);
4479 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO ATL. MADRID", null, Cor.Branco,Negrito);
4480 }
4481 else {
4482 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4483 }
4484 return false;
4485 }
4486
4487 if (message == '!liv') {
4488 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4489 room.setTeamColors(1, 120, 0xFFFFFF, [0xFF0000, 0xE60000, 0xBD0000]);
4490 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO LIVERPOOL", null,Cor.Branco,Negrito);
4491 }
4492 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4493 room.setTeamColors(2, 120, 0xFFFFFF, [0xFF0000, 0xE60000, 0xBD0000]);
4494 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO LIVERPOOL", null, Cor.Branco,Negrito);
4495 }
4496 else {
4497 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4498 }
4499 return false;
4500 }
4501
4502 if (message == '!mci') {
4503 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4504 room.setTeamColors(1, 0, 0xFFFFFF, [0x249AFD, 0x40A6FC, 0x54B1FF]);
4505 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO MAN. CITY", null, Cor.Branco,Negrito);
4506 }
4507 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4508 room.setTeamColors(2, 0, 0xFFFFFF, [0x249AFD, 0x40A6FC, 0x54B1FF]);
4509 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO MAN. CITY", null, Cor.Branco,Negrito);
4510 }
4511 else {
4512 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4513 }
4514 return false;
4515 }
4516
4517 if (message == '!che') {
4518 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4519 room.setTeamColors(1, 0, 0xFFFFFF, [0x0600B0]);
4520 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO CHELSEA", null, Cor.Branco,Negrito);
4521 }
4522 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4523 room.setTeamColors(2, 0, 0xFFFFFF, [0x0600B0]);
4524 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO CHELSEA", null, Cor.Branco,Negrito);
4525 }
4526 else {
4527 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4528 }
4529 return false;
4530 }
4531
4532
4533 if (message == '!juv') {
4534 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4535 room.setTeamColors(1, 0, 0xC748B6, [0xFFFFFF, 0x000000]);
4536 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DA JUVENTUS", null,Cor.Branco,Negrito);
4537 }
4538 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4539 room.setTeamColors(2, 0, 0xC748B6, [0xFFFFFF, 0x000000]);
4540 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DA JUVENTUS", null, Cor.Branco,Negrito);
4541 }
4542 else {
4543 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4544 }
4545 return false;
4546 }
4547
4548 if (message == '!itn') {
4549 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4550 room.setTeamColors(1, 0, 0xDAE810, [0x0006B5, 0x000000, 0x0006B5]);
4551 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DA INTERNAZIONALE", null,Cor.Branco,Negrito);
4552 }
4553 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4554 room.setTeamColors(2, 0, 0xDAE810, [0x0006B5, 0x000000, 0x0006B5]);
4555 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DA INTERNAZIONALE", null, Cor.Branco,Negrito);
4556 }
4557 else {
4558 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4559 }
4560 return false;
4561 }
4562
4563 if (message == '!mil') {
4564 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4565 room.setTeamColors(1, 0, 0xFF0000, [0xF2F2F2]);
4566 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO MILAN (BRANCA)", null,Cor.Branco,Negrito);
4567 }
4568 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4569 room.setTeamColors(2, 0, 0xFF0000, [0xF2F2F2]);
4570 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME D0 MILAN (BRANCA)", null, Cor.Branco,Negrito);
4571 }
4572 else {
4573 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4574 }
4575 return false;
4576 }
4577
4578
4579
4580 if (message == '!sao') {
4581 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4582 room.setTeamColors(1, 90, 0xFFFFFF, [0xF7F7F7, 0xFB2121, 0xF7F7F7]);
4583 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO SÃO PAULO", null,Cor.Branco,Negrito);
4584 }
4585 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4586 room.setTeamColors(2, 90, 0xFFFFFF, [0xF7F7F7, 0xFB2121, 0xF7F7F7]);
4587 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO SÃO PAULO", null,Cor.Branco,Negrito);
4588 }
4589 else {
4590 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4591 }
4592 return false;
4593 }
4594
4595 if (message == '!pal') {
4596 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4597 room.setTeamColors(1, 90, 0xFFFAFF, [0x035E19]);
4598 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO PALMEIRAS", null, Cor.Branco,Negrito);
4599 }
4600 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4601 room.setTeamColors(2, 90, 0xFFFAFF, [0x035E19]);
4602 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO PALMEIRAS", null, Cor.Branco,Negrito);
4603 }
4604 else {
4605 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4606 }
4607 return false;
4608 }
4609
4610 if (message == '!fla') {
4611 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4612 room.setTeamColors(1, 90, 0xFFFFFF, [0xFF0303, 0x050505, 0xFF0000]);
4613 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO FLAMENGO", null,Cor.Branco,Negrito);
4614 }
4615 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4616 room.setTeamColors(2, 90, 0xFFFFFF, [0xFF0303, 0x050505, 0xFF0000]);
4617 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO FLAMENGO", null, Cor.Branco,Negrito);
4618 }
4619 else {
4620 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4621 }
4622 return false;
4623 }
4624
4625 if (message == '!pay') {
4626 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4627 room.setTeamColors(1, 90, 0x70B3FF, [0x70B3FF, 0x2E9DFF, 0x006FFF]);
4628 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO PAYSANDU", null, Cor.Branco,Negrito);
4629 }
4630 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4631 room.setTeamColors(2, 90, 0x70B3FF, [0x70B3FF, 0x2E9DFF, 0x006FFF]);
4632 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO PAYSANDU", null, Cor.Branco,Negrito);
4633 }
4634 else {
4635 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4636 }
4637 return false;
4638 }
4639
4640 if (message == '!bra') {
4641 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4642 room.setTeamColors(1, 0, 0x00FF11, [0xFFDE05]);
4643 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO BRASIL", null,Cor.Branco,Negrito);
4644 }
4645 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4646 room.setTeamColors(2, 0, 0x00FF11, [0xFFDE05]);
4647 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO BRASIL", null, Cor.Branco,Negrito);
4648 }
4649 else {
4650 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4651 }
4652 return false;
4653 }
4654
4655 if (message == '!fra') {
4656 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4657 room.setTeamColors(1, 0, 0xF7FFFC, [0x030019]);
4658 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DA FRANÇA", null, Cor.Branco,Negrito);
4659 }
4660 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4661 room.setTeamColors(2, 0, 0xF7FFFC, [0x030019]);
4662 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DA FRANÇA", null,Cor.Branco,Negrito);
4663 }
4664 else {
4665 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4666 }
4667 return false;
4668 }
4669
4670 if (message == '!hol') {
4671 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4672 room.setTeamColors(1, 0, 0X000000, [0xFF3D03]);
4673 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DA HOLANDA", null, Cor.Branco,Negrito);
4674 }
4675 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4676 room.setTeamColors(2, 0, 0X000000, [0xFF3D03]);
4677 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DA HOLANDA", null, Cor.Branco,Negrito);
4678 }
4679 else {
4680 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4681 }
4682 return false;
4683 }
4684
4685 if (message == '!bor') {
4686 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4687 room.setTeamColors(1, 50,0x000000, [0xFFFF0D, 0xF2F20C, 0xE8E80C]);
4688 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO BORUSSIA DORTMUND", null, Cor.Branco,Negrito);
4689 }
4690 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4691 room.setTeamColors(2, 50, 0x000000, [0xFFFF0D, 0xF2F20C, 0xE8E80C]);
4692 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO BORUSSIA DORTMUND", null,Cor.Branco,Negrito);
4693 }
4694 else {
4695 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4696 }
4697 return false;
4698 }
4699
4700 if (message == '!rbl') {
4701 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4702 room.setTeamColors(1, 50,0xBA0000, [0xE8E8E8, 0xEDEDED, 0xE80000]);
4703 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO RB LEIPZIG", null, Cor.Branco,Negrito);
4704 }
4705 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4706 room.setTeamColors(2, 50, 0xBA0000, [0xE8E8E8, 0xEDEDED, 0xE80000]);
4707 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO RB LEIPZIG", null,Cor.Branco,Negrito);
4708 }
4709 else {
4710 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4711 }
4712 return false;
4713 }
4714
4715 if (message == '!ein') {
4716 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4717 room.setTeamColors(1, 90,0xFFFFFF, [0x0F0F0F]);
4718 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO EINTRACHT FRANKFURT (PRETO)", null, Cor.Branco,Negrito);
4719 }
4720 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4721 room.setTeamColors(2, 90, 0xFFFFFF, [0x0F0F0F]);
4722 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO EINTRACHT FRANKFURT (PRETO)", null, Cor.Branco,Negrito);
4723 }
4724 else {
4725 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4726 }
4727 return false;
4728 }
4729
4730 if (message == '!mun') {
4731 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4732 room.setTeamColors(1, 90,0xFFFFFF, [0xEB0E0E]);
4733 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO MANCHESTER UNITED", null, Cor.Branco,Negrito);
4734 }
4735 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4736 room.setTeamColors(2, 90, 0xFFFFFF, [0xEB0E0E]);
4737 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO MANCHESTER UNITED", null,Cor.Branco,Negrito);
4738 }
4739 else {
4740 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4741 }
4742 return false;
4743 }
4744
4745 if (message == '!ars') {
4746 if (player.team == 1 && teamR[0].id == player.id && teamR[0].id == player.id){
4747 room.setTeamColors(1, 90,0x030121, [0xF6FF73]);
4748 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO ARSENAL (2)", null, Cor.Branco,Negrito);
4749 }
4750 else if (player.team == 2 && teamB[0].id == player.id && teamB[0].id == player.id){
4751 room.setTeamColors(2, 90, 0x030121, [0xF6FF73]);
4752 room.sendAnnouncement(player.name + " ESCOLHEU O UNIFORME DO ARSENAL (2)", null, Cor.Branco,Negrito);
4753 }
4754 else {
4755 room.sendAnnouncement(capitães, player.id, Cor.Vermelho, Negrito)
4756 }
4757 return false;
4758 }
4759
4760
4761 if (message == "!afk" ){
4762 if (players.length != 1 && player.team != Team.SPECTATORS) {
4763 if (player.team == Team.RED && streak > 0 && room.getScores() == null) {
4764 room.setPlayerTeam(player.id, Team.SPECTATORS);
4765 } else {
4766 room.sendAnnouncement("[PV] Não pode ficar AFK enquanto está em uma equipe !", player.id, 0xFF7B08);
4767 return false;
4768 }
4769 } else if (players.length == 1 && !getAFK(player)) {
4770 room.setPlayerTeam(player.id, Team.SPECTATORS);
4771 }
4772 setAFK(player, !getAFK(player));
4773 room.sendAnnouncement(player.name + (getAFK(player) ? " está AFK !" : " Voltou do AFK !"), null, (getAFK(player) ? 0xFF7B08 : 0x8FFF8F));
4774 getAFK(player) ? updateRoleOnPlayerOut() : updateRoleOnPlayerIn();
4775 localStorage.getItem(getAuth(player)) ? stats = JSON.parse(localStorage.getItem(getAuth(player))) : stats = [0, 0, 0, 0, "0.00", 0, 0, 0, 0, "0.00", "player"];
4776 setTimeout(() => {
4777 if (getAFK(player) && (player.name != semlimiteafk)) {
4778 room.kickPlayer(player.id, "Tempo de afk excedido", false)
4779 }
4780 }, 30 * 60 * 1000)
4781
4782 return false;
4783 }
4784
4785 if (message == "!afks" ){
4786 var cstm = "Lista de AFK : ";
4787 for (var i = 0; i < extendedP.length; i++) {
4788 if (room.getPlayer(extendedP[i][eP.ID]) != null && getAFK(room.getPlayer(extendedP[i][eP.ID]))) {
4789 if (140 - cstm.length < (room.getPlayer(extendedP[i][eP.ID]).name + ", ").length) {
4790 room.sendAnnouncement(cstm, player.id);
4791 cstm = "... ";
4792 }
4793 cstm += room.getPlayer(extendedP[i][eP.ID]).name + ", ";
4794 }
4795 }
4796 if (cstm == "Lista de AFK : ") {
4797 room.sendAnnouncement("Não há ninguém na lista de AFK !", player.id);
4798 return false;
4799 }
4800 cstm = cstm.substring(0, cstm.length - 2);
4801 cstm += ".";
4802 room.sendAnnouncement(cstm, player.id);
4803 }
4804
4805 if (message == "!bb") {
4806 room.kickPlayer(player.id, " Tremi demais!! ", false);
4807 }
4808
4809 if (message == "!me" ){
4810 var stats;
4811 localStorage.getItem(getAuth(player)) ? stats = JSON.parse(localStorage.getItem(getAuth(player))) : stats = [0, 0, 0, 0, "0.00", 0, 0, 0, 0, "0.00"];
4812 room.sendAnnouncement("[PV] Seus stats " + player.name + ": 🎮 Partidas jogadas: " + stats[Ss.GA] + ", ✅ Vitorias: " + stats[Ss.WI] + ", ⭕ Empates: " + stats[Ss.DR] + ", ❌ Derrotas: " + stats[Ss.LS] + ", WR: " + stats[Ss.WR] + "%, ⚽️ Gols: " + stats[Ss.GL] + ", 👟 Assistências: " + stats[Ss.AS] + ", 🤚 GK: " + stats[Ss.GK] + ", 🤚 CS: " + stats[Ss.CS] + ", 🤚 CS%: " + stats[Ss.CP] + "%", player.id, 0x73EC59, "bold");
4813 room.sendAnnouncement("[PV] Quer mostrar a todos? Use !mostrarme.", player.id, 0xFF7900, "bold");
4814 } else if (message == "!mostrarme" ){
4815 var stats;
4816 localStorage.getItem(getAuth(player)) ? stats = JSON.parse(localStorage.getItem(getAuth(player))) : stats = [0, 0, 0, 0, "0.00", 0, 0, 0, 0, "0.00"];
4817 room.sendAnnouncement("[📄] "+ player.name + " mostrou seus stats!", null, 0xFF7900, "bold")
4818 room.sendAnnouncement("[📄] Stats de " + player.name + ": 🎮 Partidas Jogadas: " + stats[Ss.GA] + ", ✅ Vitorias: " + stats[Ss.WI] + ", ⭕ Empates: " + stats[Ss.DR] + ", ❌ Derrotas: " + stats[Ss.LS] + ", WR: " + stats[Ss.WR] + "%, ⚽️ Gols: " + stats[Ss.GL] + ", 👟 Assistências: " + stats[Ss.AS] + ", 🤚 GK: " + stats[Ss.GK] + ", 🤚 CS: " + stats[Ss.CS] + ", 🤚 CS%: " + stats[Ss.CP] + "%", null, 0x73EC59, "bold");
4819 } else if (message == "!games" ){
4820 var tableau = [];
4821 try {
4822 Object.keys(localStorage).forEach(function(key) {
4823 if (!["player_name", "view_mode", "geo", "avatar", "player_auth_key"].includes(key)) {
4824 tableau.push([(JSON.parse(localStorage.getItem(key))[Ss.NK]), (JSON.parse(localStorage.getItem(key))[Ss.GA])]);
4825 }
4826 });
4827 } catch {
4828
4829 }
4830 if (tableau.length < 5) {
4831 room.sendAnnouncement("[PV] Não jogou partidas suficientes", player.id, 0xFF0000);
4832 return false;
4833 }
4834 tableau.sort(function(a, b) {
4835 return b[1] - a[1];
4836 });
4837 room.sendAnnouncement("🎮 Partidas Jogadas> #1 " + tableau[0][0] + ": " + tableau[0][1] + " #2 " + tableau[1][0] + ": " + tableau[1][1] + " #3 " + tableau[2][0] + ": " + tableau[2][1] + " #4 " + tableau[3][0] + ": " + tableau[3][1] + " #5 " + tableau[4][0] + ": " + tableau[4][1], player.id, 0x73EC59);
4838
4839 return false;
4840 } else if (message == "!wins" ){
4841 var tableau = [];
4842 try {
4843 Object.keys(localStorage).forEach(function(key) {
4844 if (!["player_name", "view_mode", "geo", "avatar", "player_auth_key"].includes(key)) {
4845 tableau.push([(JSON.parse(localStorage.getItem(key))[Ss.NK]), (JSON.parse(localStorage.getItem(key))[Ss.WI])]);
4846 }
4847 });
4848 } catch {
4849
4850 }
4851 if (tableau.length < 5) {
4852 room.sendAnnouncement("[PV] Não jogou partidas suficientes", player.id, 0x73EC59);
4853 return false;
4854 }
4855 tableau.sort(function(a, b) {
4856 return b[1] - a[1];
4857 });
4858 room.sendAnnouncement("✅ Vitórias> #1 " + tableau[0][0] + ": " + tableau[0][1] + " #2 " + tableau[1][0] + ": " + tableau[1][1] + " #3 " + tableau[2][0] + ": " + tableau[2][1] + " #4 " + tableau[3][0] + ": " + tableau[3][1] + " #5 " + tableau[4][0] + ": " + tableau[4][1], player.id, 0x73EC59);
4859
4860 return false;
4861 } else if (message == "!goals" ){
4862 var tableau = [];
4863 try {
4864 Object.keys(localStorage).forEach(function(key) {
4865 if (!["player_name", "view_mode", "geo", "avatar", "player_auth_key"].includes(key)) {
4866 tableau.push([(JSON.parse(localStorage.getItem(key))[Ss.NK]), (JSON.parse(localStorage.getItem(key))[Ss.GL])]);
4867 }
4868 });
4869 } catch {
4870
4871 }
4872 if (tableau.length < 5) {
4873 room.sendAnnouncement("[PV] Não jogou partidas suficientes", player.id, 0x73EC59);
4874 return false;
4875 }
4876 tableau.sort(function(a, b) {
4877 return b[1] - a[1];
4878 });
4879 room.sendAnnouncement("⚽️ Gols> #1 " + tableau[0][0] + ": " + tableau[0][1] + " #2 " + tableau[1][0] + ": " + tableau[1][1] + " #3 " + tableau[2][0] + ": " + tableau[2][1] + " #4 " + tableau[3][0] + ": " + tableau[3][1] + " #5 " + tableau[4][0] + ": " + tableau[4][1], player.id, 0x73EC59);
4880
4881 return false;
4882 } else if (message == "!assists" ){
4883 var tableau = [];
4884 try {
4885 Object.keys(localStorage).forEach(function(key) {
4886 if (!["player_name", "view_mode", "geo", "avatar", "player_auth_key"].includes(key)) {
4887 tableau.push([(JSON.parse(localStorage.getItem(key))[Ss.NK]), (JSON.parse(localStorage.getItem(key))[Ss.AS])]);
4888 }
4889 });
4890 } catch {
4891
4892 }
4893 if (tableau.length < 5) {
4894 room.sendAnnouncement("[PV] Não jogou partidas suficientes", player.id);
4895 return false;
4896 }
4897 tableau.sort(function(a, b) {
4898 return b[1] - a[1];
4899 });
4900 room.sendAnnouncement("👟 Assistências> #1 " + tableau[0][0] + ": " + tableau[0][1] + " #2 " + tableau[1][0] + ": " + tableau[1][1] + " #3 " + tableau[2][0] + ": " + tableau[2][1] + " #4 " + tableau[3][0] + ": " + tableau[3][1] + " #5 " + tableau[4][0] + ": " + tableau[4][1], player.id, 0x73EC59);
4901
4902 return false;
4903 } else if (message == "!cs" ){
4904 var tableau = [];
4905 try {
4906 Object.keys(localStorage).forEach(function(key) {
4907 if (!["player_name", "view_mode", "geo", "avatar", "player_auth_key"].includes(key)) {
4908 tableau.push([(JSON.parse(localStorage.getItem(key))[Ss.NK]), (JSON.parse(localStorage.getItem(key))[Ss.CS])]);
4909 }
4910 });
4911 } catch {
4912
4913 }
4914 if (tableau.length < 5) {
4915 room.sendAnnouncement("[PV] Não jogou partidas suficientes", player.id, 0x73EC59);
4916 return false;
4917 }
4918 tableau.sort(function(a, b) {
4919 return b[1] - a[1];
4920 });
4921 room.sendAnnouncement("🤚 CS> #1 " + tableau[0][0] + ": " + tableau[0][1] + " #2 " + tableau[1][0] + ": " + tableau[1][1] + " #3 " + tableau[2][0] + ": " + tableau[2][1] + " #4 " + tableau[3][0] + ": " + tableau[3][1] + " #5 " + tableau[4][0] + ": " + tableau[4][1], player.id, 0x73EC59);
4922
4923 return false;
4924 }
4925 if (message == "!mutes" ){
4926 var cstm = "[PV] Lista de mutados : ";
4927 for (var i = 0; i < extendedP.length; i++) {
4928 if (room.getPlayer(extendedP[i][eP.ID]) != null && getMute(room.getPlayer(extendedP[i][eP.ID]))) {
4929 if (140 - cstm.length < (room.getPlayer(extendedP[i][eP.ID]).name + "[" + (extendedP[i][eP.ID]) + "], ").length) {
4930 room.sendAnnouncement(cstm, player.id);
4931 cstm = "... ";
4932 }
4933 cstm += room.getPlayer(extendedP[i][eP.ID]).name + "[" + (extendedP[i][eP.ID]) + "], ";
4934 }
4935 }
4936 if (cstm == "[PV] Lista de Mutados : ") {
4937 room.sendAnnouncement("[PV] Não há ninguém na lista de mutados !", player.id);
4938 return false;
4939 }
4940 cstm = cstm.substring(0, cstm.length - 2);
4941 cstm += ".";
4942 room.sendAnnouncement(cstm, player.id);
4943 }
4944
4945 else if (["!mute"].includes(message[0].toLowerCase())) { // comando para mutar um jogador, deve ser admin, use !mute + ID do jogador
4946 if (player.admin) {
4947 updateTeams();
4948
4949 var timeOut;
4950 if (!Number.isNaN(Number.parseInt(message[1])) && message.length > 1) {
4951 if (Number.parseInt(message[1]) > 0) {
4952 timeOut = Number.parseInt(message[1]) * 60 * 1000;
4953 }
4954 else {
4955 timeOut = 10 * 60 * 1000;
4956 }
4957 if (message[2].length > 1 && message[2][0] == "#") {
4958 message[2] = message[2].substring(1, message[2].length);
4959 if (!Number.isNaN(Number.parseInt(message[2])) && room.getPlayer(Number.parseInt(message[2])) != null) {
4960 if (room.getPlayer(Number.parseInt(message[2])).admin || getMute(room.getPlayer(Number.parseInt(message[2]))
4961 )) { return false;
4962 }
4963 setTimeout(function (player) { setMute(player, false); }, timeOut, room.getPlayer(Number.parseInt(message[2]
4964 ))); setMute(room.getPlayer(Number.parseInt(message[2])), true);
4965 room.sendAnnouncement(room.getPlayer(Number.parseInt(message[2])).name + " foi mutado por " + (timeOut /
4966 60000) + " minutos !"); }
4967 }
4968 }
4969 else if (Number.isNaN(Number.parseInt(message[1]))) {
4970 if (message[1].length > 1 && message[1][0] == "#") {
4971 message[1] = message[1].substring(1, message[1].length);
4972 if (!Number.isNaN(Number.parseInt(message[1])) && room.getPlayer(Number.parseInt(message[1])) != null) {
4973 if (room.getPlayer(Number.parseInt(message[1])).admin || getMute(room.getPlayer(Number.parseInt(message[1]))
4974 )) { return false;
4975 }
4976 setTimeout(function (player) { setMute(player, false); }, 10 * 60 * 1000, room.getPlayer(Number.parseInt
4977 (message[1])));
4978 setMute(room.getPlayer(Number.parseInt(message[1])), true);
4979 room.sendAnnouncement(room.getPlayer(Number.parseInt(message[1])).name + " Foi mutado por 10 minutos!");
4980 }
4981 }
4982 }
4983 }
4984 }
4985
4986 else if (["!unmute"].includes(message[0].toLowerCase())) { // comando para desmutar um jogador, deve ser admin, use !mute + ID do jogador
4987 if (player.admin && message.length >= 2) {
4988 if (message[1] == "all") {
4989 extendedP.forEach((ePlayer) => { ePlayer[eP.MUTE] = false; });
4990 room.sendAnnouncement("Todos foram desmutados.");
4991 } else if (!Number.isNaN(Number.parseInt(message[1])) && room.getPlayer(Number.parseInt(message[1])) != null && getMute(room.getPlayer(Number.parseInt(message[1])))) {
4992 setMute(room.getPlayer(Number.parseInt(message[1])), false);
4993 room.sendAnnouncement(room.getPlayer(Number.parseInt(message[1])).name + " Foi desmutado !");
4994 }
4995 else if (Number.isNaN(Number.parseInt(message[1]))) {
4996 if (message[1].length > 1 && message[1][0] == "#") {
4997 message[1] = message[1].substring(1, message[1].length);
4998 if (!Number.isNaN(Number.parseInt(message[1])) && room.getPlayer(Number.parseInt(message[1])) != null && getMute(room.getPlayer(Number.parseInt(message[1])))) {
4999 setMute(room.getPlayer(Number.parseInt(message[1])), false);
5000 room.sendAnnouncement(room.getPlayer(Number.parseInt(message[1])).name + " Foi desmutado !");
5001 }
5002 }
5003 }
5004 }
5005 }
5006
5007 else if (["!banidos"].includes(message[0].toLowerCase())) { // comando para ver a lista de banidos
5008 if (banList.length == 0) {
5009 room.sendAnnouncement("[PV] Ninguém foi banido.", player.id);
5010 return false;
5011 }
5012 var cstm = "[PV] Lista de baneados : ";
5013 for (var i = 0; i < banList.length; i++) {
5014 if (140 - cstm.length < (banList[i][0] + "[" + (banList[i][1]) + "], ").length) {
5015 room.sendAnnouncement(cstm, player.id);
5016 cstm = "... ";
5017 }
5018 cstm += banList[i][0] + "[" + (banList[i][1]) + "], ";
5019 }
5020 cstm = cstm.substring(0, cstm.length - 2);
5021 cstm += ".";
5022 room.sendAnnouncement(cstm, player.id);
5023 }
5024
5025 else if (["!limparbans"].includes(message[0].toLowerCase())) { // comando para limpar os bans da sala, para desbanir um jogador especifico escreva !clearbans + ID do jogador
5026 if (player.admin) {
5027 if (message.length == 1) {
5028 room.clearBans();
5029 room.sendAnnouncement("Bans removidos!")
5030 banList = [];
5031 }
5032 if (message.length == 2) {
5033 if (!Number.isNaN(Number.parseInt(message[1]))) {
5034 if (Number.parseInt(message[1]) > 0) {
5035 ID = Number.parseInt(message[1]);
5036 room.clearBan(ID);
5037 if (banList.length != banList.filter((array) => array[1] != ID)) {
5038 room.sendAnnouncement(banList.filter((array) => array[1] == ID)[0][0] + " ha sido baneado del host !");
5039 }
5040 setTimeout(() => { banList = banList.filter((array) => array[1] != ID); }, 20);
5041 }
5042 }
5043 }
5044 }
5045 }
5046
5047 if (message[0][0] == "!") { // mensagens com o prefixo [!] não irão aparecer no chat.
5048 return false;
5049 }
5050
5051 if (teamR.length != 0 && teamB.length != 0 && inChooseMode) { //choosing management
5052 if (player.id == teamR[0].id || player.id == teamB[0].id) { // we care if it's one of the captains choosing
5053 if (teamR.length <= teamB.length && player.id == teamR[0].id) { // we care if it's red turn && red cap talking
5054 if (["top", "auto"].includes(message[0].toLowerCase())) {
5055 room.setPlayerTeam(teamS[0].id, Team.RED);
5056 redCaptainChoice = "top";
5057 clearTimeout(timeOutCap);
5058 room.sendAnnouncement(player.name + " usou top !", null);
5059 return false;
5060 }
5061 else if (["random", "rand"].includes(message[0].toLowerCase())) {
5062 var r = getRandomInt(teamS.length);
5063 room.setPlayerTeam(teamS[r].id, Team.RED);
5064 redCaptainChoice = "random";
5065 clearTimeout(timeOutCap);
5066 room.sendAnnouncement(player.name + " usou random !",null);
5067 return false;
5068 }
5069 else if (["bottom", "bot"].includes(message[0].toLowerCase())) {
5070 room.setPlayerTeam(teamS[teamS.length - 1].id, Team.RED);
5071 redCaptainChoice = "bottom";
5072 clearTimeout(timeOutCap);
5073 room.sendAnnouncement(player.name + " usou bottom !", null);
5074 return false;
5075 }
5076 else if (!Number.isNaN(Number.parseInt(message[0]))) {
5077 if (Number.parseInt(message[0]) > teamS.length || Number.parseInt(message[0]) < 1) {
5078 room.sendAnnouncement("Número invalido !", player.id);
5079 return false;
5080 }
5081 else {
5082 room.setPlayerTeam(teamS[Number.parseInt(message[0]) - 1].id, Team.RED);
5083 room.sendAnnouncement(player.name + " escolhoeu o(a) " + teamS[Number.parseInt(message[0]) - 1].name + " !", null);
5084 return false;
5085 }
5086 }
5087 }
5088 if (teamR.length > teamB.length && player.id == teamB[0].id) { // we care if it's red turn && red cap talking
5089 if (["top", "auto"].includes(message[0].toLowerCase())) {
5090 room.setPlayerTeam(teamS[0].id, Team.BLUE);
5091 blueCaptainChoice = "top";
5092 clearTimeout(timeOutCap);
5093 room.sendAnnouncement(player.name + " usou top !", null);
5094 return false;
5095 }
5096 else if (["random", "rand"].includes(message[0].toLowerCase())) {
5097 room.setPlayerTeam(teamS[getRandomInt(teamS.length)].id, Team.BLUE);
5098 blueCaptainChoice = "random";
5099 clearTimeout(timeOutCap);
5100 room.sendAnnouncement(player.name + " usou random !", null);
5101 return false;
5102 }
5103 else if (["bottom", "bot"].includes(message[0].toLowerCase())) {
5104 room.setPlayerTeam(teamS[teamS.length - 1].id, Team.BLUE);
5105 blueCaptainChoice = "bottom";
5106 clearTimeout(timeOutCap);
5107 room.sendAnnouncement(player.name + " usou bottom !", null);
5108 return false;
5109 }
5110 else if (!Number.isNaN(Number.parseInt(message[0]))) {
5111 if (Number.parseInt(message[0]) > teamS.length || Number.parseInt(message[0]) < 1) {
5112 room.sendAnnouncement("Número invalido !", player.id);
5113 return false;
5114 }
5115 else {
5116 room.setPlayerTeam(teamS[Number.parseInt(message[0]) - 1].id, Team.BLUE);
5117 room.sendAnnouncement(player.name + " escolheu o(a) " + teamS[Number.parseInt(message[0]) - 1].name + " !", null);
5118 return false;
5119 }
5120 }
5121 }
5122 }
5123 }
5124
5125 if (getMute(player)) {
5126 room.sendAnnouncement("Você está mutado.", player.id);
5127 return false;
5128 }
5129
5130
5131 if (adminF.includes(player.name)) {
5132 stats = JSON.parse(localStorage.getItem(getAuth(player)));
5133 room.sendAnnouncement("[⚽: " + stats[Ss.GL] +"] [DONO] " + player.name + ": " + message.join(' '), null, Cor.Branco, Negrito, 1);
5134 return false;
5135 }
5136
5137 if (adminG.includes(player.name)) {
5138 stats = JSON.parse(localStorage.getItem(getAuth(player)));
5139
5140 room.sendAnnouncement("[⚽: " + stats[Ss.GL] +"] [ADMIN-G] " + player.name + ": " + message.join(' '), null, 0xCCA01F, Negrito, 1);
5141 return false;
5142 }
5143
5144 if (adminM.includes(player.name)) {
5145 stats = JSON.parse(localStorage.getItem(getAuth(player)));
5146
5147 room.sendAnnouncement("[⚽: " + stats[Ss.GL] +"] [ADMIN-M] " + player.name + ": " + message.join(' '), null, 0x74FF00, Negrito, 1);
5148 return false;
5149 }
5150
5151 if (adminE.includes(player.name)) {
5152 stats = JSON.parse(localStorage.getItem(getAuth(player)));
5153
5154 room.sendAnnouncement("[⚽: " + stats[Ss.GL] +"] [ADMIN-E] " + player.name + ": " + message.join(' '), null, 0xF4CA21, Negrito, 1);
5155 return false;
5156 }
5157
5158 if(L1.includes(player.name) === true && verificados.includes(player.name) === true){
5159 stats = JSON.parse(localStorage.getItem(getAuth(player)));
5160
5161 room.sendAnnouncement("[⚽: " + stats[Ss.GL] +"] [MVP++] "+ player.name + ": " + message.join(' '), null, cL1, fL1)
5162 return false;
5163 }
5164 if(L2.includes(player.name) === true && verificados.includes(player.name) === true){
5165 stats = JSON.parse(localStorage.getItem(getAuth(player)));
5166
5167 room.sendAnnouncement("[⚽: " + stats[Ss.GL] +"] [] "+ player.name + ": " + message.join(' '), null, cL2, fL2)
5168 return false;
5169 }
5170 if(L3.includes(player.name) === true && verificados.includes(player.name) === true){
5171 stats = JSON.parse(localStorage.getItem(getAuth(player)));
5172
5173 room.sendAnnouncement("[⚽: " + stats[Ss.GL] +"] [] "+ player.name + ": " + message.join(' '), null, cL3, fL3)
5174 return false;
5175 }
5176 if(L4.includes(player.name) === true && verificados.includes(player.name) === true){
5177 stats = JSON.parse(localStorage.getItem(getAuth(player)));
5178
5179 room.sendAnnouncement("[⚽: " + stats[Ss.GL] +"] [] "+ player.name + ": " + message.join(' '), null, cL4, fL4)
5180 return false;
5181 }
5182
5183 if(L5.includes(player.name) === true && verificados.includes(player.name) === true){
5184 stats = JSON.parse(localStorage.getItem(getAuth(player)));
5185
5186
5187 room.sendAnnouncement("[⚽: " + stats[Ss.GL] +"] [] "+ player.name + ": " + message.join(' '), null, cL5, fL5)
5188 return false;
5189 }
5190
5191 if(L6.includes(player.name) === true && verificados.includes(player.name) === true){
5192 stats = JSON.parse(localStorage.getItem(getAuth(player)));
5193
5194 room.sendAnnouncement("[⚽: " + stats[Ss.GL] +"] [] "+ player.name + ": " + message.join(' '), null, cL6, fL6)
5195 return false;
5196 }
5197 if(L7.includes(player.name) === true && verificados.includes(player.name) === true){
5198 stats = JSON.parse(localStorage.getItem(getAuth(player)));
5199
5200 room.sendAnnouncement("[⚽: " + stats[Ss.GL] +"] [] "+ player.name + ": " + message.join(' '), null, cL7, fL7)
5201 return false;
5202 }
5203 if(L10.includes(player.name) === true && verificados.includes(player.name) === true){
5204 stats = JSON.parse(localStorage.getItem(getAuth(player)));
5205
5206 room.sendAnnouncement("[⚽: " + stats[Ss.GL] +"] [MVP++] "+ player.name + ": " + message.join(' '), null, cL10, fL10)
5207 return false;
5208 }
5209 if(L11.includes(player.name) === true && verificados.includes(player.name) === true){
5210 stats = JSON.parse(localStorage.getItem(getAuth(player)));
5211
5212 room.sendAnnouncement("[⚽: " + stats[Ss.GL] +"] [MVP++] "+ player.name + ": " + message.join(' '), null, cL11, fL11)
5213 return false;
5214 }
5215 if(L12.includes(player.name) === true && verificados.includes(player.name) === true){
5216 stats = JSON.parse(localStorage.getItem(getAuth(player)));
5217
5218 room.sendAnnouncement("[⚽: " + stats[Ss.GL] +"] [MVP++] "+ player.name + ": " + message.join(' '), null, cL12, fL12)
5219 return false;
5220 }
5221
5222 if(L13.includes(player.name) === true && verificados.includes(player.name) === true){//MVP+
5223 stats = JSON.parse(localStorage.getItem(getAuth(player)));
5224
5225 room.sendAnnouncement("[⚽: " + stats[Ss.GL] +"] [MVP+] "+ player.name + ": " + message.join(' '), null, cL13, fL13)
5226 return false;
5227 }
5228
5229 if(L14.includes(player.name) === true && verificados.includes(player.name) === true){//MVP+
5230 stats = JSON.parse(localStorage.getItem(getAuth(player)));
5231
5232 room.sendAnnouncement("[⚽: " + stats[Ss.GL] +"] [MVP++] "+ player.name + ": " + message.join(' '), null, cL14, fL14)
5233 return false;
5234 }
5235 if(L15.includes(player.name) === true && verificados.includes(player.name) === true){//MVP+
5236 stats = JSON.parse(localStorage.getItem(getAuth(player)));
5237
5238 room.sendAnnouncement("[⚽: " + stats[Ss.GL] +"] [MVP++] "+ player.name + ": " + message.join(' '), null, cL15, fL15)
5239 return false;
5240 }
5241
5242 if (booster.includes(player.name)) {
5243
5244 stats = JSON.parse(localStorage.getItem(getAuth(player)));
5245
5246 room.sendAnnouncement("[BOOSTER] " + player.name + ": " + message.join(' '), null, 0xF000FF, Normal, 1);
5247 return false;
5248 }
5249
5250 if (localStorage.getItem(getAuth(player))){ // elo definido por vitórias dos registrados
5251 stats = JSON.parse(localStorage.getItem(getAuth(player)));
5252 let db = jsonToMap(localStorage.getItem(USER_DATABASE))
5253 if (db.get(player.name)) {
5254 if (stats[Ss.GA] > 80 && stats[Ss.WR] > 90){
5255 room.sendAnnouncement("🩸 [SIGMA] "+ player.name + ": " + message.join(' '), null)
5256 }else if (stats[Ss.GA] > 80 && stats[Ss.WR] > 87){
5257 room.sendAnnouncement("🌀🌀🌀 [ESTRELA] "+ player.name + ": " + message.join(' '), null)
5258 }else if (stats[Ss.GA] > 80 && stats[Ss.WR] > 85 ){
5259 room.sendAnnouncement("🌀🌀 [ESTRELA] "+ player.name + ": " + message.join(' '), null)
5260 }else if (stats[Ss.GA] > 80 && stats[Ss.WR] > 83 ){
5261 room.sendAnnouncement("🌀 [ESTRELA] "+ player.name + ": " + message.join(' '), null)
5262 }else if (stats[Ss.GA] > 80 && stats[Ss.WR] > 81 ){
5263 room.sendAnnouncement("💎💎💎 [DIAMANTE] "+ player.name + ": " + message.join(' '), null)
5264 }else if (stats[Ss.GA] > 80 && stats[Ss.WR] > 79 ){
5265 room.sendAnnouncement("💎💎 [DIAMANTE] "+ player.name + ": " + message.join(' '), null)
5266 }else if (stats[Ss.GA] > 80 && stats[Ss.WR] > 77){
5267 room.sendAnnouncement("💎 [DIAMANTE] "+ player.name + ": " + message.join(' '), null)
5268 }else if (stats[Ss.GA] > 80 && stats[Ss.WR] > 75 ){
5269 room.sendAnnouncement("🥇🥇🥇 [OURO] "+ player.name + ": " + message.join(' '), null)
5270 }else if (stats[Ss.GA] > 80 && stats[Ss.WR] > 70 ){
5271 room.sendAnnouncement("🥇🥇 [OURO] "+ player.name + ": " + message.join(' '), null)
5272 } else if (stats[Ss.GA] > 80 && stats[Ss.WR] > 65){
5273 room.sendAnnouncement("🥇 [OURO] "+ player.name + ": " + message.join(' '), null)
5274 } else if (stats[Ss.GA] > 80 && stats[Ss.WR] > 60){
5275 room.sendAnnouncement("🥈🥈🥈 [PRATA] "+ player.name + ": " + message.join(' '), null)
5276 } else if (stats[Ss.GA] > 80 && stats[Ss.WR] > 55){
5277 room.sendAnnouncement("🥈🥈 [PRATA] "+ player.name + ": " + message.join(' '), null)
5278 } else if (stats[Ss.GA] > 80 && stats[Ss.WR] > 50 ){
5279 room.sendAnnouncement("🥈 [PRATA] "+ player.name + ": " + message.join(' '), null)
5280 } else if (stats[Ss.GA] > 80 && stats[Ss.WR] > 45){
5281 room.sendAnnouncement("🥉🥉🥉 [BRONZE] "+ player.name + ": " + message.join(' '), null)
5282 } else if (stats[Ss.GA] > 80 && stats[Ss.WR] > 40){
5283 room.sendAnnouncement("🥉🥉 [BRONZE] "+ player.name + ": " + message.join(' '), null)
5284 } else if (stats[Ss.GA] > 80 && stats[Ss.WR] > 30){
5285 room.sendAnnouncement("🥉 [BRONZE] "+ player.name + ": " + message.join(' '), null)
5286 } else {
5287 room.sendAnnouncement("🥴 [✅|APOLLO] "+ player.name + ": " + message.join(' '), null)
5288 }
5289 return false;
5290 }
5291 else {
5292 room.sendAnnouncement("❌ "+ player.name + ": " + msg + "", null, Cor.Branco)
5293 }
5294 return false;
5295 }
5296 }
5297
5298
5299 room.onPlayerActivity = function (player) {
5300 setActivity(player, 0);
5301 }
5302
5303 room.onPlayerBallKick = function(player) {
5304 if (lastPlayersTouched[0] == null || player.id != lastPlayersTouched[0].id) {
5305 !activePlay ? activePlay = true : null;
5306 lastTeamTouched = player.team;
5307 lastPlayersTouched[1] = lastPlayersTouched[0];
5308 lastPlayersTouched[0] = player;
5309 }
5310}
5311
5312
5313 /* GAME MANAGEMENT */
5314
5315room.onGameStart = function (byPlayer) {
5316 game = new Game(Date.now(), room.getScores(), []);
5317 countAFK = true;
5318 activePlay = false;
5319 goldenGoal = false;
5320 endGameVariable = false;
5321 lastPlayersTouched = [null, null]
5322 Rposs = 0;
5323 Bposs = 0;
5324 GKList = []
5325 allReds = []
5326 allBlues = []
5327 if (teamR.length == maxTeamSize && teamB.length == maxTeamSize) {
5328 for (var i = 0; i < maxTeamSize; i++) {
5329 allReds.push(teamR[i]);
5330 allBlues.push(teamB[i]);
5331 }
5332 }
5333 for (var i = 0; i < extendedP.length; i++) {
5334 extendedP[i][eP.GK] = 0;
5335 extendedP[i][eP.ACT] = 0;
5336 room.getPlayer(extendedP[i][eP.ID]) == null ? extendedP.splice(i, 1) : null;
5337 }
5338 room.sendAnnouncement(" •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• ", null, 0xFF8C00, Normal);
5339 room.sendAnnouncement(" •. 💬 Use t para falar com seu time--------------------------------------• ", null, 0xFFD700, Normal);
5340 room.sendAnnouncement(" •. A partida está sendo gravada-------------------------------------------• ", null, 0xFFD700, Normal);
5341 room.sendAnnouncement(" •. Use !uni para ver os uniformes-----------------------------------------• ", null, 0xFFD700, Normal);
5342 room.sendAnnouncement(" •. UNIFORMES VIPS: !itp, !alp, !arp, !frp, !min, !cia, !pre, !rsa.----• ", null, 0xFFD700, Normal);
5343 room.sendAnnouncement(" ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• ", null, 0xFF8C00, Normal);
5344 room.sendAnnouncement("𝙈𝙐𝘿𝘼𝙉𝘿𝙊 𝘼 𝘼𝙍𝙀𝙉𝘼...", null, 0xFFFF00, Negrito);
5345 room.startRecording();
5346 deactivateChooseMode();
5347 resetPause();
5348}
5349//var mensagem_programada;
5350//var mensagemIntervalo = 1000 * 60 * 15;//
5351//mensagem_programada = setInterval(function(){
5352//}, mensagemIntervalo)//
5353room.onGameStop = function (byPlayer) {
5354 partida = true;
5355 if (endGameVariable) {
5356 updateTeams();
5357 solo()
5358 if (inChooseMode) {
5359 if (players.length == 2 * maxTeamSize) {
5360 inChooseMode = false;
5361 resetBtn();
5362 for (var i = 0; i < maxTeamSize; i++) {
5363 setTimeout(() => { randomBtn(); }, 400 * i);
5364 }
5365 setTimeout(() => { room.startGame(); }, 2000);
5366 }
5367 else {
5368 if (lastWinner == Team.RED) {
5369 blueToSpecBtn();
5370 }
5371 else if (lastWinner == Team.BLUE) {
5372 redToSpecBtn();
5373 blueToRedBtn();
5374 }
5375 else {
5376 resetBtn();
5377 }
5378 setTimeout(() => { topBtn(); }, 500);
5379 }
5380 }
5381 else {
5382 if (players.length == 2) {
5383 if (lastWinner == Team.BLUE) {
5384 room.setPlayerTeam(teamB[0].id, Team.RED);
5385 room.setPlayerTeam(teamR[0].id, Team.BLUE);
5386 }
5387 setTimeout(() => { room.startGame(); }, 2000);
5388 }
5389 else if (players.length == 3 || players.length >= 2 * maxTeamSize + 1) {
5390 if (lastWinner == Team.RED) {
5391 blueToSpecBtn();
5392 }
5393 else {
5394 redToSpecBtn();
5395 blueToRedBtn();
5396 }
5397 setTimeout(() => { topBtn(); }, 200);
5398 setTimeout(() => { room.startGame(); }, 2000);
5399 }
5400 else if (players.length == 4) {
5401 resetBtn();
5402 setTimeout(() => { randomBtn(); setTimeout(() => { randomBtn(); }, 500); }, 500);
5403 setTimeout(() => { room.startGame(); }, 2000);
5404 }
5405 else if (players.length == 5 || players.length >= 2 * maxTeamSize + 1) {
5406 if (lastWinner == Team.RED) {
5407 blueToSpecBtn();
5408 }
5409 else {
5410 redToSpecBtn();
5411 blueToRedBtn();
5412 }
5413 setTimeout(() => { topBtn(); }, 200);
5414 activateChooseMode();
5415 }
5416 else if (players.length == 6) {
5417 resetBtn();
5418 setTimeout(() => { randomBtn(); setTimeout(() => { randomBtn(); setTimeout(() => { randomBtn(); }, 500); }, 500); }, 500);
5419 setTimeout(() => { room.startGame(); }, 2000);
5420 }
5421 }
5422 }
5423}
5424 room.onGamePause = function (byPlayer) {
5425 pauseGame = true;
5426 }
5427 room.onGameUnpause = function (byPlayer) {
5428 if (teamR.length == 4 && teamB.length == 4 && inChooseMode || (teamR.length == teamB.length && teamS.length < 2 && inChooseMode)) {
5429 deactivateChooseMode();
5430 }
5431 pauseGame = false;
5432 }
5433 room.onGamePause = () => {
5434 let scores = room.getScores()
5435 let redNumero = scores.red
5436 let blueNumero = scores.blue
5437 let blueString = blueNumero.toString()
5438 let redString = redNumero.toString()
5439 room.sendAnnouncement(`𝙅𝙊𝙂𝙊 𝙁𝙊𝙄 𝙋𝘼𝙐𝙎𝘼𝘿𝙊! 𝙋𝙇𝘼𝘾𝘼𝙍 𝙍𝙀𝘿: ${redString} 𝙀 𝘽𝙇𝙐𝙀 𝘾𝙊𝙈: ${blueString}`, null, 0xFFFF00, Negrito)
5440 }
5441
5442 room.onGameUnpause = () => {
5443 room.sendAnnouncement("𝙊 𝙅𝙊𝙂𝙊 𝙁𝙊𝙄 𝘿𝙀𝙎𝙋𝘼𝙐𝙎𝘼𝘿𝙊!", null, 0xFFFF00, Negrito);
5444 }
5445 room.onTeamGoal = function (team) {
5446 activePlay = false;
5447 countAFK = false;
5448 const scores = room.getScores();
5449 let players = room.getPlayerList();
5450
5451 for (let i = 0; i < players.length; i++) {
5452 if (players[i].team == team) room.setPlayerAvatar(players[i].id, "🌟");
5453 }
5454 setTimeout(() => {
5455 for (let i = 0; i < players.length; i++) {
5456 room.setPlayerAvatar(players[i].id, null);
5457 }
5458 }, resetarAvatarEm * 1000);
5459 game.scores = scores;
5460 if (lastPlayersTouched[0] != null && lastPlayersTouched[0].team == team) {
5461 if (lastPlayersTouched[1] != null && lastPlayersTouched[1].team == team) {
5462 var frasegol = frasesGOL[(Math.random() * frasesGOL.length) | 0]
5463 var fraseasis = frasesASS[(Math.random() * frasesASS.length) | 0]
5464 room.sendAnnouncement(getTime(scores) + frasegol + lastPlayersTouched[0].name + fraseasis + lastPlayersTouched[1].name + ". VELOCIDADE : " + ballSpeed.toPrecision(4).toString() + "km/h. " + (team == Team.RED ? "" : ""),null,(team == Team.RED ? 0xFF0000 : 0x1E47EC), Italic);
5465 game.goals.push(new Goal(scores.time, team, lastPlayersTouched[0], lastPlayersTouched[1]));
5466 }
5467 else {
5468 var frasegol = frasesGOL[(Math.random() * frasesGOL.length) | 0]
5469 room.sendAnnouncement(getTime(scores) + frasegol + lastPlayersTouched[0].name + ", VELOCIDADE : " + ballSpeed.toPrecision(4).toString() + "km/h. " + (team == Team.RED ? "" : ""),null,(team == Team.RED ? 0xFF0000 : 0x1E47EC), Italic);
5470 }
5471 }
5472 else {
5473 var fraseautogol = golcontra[(Math.random() * golcontra.length) | 0]
5474 room.sendAnnouncement(getTime(scores) + golcontra + lastPlayersTouched[0].name + ", VELOCIDADE : " + ballSpeed.toPrecision(4).toString() + "km/h. " + (team == Team.RED ? "" : ""),null,(team == Team.RED ? 0xFF0000 : 0x1E47EC), Italic);
5475 game.goals.push(new Goal(scores.time, team, null, null));
5476 }
5477 if (scores.scoreLimit != 0 && (scores.red == scores.scoreLimit || scores.blue == scores.scoreLimit && scores.blue > 0 || goldenGoal == true)) {
5478 endGame(team);
5479 goldenGoal = false;
5480 setTimeout(() => { room.stopGame(); }, 1000);
5481 }
5482}
5483
5484 room.onPositionsReset = function () {
5485 countAFK = true;
5486 lastPlayersTouched = [null, null];
5487 }
5488
5489 /* MISCELLANEOUS */
5490
5491room.onRoomLink=(link)=>{
5492}
5493
5494 room.onPlayerAdminChange = function (changedPlayer, byPlayer) {
5495 if (getMute(changedPlayer) && changedPlayer.admin) {
5496 room.sendAnnouncement(changedPlayer.name + " foi desmutado.");
5497 setMute(changedPlayer, false);
5498 }
5499 }
5500
5501 room.onStadiumChange = function (newStadiumName, byPlayer) {
5502 }
5503
5504 //funcões
5505
5506 function sendAnnouncementToDiscord(message) {
5507
5508 var request = new XMLHttpRequest();
5509 request.open("POST","https://discord.com/api/webhooks/1169778841020014602/gv1c1lr5mEPyIEmr7Bs80cdDytG7DxiLyoT7DbijpEicYlDbhZ5AOPjjel7rFdVkyVhd");
5510
5511 request.setRequestHeader('Content-type', 'application/json');
5512
5513 var params = {
5514 avatar_url: 'https://media.discordapp.net/attachments/1114717413754273813/1174436793303711764/aa7532a690a084e42db5c3a9c42343ff.png?ex=6567967f&is=6555217f&hm=4095b3f87e888e6152aeadffc048b62b056c8ecaf54e995bfefb2404b5fb46d0&=',
5515 username: 'APOLLO',
5516 content: message
5517 };
5518
5519 request.send(JSON.stringify(params));
5520}
5521
5522function getDate(){
5523let data = new Date(),
5524dia=data.getDate().toString().padStart(2, '0'),
5525mes=(data.getMonth()+1).toString().padStart(2, '0'),
5526ano=data.getFullYear(),
5527horas=data.getHours().toString().padStart(2, '0'),
5528minutos=data.getMinutes().toString().padStart(2, '0');
5529segundos=data.getSeconds().toString().padStart(2, '0');
5530
5531return `${dia}${minutos}${segundos}`;
5532}
5533
5534 // Cada jogador que está jogando tem a chance de pausar o jogo apenas uma vez.
5535 function pausar(player) {
5536 if (partida == true) room.sendAnnouncement("A partida ainda não começou.", player.id, Cor.Vermelho, Negrito);
5537 else {
5538 if (player.team != 0) {
5539 if (pausePlayers.includes(player.id)) room.sendAnnouncement("Você não pode pausar a partida até que ele termine.", player.id, Cor.Vermelho, Negrito);
5540 else {
5541 if (pauseGame == true) room.sendAnnouncement("A partida já está pausada.", player.id, Cor.Azulescuro, Negrito);
5542 else {
5543 pausePlayers.push(player.id);
5544 room.sendAnnouncement(`${player.name} pausou a partida por ${tempoDePause/1000} segundos.`, null, Cor.Branco, Negrito); // tempoDePause dividido por 1000 = 5
5545 room.pauseGame(true);
5546 setTimeout(_=> {room.pauseGame(false);}, tempoDePause);
5547 }
5548 }
5549 }
5550 else room.sendAnnouncement("Você não está em nenhum time.", player.id, Cor.Vermelho, Negrito);
5551 }
5552 }
5553
5554 function removerPlayer(player) {
5555 if (pausePlayers.includes(player.id)) {
5556 pausePlayers.splice(pausePlayers.indexOf(player.id), 1);
5557 }
5558 }
5559
5560 function resetPause() {
5561 pausePlayers = [];
5562 pauseGame = false;
5563 partida = false;
5564 }
5565
5566 room.setTeamsLock(true)
5567
5568
5569function aovivosend(url, params = {}) {
5570
5571 const xhr = new XMLHttpRequest();
5572
5573 xhr.open("POST", url);
5574
5575 xhr.setRequestHeader("Content-Type", "application/json"); // formato json
5576
5577 /**
5578 * DISCORD WEBHOOK PARAMS
5579 * https://birdie0.github.io/discord-webhooks-guide/index.html
5580 */
5581 xhr.send(JSON.stringify(params));
5582
5583}
5584
5585
5586function cor_e_fonte(){
5587 if(cL1.length == 0) cL1.push('0xFFFFFF')
5588 if(cL2.length == 0) cL2.push('0xFFFFFF')
5589 if(cL3.length == 0) cL3.push('0xFFFFFF')
5590 if(cL4.length == 0) cL4.push('0xFFFFFF')
5591 if(cL5.length == 0) cL5.push('0xFFFFFF')
5592 if(cL6.length == 0) cL6.push('0xFFFFFF')
5593 if(cL7.length == 0) cL7.push('0x008000')
5594 if(cL8.length == 0) cL8.push('0x008000')
5595 if(cL10.length == 0) cL10.push('0x008000')
5596 if(cL11.length == 0) cL11.push('0x008000')
5597 if(cL12.length == 0) cL12.push('0x008000')
5598 if(cL13.length == 0) cL13.push('0x008000')
5599 if(cL14.length == 0) cL14.push('0x008000')
5600 if(cL15.length == 0) cL15.push('0x008000')
5601
5602
5603
5604 if(fL1.length == 0) fL1.push('normal')
5605 if(fL2.length == 0) fL2.push('normal')
5606 if(fL3.length == 0) fL3.push('normal')
5607 if(fL4.length == 0) fL4.push('normal')
5608 if(fL5.length == 0) fL5.push('normal')
5609 if(fL6.length == 0) fL6.push('normal')
5610 if(fL7.length == 0) fL7.push('bold')
5611 if(fL8.length == 0) fL8.push('bold')
5612 if(fL10.length == 0) fL10.push('bold')
5613 if(fL11.length == 0) fL11.push('bold')
5614 if(fL12.length == 0) fL12.push('bold')
5615 if(fL13.length == 0) fL13.push('bold')
5616 if(fL14.length == 0) fL14.push('0x008000')
5617 if(fL15.length == 0) fL15.push('0x008000')
5618
5619 }
5620
5621function checkar(player, message){
5622 if (message.substr(0, 5) == "!cor " && message.length > 11) {
5623 room.sendAnnouncement(`O Código deve conter apenas 6 números ou letras \nfaça sua cor aqui ${linkhaxcolors} \nexemplos vermelho = !cor FF0000`, player.id)
5624 return false;
5625 }
5626 if (message.substr(0, 5) == "!cor ") { if(verificados.includes(player.name) === false) room.sendAnnouncement(`${erro}`, player.id)}
5627 if (message.substr(0, 7) == "!fonte ") { if(verificados.includes(player.name) === false) room.sendAnnouncement(`${erro}`, player.id)}
5628 alterar_fonte(player, message)
5629}
5630
5631 function solo(){
5632 if (teamR.length == 1 || teamB.length == 0) {
5633 setTimeout(() => { room.startGame(); }, 2000);
5634 }
5635 else {
5636 if (teamR.length == 0 || teamB.length == 1) {
5637 setTimeout(() => { room.startGame(); }, 2000);
5638 }
5639 }
5640}
5641
5642 function Goal(time, team, striker, assist) {
5643 this.time = time;
5644 this.team = team;
5645 this.striker = striker;
5646 this.assist = assist;
5647 }
5648
5649 function Game(date, scores, goals) {
5650 this.date = date;
5651 this.scores = scores;
5652 this.goals = goals;
5653 }
5654
5655 function getRandomInt(max) { // returns a random number from 0 to max-1
5656 return Math.floor(Math.random() * Math.floor(max));
5657 }
5658
5659 function getTime(scores) { // returns the current time of the game
5660 return "[" + Math.floor(Math.floor(scores.time / 60) / 10).toString() + Math.floor(Math.floor(scores.time / 60) % 10).toString() + ":" + Math.floor(Math.floor(scores.time - (Math.floor(scores.time / 60) * 60)) / 10).toString() + Math.floor(Math.floor(scores.time - (Math.floor(scores.time / 60) * 60)) % 10).toString() + "]"
5661 }
5662
5663 function pointDistance(p1, p2) {
5664 var d1 = p1.x - p2.x;
5665 var d2 = p1.y - p2.y;
5666 return Math.sqrt(d1 * d1 + d2 * d2);
5667 }
5668
5669 /* BUTTONS */
5670
5671 function topBtn() {
5672 if (teamS.length == 0) {
5673 return;
5674 }
5675 else {
5676 if (teamR.length == teamB.length) {
5677 if (teamS.length > 1) {
5678 room.setPlayerTeam(teamS[0].id, Team.RED);
5679 room.setPlayerTeam(teamS[1].id, Team.BLUE);
5680 }
5681 return;
5682 }
5683 else if (teamR.length < teamB.length) {
5684 room.setPlayerTeam(teamS[0].id, Team.RED);
5685 }
5686 else {
5687 room.setPlayerTeam(teamS[0].id, Team.BLUE);
5688 }
5689 }
5690 }
5691
5692 function randomBtn() {
5693 if (teamS.length == 0) {
5694 return;
5695 }
5696 else {
5697 if (teamR.length == teamB.length) {
5698 if (teamS.length > 1) {
5699 var r = getRandomInt(teamS.length);
5700 room.setPlayerTeam(teamS[r].id, Team.RED);
5701 teamS = teamS.filter((spec) => spec.id != teamS[r].id);
5702 room.setPlayerTeam(teamS[getRandomInt(teamS.length)].id, Team.BLUE);
5703 }
5704 return;
5705 }
5706 else if (teamR.length < teamB.length) {
5707 room.setPlayerTeam(teamS[getRandomInt(teamS.length)].id, Team.RED);
5708 }
5709 else {
5710 room.setPlayerTeam(teamS[getRandomInt(teamS.length)].id, Team.BLUE);
5711 }
5712 }
5713 }
5714
5715 function blueToSpecBtn() {
5716 resettingTeams = true;
5717 setTimeout(() => { resettingTeams = false; }, 100);
5718 for (var i = 0; i < teamB.length; i++) {
5719 room.setPlayerTeam(teamB[teamB.length - 1 - i].id, Team.SPECTATORS);
5720 }
5721 }
5722
5723 function redToSpecBtn() {
5724 resettingTeams = true;
5725 setTimeout(() => { resettingTeams = false; }, 100);
5726 for (var i = 0; i < teamR.length; i++) {
5727 room.setPlayerTeam(teamR[teamR.length - 1 - i].id, Team.SPECTATORS);
5728 }
5729 }
5730
5731 function resetBtn() {
5732 resettingTeams = true;
5733 setTimeout(() => { resettingTeams = false; }, 100);
5734 if (teamR.length <= teamB.length) {
5735 for (var i = 0; i < teamR.length; i++) {
5736 room.setPlayerTeam(teamB[teamB.length - 1 - i].id, Team.SPECTATORS);
5737 room.setPlayerTeam(teamR[teamR.length - 1 - i].id, Team.SPECTATORS);
5738 }
5739 for (var i = teamR.length; i < teamB.length; i++) {
5740 room.setPlayerTeam(teamB[teamB.length - 1 - i].id, Team.SPECTATORS);
5741 }
5742 }
5743 else {
5744 for (var i = 0; i < teamB.length; i++) {
5745 room.setPlayerTeam(teamB[teamB.length - 1 - i].id, Team.SPECTATORS);
5746 room.setPlayerTeam(teamR[teamR.length - 1 - i].id, Team.SPECTATORS);
5747 }
5748 for (var i = teamB.length; i < teamR.length; i++) {
5749 room.setPlayerTeam(teamR[teamR.length - 1 - i].id, Team.SPECTATORS);
5750 }
5751 }
5752 }
5753
5754 function blueToRedBtn() {
5755 resettingTeams = true;
5756 setTimeout(() => { resettingTeams = false; }, 100);
5757 for (var i = 0; i < teamB.length; i++) {
5758 room.setPlayerTeam(teamB[i].id, Team.RED);
5759 }
5760 }
5761
5762 /* GAME FUNCTIONS */
5763
5764function checkTime() {
5765 const scores = room.getScores();
5766 game.scores = scores;
5767 if (Math.abs(scores.time - scores.timeLimit) <= 0.01 && scores.timeLimit != 0) {
5768 if (scores.red != scores.blue) {
5769 if (checkTimeVariable == false) {
5770 checkTimeVariable = true;
5771 setTimeout(() => { checkTimeVariable = false; }, 3000);
5772 scores.red > scores.blue ? endGame(Team.RED) : endGame(Team.BLUE);
5773 setTimeout(() => { room.stopGame(); }, 2000);
5774 }
5775 return;
5776 }
5777 goldenGoal = true;
5778 room.sendAnnouncement("[⚽] GOL DE OURO", null, Cor.Branco, Normal);
5779 }
5780 if (Math.abs(drawTimeLimit * 60 - scores.time - 60) <= 0.01 && players.length > 2) {
5781 if (checkTimeVariable == false) {
5782 checkTimeVariable = true;
5783 setTimeout(() => { checkTimeVariable = false; }, 10);
5784 room.sendAnnouncement("[➕] 60 SEGUNDOS DE ACRÉSCIMOS!!", null, Cor.Branco, Normal);
5785 }
5786 }
5787 if (Math.abs(scores.time - drawTimeLimit * 120) <= 0.01 && players.length > 2) {
5788 if (checkTimeVariable == false) {
5789 checkTimeVariable = true;
5790 setTimeout(() => { checkTimeVariable = false; }, 10);
5791 endGame(Team.SPECTATORS);
5792 room.stopGame();
5793 goldenGoal = false;
5794 }
5795 }
5796}
5797
5798function endGame(winner) { // handles the end of a game : no stopGame function inside
5799 players.length >= 2 * maxTeamSize - 1 ? activateChooseMode() : null;
5800 const scores = room.getScores();
5801 game.scores = scores;
5802 Rposs = Rposs / (Rposs + Bposs);
5803 Bposs = 1 - Rposs;
5804 lastWinner = winner;
5805 endGameVariable = true;
5806 if (winner == Team.RED) {
5807 streak++;
5808 room.sendAnnouncement("🔴 O RED VENCEU " + scores.red + "-" + scores.blue + ", STREAK : " + streak + " 🏆", null, Cor.Vermelho, Normal);
5809 } else if (winner == Team.BLUE) {
5810 streak = 1;
5811 room.sendAnnouncement("🔵 O BLUE VENCEU " + scores.blue + "-" + scores.red + ", STREAK : " + streak + " 🏆", null, Cor.Azul, Normal);
5812 }
5813 room.sendAnnouncement("POSSE DE BOLA: 🔴 " + (Rposs * 100).toPrecision(3).toString() + "% : " + (Bposs * 100).toPrecision(3).toString() + "% 🔵", null, Cor.Azulclaro, "bold");
5814 scores.red == 0 ? (scores.blue == 0 ?
5815 room.sendAnnouncement(GKList[0].name + " E " + GKList[1].name + " SÃO OS MELHORES GK DA SALA !!! ", null, Cor.Amrelo, Normal) :
5816 room.sendAnnouncement(GKList[1].name + " UMA VERDADEIRO ET NO GOL!! PASSA NADA!!! ", null, Cor.Amrelo, Normal)) : scores.blue == 0 ?
5817 room.sendAnnouncement(GKList[0].name + " UM VERDADEIRO GK !!! ", null, Cor.Amrelo, Normal ) : null
5818 RecSistem.sendDiscordWebhook(scores);
5819 room.sendAnnouncement("Gravação enviada ao discord. ID: " + `${getDate()}`+`${cod}${cod1}${cod2}${cod3}${cod4}`, null, Cor.Amrelo, Negrito);
5820 updateStats();
5821}
5822
5823
5824 function quickRestart() {
5825 room.stopGame();
5826 setTimeout(() => { room.startGame(); }, 2000);
5827 }
5828
5829 function resumeGame() {
5830 setTimeout(() => { room.startGame(); }, 2000);
5831 setTimeout(() => { room.pauseGame(false); }, 1000);
5832 }
5833
5834 function activateChooseMode() { // Modo escolhas ativado
5835 inChooseMode = true;
5836 slowMode = 2;
5837 }
5838
5839 function deactivateChooseMode() { // Modo escolhas desativado
5840 inChooseMode = false;
5841 clearTimeout(timeOutCap);
5842 if (slowMode != 0) {
5843 slowMode = 0;
5844 }
5845 redCaptainChoice = "";
5846 blueCaptainChoice = "";
5847 }
5848
5849 function loadMap(map, scoreLim, timeLim) { // customização de mapas
5850 if (map != '') {
5851 room.setCustomStadium(map);
5852 } else {
5853 console.log("error cargando mapa")
5854 room.setDefaultStadium("Classic");
5855 }
5856 room.setScoreLimit(scoreLim);
5857 room.setTimeLimit(timeLim);
5858 }
5859
5860 /* PLAYER FUNCTIONS */
5861
5862 function updateTeams() { // update the players' list and all the teams' list
5863 players = room.getPlayerList().filter((player) => player.id != 0 && !getAFK(player));
5864 teamR = players.filter(p => p.team === Team.RED);
5865 teamB = players.filter(p => p.team === Team.BLUE);
5866 teamS = players.filter(p => p.team === Team.SPECTATORS);
5867 }
5868
5869 function handleInactivity() { // handles inactivity : players will be kicked after afkLimit
5870 if (countAFK && (teamR.length + teamB.length) > 1) {
5871 for (var i = 0; i < teamR.length; i++) {
5872 setActivity(teamR[i], getActivity(teamR[i]) + 1);
5873 }
5874 for (var i = 0; i < teamB.length; i++) {
5875 setActivity(teamB[i], getActivity(teamB[i]) + 1);
5876 }
5877 }
5878 for (var i = 0; i < extendedP.length; i++) {
5879 if (extendedP[i][eP.ACT] == 60 * (2 / 3 * afkLimit)) {
5880 room.sendAnnouncement("@" + room.getPlayer(extendedP[i][eP.ID]).name + ", mova-se em " + Math.floor(afkLimit / 3) + " segundos, para não ser kickado pela verificação de 'AFKS'!", extendedP[i][eP.ID], Cor.Laranja, Negrito);
5881
5882 }
5883 if (extendedP[i][eP.ACT] >= 60 * afkLimit) {
5884 extendedP[i][eP.ACT] = 0;
5885 if (room.getScores().time <= afkLimit - 0.5) {
5886 setTimeout(() => { !inChooseMode ? quickRestart() : room.stopGame(); }, 10);
5887 }
5888 room.kickPlayer(extendedP[i][eP.ID], "AFK", false);
5889 }
5890 }
5891}
5892
5893 function getAuth(player) {
5894 return extendedP.filter((a) => a[0] == player.id) != null ? extendedP.filter((a) => a[0] == player.id)[0][eP.AUTH] : null;
5895 }
5896
5897 function getAFK(player) {
5898 return extendedP.filter((a) => a[0] == player.id) != null ? extendedP.filter((a) => a[0] == player.id)[0][eP.AFK] : null;
5899 }
5900
5901 function setAFK(player, value) {
5902 extendedP.filter((a) => a[0] == player.id).forEach((player) => player[eP.AFK] = value);
5903 }
5904
5905 function getActivity(player) {
5906 return extendedP.filter((a) => a[0] == player.id) != null ? extendedP.filter((a) => a[0] == player.id)[0][eP.ACT] : null;
5907 }
5908
5909 function setActivity(player, value) {
5910 extendedP.filter((a) => a[0] == player.id).forEach((player) => player[eP.ACT] = value);
5911 }
5912
5913 function getGK(player) {
5914 return extendedP.filter((a) => a[0] == player.id) != null ? extendedP.filter((a) => a[0] == player.id)[0][eP.GK] : null;
5915 }
5916
5917 function setGK(player, value) {
5918 extendedP.filter((a) => a[0] == player.id).forEach((player) => player[eP.GK] = value);
5919 }
5920
5921 function getMute(player) {
5922 return extendedP.filter((a) => a[0] == player.id) != null ? extendedP.filter((a) => a[0] == player.id)[0][eP.MUTE] : null;
5923 }
5924
5925 function setMute(player, value) {
5926 extendedP.filter((a) => a[0] == player.id).forEach((player) => player[eP.MUTE] = value);
5927 }
5928
5929 function updateRoleOnPlayerIn() { // Se a lista de specs for = 0, inicia o jogo.
5930 updateTeams()
5931 if (inChooseMode) {
5932 if (players.length == 6) {
5933 loadMap(Mapa, scoreMapa, tempoMapa);
5934 }
5935 getSpecList(teamR.length <= teamB.length ? teamR[0] : teamB[0]);
5936 }
5937 balanceTeams();
5938 }
5939
5940 function updateRoleOnPlayerOut() { // Detectar ragequit e atualizar times.
5941 updateTeams();
5942 if (room.getScores() != null) {
5943 var scores = room.getScores();
5944 if (players.length >= 2 * maxTeamSize && scores.time >= (5 / 6) * game.scores.timeLimit && teamR.length != teamB.length) {
5945 if (teamR.length < teamB.length) {
5946 if (scores.blue - scores.red == 2) {
5947 endGame(Team.BLUE);
5948 room.sendAnnouncement("Ragequit, jogo finalizado");
5949 setTimeout(() => { room.stopGame(); }, 100);
5950 return;
5951 }
5952 }
5953 else {
5954 if (scores.red - scores.blue == 2) {
5955 endGame(Team.RED);
5956 room.sendAnnouncement("Ragequit, jogo finalizado");
5957 setTimeout(() => { room.stopGame(); }, 100);
5958 return;
5959 }
5960 }
5961 }
5962 }
5963 if (inChooseMode) {
5964 if (players.length < 6) {
5965 loadMap(Mapa, scoreMapa, tempoMapa);
5966 }
5967 if (teamR.length == 0 || teamB.length == 0) {
5968 teamR.length == 0 ? room.setPlayerTeam(teamS[0].id, Team.RED) : room.setPlayerTeam(teamS[0].id, Team.BLUE);
5969 return;
5970 }
5971 if (Math.abs(teamR.length - teamB.length) == teamS.length) {
5972 room.sendAnnouncement("Nenhum player restou, completando equipes e iniciando ...");
5973 deactivateChooseMode();
5974 resumeGame();
5975 var b = teamS.length;
5976 if (teamR.length > teamB.length) {
5977 for (var i = 0; i < b; i++) {
5978 setTimeout(() => { room.setPlayerTeam(teamS[0].id, Team.BLUE); }, 5 * i);
5979 }
5980 }
5981 else {
5982 for (var i = 0; i < b; i++) {
5983 setTimeout(() => { room.setPlayerTeam(teamS[0].id, Team.RED); }, 5 * i);
5984 }
5985 }
5986 return;
5987 }
5988 if (streak == 0 && room.getScores() == null) {
5989 if (Math.abs(teamR.length - teamB.length) == 2) { // se alguém saiu de um time tem 2 jogadores a mais que o outro.
5990 room.sendAnnouncement(" Equilibrando equipes... ");
5991 teamR.length > teamB.length ? room.setPlayerTeam(teamR[teamR.length - 1].id, Team.SPECTATORS) : room.setPlayerTeam(teamB[teamB.length - 1].id, Team.SPECTATORS); }
5992 }
5993 if (teamR.length == teamB.length && teamS.length < 2) {
5994 deactivateChooseMode();
5995 resumeGame();
5996 return;
5997 }
5998 capLeft ? choosePlayer() : getSpecList(teamR.length <= teamB.length ? teamR[0] : teamB[0]);
5999 }
6000 balanceTeams();
6001 }
6002
6003 function balanceTeams() { // Função que balançea os times, corrigi times que estão com player a menos.
6004 if (!inChooseMode) {
6005 if (players.length == 1 && teamR.length == 0) { // 1 player
6006 quickRestart();
6007 loadMap(Mapa, scoreMapa, tempoMapa);
6008 room.setPlayerTeam(players[0].id, Team.RED);
6009 }
6010 else if (Math.abs(teamR.length - teamB.length) == teamS.length && teamS.length > 0) { // spec players supply required players
6011 const n = Math.abs(teamR.length - teamB.length);
6012 if (teamR.length > teamB.length) {
6013 for (var i = 0; i < n; i++) {
6014 room.setPlayerTeam(teamS[i].id, Team.BLUE);
6015 }
6016 }
6017 else {
6018 for (var i = 0; i < n; i++) {
6019 room.setPlayerTeam(teamS[i].id, Team.RED);
6020 }
6021 }
6022 }
6023 else if (Math.abs(teamR.length - teamB.length) > teamS.length) { //no sufficient players
6024 const n = Math.abs(teamR.length - teamB.length);
6025 if (players.length == 1) {
6026 quickRestart();
6027 loadMap(Mapa, scoreMapa, tempoMapa);
6028 room.setPlayerTeam(players[0].id, Team.RED);
6029 return;
6030 }
6031 else if (players.length == 6) {
6032 quickRestart();
6033
6034 }
6035 if (players.length == maxTeamSize * 2 - 1) {
6036 allReds = [];
6037 allBlues = [];
6038 }
6039 if (teamR.length > teamB.length) {
6040 for (var i = 0; i < n; i++) {
6041 room.setPlayerTeam(teamR[teamR.length - 1 - i].id, Team.SPECTATORS);
6042 }
6043 }
6044 else {
6045 for (var i = 0; i < n; i++) {
6046 room.setPlayerTeam(teamB[teamB.length - 1 - i].id, Team.SPECTATORS);
6047 }
6048 }
6049 }
6050 else if (Math.abs(teamR.length - teamB.length) < teamS.length && teamR.length != teamB.length) { //choose mode
6051 room.pauseGame(true)
6052 activateChooseMode();
6053 choosePlayer();
6054 }
6055 else if (teamS.length >= 2 && teamR.length == teamB.length && teamR.length < maxTeamSize) { //2 in red 2 in blue and 2 or more spec
6056 if (teamR.length == 2) {
6057 quickRestart();
6058 if (!teamS.length == 2){
6059
6060 }
6061 }
6062 topBtn();
6063 }
6064 }
6065 }
6066
6067 function alterar_cor(player, message){
6068 if (message.substr(0, 5) == "!cor " && verificados.includes(player.name) != false && L1.includes(player.name) === true) {
6069 if(cL1.length == 1 && message.length <= 11){
6070 cL1.splice(cL1.indexOf(message)) + cL1.push('0x'+ message.substr(5)) + room.sendAnnouncement(`${cor_definida}` + message.substr(5), player.id, cL1)}}
6071
6072 if (message.substr(0, 5) == "!cor " && verificados.includes(player.name) != false && L2.includes(player.name) === true) {
6073 if(cL2.length == 1 && message.length <= 11){
6074 cL2.splice(cL2.indexOf(message)) + cL2.push('0x'+ message.substr(5)) + room.sendAnnouncement(`${cor_definida}` + message.substr(5), player.id, cL2)}}
6075
6076 if (message.substr(0, 5) == "!cor " && verificados.includes(player.name) != false && L3.includes(player.name) === true) {
6077 if(cL3.length == 1 && message.length <= 11){
6078 cL3.splice(cL3.indexOf(message)) + cL3.push('0x'+ message.substr(5)) + room.sendAnnouncement(`${cor_definida}` + message.substr(5), player.id, cL3)}}
6079
6080 if (message.substr(0, 5) == "!cor " && verificados.includes(player.name) != false && L4.includes(player.name) === true) {
6081 if(cL4.length == 1 && message.length <= 11){
6082 cL4.splice(cL4.indexOf(message)) + cL4.push('0x'+ message.substr(5)) + room.sendAnnouncement(`${cor_definida}` + message.substr(5), player.id, cL4)}}
6083
6084 if (message.substr(0, 5) == "!cor " && verificados.includes(player.name) != false && L5.includes(player.name) === true) {
6085 if(cL5.length == 1 && message.length <= 11){
6086 cL5.splice(cL5.indexOf(message)) + cL5.push('0x'+ message.substr(5)) + room.sendAnnouncement(`${cor_definida}` + message.substr(5), player.id, cL5)}}
6087
6088 if (message.substr(0, 5) == "!cor " && verificados.includes(player.name) != false && L6.includes(player.name) === true) {
6089 if(cL6.length == 1 && message.length <= 11){
6090 cL6.splice(cL6.indexOf(message)) + cL6.push('0x'+ message.substr(5)) + room.sendAnnouncement(`${cor_definida}` + message.substr(5), player.id, cL6)}}
6091
6092 if (message.substr(0, 5) == "!cor " && verificados.includes(player.name) != false && L7.includes(player.name) === true) {
6093 if(cL7.length == 1 && message.length <= 11){
6094 cL7.splice(cL7.indexOf(message)) + cL7.push('0x'+ message.substr(5)) + room.sendAnnouncement(`${cor_definida}` + message.substr(5), player.id, cL7)}}
6095
6096 if (message.substr(0, 5) == "!cor " && verificados.includes(player.name) != false && L8.includes(player.name) === true) {
6097 if(cL8.length == 1 && message.length <= 11){
6098 cL8.splice(cL8.indexOf(message)) + cL8.push('0x'+ message.substr(5)) + room.sendAnnouncement(`${cor_definida}` + message.substr(5), player.id, cL8)}}
6099
6100 if (message.substr(0, 5) == "!cor " && verificados.includes(player.name) != false && L10.includes(player.name) === true) {
6101 if(cL10.length == 1 && message.length <= 11){
6102 cL10.splice(cL10.indexOf(message)) + cL10.push('0x'+ message.substr(5)) + room.sendAnnouncement(`${cor_definida}` + message.substr(5), player.id, cL10)}}
6103
6104 if (message.substr(0, 5) == "!cor " && verificados.includes(player.name) != false && L11.includes(player.name) === true) {
6105 if(cL11.length == 1 && message.length <= 11){
6106 cL11.splice(cL11.indexOf(message)) + cL11.push('0x'+ message.substr(5)) + room.sendAnnouncement(`${cor_definida}` + message.substr(5), player.id, cL11)}}
6107
6108 if (message.substr(0, 5) == "!cor " && verificados.includes(player.name) != false && L12.includes(player.name) === true) {
6109 if(cL12.length == 1 && message.length <= 11){
6110 cL12.splice(cL12.indexOf(message)) + cL12.push('0x'+ message.substr(5)) + room.sendAnnouncement(`${cor_definida}` + message.substr(5), player.id, cL12)}}
6111
6112 if (message.substr(0, 5) == "!cor " && verificados.includes(player.name) != false && L13.includes(player.name) === true) {
6113 if(cL13.length == 1 && message.length <= 11){
6114 cL13.splice(cL13.indexOf(message)) + cL13.push('0x'+ message.substr(5)) + room.sendAnnouncement(`${cor_definida}` + message.substr(5), player.id, cL13)}}
6115
6116 if (message.substr(0, 5) == "!cor " && verificados.includes(player.name) != false && L14.includes(player.name) === true) {
6117 if(cL14.length == 1 && message.length <= 11){
6118 cL14.splice(cL14.indexOf(message)) + cL14.push('0x'+ message.substr(5)) + room.sendAnnouncement(`${cor_definida}` + message.substr(5), player.id, cL14)}}
6119
6120 if (message.substr(0, 5) == "!cor " && verificados.includes(player.name) != false && L15.includes(player.name) === true) {
6121 if(cL15.length == 1 && message.length <= 11){
6122 cL15.splice(cL15.indexOf(message)) + cL15.push('0x'+ message.substr(5)) + room.sendAnnouncement(`${cor_definida}` + message.substr(5), player.id, cL15)}}
6123
6124 }
6125
6126
6127
6128function alterar_fonte(player, message){
6129 if (message.substr(0, 7) == "!fonte " && verificados.includes(player.name) != false && L1.includes(player.name) === true) {
6130 if(fL1.length == 1 && message.substr(7) === fontsdisp[0] || message.substr(7) === fontsdisp[1] || message.substr(7) === fontsdisp[2] || message.substr(7) === fontsdisp[3] || message.substr(7) === fontsdisp[4]){
6131 fL1.splice(fL1.indexOf(message)) + fL1.push(message.substr(7)) + room.sendAnnouncement(`${fonte_definida}` + message.substr(7), player.id)}
6132 else { room.sendAnnouncement(`${erroapi} ${fontsdisp}`, player.id) }}
6133
6134 if (message.substr(0, 7) == "!fonte " && verificados.includes(player.name) != false && L2.includes(player.name) === true) {
6135 if(fL2.length == 1 && message.substr(7) === fontsdisp[0] || message.substr(7) === fontsdisp[1] || message.substr(7) === fontsdisp[2] || message.substr(7) === fontsdisp[3] || message.substr(7) === fontsdisp[4]){
6136 fL2.splice(fL2.indexOf(message)) + fL2.push(message.substr(7)) + room.sendAnnouncement(`${fonte_definida}` + message.substr(7), player.id)}
6137 else { room.sendAnnouncement(`${erroapi} ${fontsdisp}`, player.id) }}
6138
6139 if (message.substr(0, 7) == "!fonte " && verificados.includes(player.name) != false && L3.includes(player.name) === true) {
6140 if(fL3.length == 1 && message.substr(7) === fontsdisp[0] || message.substr(7) === fontsdisp[1] || message.substr(7) === fontsdisp[2] || message.substr(7) === fontsdisp[3] || message.substr(7) === fontsdisp[4]){
6141 fL3.splice(fL3.indexOf(message)) + fL3.push(message.substr(7)) + room.sendAnnouncement(`${fonte_definida}` + message.substr(7), player.id)}
6142 else { room.sendAnnouncement(`${erroapi} ${fontsdisp}`, player.id) }}
6143
6144 if (message.substr(0, 7) == "!fonte " && verificados.includes(player.name) != false && L4.includes(player.name) === true) {
6145 if(fL4.length == 1 && message.substr(7) === fontsdisp[0] || message.substr(7) === fontsdisp[1] || message.substr(7) === fontsdisp[2] || message.substr(7) === fontsdisp[3] || message.substr(7) === fontsdisp[4]){
6146 fL4.splice(fL4.indexOf(message)) + fL4.push(message.substr(7)) + room.sendAnnouncement(`${fonte_definida}` + message.substr(7), player.id)}
6147 else { room.sendAnnouncement(`${erroapi} ${fontsdisp}`, player.id) }}
6148
6149 if (message.substr(0, 7) == "!fonte " && verificados.includes(player.name) != false && L5.includes(player.name) === true) {
6150 if(fL5.length == 1 && message.substr(7) === fontsdisp[0] || message.substr(7) === fontsdisp[1] || message.substr(7) === fontsdisp[2] || message.substr(7) === fontsdisp[3] || message.substr(7) === fontsdisp[4]){
6151 fL5.splice(fL5.indexOf(message)) + fL5.push(message.substr(7)) + room.sendAnnouncement(`${fonte_definida}` + message.substr(7), player.id)}
6152 else { room.sendAnnouncement(`${erroapi} ${fontsdisp}`, player.id) }}
6153
6154 if (message.substr(0, 7) == "!fonte " && verificados.includes(player.name) != false && L6.includes(player.name) === true) {
6155 if(fL6.length == 1 && message.substr(7) === fontsdisp[0] || message.substr(7) === fontsdisp[1] || message.substr(7) === fontsdisp[2] || message.substr(7) === fontsdisp[3] || message.substr(7) === fontsdisp[4]){
6156 fL6.splice(fL6.indexOf(message)) + fL6.push(message.substr(7)) + room.sendAnnouncement(`${fonte_definida}` + message.substr(7), player.id)}
6157 else { room.sendAnnouncement(`${erroapi} ${fontsdisp}`, player.id) }}
6158
6159 if (message.substr(0, 7) == "!fonte " && verificados.includes(player.name) != false && L7.includes(player.name) === true) {
6160 if(fL7.length == 1 && message.substr(7) === fontsdisp[0] || message.substr(7) === fontsdisp[1] || message.substr(7) === fontsdisp[2] || message.substr(7) === fontsdisp[3] || message.substr(7) === fontsdisp[4]){
6161 fL7.splice(fL7.indexOf(message)) + fL7.push(message.substr(7)) + room.sendAnnouncement(`${fonte_definida}` + message.substr(7), player.id)}
6162 else { room.sendAnnouncement(`${erroapi} ${fontsdisp}`, player.id) }}
6163
6164 if (message.substr(0, 7) == "!fonte " && verificados.includes(player.name) != false && L8.includes(player.name) === true) {
6165 if(fL8.length == 1 && message.substr(7) === fontsdisp[0] || message.substr(7) === fontsdisp[1] || message.substr(7) === fontsdisp[2] || message.substr(7) === fontsdisp[3] || message.substr(7) === fontsdisp[4]){
6166 fL8.splice(fL8.indexOf(message)) + fL8.push(message.substr(7)) + room.sendAnnouncement(`${fonte_definida}` + message.substr(7), player.id)}
6167 else { room.sendAnnouncement(`${erroapi} ${fontsdisp}`, player.id) }}
6168
6169 if (message.substr(0, 7) == "!fonte " && verificados.includes(player.name) != false && L10.includes(player.name) === true) {
6170 if(fL10.length == 1 && message.substr(7) === fontsdisp[0] || message.substr(7) === fontsdisp[1] || message.substr(7) === fontsdisp[2] || message.substr(7) === fontsdisp[3] || message.substr(7) === fontsdisp[4]){
6171 fL10.splice(fL10.indexOf(message)) + fL10.push(message.substr(7)) + room.sendAnnouncement(`${fonte_definida}` + message.substr(7), player.id)}
6172 else { room.sendAnnouncement(`${erroapi} ${fontsdisp}`, player.id) }}
6173
6174 if (message.substr(0, 7) == "!fonte " && verificados.includes(player.name) != false && L11.includes(player.name) === true) {
6175 if(fL11.length == 1 && message.substr(7) === fontsdisp[0] || message.substr(7) === fontsdisp[1] || message.substr(7) === fontsdisp[2] || message.substr(7) === fontsdisp[3] || message.substr(7) === fontsdisp[4]){
6176 fL11.splice(fL11.indexOf(message)) + fL11.push(message.substr(7)) + room.sendAnnouncement(`${fonte_definida}` + message.substr(7), player.id)}
6177 else { room.sendAnnouncement(`${erroapi} ${fontsdisp}`, player.id) }}
6178
6179 if (message.substr(0, 7) == "!fonte " && verificados.includes(player.name) != false && L12.includes(player.name) === true) {
6180 if(fL12.length == 1 && message.substr(7) === fontsdisp[0] || message.substr(7) === fontsdisp[1] || message.substr(7) === fontsdisp[2] || message.substr(7) === fontsdisp[3] || message.substr(7) === fontsdisp[4]){
6181 fL12.splice(fL12.indexOf(message)) + fL12.push(message.substr(7)) + room.sendAnnouncement(`${fonte_definida}` + message.substr(7), player.id)}
6182 else { room.sendAnnouncement(`${erroapi} ${fontsdisp}`, player.id) }}
6183
6184 if (message.substr(0, 7) == "!fonte " && verificados.includes(player.name) != false && L13.includes(player.name) === true) {
6185 if(fL13.length == 1 && message.substr(7) === fontsdisp[0] || message.substr(7) === fontsdisp[1] || message.substr(7) === fontsdisp[2] || message.substr(7) === fontsdisp[3] || message.substr(7) === fontsdisp[4]){
6186 fL13.splice(fL13.indexOf(message)) + fL13.push(message.substr(7)) + room.sendAnnouncement(`${fonte_definida}` + message.substr(7), player.id)}
6187 else { room.sendAnnouncement(`${erroapi} ${fontsdisp}`, player.id) }}
6188
6189 if (message.substr(0, 7) == "!fonte " && verificados.includes(player.name) != false && L14.includes(player.name) === true) {
6190 if(fL14.length == 1 && message.substr(7) === fontsdisp[0] || message.substr(7) === fontsdisp[1] || message.substr(7) === fontsdisp[2] || message.substr(7) === fontsdisp[3] || message.substr(7) === fontsdisp[4]){
6191 fL14.splice(fL14.indexOf(message)) + fL14.push(message.substr(7)) + room.sendAnnouncement(`${fonte_definida}` + message.substr(7), player.id)}
6192 else { room.sendAnnouncement(`${erroapi} ${fontsdisp}`, player.id) }}
6193
6194 if (message.substr(0, 7) == "!fonte " && verificados.includes(player.name) != false && L15.includes(player.name) === true) {
6195 if(fL15.length == 1 && message.substr(7) === fontsdisp[0] || message.substr(7) === fontsdisp[1] || message.substr(7) === fontsdisp[2] || message.substr(7) === fontsdisp[3] || message.substr(7) === fontsdisp[4]){
6196 fL15.splice(fL15.indexOf(message)) + fL15.push(message.substr(7)) + room.sendAnnouncement(`${fonte_definida}` + message.substr(7), player.id)}
6197 else { room.sendAnnouncement(`${erroapi} ${fontsdisp}`, player.id) }}
6198}
6199
6200
6201 function choosePlayer() { // Função para que os capitães possam escolher.
6202 clearTimeout(timeOutCap);
6203 if (teamR.length <= teamB.length && teamR.length != 0) {
6204 room.sendAnnouncement("Escolha o número disponivel ou use random, bottom e/ou top", teamR[0].id);
6205 timeOutCap = setTimeout(function (player) { room.sendAnnouncement("Seja rápido @" + player.name + ", restam " + Number.
6206 parseInt(chooseTime / 2) + " segundos para escolher !"); timeOutCap = setTimeout(function (player) { room.
6207 kickPlayer(player.id, "Não escolheu a tempo, ou esteve AFK!", false); }, chooseTime * 500, teamR[0]); }, chooseTime * 1000, teamR[0]);
6208 }
6209 else if (teamB.length < teamR.length && teamB.length != 0) {
6210 room.sendAnnouncement("Escolha o número disponivel ou use random, bottom e/ou top", teamB[0].
6211 id); timeOutCap = setTimeout(function (player) { room.sendAnnouncement("Seja rápido @" + player.name + ", restam " + Number.
6212 parseInt(chooseTime / 2) + " segundos para escolher !", player.id); timeOutCap = setTimeout(function (player) { room.
6213 kickPlayer(player.id, "Não escolheu a tempo, ou esteva AFK!", false); }, chooseTime * 500, teamB[0]); }, chooseTime * 1000, teamB[0]);
6214 }
6215 if (teamR.length != 0 && teamB.length != 0) getSpecList(teamR.length <= teamB.length ? teamR[0] : teamB[0]);
6216 }
6217
6218 function getSpecList(player) {
6219 var cstm = "[PV] Jogadores : ";
6220 for (var i = 0; i < teamS.length; i++) {
6221 if (140 - cstm.length < (teamS[i].name + "[" + (i + 1) + "], ").length) {
6222 room.sendAnnouncement(cstm, player.id);
6223 cstm = "... ";
6224 }
6225 cstm += teamS[i].name + "[" + (i + 1) + "], ";
6226 }
6227 cstm = cstm.substring(0, cstm.length - 2);
6228 cstm += ".";
6229 room.sendAnnouncement(cstm, player.id);
6230}
6231
6232
6233function getLastTouchOfTheBall() {
6234 const ballPosition = room.getBallPosition();
6235 updateTeams();
6236 for (var i = 0; i < players.length; i++) {
6237 if (players[i].position != null) {
6238 var distanceToBall = pointDistance(players[i].position, ballPosition);
6239 if (distanceToBall < triggerDistance) {
6240 !activePlay ? activePlay = true : null;
6241 if (lastTeamTouched == players[i].team && lastPlayersTouched[0] != null && lastPlayersTouched[0].id != players[i].id) {
6242 lastPlayersTouched[1] = lastPlayersTouched[0];
6243 lastPlayersTouched[0] = players[i];
6244 }
6245 lastTeamTouched = players[i].team;
6246 }
6247 }
6248 }
6249 }
6250
6251 function getStats() { // gives possession, ball speed and GK of each team
6252 if (activePlay) {
6253 updateTeams();
6254 lastTeamTouched == Team.RED ? Rposs++ : Bposs++;
6255 var ballPosition = room.getBallPosition();
6256 point[1] = point[0];
6257 point[0] = ballPosition;
6258 ballSpeed = (pointDistance(point[0], point[1]) * 60 * 60 * 60)/15000;
6259 var k = [-1, Infinity];
6260 for (var i = 0; i < teamR.length; i++) {
6261 if (teamR[i].position.x < k[1]) {
6262 k[0] = teamR[i];
6263 k[1] = teamR[i].position.x;
6264 }
6265 }
6266 k[0] != -1 ? setGK(k[0], getGK(k[0]) + 1) : null;
6267 k = [-1, -Infinity];
6268 for (var i = 0; i < teamB.length; i++) {
6269 if (teamB[i].position.x > k[1]) {
6270 k[0] = teamB[i];
6271 k[1] = teamB[i].position.x;
6272 }
6273 }
6274 k[0] != -1 ? setGK(k[0], getGK(k[0]) + 1) : null;
6275 findGK();
6276 }
6277 }
6278
6279 function updateStats() {
6280 if (players.length >= 2 * maxTeamSize && (game.scores.time >= (5 / 6) * game.scores.timeLimit || game.scores.red == game.scores.scoreLimit || game.scores.blue == game.scores.scoreLimit) && allReds.length >= maxTeamSize && allBlues.length >= maxTeamSize) {
6281 var stats;
6282 for (var i = 0; i < allReds.length; i++) {
6283 localStorage.getItem(getAuth(allReds[i])) ? stats = JSON.parse(localStorage.getItem(getAuth(allReds[i]))) : stats = [0, 0, 0, 0, "0.00", 0, 0, 0, 0, "0.00", "player", allReds[i].name];
6284 stats[Ss.GA]++;
6285 lastWinner == Team.RED ? stats[Ss.WI]++ : lastWinner == Team.BLUE ? stats[Ss.LS]++ : stats[Ss.DR]++;
6286 stats[Ss.WR] = (100 * stats[Ss.WI] / stats[Ss.GA]).toPrecision(3);
6287 localStorage.setItem(getAuth(allReds[i]), JSON.stringify(stats));
6288 }
6289 for (var i = 0; i < allBlues.length; i++) {
6290 localStorage.getItem(getAuth(allBlues[i])) ? stats = JSON.parse(localStorage.getItem(getAuth(allBlues[i]))) : stats = [0, 0, 0, 0, "0.00", 0, 0, 0, 0, "0.00", "player", allBlues[i].name];
6291 stats[Ss.GA]++;
6292 lastWinner == Team.BLUE ? stats[Ss.WI]++ : lastWinner == Team.RED ? stats[Ss.LS]++ : stats[Ss.DR]++;
6293 stats[Ss.WR] = (100 * stats[Ss.WI] / stats[Ss.GA]).toPrecision(3);
6294 localStorage.setItem(getAuth(allBlues[i]), JSON.stringify(stats));
6295 }
6296 for (var i = 0; i < game.goals.length; i++) {
6297 if (game.goals[i].striker != null) {
6298 if ((allBlues.concat(allReds)).findIndex((player) => player.id == game.goals[i].striker.id) != -1) {
6299 stats = JSON.parse(localStorage.getItem(getAuth(game.goals[i].striker)));
6300 stats[Ss.GL]++;
6301 localStorage.setItem(getAuth(game.goals[i].striker), JSON.stringify(stats));
6302 }
6303 }
6304 if (game.goals[i].assist != null) {
6305 if ((allBlues.concat(allReds)).findIndex((player) => player.name == game.goals[i].assist.name) != -1) {
6306 stats = JSON.parse(localStorage.getItem(getAuth(game.goals[i].assist)));
6307 stats[Ss.AS]++;
6308 localStorage.setItem(getAuth(game.goals[i].assist), JSON.stringify(stats));
6309 }
6310 }
6311 }
6312 if (allReds.findIndex((player) => player.id == GKList[0].id) != -1) {
6313 stats = JSON.parse(localStorage.getItem(getAuth(GKList[0])));
6314 stats[Ss.GK]++;
6315 game.scores.blue == 0 ? stats[Ss.CS]++ : null;
6316 stats[Ss.CP] = (100 * stats[Ss.CS] / stats[Ss.GK]).toPrecision(3);
6317 localStorage.setItem(getAuth(GKList[0]), JSON.stringify(stats));
6318 }
6319 if (allBlues.findIndex((player) => player.id == GKList[1].id) != -1) {
6320 stats = JSON.parse(localStorage.getItem(getAuth(GKList[1])));
6321 stats[Ss.GK]++;
6322 game.scores.red == 0 ? stats[Ss.CS]++ : null;
6323 stats[Ss.CP] = (100 * stats[Ss.CS] / stats[Ss.GK]).toPrecision(3);
6324 localStorage.setItem(getAuth(GKList[1]), JSON.stringify(stats));
6325 }
6326 }
6327 }
6328
6329 function findGK() {
6330 var tab = [[-1,""], [-1,""]];
6331 for (var i = 0; i < extendedP.length ; i++) {
6332 if (room.getPlayer(extendedP[i][eP.ID]) != null && room.getPlayer(extendedP[i][eP.ID]).team == Team.RED) {
6333 if (tab[0][0] < extendedP[i][eP.GK]) {
6334 tab[0][0] = extendedP[i][eP.GK];
6335 tab[0][1] = room.getPlayer(extendedP[i][eP.ID]);
6336 }
6337 }
6338 else if (room.getPlayer(extendedP[i][eP.ID]) != null && room.getPlayer(extendedP[i][eP.ID]).team == Team.BLUE) {
6339 if (tab[1][0] < extendedP[i][eP.GK]) {
6340 tab[1][0] = extendedP[i][eP.GK];
6341 tab[1][1] = room.getPlayer(extendedP[i][eP.ID]);
6342 }
6343 }
6344 }
6345 GKList = [tab[0][1], tab[1][1]];
6346 }
6347
6348function isBlacklisted(player){
6349 return blacklist.filter(b => b.ipv4 == player.ipv4 || b.Auth == player.auth || b.Conn == player.conn).length > 0;
6350}
6351
6352 function getDatehoras(){
6353 let data = new Date(),
6354 dia=data.getDate().toString().padStart(2, '0'),
6355 mes=(data.getMonth()+1).toString().padStart(2, '0'),
6356 horas=data.getHours().toString().padStart(2, '0'),
6357 minutos=data.getMinutes().toString().padStart(2, '0');
6358 return `${horas}:${minutos}`;
6359}
6360
6361function getDateInfo(){
6362 let data = new Date(),
6363 dia=data.getDate().toString().padStart(2, '0'),
6364 mes=(data.getMonth()+1).toString().padStart(2, '0'),
6365 ano=data.getFullYear(),
6366 horas=data.getHours().toString().padStart(2, '0'),
6367 minutos=data.getMinutes().toString().padStart(2, '0');
6368 segundos=data.getSeconds().toString().padStart(2, '0');
6369 return `${dia} do ${mes} de ${ano}, ás ${horas}:${minutos}:${segundos}`;
6370}
6371
6372function dataehora(){
6373 let data = new Date(),
6374 dia=data.getDate().toString().padStart(2, '0'),
6375 mes=(data.getMonth()+1).toString().padStart(2, '0'),
6376 ano=data.getFullYear(),
6377 horas=data.getHours().toString().padStart(2, '0'),
6378 minutos=data.getMinutes().toString().padStart(2, '0');
6379 segundos=data.getSeconds().toString().padStart(2, '0');
6380 return `${dia}/${mes} de ${ano}, ás ${horas}:${minutos} e ${segundos} segundos`;
6381}
6382
6383
6384function multiplas_abas(player){
6385conns.push([player.id,player.name,player.auth,player.conn])
6386playerConn[player.id] = player.conn;
6387if (room.getPlayerList().filter((p) => playerConn[p.id] == player.conn).length > 1)
6388room.kickPlayer(room.getPlayerList().filter((p) => playerConn[p.id] == player.conn)[1].id, "Você já está nessa sala em outra aba, feche a outra aba.", false)
6389}
6390
6391function playerChat(player, message) {
6392 var playerTargetIndex = players.findIndex(
6393 (p) => p.name.replaceAll(' ', '_') == msgArray[0].substring(2)
6394 );
6395 if (playerTargetIndex == -1) {
6396 room.sendAnnouncement(
6397 "Player inválido, verifique se o nome digitado está correto.",
6398 player.id,
6399 Cor.Vermelho,
6400 'bold',
6401 );
6402 return false;
6403 }
6404 var playerTarget = players[playerTargetIndex];
6405 if (player.id == playerTarget.id) {
6406 room.sendAnnouncement(
6407 "Você não pode enviar um PV para si mesmo!",
6408 player.id,
6409 Cor.Vermelho,
6410 'bold',
6411 null
6412 );
6413 return false;
6414 }
6415 var messageFrom = `[Privado com ${playerTarget.name}] ${player.name}: ${msgArray.slice(1).join(' ')}`
6416
6417 var messageTo = `[Privado com ${player.name}] ${player.name}: ${msgArray.slice(1).join(' ')}`
6418
6419 room.sendAnnouncement(
6420 messageFrom,
6421 player.id,
6422 Cor.Azulclaro,
6423 Normal,
6424 1
6425 );
6426 room.sendAnnouncement(
6427 messageTo,
6428 playerTarget.id,
6429 Cor.Azulclaro,
6430 Normal,
6431 1
6432 );
6433}
6434
6435room.onGameTick = function () {
6436 checkTime()
6437 getLastTouchOfTheBall()
6438 getStats()
6439 handleInactivity()
6440 lastScores = room.getScores()
6441}