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