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