PL

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 42

var Map = `{"name":"C.U.

H | Policia e
Ladrão","width":830,"height":600,"spawnDistance":225,"bg":
{"type":"hockey","width":0,"height":0,"kickOffRadius":0,"cornerRadius":0},"vertexes
":[{"x":655,"y":320,"bCoef":0,"cMask":["red","blue","c0","c1"],"cGroup":["ball"]},
{"x":655,"y":515,"bCoef":0,"cMask":["red","blue","c0","c1"],"cGroup":["ball"]},
{"x":655,"y":-515,"bCoef":0,"cMask":["red","blue","c0","c1"],"cGroup":["ball"]},
{"x":655,"y":240,"bCoef":0,"cMask":["red","blue","c0","c1"],"cGroup":["ball"]},
{"x":365,"y":392,"bCoef":0,"cMask":["wall","score"]},
{"x":365,"y":483,"bCoef":0,"cMask":["wall","score"]},{"x":-150,"y":-430,"cMask":
["none"]},{"x":653,"y":-430,"cMask":["none"]},{"x":653,"y":-280,"cMask":["none"]},
{"x":-150,"y":-280,"cMask":["none"]},{"x":-180,"y":-250,"cMask":["none"]},{"x":-
180,"y":513,"cMask":["none"]},{"x":-330,"y":513,"cMask":["none"]},{"x":-330,"y":-
250,"cMask":["none"]},{"x":-250,"y":470,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"]},{"x":-190,"y":470,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"]},{"x":-190,"y":-120,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"]},{"x":-250,"y":-120,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"]},{"x":-260,"y":470,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"]},{"x":-320,"y":470,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"]},{"x":-320,"y":-120,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"]},{"x":-260,"y":-120,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"]},{"x":-255,"y":430,"bCoef":0,"cMask":["wall"]},{"x":-
255,"y":380,"bCoef":0,"cMask":["wall"]},{"x":-255,"y":180,"bCoef":0,"cMask":
["wall"]},{"x":-255,"y":230,"bCoef":0,"cMask":["wall"]},{"x":-
255,"y":30,"bCoef":0,"cMask":["wall"]},{"x":-255,"y":-20,"bCoef":0,"cMask":
["wall"]},{"x":-255,"y":-220,"bCoef":0,"cMask":["wall"]},{"x":-255,"y":-
170,"bCoef":0,"cMask":["wall"]},{"x":-130,"y":-355,"bCoef":0,"cMask":["wall"]},
{"x":-80,"y":-355,"bCoef":0,"cMask":["wall"]},{"x":120,"y":-355,"bCoef":0,"cMask":
["wall"]},{"x":70,"y":-355,"bCoef":0,"cMask":["wall"]},{"x":270,"y":-
355,"bCoef":0,"cMask":["wall"]},{"x":320,"y":-355,"bCoef":0,"cMask":["wall"]},
{"x":520,"y":-355,"bCoef":0,"cMask":["wall"]},{"x":470,"y":-355,"bCoef":0,"cMask":
["wall"]},{"x":-150,"y":-420,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"]},{"x":430,"y":-420,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"]},{"x":430,"y":-360,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"]},{"x":-150,"y":-360,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"]},{"x":-150,"y":-290,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"]},{"x":430,"y":-290,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"]},{"x":430,"y":-350,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"]},{"x":-150,"y":-350,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"]},{"x":-150,"y":-250,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-150,"y":-80,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":150,"y":-80,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":150,"y":-250,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-150,"y":250,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-150,"y":80,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":150,"y":80,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":150,"y":250,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-150,"y":410,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-150,"y":513,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":150,"y":410,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":150,"y":513,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-100,"y":-250,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-65,"y":-250,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":150,"y":-135,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":150,"y":-100,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":30,"y":-80,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":65,"y":-80,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-150,"y":150,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-150,"y":185,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-85,"y":80,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-50,"y":80,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":30,"y":80,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":65,"y":80,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":30,"y":250,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":65,"y":250,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-420,"y":-180,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-350,"y":-180,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-350,"y":-360,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-350,"y":-440,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-350,"y":-513,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-598,"y":-180,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-500,"y":-180,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-536,"y":300,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-536,"y":320,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-516,"y":320,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-516,"y":300,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-536,"y":410,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-536,"y":430,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-516,"y":430,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-516,"y":410,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-416,"y":300,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-416,"y":320,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-396,"y":320,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-396,"y":300,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-416,"y":410,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-416,"y":430,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-396,"y":430,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-396,"y":410,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-636,"y":300,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-636,"y":320,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-656,"y":320,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-656,"y":300,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-636,"y":410,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-636,"y":430,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-656,"y":430,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-656,"y":410,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-536,"y":190,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-536,"y":210,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-516,"y":210,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-516,"y":190,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-416,"y":190,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-416,"y":210,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-396,"y":210,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-396,"y":190,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-636,"y":190,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-636,"y":210,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-656,"y":210,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-656,"y":190,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-530,"y":0,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-530,"y":-80,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-440,"y":-80,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-460,"y":90,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-360,"y":90,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-360,"y":0,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-755,"y":515,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":-755,"y":-515,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":355,"y":485,"bCoef":0,"cMask":
["wall","score"]},{"x":355,"y":505,"bCoef":0,"cMask":["wall","score"]},
{"x":375,"y":505,"bCoef":0,"cMask":["red","c0"]},
{"x":375,"y":485,"bCoef":0,"cMask":["red","c0"]},
{"x":355,"y":390,"bCoef":0,"cMask":["wall","score"]},
{"x":355,"y":370,"bCoef":0,"cMask":["wall","score"]},
{"x":375,"y":370,"bCoef":0,"cMask":["red","c0"]},
{"x":375,"y":390,"bCoef":0,"cMask":["red","c0"]},
{"x":355,"y":280,"bCoef":0,"cMask":["wall","score"]},
{"x":355,"y":260,"bCoef":0,"cMask":["wall","score"]},
{"x":375,"y":260,"bCoef":0,"cMask":["red","c0"]},
{"x":375,"y":280,"bCoef":0,"cMask":["red","c0"]},
{"x":355,"y":160,"bCoef":0,"cMask":["red","c0"]},
{"x":355,"y":140,"bCoef":0,"cMask":["red","c0"]},
{"x":375,"y":140,"bCoef":0,"cMask":["red","c0"]},
{"x":375,"y":160,"bCoef":0,"cMask":["red","c0"]},
{"x":495,"y":160,"bCoef":0,"cMask":["red","c0"]},
{"x":495,"y":140,"bCoef":0,"cMask":["wall","score"]},
{"x":515,"y":140,"bCoef":0,"cMask":["wall","score"]},
{"x":515,"y":160,"bCoef":0,"cMask":["red","c0"]},
{"x":365,"y":282,"bCoef":0,"cMask":["wall","score"]},
{"x":365,"y":368,"bCoef":0,"cMask":["wall","score"]},
{"x":365,"y":162,"bCoef":0,"cMask":["wall","score"]},
{"x":365,"y":258,"bCoef":0,"cMask":["wall","score"]},
{"x":377,"y":150,"bCoef":0,"cMask":["wall","score"]},
{"x":493,"y":150,"bCoef":0,"cMask":["wall","score"]},
{"x":628,"y":150,"bCoef":0,"cMask":["wall","score"]},
{"x":517,"y":150,"bCoef":0,"cMask":["wall","s
core"]},{"x":270,"y":-245,"bCoef":0,"cMask":["red","blue","c0","c1"],"cGroup":
["ball"]},{"x":270,"y":-140,"bCoef":0,"cMask":["red","blue","c0","c1"],"cGroup":
["ball"]},{"x":470,"y":-245,"bCoef":0,"cMask":["red","blue","c0","c1"],"cGroup":
["ball"]},{"x":350,"y":15,"bCoef":0,"cMask":["red","blue","c0","c1"],"cGroup":
["ball"]},{"x":350,"y":-140,"bCoef":0,"cMask":["red","blue","c0","c1"],"cGroup":
["ball"]},{"x":-70,"y":410,"bCoef":0,"cMask":["red","blue","c0","c1"],"cGroup":
["ball"]},{"x":-35,"y":410,"bCoef":0,"cMask":["red","blue","c0","c1"],"cGroup":
["ball"]},{"x":350,"y":-80,"bCoef":0,"cMask":["red","blue","c0","c1"]},
{"x":350,"y":-45,"bCoef":0,"cMask":["red","blue","c0","c1"]},{"x":270,"y":-
210,"bCoef":0,"cMask":["red","blue","c0","c1"]},{"x":270,"y":-
175,"bCoef":0,"cMask":["red","blue","c0","c1"]},{"x":470,"y":-
210,"bCoef":0,"cMask":["red","blue","c0","c1"]},{"x":470,"y":-
175,"bCoef":0,"cMask":["red","blue","c0","c1"]},{"x":470,"y":-
125,"bCoef":0,"cMask":["red","blue","c0","c1"]},{"x":470,"y":-90,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":470,"y":-30,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":470,"y":5,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":558,"y":-85,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":558,"y":-65,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":578,"y":-65,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":578,"y":-85,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":558,"y":25,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":558,"y":45,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":578,"y":45,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":578,"y":25,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":558,"y":-195,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":558,"y":-175,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":578,"y":-175,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":578,"y":-195,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":270,"y":15,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":270,"y":120,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":470,"y":120,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":270,"y":55,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":270,"y":90,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":470,"y":55,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":470,"y":90,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-600,"y":-190,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-753,"y":-190,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-600,"y":90,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-753,"y":90,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-600,"y":20,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-600,"y":55,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-600,"y":-135,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-600,"y":-100,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":70,"y":-514,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":40,"y":-480,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":100,"y":-480,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":370,"y":-514,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":340,"y":-480,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":400,"y":-480,"bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},{"x":295,"y":460,"bCoef":1000,"cMask":
["wall"],"cGroup":["all","c0","c1"]},{"x":335,"y":460,"bCoef":1000,"cMask":
["wall"],"cGroup":["all","c0","c1"]},{"x":295,"y":210,"bCoef":1000,"cMask":
["wall"],"cGroup":["all","c0","c1"]},{"x":335,"y":170,"bCoef":1000,"cMask":
["wall"],"cGroup":["all","c0","c1"]},{"x":640,"y":170,"bCoef":1000,"cMask":
["wall"],"cGroup":["all","c0","c1"]},{"x":640,"y":210,"bCoef":1000,"cMask":
["wall"],"cGroup":["all","c0","c1"]},{"x":657.5,"y":320,"bCoef":0,"cMask":
["blue","c1"],"cGroup":["ball"]},{"x":657.5,"y":517.5,"bCoef":0,"cMask":
["blue","c1"],"cGroup":["ball"]},{"x":657.5,"y":-517.5,"bCoef":0,"cMask":
["blue","c1"],"cGroup":["ball"]},{"x":657.5,"y":240,"bCoef":0,"cMask":
["blue","c1"],"cGroup":["ball"]},{"x":-757.5,"y":517.5,"bCoef":0,"cMask":
["blue","c1"],"cGroup":["ball"]},{"x":-757.5,"y":-517.5,"bCoef":0,"cMask":
["blue","c1"],"cGroup":["ball"]},{"x":-2,"y":330,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":2,"y":330,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":88,"y":330,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":92,"y":330,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-88,"y":330,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":-92,"y":330,"bCoef":0,"cMask":
["red","blue","c0","c1"]},{"x":757,"y":315,"bCoef":0,"cMask":["red","c0"]},
{"x":757,"y":345,"bCoef":0,"cMask":["red","c0"]},
{"x":575,"y":445,"bCoef":0,"cMask":["red","c0"]},
{"x":575,"y":505,"bCoef":0,"cMask":["red","c0"]},
{"x":645,"y":505,"bCoef":0,"cMask":["red","c0"]},
{"x":645,"y":445,"bCoef":0,"cMask":["red","c0"]},
{"x":757,"y":395,"bCoef":0,"cMask":["red","c0"]},
{"x":757,"y":365,"bCoef":0,"cMask":["red","c0"]},
{"x":757,"y":265,"bCoef":0,"cMask":["red","c0"]},
{"x":757,"y":295,"bCoef":0,"cMask":["red","c0"]},
{"x":757,"y":245,"bCoef":0,"cMask":["red","c0"]},
{"x":757,"y":215,"bCoef":0,"cMask":["red","c0"]},
{"x":757,"y":165,"bCoef":0,"cMask":["red","c0"]},
{"x":757,"y":195,"bCoef":0,"cMask":["red","c0"]},
{"x":655,"y":220,"bCoef":0,"cMask":["blue","c1"],"cGroup":["ball"]},
{"x":655,"y":340,"bCoef":0,"cMask":["blue","c1"],"cGroup":["ball"]},
{"x":630,"y":160,"bCoef":0,"cMask":["red","c0"]},
{"x":630,"y":140,"bCoef":0,"cMask":["wall","score"]},
{"x":650,"y":140,"bCoef":0,"cMask":["wall","score"]},
{"x":650,"y":160,"bCoef":0,"cMask":["red","c0"]},
{"x":657.5,"y":165,"bCoef":0,"cMask":["all","c0","c1","c2","c3","score"],"cGroup":
["all","c0","c1","c2","c3","score"]},{"x":830,"y":165,"bCoef":0,"cMask":
["all","c0","c1","c2","c3","score"],"cGroup":["all","c0","c1","c2","c3","score"]},
{"x":830,"y":395,"bCoef":0,"cMask":["all","c0","c1","c2","c3","score"],"cGroup":
["all","c0","c1","c2","c3","score"]},{"x":657.5,"y":395,"bCoef":0,"cMask":
["all","c0","c1","c2","c3","score"],"cGroup":["all","c0","c1","c2","c3","score"]},
{"x":772,"y":165,"bCoef":0,"cMask":["all","c0","c1","c2","c3","score"],"cGroup":
["all","c0","c1","c2","c3","score"]},{"x":772,"y":395,"bCoef":0,"cMask":
["all","c0","c1","c2","c3","score"],"cGroup":["all","c0","c1","c2","c3","score"]},
{"x":657.5,"y":600,"bCoef":0,"cMask":["all","c0","c1","c2","c3","score"],"cGroup":
["all","c0","c1","c2","c3","score"]},{"x":657.5,"y":-600,"bCoef":0,"cMask":
["all","c0","c1","c2","c3","score"],"cGroup":
["all","c0","c1","c2","c3","score"]}],"segments":
[{"v0":0,"v1":1,"color":"000000","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":2,"v1":3,"color":"000000","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":4,"v1":5,"color":"ADAEC9","bCoef":0,"cMask":["wall","score"],"bias":-285},
{"v0":6,"v1":7,"color":"333333","cMask":["none"]},
{"v0":8,"v1":9,"color":"333333","cMask":["none"]},
{"v0":10,"v1":11,"color":"333333","cMask":["none"]},
{"v0":12,"v1":13,"color":"333333","cMask":["none"]},
{"v0":13,"v1":6,"curve":90,"color":"333333","cMask":["none"]},
{"v0":10,"v1":9,"curve":90,"color":"333333","cMask":["none"]},
{"v0":15,"v1":16,"vis":false,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"]},{"v0":17,"v1":14,"vis":false,"bCoef":0,"cMask":
["wall"],"cGroup":["all","c0","c1"]},
{"v0":19,"v1":20,"vis":false,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"]},{"v0":21,"v1":18,"vis":false,"bCoef":0,"cMask":
["wall"],"cGroup":["all","c0","c1"]},
{"v0":22,"v1":23,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":24,"v1":25,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":26,"v1":27,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":28,"v1":29,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":30,"v1":31,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":32,"v1":33,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":34,"v1":35,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":36,"v1":37,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":38,"v1":39,"vis":false,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"]},{"v0":40,"v1":41,"vis":false,"bCoef":0,"cMask":
["wall"],"cGroup":["all","c0","c1"]},
{"v0":42,"v1":43,"vis":false,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"]},{"v0":44,"v1":45,"vis":false,"bCoef":0,"cMask":
["wall"],"cGroup":["all","c0","c1"]},
{"v0":42,"v1":38,"vis":false,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"],"bias":-30},{"v0":46,"v1":47,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":52,"v1":53,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":54,"v1":55,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":56,"v1":57,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":58,"v1":59,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":60,"v1":61,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":62,"v1":63,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":47,"v1":62,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":46,"v1":58,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":63,"v1":48,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":48,"v1":61,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":60,"v1":49,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":49,"v1":59,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":64,"v1":65,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":66,"v1":67,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":68,"v1":69,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":70,"v1":71,"color":"ffffff","bCoef":0,"cMask":["wall"]
},{"v0":53,"v1":71,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":52,"v1":69,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":50,"v1":70,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":50,"v1":65,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":51,"v1":64,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":51,"v1":66,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":67,"v1":68,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":72,"v1":73,"color":"f6ffa4","bCoef":0,"cMask":["red","blue","c0","c1"]},
{"v0":73,"v1":74,"color":"f6ffa4","bCoef":0,"cMask":["red","blue","c0","c1"]},
{"v0":75,"v1":76,"color":"f6ffa4","bCoef":0,"cMask":["red","blue","c0","c1"]},
{"v0":77,"v1":78,"color":"f6ffa4","bCoef":0,"cMask":["red","blue","c0","c1"]},
{"v0":79,"v1":80,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":80,"v1":81,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":81,"v1":82,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":82,"v1":79,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":83,"v1":84,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":84,"v1":85,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":85,"v1":86,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":86,"v1":83,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":87,"v1":88,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":88,"v1":89,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":89,"v1":90,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":90,"v1":87,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":91,"v1":92,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":92,"v1":93,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":93,"v1":94,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":94,"v1":91,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":95,"v1":96,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":96,"v1":97,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":97,"v1":98,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":98,"v1":95,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":99,"v1":100,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":100,"v1":101,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":101,"v1":102,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":102,"v1":99,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":103,"v1":104,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":104,"v1":105,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":105,"v1":106,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":106,"v1":103,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":107,"v1":108,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":108,"v1":109,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":109,"v1":110,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":110,"v1":107,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":111,"v1":112,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":112,"v1":113,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":113,"v1":114,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":114,"v1":111,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":115,"v1":116,"color":"222222","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":116,"v1":117,"color":"222222","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":118,"v1":119,"color":"222222","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":119,"v1":120,"color":"222222","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":1,"v1":121,"color":"000000","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":121,"v1":122,"color":"000000","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":122,"v1":2,"color":"000000","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":123,"v1":124,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":124,"v1":125,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":125,"v1":126,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":126,"v1":123,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":127,"v1":128,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":128,"v1":129,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":129,"v1":130,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":130,"v1":127,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":131,"v1":132,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":132,"v1":133,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":133,"v1":134,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":134,"v1":131,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":135,"v1":136,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":136,"v1":137,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":137,"v1":138,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":138,"v1":135,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":139,"v1":140,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":140,"v1":141,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":141,"v1":142,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":142,"v1":139,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":143,"v1":144,"color":"adaec9","bCoef":0,"cMask":["wall","score"],"bias":-
285},{"v0":145,"v1":146,"color":"adaec9","bCoef":0,"cMask":
["wall","score"],"bias":-285},
{"v0":147,"v1":148,"color":"adaec9","bCoef":0,"cMask":["wall","score"],"bias":360},
{"v0":149,"v1":150,"color":"adaec9","bCoef":0,"cMask":["wall","score"],"bias":-
360},{"v0":151,"v1":153,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":155,"v1":152,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":54,"v1":156,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":56,"v1":157,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":156,"v1":157,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":158,"v1":159,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":160,"v1":161,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":162,"v1":163,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":164,"v1":165,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":166,"v1":167,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":168,"v1":169,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":169,"v1":170,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":170,"v1":171,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":171,"v1":168,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":172,"v1":173,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":173,"v1":174,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":174,"v1":175,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":175,"v1":172,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":176,"v1":177,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":177,"v1":178,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":178,"v1":179,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":179,"v1":176,"color":"222333","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":152,"v1":161,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":160,"v1":151,"color":"3a005c","bCoef":0,"cMask":["red","blue","c0","c1"]},
{"v0":155,"v1":158,"color":"3a005c","bCoef":0,"cMask":["red","blue","c0","c1"]},
{"v0":159,"v1":154,"color":"3a005c","bCoef":0,"cMask":["red","blue","c0","c1"]},
{"v0":166,"v1":165,"color":"3a005c","bCoef":0,"cMask":["red","blue","c0","c1"]},
{"v0":164,"v1":163,"color":"3a005c","bCoef":0,"cMask":["red","blue","c0","c1"]},
{"v0":162,"v1":153,"color":"3a005c","bCoef":0,"cMask":["red","blue","c0","c1"]},
{"v0":154,"v1":180,"color":"3a005c","bCoef":0,"cMask":["red","blue","c0","c1"]},
{"v0":181,"v1":182,"color":"3a005c","bCoef":0,"cMask":["red","blue","c0","c1"]},
{"v0":183,"v1":184,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":185,"v1":186,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":181,"v1":184,"color":"3a005c","bCoef":0,"cMask":["red","blue","c0","c1"]},
{"v0":183,"v1":180,"color":"3a005c","bCoef":0,"cMask":["red","blue","c0","c1"]},
{"v0":182,"v1":186,"color":"3a005c","bCoef":0,"cMask":["red","blue","c0","c1"]},
{"v0":185,"v1":167,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball
"]},{"v0":187,"v1":188,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"]},{"v0":189,"v1":190,"color":"3a005c","bCoef":0,"cMask":
["red","blue","c0","c1"]},{"v0":191,"v1":192,"color":"ffffff","bCoef":0,"cMask":
["wall"]},{"v0":193,"v1":194,"color":"ffffff","bCoef":0,"cMask":["wall"]},
{"v0":189,"v1":192,"color":"3a005c","bCoef":0,"cMask":["red","blue","c0","c1"]},
{"v0":191,"v1":194,"color":"3a005c","bCoef":0,"cMask":["red","blue","c0","c1"]},
{"v0":193,"v1":187,"color":"3a005c","bCoef":0,"cMask":["red","blue","c0","c1"]},
{"v0":195,"v1":196,"curve":100,"color":"000000","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":196,"v1":197,"color":"000000","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":197,"v1":195,"curve":100,"color":"000000","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":198,"v1":199,"curve":100,"color":"000000","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":199,"v1":200,"color":"000000","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":200,"v1":198,"curve":100,"color":"000000","bCoef":0,"cMask":
["red","blue","c0","c1"],"cGroup":["ball"]},
{"v0":201,"v1":202,"vis":false,"bCoef":1000,"cMask":["wall"],"cGroup":
["all","c0","c1"]},{"v0":203,"v1":204,"vis":false,"bCoef":1000,"cMask":
["wall"],"cGroup":["all","c0","c1"]},
{"v0":205,"v1":206,"vis":false,"bCoef":1000,"cMask":["wall"],"cGroup":
["all","c0","c1"]},{"v0":207,"v1":208,"color":"000000","bCoef":0,"cMask":
["blue","c1"],"cGroup":["ball"]},
{"v0":209,"v1":210,"color":"000000","bCoef":0,"cMask":["blue","c1"],"cGroup":
["ball"]},{"v0":208,"v1":211,"color":"000000","bCoef":0,"cMask":
["blue","c1"],"cGroup":["ball"]},
{"v0":211,"v1":212,"color":"000000","bCoef":0,"cMask":["blue","c1"],"cGroup":
["ball"]},{"v0":212,"v1":209,"color":"000000","bCoef":0,"cMask":
["blue","c1"],"cGroup":["ball"]},
{"v0":213,"v1":214,"curve":180,"color":"f6ffa4","bCoef":0,"cMask":
["red","blue","c0","c1"]},
{"v0":214,"v1":213,"curve":180,"color":"f6ffa4","bCoef":0,"cMask":
["red","blue","c0","c1"]},
{"v0":215,"v1":216,"curve":180,"color":"f6ffa4","bCoef":0,"cMask":
["red","blue","c0","c1"]},
{"v0":216,"v1":215,"curve":180,"color":"f6ffa4","bCoef":0,"cMask":
["red","blue","c0","c1"]},
{"v0":217,"v1":218,"curve":180,"color":"f6ffa4","bCoef":0,"cMask":
["red","blue","c0","c1"]},
{"v0":218,"v1":217,"curve":180,"color":"f6ffa4","bCoef":0,"cMask":
["red","blue","c0","c1"]},
{"v0":219,"v1":220,"curve":180,"color":"000000","bCoef":0,"cMask":["red","c0"]},
{"v0":221,"v1":222,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":222,"v1":223,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":223,"v1":224,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":224,"v1":221,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":225,"v1":226,"curve":-180,"color":"000000","bCoef":0,"cMask":["red","c0"]},
{"v0":227,"v1":228,"curve":180,"color":"000000","bCoef":0,"cMask":["red","c0"]},
{"v0":229,"v1":230,"curve":-180,"color":"000000","bCoef":0,"cMask":["red","c0"]},
{"v0":231,"v1":232,"curve":180,"color":"000000","bCoef":0,"cMask":["red","c0"]},
{"v0":233,"v1":234,"curve":-170,"color":"333333","bCoef":0,"cMask":
["blue","c1"],"cGroup":["ball"]},
{"v0":235,"v1":236,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":236,"v1":237,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":237,"v1":238,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":238,"v1":235,"color":"0000ff","bCoef":0,"cMask":["red","c0"]},
{"v0":39,"v1":43,"vis":false,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"],"bias":-30},{"v0":15,"v1":19,"vis":false,"bCoef":0,"cMask":
["wall"],"cGroup":["all","c0","c1"],"bias":-30},
{"v0":20,"v1":16,"vis":false,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"],"bias":-30},{"v0":123,"v1":124,"vis":false,"bCoef":0,"cMask":
["wall","score"],"bias":-295},{"v0":128,"v1":127,"vis":false,"bCoef":0,"cMask":
["wall","score"],"bias":-295},{"v0":132,"v1":131,"vis":false,"bCoef":0,"cMask":
["wall","score"],"bias":-295},{"v0":140,"v1":141,"vis":false,"bCoef":0,"cMask":
["wall","score"],"bias":370},{"v0":236,"v1":237,"vis":false,"bCoef":0,"cMask":
["wall","score"],"bias":370},{"v0":145,"v1":147,"vis":false,"bCoef":0,"cMask":
["wall","score"],"bias":30},{"v0":243,"v1":244,"vis":false,"bCoef":0,"cMask":
["all","c0","c1","c2","c3","score"],"cGroup":
["all","c0","c1","c2","c3","score"],"bias":-58},
{"v0":232,"v1":230,"vis":false,"bCoef":0,"cMask":
["all","c0","c1","c2","c3","score"],"cGroup":
["all","c0","c1","c2","c3","score"],"bias":-15},
{"v0":229,"v1":227,"vis":false,"bCoef":0,"cMask":
["all","c0","c1","c2","c3","score"],"cGroup":
["all","c0","c1","c2","c3","score"],"bias":-15},
{"v0":228,"v1":219,"vis":false,"bCoef":0,"cMask":
["all","c0","c1","c2","c3","score"],"cGroup":
["all","c0","c1","c2","c3","score"],"bias":-15},
{"v0":220,"v1":226,"vis":false,"bCoef":0,"cMask":
["all","c0","c1","c2","c3","score"],"cGroup":
["all","c0","c1","c2","c3","score"],"bias":-15},
{"v0":245,"v1":208,"vis":false,"bCoef":0,"cMask":
["all","c0","c1","c2","c3","score"],"cGroup":
["all","c0","c1","c2","c3","score"],"bias":-1487.5},
{"v0":209,"v1":246,"vis":false,"bCoef":0,"cMask":
["all","c0","c1","c2","c3","score"],"cGroup":
["all","c0","c1","c2","c3","score"],"bias":-1487.5},
{"v0":239,"v1":240,"vis":false,"bCoef":0,"cMask":
["all","c0","c1","c2","c3","score"],"cGroup":
["all","c0","c1","c2","c3","score"],"bias":-765},
{"v0":241,"v1":242,"vis":false,"bCoef":0,"cMask":
["all","c0","c1","c2","c3","score"],"cGroup":
["all","c0","c1","c2","c3","score"],"bias":-205}],"goals":[],"discs":
[{"radius":39.99,"invMass":-0.1,"pos":
[660,280],"color":"111111","bCoef":0.0005,"cMask":["red","c0","wall"],"cGroup":
["ball"],"damping":1.06},{"radius":30,"invMass":-0.1,"pos":[-
220,440],"color":"111111","bCoef":0,"cMask":
["red","blue","c0","c1","ball"],"cGroup":["wall"],"damping":1.03},
{"radius":30,"invMass":-0.1,"pos":[-290,440],"color":"111111","bCoef":0,"cMask":
["red","blue","c0","c1","ball"],"cGroup":["wall"],"damping":1.03},
{"radius":30,"invMass":-0.1,"pos":[400,-320],"color":"111111","bCoef":0,"cMask":
["red","blue","c0","c1","ball"],"cGroup":["wall"],"damping":1.03},
{"radius":30,"invMass":-0.1,"pos":[-120,-390],"color":"111111","bCoef":0,"cMask":
["red","blue","c0","c1","ball"],"cGroup":["wall"],"damping":1.03},
{"radius":5,"invMass":0,"pos":[-350,-360],"color":"F6FFA4","bCoef":0,"cMask":
["red","blue","c0","c1"],"damping":0},{"radius":5,"invMass":0,"pos":[-350,-
440],"color":"F6FFA4","bCoef":0,"cMask":["red","blue","c0","c1"],"damping":0},
{"radius":5,"invMass":0,"pos":[-350,-270],"color":"F6FFA4","bCoef":0,"cMask":
["red","blue","c0","c1"],"damping":0},{"radius":5,"invMass":0,"pos":[-350,-
180],"color":"F6FFA4","bCoef":0,"cMask":["red","blue","c0","c1"],"damping":0},
{"radius":5,"invMass":0,"pos":[-420,-180],"color":"F6FFA4","bCoef":0,"cMask":
["red","blue","c0","c1"],"damping":0},{"radius":5,"invMass":0,"pos":[-500,-
180],"color":"F6FFA4","bCoef":0,"cMask":["red","blue","c0","c1"],"damping":0},
{"radius":35,"invMass":0,"pos":[-460,-250],"color":"0E8500","bCoef":0,"cMask":
["wall"],"damping":0},{"radius":35,"invMass":0,"pos":[-580,-
250],"color":"0E8500","bCoef":0,"cMask":["wall"],"damping":0},
{"radius":35,"invMass":0,"pos":[-460,-355],"color":"0E8500","bCoef":0,"cMask":
["wall"],"damping":0},{"radius":35,"invMass":0,"pos":[-580,-
355],"color":"0E8500","bCoef":0,"cMask":["wall"],"damping":0},
{"radius":35,"invMass":0,"pos":[-460,-460],"color":"0E8500","bCoef":0,"cMask":
["wall"],"damping":0},{"radius":35,"invMass":0,"pos":[-580,-
460],"color":"0E8500","bCoef":0,"cMask":["wall"],"damping":0},
{"radius":45,"invMass":0,"pos":[-445,5],"color":"ADAEC9","bCoef":0,"cMask":
["red","c0"],"damping":0},{"radius":5,"pos":[0,-70],"color":"000000","bCoef":-
5,"cMask":["ball"],"cGroup":["ball"],"damping":1,"speed":[0,0.2]},
{"radius":35,"invMass":0,"pos":[-695,-250],"color":"0E8500","bCoef":0,"cMask":
["wall"],"damping":0},{"radius":35,"invMass":0,"pos":[-695,-
355],"color":"0E8500","bCoef":0,"cMask":["wall"],"damping":0},
{"radius":35,"invMass":0,"pos":[-695,-460],"color":"0E8500","bCoef":0,"cMask":
["wall"],"damping":0},{"radius":15,"invMass":5e-324,"pos":
[318,425],"color":"5689E5","bCoef":0.001,"cMask":["red","c0","ball"],"cGroup":
["wall"],"damping":1,"speed":[0,1.5]},{"radius":15,"invMass":0,"pos":[305,-
15],"color":"0E8522","bCoef":0,"cMask":["wall"],"damping":0},
{"radius":15,"invMass":0,"pos":[305,-110],"color":"0E8522","bCoef":0,"cMask":
["wall"],"damping":0}],"planes":[{"normal":[0,1],"dist":-600,"bCoef":0,"cMask":
["red","c0"],"_data":{"extremes":{"normal":[0,1],"dist":-600,"canvas_rect":[-830,-
600,830,600],"a":[-830,-600],"b":[830,-600]}}},{"normal":[0,-1],"dist":-
600,"bCoef":0,"cMask":["red","blue","c0","c1"],"_data":{"extremes":{"normal":[0,-
1],"dist":-600,"canvas_rect":[-830,-600,830,600],"a":[-830,600],"b":[830,600]}}},
{"normal":[1,0],"dist":-757.5,"bCoef":0,"cMask":["red","c0"],"_data":{"extremes":
{"normal":[1,0],"dist":-757.5,"canvas_rect":[-830,-600,830,600],"a":[-757.5,-
600],"b":[-757.5,600]}}},{"normal":[-1,0],"dist":-830,"bCoef":0,"cMask":
["red","c0"],"_data":{"extremes":{"normal":[-1,0],"dist":-830,"canvas_rect":[-830,-
600,830,600],"a":[830,-600],"b":[830,600]}}},{"normal":[1,0],"dist":-
750,"bCoef":0,"cMask":["blue","c1"],"_data":{"extremes":{"normal":[1,0],"dist":-
750,"canvas_rect":[-830,-600,830,600],"a":[-750,-600],"b":[-750,600]}}},{"normal":
[-1,0],"dist":-650,"bCoef":0,"cMask":["blue","c1"],"_data":{"extremes":{"normal":[-
1,0],"dist":-650,"canvas_rect":[-830,-600,830,600],"a":[650,-600],"b":[650,600]}}},
{"normal":[0,-1],"dist":-510,"bCoef":0,"cMask":["blue","c1"],"_data":{"extremes":
{"normal":[0,-1],"dist":-510,"canvas_rect":[-830,-600,830,600],"a":[-830,510],"b":
[830,510]}}},{"normal":[0,1],"dist":-510,"bCoef":0,"cMask":["blue","c1"],"_data":
{"extremes":{"normal":[0,1],"dist":-510,"canvas_rect":[-830,-600,830,600],"a":[-
830,-510],"b":[830,-510]}}},{"normal":[1,0],"dist":180,"bCoef":0,"cMask":
["blue","c1"],"cGroup":["blueKO","redKO"],"_data":{"extremes":{"normal":
[1,0],"dist":180,"canvas_rect":
[-830,-600,830,600],"a":[180,-600],"b":[180,600]}}},{"normal":[-
1,0],"dist":180,"bCoef":0,"cMask":["red","c0"],"cGroup":["blueKO","redKO"],"_data":
{"extremes":{"normal":[-1,0],"dist":180,"canvas_rect":[-830,-600,830,600],"a":[-
180,-600],"b":[-180,600]}}},{"normal":[0,-1],"dist":-320,"bCoef":0,"cMask":
["ball"],"_data":{"extremes":{"normal":[0,-1],"dist":-320,"canvas_rect":[-830,-
600,830,600],"a":[-830,320],"b":[830,320]}}},{"normal":[-1,0],"dist":-
700,"bCoef":0,"cMask":["ball"],"_data":{"extremes":{"normal":[-1,0],"dist":-
700,"canvas_rect":[-830,-600,830,600],"a":[700,-600],"b":[700,600]}}},{"normal":
[1,0],"dist":430,"bCoef":0.5,"cMask":["ball"],"_data":{"extremes":{"normal":
[1,0],"dist":430,"canvas_rect":[-830,-600,830,600],"a":[430,-600],"b":[430,600]}}},
{"normal":[0,1],"dist":240,"bCoef":0,"cMask":["ball"],"_data":{"extremes":
{"normal":[0,1],"dist":240,"canvas_rect":[-830,-600,830,600],"a":[-830,240],"b":
[830,240]}}},{"normal":[0,-1],"dist":-470,"bCoef":0,"cMask":["wall"],"cGroup":
["all","c0","c1"],"_data":{"extremes":{"normal":[0,-1],"dist":-470,"canvas_rect":[-
830,-600,830,600],"a":[-830,470],"b":[830,470]}}}],"traits":{"ballArea":
{"vis":false,"bCoef":1,"cMask":["ball"]},"goalPost":
{"radius":8,"invMass":0,"bCoef":0.5},"goalNet":{"vis":true,"bCoef":0.1,"cMask":
["ball"]},"kickOffBarrier":{"vis":false,"bCoef":0.1,"cGroup":
["redKO","blueKO"],"cMask":["red","blue"]}},"playerPhysics":
{"bCoef":1000,"invMass":0.5,"damping":0.982,"acceleration":0.077,"kickingAccelerati
on":0.06,"kickingDamping":0.97,"kickStrength":0,"radius":15},"ballPhysics":
{"bCoef":0,"radius":20,"color":"transparent","invMass":1e-27,"damping":0,"cMask":
["ball","red","blue","c0","c1"],"cGroup":["ball"]},"joints":[],"redSpawnPoints":[[-
520,-302.5],[-675,-50],[-466,255],[-402.5,47.5],[-220,0],
[757,280]],"blueSpawnPoints":[[410,-62.5],[257.5,310],[585,355],[505,270],[220,0],
[610,475]],"canBeStored":false,"cameraFollow":"player","kickOffReset":"full"}`

var JMap = JSON.parse(Map);

var playerList = {};


var chatFunctions = [getCommands, getDiscord, getStats, setAdmin, setAFK, setBB,
setCollision, setLanguage];

var languages = ["br", "en"];

var badwords = {
br: [/[a4@][./]m[./][gkq]+/, /[a4@]hm[a4@][gğk]+/, /[a4@]mc[ıi1][gğk]+/,
/[a4@]m[ı1]n+/, /[a4@]m[kq]+/, /[a4@]ngu[t₺]+/, /[a4@]n[a4@][ns$5]+/, /[a4@]nn[e€]
[s$5][ıi1]+/, /[a4@][bp][t₺][a4@][l1]+/, /[a4@]q+/, /[a4@][t₺][a4@]pu[t₺]+/, /[bß]
[a4@][bß][a4@]n+/, /[bß][o0]k+/, /d[a4@][l1][l1][a4@]m[a4@]+/, /d[a4@]ng[a4@][l1]
[a4@][gğkq]+/, /[e€][bß][e€][ns$5]+/, /f[a4@]h[ıi1][sş$5][e€]+/,
/g[e€]r[ıi1]z[e€]k[a4@]+/, /g[a4@]v[a4@][t₺]+/, /[cg][oö0][t₺][uü][mn]+/, /[cg]
[oö0][t₺]v[e€]r[e€]n+/, /h[a4@][s$5][s$5][ıi1]k[t₺][ıi1]r+/, /[ıi1][bp]n[e€]+/,
/k[a4@]f[ıi1]r+/, /k[a4@]h[bpß][e€]+/, /k[a4@]n[c¢][ıi1]k/, /k[e€]r[ıi1]z+/,
/k[e€]v[a4@][sş$5][e€]+/, /[l1][a4@]vu[gğk]+/, /m[./][gkq]+/, /m[o0]r[o0]n+/,
/n[o0]n[o0][sş$5]+/, /[o0][./][cç¢]+/, /[o0][cç¢]+/, /[o0][rvw][o0][sş$5][bpß]
[ıiou]+/, /p[e€]z[e€]v[e€]n[gkq]+/, /p[ıi1][cçj¢]+/, /pu[sş$5][t₺]+/, /s.g+/,
/[s$5][a4@][l1][a4@][gğk]+/, /[sşz$5][ıi1!]k[eıikmt₺1]+/, /[sşz$5]+2+[ikmşy]+/,
/[sş$5][e€]r[e€]f[sş$5][ıi1]z+/, /[t₺][a4@][sş$5][a4@]k+/, /[t₺][a4@][sş$5][sş$5]
[a4@]k+/, /v[a4@][l1][ıi1]d[e€][ns]+/, /[y7][a4@]r[a4@][gğkmq]+/, /[y7][a4@]rr[a4@]
[gğkmq]+/, /[y7][a4@][uv][sş$5][a4@][gğk]+/, /[y7][o0][sş$5]m[a4@]+/],
en: [/[a4@][s$5][s$5]h[o0][l1][e€]+/, /[bß][a4@]rm[iy7]+/, /[bß][a4@][s$5][t₺]
[a4@]rd+/, /[bß][ıi1][t₺][cç¢]h+/, /[c¢]un[t₺]+/, /f[uü][cç¢]k+/, /[l1]m[a4@]
[o0]+/, /[l1]mf[a4@][o0]+/, /pu[s5$][s5$][y7]+/, /r[e€][t₺][a4@]rd+/, /[s$5]
[t₺]fu+/, /wh[o0]r[e€]+/, /w[t₺]f+/]
};

var roomObject = {
arrestPoint: {
X: JMap.redSpawnPoints[JMap.redSpawnPoints.length - 1][0],
Y: JMap.redSpawnPoints[JMap.redSpawnPoints.length - 1][1],
},
borders: {
MinX: -755,
MaxX: 655,
MinY: -515,
MaxY: 515
},
coefficients: {
points: {
gameEnd: {
cops: {
losses: 3,
wins: 2
},
robbers: {
losses: 1,
wins: 4
}
}
}
},
collision: true,
commandPrefix: "!",
discordLink: "https://discord.gg/sdBtcpqZN6",
emojis: ["", "", "👨‍✈️
"],
gamePauseState: false,
geo: {
br: { "code": "br", "lat": -23, "lon": -46 },
en: { "code": "gb", "lat": 51, "lon": 0 }
},
isRoomSet: false,
join: {
names: {
length: {
min: 3,
max: 15
}
}
},
locale: languages[0],
maxPlayers: 12,
name: {
br: " Policia e Ladrão ",
en: " Cops & Robbers 👤"
},
noPlayer: true,
password: null,
playerStatus: ["PLAYER", "ADMIN"],
prohibitedPoints: {
red: {
circle: [
{ x: -695, y: -460, radius: 35 },
{ x: -580, y: -460, radius: 35 },
{ x: -460, y: -460, radius: 35 },
{ x: -695, y: -355, radius: 35 },
{ x: -580, y: -355, radius: 35 },
{ x: -460, y: -355, radius: 35 },
{ x: -695, y: -250, radius: 35 },
{ x: -580, y: -250, radius: 35 },
{ x: -460, y: -250, radius: 35 },
{ x: 305, y: -110, radius: 15 },
{ x: 305, y: -15, radius: 15 },
],
corner: [
{ x: -755 + JMap.playerPhysics.radius, y: -515 +
JMap.playerPhysics.radius },
{ x: -755 + JMap.playerPhysics.radius, y: 515 -
JMap.playerPhysics.radius },
{ x: 655 - JMap.playerPhysics.radius, y: -515 +
JMap.playerPhysics.radius },
{ x: 655 - JMap.playerPhysics.radius, y: 515 -
JMap.playerPhysics.radius },
{ x: -350 - JMap.playerPhysics.radius, y: -515 +
JMap.playerPhysics.radius },
{ x: -350 + JMap.playerPhysics.radius, y: 515 -
JMap.playerPhysics.radius },
{ x: -350 - JMap.playerPhysics.radius, y: -180 -
JMap.playerPhysics.radius },
{ x: -755 + JMap.playerPhysics.radius, y: -190 -
JMap.playerPhysics.radius },
{ x: -755 + JMap.playerPhysics.radius, y: -190 +
JMap.playerPhysics.radius },
{ x: -600 - JMap.playerPhysics.radius, y: -190 +
JMap.playerPhysics.radius },
{ x: -600 + JMap.playerPhysics.radius, y: -180 +
JMap.playerPhysics.radius },
{ x: -755 + JMap.playerPhysics.radius, y: 90 -
JMap.playerPhysics.radius },
{ x: -755 + JMap.playerPhysics.radius, y: 90 +
JMap.playerPhysics.radius },
{ x: -600 - JMap.playerPhysics.radius, y: 90 -
JMap.playerPhysics.radius },
{ x: -530 + JMap.playerPhysics.radius, y: -80 +
JMap.playerPhysics.radius },
{ x: -360 - JMap.playerPhysics.radius, y: 90 -
JMap.playerPhysics.radius },
{ x: -150 - JMap.playerPhysics.radius, y: 515 -
JMap.playerPhysics.radius },
{ x: -150 + JMap.playerPhysics.radius, y: 515 -
JMap.playerPhysics.radius },
{ x: -150 + JMap.playerPhysics.radius, y: 410 +
JMap.playerPhysics.radius },
{ x: 150 - JMap.playerPhysics.radius, y: 410 +
JMap.playerPhysics.radius },
{ x: 150 - JMap.playerPhysics.radius, y: 515 -
JMap.playerPhysics.radius },
{ x: 150 + JMap.playerPhysics.radius, y: 515 -
JMap.playerPhysics.radius },
{ x: -150 + JMap.playerPhysics.radius, y: -250 +
JMap.playerPhysics.radius },
{ x: 150 - JMap.playerPhysics.radius, y: -250 +
JMap.playerPhysics.radius },
{ x: 150 - JMap.playerPhysics.radius, y: -80 -
JMap.playerPhysics.radius },
{ x: -150 + JMap.playerPhysics.radius, y: -80 -
JMap.playerPhysics.radius },
{ x: -150 + JMap.playerPhysics.radius, y: 80 +
JMap.playerPhysics.radius },
{ x: 150 - JMap.playerPhysics.radius, y: 80 +
JMap.playerPhysics.radius },
{ x: 150 - JMap.playerPhysics.radius, y: 250 -
JMap.playerPhysics.radius },
{ x: -150 + JMap.playerPhysics.radius, y: 250 -
JMap.playerPhysics.radius },
{ x: 270 + JMap.playerPhysics.radius, y: -245 +
JMap.playerPhysics.radius },
{ x: 470 - JMap.playerPhysics.radius, y: -245 +
JMap.playerPhysics.radius },
{ x: 470 - JMap.playerPhysics.radius, y: 120 -
JMap.playerPhysics.radius },
{ x: 270 + JMap.playerPhysics.radius, y: 120 -
JMap.playerPhysics.radius },
{ x: 270 + JMap.playerPhysics.radius, y: 15 +
JMap.playerPhysics.radius },
{ x: 350 - JMap.playerPhysics.radius, y: 15 -
JMap.playerPhysics.radius },
{ x: 350 - JMap.playerPhysics.radius, y: -140 +
JMap.playerPhysics.radius },
{ x: 270 + JMap.playerPhysics.radius, y: -140 -
JMap.playerPhysics.radius },
{ x: 355 - JMap.playerPhysics.radius, y: 120 +
JMap.playerPhysics.radius },
{ x: 375 + JMap.playerPhysics.radius, y: 120 -
JMap.playerPhysics.radius },
{ x: 655 - JMap.playerPhysics.radius, y: 140 -
JMap.playerPhysics.radius },
{ x: 655 - JMap.playerPhysics.radius, y: 160 +
JMap.playerPhysics.radius },
{ x: 655 - JMap.playerPhysics.radius, y: 445 -
JMap.playerPhysics.radius },
{ x: 575 - JMap.playerPhysics.radius, y: 515 -
JMap.playerPhysics.radius },
{ x: 375 + JMap.playerPhysics.radius, y: 515 -
JMap.playerPhysics.radius },
{ x: 355 - JMap.playerPhysics.radius, y: 515 -
JMap.playerPhysics.radius }
]
},
blue: {
circle: [
{ x: -695, y: -460, radius: 35 },
{ x: -580, y: -460, radius: 35 },
{ x: -460, y: -460, radius: 35 },
{ x: -695, y: -355, radius: 35 },
{ x: -580, y: -355, radius: 35 },
{ x: -460, y: -355, radius: 35 },
{ x: -695, y: -250, radius: 35 },
{ x: -580, y: -250, radius: 35 },
{ x: -460, y: -250, radius: 35 },
{ x: 305, y: -110, radius: 15 },
{ x: 305, y: -15, radius: 15 },
{ x: -445, y: 5, radius: 45 }
],
corner: [
{ x: Infinity, y: Infinity }
],
gate: {
MinX: 365,
MaxX: 650,
MinY: 150,
MaxY: 515
}
}
},
public: true,
recaptcha: false,
scoreLimit: 0,
teams: ["spectators", "red", "blue"],
teamsLock: true,
timeLimit: 3,
timeouts: {
AFK: 900,
bugging: {
circle: 600,
corner: 180
}
},
timers: {
gameEndCheck: 0
},
token: null,
tolerances: {
arrest: 0.01,
badwords: 2,
bugging: {
red: {
circle: 0,
corner: 0
},
blue: {
circle: 0,
corner: 0,
gate: 1
}
}
}
}

var commands = {
br: {
"!admin": setAdmin,
"!afk": setAFK,
"!bb": setBB,
"!colisao": setCollision,
"!dc": getDiscord,
"!idioma": setLanguage,
"!discord": getDiscord,
"!stats": getStats,
"!ajuda": getCommands
},
en: {
"!admin": setAdmin,
"!afk": setAFK,
"!bb": setBB,
"!collision": setCollision,
"!commands": getCommands,
"!dc": getDiscord,
"!discord": getDiscord,
"!lang": setLanguage,
"!stats": getStats,
}
}

var colors = {
AdminChange: {
Rollback: 0xFF0000
},
Chat: {
AFK: [0x00FF00, 0x00FF00],
Badwords: 0xFF0000,
Collision: [0x00FF00, 0x00FF00],
Commands: [0xFFFFFF, 0xFFDB72],
Discord: 0xFFFFFF,
Message: [0xFFFFFF, 0xFFDB72],
NoAuthorization: {
Collision: [0xFF0000, 0xFF0000]
},
NotACommand: 0xFF0000,
LanguageSwitch: {
Fail: 0xFFFF00,
Success: 0x00FF00
},
Stats: {
Info: 0x00FFFF,
List: 0xFFFFFF
}
},
StadiumChange: {
NoAuthorization: 0xFF0000
},
Start: 0xFFFFFF,
TeamChange: {
Rollback: 0xFF0000
},
Tick: {
AFK: {
Warning: 0xFFFF00
},
Bugging: {
Warning: 0xFFFF00
},
GameEnd: [0xE56E56, 0x5689E5]
}
};

var fonts = {
AdminChange: {
Rollback: "bold"
},
Chat: {
AFK: ["normal", "normal"],
Badwords: "bold",
Collision: ["normal", "normal"],
Commands: ["normal", "normal"],
Discord: "normal",
LanguageSwitch: {
Fail: "bold",
Success: "normal"
},
Message: ["normal", "bold"],
NoAuthorization: {
Collision: ["bold", "bold"]
},
NotACommand: "bold",
Stats: {
Info: "normal",
List: "normal"
}
},
StadiumChange: {
NoAuthorization: "normal"
},
Start: "normal",
TeamChange: {
Rollback: "bold"
},
Tick: {
AFK: {
Warning: "bold"
},
Bugging: {
Warning: "bold"
},
GameEnd: ["bold", "bold"]
}
};

var sounds = {
AdminChange: {
Rollback: 2
},
Chat: {
AFK: [1, 1],
Badwords: 2,
Collision: [1, 1],
Commands: [1, 1],
Discord: 1,
LanguageSwitch: {
Fail: 2,
Success: 1
},
Message: [1, 1],
NoAuthorization: {
Collision: [2, 2]
},
NotACommand: 2,
Stats: {
Info: 1,
List: 0
}
},
StadiumChange: {
NoAuthorization: 2
},
Start: 1,
TeamChange: {
Rollback: 2
},
Tick: {
AFK: {
Warning: 2
},
Bugging: {
Warning: 2
},
GameEnd: [1, 1]
}
};

var kickTypes = {
Chat: {
Badwords: true,
SeeOff: false
},
Join: {
Duplicated: {
Account: false,
Name: false
},
Names: {
Badwords: true,
Improper: false,
Length: false
}
},
Tick: {
AFK: false,
Bugging: true
}
};

var locales = {
tr: {
AdminChange: {
Log: [["isimli oyuncunun adminliği alındı", "isimli oyuncuya adminlik
verildi"], ["isimli oyuncunun adminliği bir oyuncu tarafından alındı", "isimli
oyuncuya bir oyuncu tarafından adminlik verildi"]],
Rollback: ["Başka bir oyuncuya adminlik veremezsiniz!", "Başka bir
oyuncunun adminliğini alamazsınız!"]
},
Chat: {
AFK: ["AFK değilsiniz!", "AFK oldunuz!"],
Badwords: {
Kick: "Odamızda küfür/hakaret içerikli kelimeler kullanmak
yasaktır.",
Warning: "Odamızda küfür/hakaret içerikli kelimeler kullanmak
yasaktır. Tekrar etmeniz hâlinde banlanacaksınız!",
},
Collision: ["Çarpışma özelliği kapatıldı!", "Çarpışma özelliği
açıldı!"],
Commands: ["Kullanılabilir komutlar: !admin, !afk, !bb, !dc, !dil [Dil
kodu], !discord, !istatistikler, !komutlar", "Kullanılabilir komutlar: !admin, !
afk, !bb, !çarpışma, !dc, !dil [Dil kodu], !discord, !istatistikler, !komutlar"],
Discord: `Discord adresimiz: ${roomObject.discordLink}`,
LanguageSwitch: {
Fail: `Dil değiştirme işlemi başarısız! Kullanılabilir dil kodları:
${languages.toString()}`,
Success: "Diliniz başarıyla değiştirildi:"
},
NoAuthorization: {
Collision: ["Çarpışma özelliğini açmak için yetkiniz
bulunmamaktadır!", "Çarpışma özelliğini kapatmak için yetkiniz bulunmamaktadır!"]
},
NotACommand: "Böyle bir komut yok! Kullanılabilir komutları görmek için
!komutlar yazınız.",
SeeOff: "Görüşmek üzere.",
Stats: {
Cops: {
Losses: "a Policia Perdeu:",
Wins: "a Policia Venceu:"
},
Info: "İstatistikleriniz aşağıdaki gibidir:\n",
Points: "Toplam puan:",
Robbers: {
Losses: "Hırsızda kaybetme:",
Wins: "Hırsızda kazanma:"
}
}
},
Join: {
Duplicated: {
Account: "Birden fazla sekmeyle odaya giriş yapmak yasaktır.",
Name: "Bu isimde biri zaten var."
},
Log: {
Success: "odaya katıldı"
},
Names: {
Badwords: "Odamıza küfür/hakaret içerikli isimlerle giriş yapmak
yasaktır.",
Improper: "İsminizin sağında/solunda boşluk karakteri bulunamaz ve
isminiz çifte boşluk karakteri içeremez.",
Length: {
Min: `İsminiz en az ${roomObject.join.names.length.min}
karakterli olmalıdır.`,
Max: `İsminiz en fazla ${roomObject.join.names.length.max}
karakterli olmalıdır.`
}
}
},
Kick: {
Log: [["kicklendi", "banlandı"], ["bir kişi tarafından kicklendi", "bir
kişi tarafından banlandı"]]
},
Leave: {
Log: "odadan ayrıldı"
},
Link: {
Log: "Oda kuruldu, link:"
},
Pause: {
Log: ["Oyun duraklatıldı", "Oyun bir kişi tarafından duraklatıldı:"]
},
StadiumChange: {
Log: ["isimli stadyum yüklendi", "isimli stadyum bir kişi tarafından
yüklendi:"],
NoAuthorization: "Stadyumu değiştirmek için yetkiniz bulunmamaktadır!"
},
Start: {
Info: `Oyun başladı. ${roomObject.scoreLimit} dakika sonunda sahada
hırsız kalmazsa polisler kazanır; aksi durumda hırsızlar kazanır.`,
Log: ["Oyun başlatıldı", "Oyun bir kişi tarafından başlatıldı:"]
},
Stop: {
Log: ["Oyun durduruldu", "Oyun bir kişi tarafından durduruldu:"]
},
Unpause: {
Log: ["Oyun devam ettirildi", "Oyun bir kişi tarafından devam
ettirildi:"]
},
TeamChange: {
Log: [["isimli oyuncu izleyicilere taşındı", "isimli oyuncu bir kişi
tarafından izleyicilere taşındı"], ["isimli oyuncu kırmızı takıma taşındı", "isimli
oyuncu bir kişi tarafından kırmızı takıma taşındı"], ["isimli oyuncu mavi takıma
taşındı", "isimli oyuncu bir kişi tarafından mavi takıma taşındı"]],
Rollback: "Oyuncu takımları sadece bot tarafından değiştirilebilir!"
},
Tick: {
AFK: {
Kick: "AFK",
Warning: `AFK kalmaya devam ederseniz ${roomObject.timeouts.AFK /
60} saniye sonunda odadan atılacaksınız!`
},
Bugging: {
Circle: {
Kick: `Disc içlerinde ${roomObject.timeouts.bugging.circle /
60} saniyeden uzun süre kalmak yasaktır.`,
Warning: `Disc içlerinde ${roomObject.timeouts.bugging.circle /
60} saniyeden uzun süre kalmanız yasaktır. Lütfen en kısa sürede bulunduğunuz
konumu terk ediniz!`
},
Corner: {
Kick: `Köşelerde ${roomObject.timeouts.bugging.corner / 60}
saniyeden uzun süre kalmak yasaktır.`,
Warning: `Köşelerde ${roomObject.timeouts.bugging.corner / 60}
saniyeden uzun süre kalmanız yasaktır. Lütfen en kısa sürede bulunduğunuz konumu
terk ediniz!`
}
},
GameEnd: ["Hırsızlar kazandı!", "Polisler kazandı!"]
}
},
en: {
AdminChange: {
Log: [["'s admin rights was taken away", "was given admin rights"],
["'s admin rights was taken by", "was given admin rights by"]],
Rollback: ["You cannot give admin rights to another player!", "You
cannot take admin rights of another player!"]
},
Chat: {
AFK: ["You are now with us!", "You are now AFK!"],
Badwords: {
Kick: "It's strictly prohibited to use bad words in this room.",
Warning: "It's strictly prohibited to use bad words in this room.
Please remember that a further attempt will result in ban.",
},
Collision: ["Collision is now turned off!", "Collision is now turned
on!"],
Commands: ["Available commands: !admin, !afk, !bb, !commands, !dc, !
discord, !lang [Code], !stats", "Kullanılabilir komutlar: !admin, !afk, !bb, !
collision, !commands, !dc, !discord, !lang [Code], !stats"],
Discord: `Our discord server: ${roomObject.discordLink}`,
LanguageSwitch: {
Fail: `Language switch failed! Available language codes: $
{languages.toString()}`,
Success: "Your language was successfully changed to:"
},
NoAuthorization: {
Collision: ["You have no authorization to turn on the collision
feature!", "You have no authorization to turn off the collision feature!"],
StadiumChange: "You have no authorization to change stadium in this
room!"
},
NotACommand: "There's no such a command. Please type !commands to see
the available commands.",
SeeOff: "Bye.",
Stats: {
Cops: {
Losses: "Losses in cops:",
Wins: "Wins in cops:"
},
Info: "Your statistics below:\n",
Points: "Total points:",
Robbers: {
Losses: "Loss in robbers:",
Wins: "Wins in robbers:"
}
}
},
Join: {
Duplicated: {
Account: "Joining with multiple accounts from the same source is
not allowed in this room.",
Name: "A player with this such name already exists!"
},
Log: {
Success: "has joined"
},
Names: {
Badwords: "Bad name.",
Improper: "Names start or end with blank character or contain
duplicated blank character are not allowed in this room!",
Length: {
Min: `Your name should have ${roomObject.join.names.length.min}
characters at least.`,
Max: `Your name should have ${roomObject.join.names.length.max}
characters at most.`
}
}
},
Kick: {
Log: [["was kicked", "banlandı."], ["was kicked by", "was banned by"]]
},
Leave: {
Log: "has left"
},
Link: {
Log: "Room set, link:"
},
Pause: {
Log: ["Game paused", "Game paused by"]
},
StadiumChange: {
Log: ["was loaded", "was loaded by"],
NoAuthorization: "You have no authorization to change stadium!"
},
Start: {
Info: `Game started. In ${roomObject.scoreLimit == 1 ?
roomObject.scoreLimit + " minute, " : " minutes, "} cops win if there are robbers
in the pitch, otherwise robbers win.`,
Log: ["Game started", "Game started by"]
},
Stop: {
Log: ["Game stopped", "Game stopped by"]
},
Unpause: {
Log: ["Game unpaused", "Game unpaused by"]
},
TeamChange: {
Log: [["was moved to spectators", "was moved to spectators by"], ["was
moved to red", "was moved to red by"], ["was moved to blue", "was moved to blue
by"]],
Rollback: "Only the host can change player teams!"
},
Tick: {
AFK: {
Kick: "AFK timeout",
Warning: `You will be kicked at the end of $
{roomObject.timeouts.AFK / 60 == 1 ? roomObject.timeouts.AFK / 60 + " second " : "
seconds "} if you go ahead on staying AFK!`
},
Bugging: {
Circle: {
Kick: `It's strictly prohibited to be in discs for more than $
{roomObject.timeouts.bugging.circle / 60 == 1 ? roomObject.timeouts.bugging.circle
+ " second " : " seconds "} in this room.`,
Warning: `It's strictly prohibited to be in discs for more than
${roomObject.timeouts.bugging.circle / 60 == 1 ? roomObject.timeouts.bugging.circle
+ " second. " : " seconds. "} Please leave your location as fast as possible!`,
},
Corner: {
Kick: `It's strictly prohibited to lean at corners for more
than ${roomObject.timeouts.bugging.corner / 60 == 1 ?
roomObject.timeouts.bugging.corner + " second " : " seconds "} in this room.`,
Warning: `It's strictly prohibited to lean at corners for more
than ${roomObject.timeouts.bugging.corner / 60 == 1 ?
roomObject.timeouts.bugging.corner + " second. " : " seconds. "} Please leave your
location as fast as possible!`,
}
},
GameEnd: ["Robbers won!", "Cops won!"]
}
}
};

geo = roomObject.geo[languages[languages.indexOf(roomObject.locale)]]

var room = HBInit({ roomName: roomObject.name[roomObject.locale], noPlayer:


roomObject.noPlayer, public: roomObject.public, maxPlayers: roomObject.maxPlayers,
geo });

var cf = room.CollisionFlags;

var collisionOff_cGroups = [cf.c0, cf.c1]; //When collision is turned on


var collisionOn_cGroups = [cf.red, cf.blue]; //When collision is turned off
var collision_cGroups = [collisionOff_cGroups, collisionOn_cGroups];
var cGroups = [collisionOff_cGroups, collisionOn_cGroups];

var collisionOff_cMasks = [cf.c1, cf.c0]; //When collision is turned on


var collisionOn_cMasks = [cf.blue, cf.red]; //When collision is turned off
var collision_cMasks = [collisionOff_cMasks, collisionOn_cMasks];
var cMasks = [collisionOff_cMasks, collisionOn_cMasks];

var bias_cMasks = [cf.c2, cf.c3]; //When a player is inside a circle or on gate


var bias_cGroups = [cf.c2, cf.c3]; //When a player is inside a circle or on gate

/*COMMAND FUNCTIONS*/

function getCommands(player, message) {


room.sendAnnouncement(`$
{locales[playerList[player.name].language].Chat.Commands[Number(player.admin)]}`,
player.id, colors.Chat.Commands[Number(player.admin)],
fonts.Chat.Commands[Number(player.admin)],
sounds.Chat.Commands[Number(player.admin)]);
return false;
}

function getDiscord(player, message) {


room.sendAnnouncement(`$
{locales[playerList[player.name].language].Chat.Discord}`, player.id,
colors.Chat.Discord, fonts.Chat.Discord, sounds.Chat.Discord);
return false;
}

function getStats(player, message) {


room.sendAnnouncement(`$
{locales[playerList[player.name].language].Chat.Stats.Info}`, player.id,
colors.Chat.Stats.Info, fonts.Chat.Stats.Info, sounds.Chat.Stats.Info);
room.sendAnnouncement(`$
{locales[playerList[player.name].language].Chat.Stats.Cops.Wins} $
{playerList[player.name].cops.wins}\n$
{locales[playerList[player.name].language].Chat.Stats.Cops.Losses} $
{playerList[player.name].cops.losses}\n$
{locales[playerList[player.name].language].Chat.Stats.Robbers.Wins} $
{playerList[player.name].robbers.wins}\n$
{locales[playerList[player.name].language].Chat.Stats.Robbers.Losses} $
{playerList[player.name].robbers.losses}\n$
{locales[playerList[player.name].language].Chat.Stats.Points} $
{playerList[player.name].points}`, player.id, colors.Chat.Stats.List,
fonts.Chat.Stats.List, sounds.Chat.Stats.List);
return false;
}
function setAdmin(player, message) {
room.setPlayerAdmin(player.id, !player.admin);
return false;
}

function setAFK(player, message) {


playerList[player.name].afkStatus = !playerList[player.name].afkStatus;
room.sendAnnouncement(`$
{locales[playerList[player.name].language].Chat.AFK[Number(playerList[player.name].
afkStatus)]}`, player.id,
colors.Chat.AFK[Number(playerList[player.name].afkStatus)],
fonts.Chat.AFK[Number(playerList[player.name].afkStatus)],
sounds.Chat.AFK[Number(playerList[player.name].afkStatus)]);
if (playerList[player.name].afkStatus == true) {
room.setPlayerTeam(player.id, 0);
updateAdmins2(player);
}
equateTeams();
return false;
}

function setBB(player, message) {


room.kickPlayer(player.id, `$
{locales[playerList[player.name].language].Chat.SeeOff}`, kickTypes.Chat.SeeOff);
return false;
}

function setCollision(player, message) {


if (player.admin == true) {
roomObject.collision = !roomObject.collision;
room.sendAnnouncement(`$
{locales[playerList[player.name].language].Chat.Collision[Number(roomObject.collisi
on)]}`, player.id, colors.Chat.Collision[Number(roomObject.collision)],
fonts.Chat.Collision[Number(roomObject.collision)],
sounds.Chat.Collision[Number(roomObject.collision)]);
changeCollisionStatus();
}
else {
room.sendAnnouncement(`$
{locales[playerList[player.name].language].Chat.NoAuthorization.Collision[Number(ro
omObject.collision)]}`, player.id,
colors.Chat.NoAuthorization.Collision[Number(roomObject.collision)],
fonts.Chat.NoAuthorization.Collision[Number(roomObject.collision)],
sounds.Chat.NoAuthorization.Collision[Number(roomObject.collision)]);
return false;
}
}

function setLanguage(player, message) {


var language = message.toLowerCase().split(" ")[1];
if (languages.includes(language) == false) {
room.sendAnnouncement(`$
{locales[playerList[player.name].language].Chat.LanguageSwitch.Fail}`, player.id,
colors.Chat.LanguageSwitch.Fail, fonts.Chat.LanguageSwitch.Fail,
sounds.Chat.LanguageSwitch.Fail);
return false;
}
else {
playerList[player.name].language = language;
room.sendAnnouncement(`$
{locales[playerList[player.name].language].Chat.LanguageSwitch.Success} $
{language}`, player.id, colors.Chat.LanguageSwitch.Success,
fonts.Chat.LanguageSwitch.Success, sounds.Chat.LanguageSwitch.Success);
return false;
}
}

/*GAME FUNCTIONS*/

function addPlayerTeam(player) {
playerList[player.name].teams.push(player.team);
}

function bustingCheck() {
if (roomObject.collision == false) {
var players = room.getPlayerList().filter(p =>
room.getPlayerDiscProperties(p.id) != null);
for (var i = 0; i < players.length; i++) {
for (var j = 0; j < i; j++) {
bustPlayerOnArrest(players[j], players[i]);
}
}
}
}

function bustPlayerOnArrest(p1, p2) {


if (roomObject.collision == false) {
var players = [p1, p2];
if (checkIfArrest(p1, p2) == true) {
p1 = players.find(p => p.team == 1);
if (room.getPlayerDiscProperties(p1.id) != null) {
if (isPlayerAtArrestPoint(p1) == false) {
room.setPlayerDiscProperties(p1.id, { x:
JMap.redSpawnPoints[JMap.redSpawnPoints.length - 1][0], y:
JMap.redSpawnPoints[JMap.redSpawnPoints.length - 1][1], xspeed: 0, yspeed: 0 });
}
}
}
}
}

function changeCollisionStatus() {
var players = room.getPlayerList().filter(p =>
room.getPlayerDiscProperties(p.id) != null);
players.forEach(p => {
room.setPlayerDiscProperties(p.id, { cGroup:
collision_cGroups[Number(roomObject.collision)][p.team - 1], cMask:
collision_cMasks[Number(roomObject.collision)][p.team - 1] });
});
}

function checkForEndGame() {
var scores = room.getScores();
if (scores != null) {
var players = room.getPlayerList().filter(p =>
room.getPlayerDiscProperties(p.id) != null);
var inPitchPlayers = players.filter(p => isPlayerInPitch(p) == true);
var reds = players.filter(p => p.team == 1);
var blues = players.filter(p => p.team == 2);
var difference = reds.length - blues.length;

if (roomObject.timeLimit * 60 <= scores.time && scores.time <=


roomObject.timeLimit * 60 + 1 / 60) {
if (inPitchPlayers.length == 0) {
reds.forEach(r => {
playerList[r.name].robbers.losses++;
playerList[r.name].points -= (difference +
roomObject.coefficients.points.gameEnd.robbers.losses);
});
blues.forEach(b => {
playerList[b.name].cops.wins++;
playerList[r.name].points += (difference +
roomObject.coefficients.points.gameEnd.cops.wins);
});
}
else {
reds.forEach(r => {
playerList[r.name].robbers.wins++;
playerList[r.name].points += (difference +
roomObject.coefficients.points.gameEnd.robbers.wins);
});
blues.forEach(b => {
playerList[b.name].cops.losses++;
playerList[r.name].points -= (difference +
roomObject.coefficients.points.gameEnd.cops.losses);
});
}
room.sendAnnouncement(`$
{locales[roomObject.locale].Tick.GameEnd[Number(inPitchPlayers.length == 0)]}`,
null, colors.Tick.GameEnd[Number(inPitchPlayers.length == 0)],
fonts.Tick.GameEnd[Number(inPitchPlayers.length == 0)],
sounds.Tick.GameEnd[Number(inPitchPlayers.length == 0)]);
room.stopGame();
}
else if (scores.time < roomObject.timeLimit * 60) {
if (reds.length == 0 || blues.length == 0) {
room.stopGame();
}
else {
if (inPitchPlayers.length == 0) {
roomObject.timers.gameEndCheck++;
if (1 <= roomObject.timers.gameEndCheck &&
roomObject.timers.gameEndCheck < 2) {
room.sendAnnouncement(`$
{locales[roomObject.locale].Tick.GameEnd[Number(inPitchPlayers.length == 0)]}`,
null, colors.Tick.GameEnd[Number(inPitchPlayers.length == 0)],
fonts.Tick.GameEnd[Number(inPitchPlayers.length == 0)],
sounds.Tick.GameEnd[Number(inPitchPlayers.length == 0)]);
reds.forEach(r => {
playerList[r.name].robbers.losses++;
playerList[r.name].points -= (difference +
roomObject.coefficients.points.gameEnd.robbers.losses);
});
blues.forEach(b => {
playerList[b.name].cops.wins++;
playerList[b.name].points += (difference +
roomObject.coefficients.points.gameEnd.cops.wins);
});
}
room.stopGame();
}
}
}
}
}

function checkIfArrest(p1, p2) {


return checkIfOpponents(p1, p2) && checkIfTouching(p1, p2);
}

function checkIfOpponents(p1, p2) {


return (p1 != undefined && p2 != undefined) && (p1.id != p2.id) && (p1.team !=
p2.team);
}

function checkIfTouching(p1, p2) {


return (room.getPlayerDiscProperties(p1.id) != null &&
room.getPlayerDiscProperties(p2.id) != null) &&
(pointDistance(room.getPlayerDiscProperties(p1.id),
room.getPlayerDiscProperties(p2.id)) < room.getPlayerDiscProperties(p1.id).radius +
room.getPlayerDiscProperties(p2.id).radius + roomObject.tolerances.arrest);
}

function equateTeams() {
var players = room.getPlayerList().filter(p => playerList[p.name].afkStatus ==
false);
var spectators = players.filter(p => p.team == 0);
var reds = players.filter(p => p.team == 1);
var blues = players.filter(p => p.team == 2);
var teams = [reds, blues];

if (reds.length > 0 && blues.length > 0) {


if (Math.abs(reds.length - blues.length) > 1) {
var difference = reds.length - blues.length;

if (Math.sign(difference) == 1) {
console.log("1");
for (var i = reds.length - 1; i > reds.length - 1 -
Math.floor(difference / 2); i--) {
room.setPlayerTeam(reds[i].id, 2);
}
if (spectators.length == 0) {
return false;
}
else {
spectators.forEach(s => {
room.setPlayerTeam(s.id, 2);
});
}
}
else if (Math.sign(difference) == -1) {
console.log("-1");
for (var i = reds.length - 1; i > reds.length - 1 -
Math.floor(difference / 2); i--) {
room.setPlayerTeam(reds[i].id, 2);
}
if (spectators.length == 0) {
return false;
}
else {
spectators.forEach(s => {
room.setPlayerTeam(s.id, 2);
});
}
}

if (Math.abs(reds.length - blues.length) == 1) {
var difference2 = reds.length - blues.length;
if (spectators.length == 0) {
return false;
}
else {
spectators.forEach(s => {
Math.sign(difference2) == 1 ? room.setPlayerTeam(s.id, 2) :
room.setPlayerTeam(s.id, 1);
});
}
}
else {
var difference2 = reds.length - blues.length;
if (spectators.length == 0) {
for (var t in teams) {
for (var i = t.length - 1; i > t.length - 1 -
Math.floor(difference / 2); i--) {
room.setPlayerTeam(t[i].id, 2 - teams.indexOf(t));
}
}
}
else {
spectators.forEach(s => {
Math.sign(difference2) == 1 ? room.setPlayerTeam(s.id, 2) :
room.setPlayerTeam(s.id, 1);
});
}
}
}
else {
if (spectators.length != 0) {
var difference = reds.length - blues.length;
Math.sign(difference) == 1 ? room.setPlayerTeam(spectators[0].id,
2) : room.setPlayerTeam(spectators[0].id, 1);
}
}
}
}

function equateTeamsOnJoin() {
var players = room.getPlayerList().filter(p => playerList[p.name].afkStatus ==
false);
var spectators = players.filter(p => p.team == 0);
var reds = players.filter(p => p.team == 1);
var blues = players.filter(p => p.team == 2);
var difference = reds.length - blues.length;
if (players.length == 2) {
if (reds.length == 0 && blues.length == 0) {
spectators.forEach(s => room.setPlayerTeam(s.id, 1 +
spectators.indexOf(s)));
}
else {
if (reds.length == 0 && blues.length != 0) {
room.setPlayerTeam(spectators[0].id, 1);
if (room.getScores() == null) room.startGame();
}
else if (reds.length != 0 && blues.length == 0) {
room.setPlayerTeam(spectators[0].id, 2);
if (room.getScores() == null) room.startGame();
}
else {
if (room.getScores() == null) room.startGame();
}
}
}
else if (players.length > 2) {
if (reds.length == 0 && blues.length == 0) {
spectators.forEach(s => room.setPlayerTeam(s.id, 1 +
(spectators.indexOf(s) % 2)));
if (room.getScores() == null) room.startGame();
}
else {
if (reds.length == 0 && blues.length != 0) {
spectators.forEach(s => room.setPlayerTeam(s.id, 1));
if (room.getScores() == null) room.startGame();
}
else if (reds.length != 0 && blues.length == 0) {
spectators.forEach(s => room.setPlayerTeam(s.id, 2));
if (room.getScores() == null) room.startGame();
}
else {
Math.sign(difference) == 1 ? room.setPlayerTeam(spectators[0].id,
2) : room.setPlayerTeam(spectators[0].id, 1);
}
}
}
}

/* function fillCircle(circle) {
var players = room.getPlayerList().filter(p =>
room.getPlayerDiscProperties(p.id) != null);
var circleIndexes = findRoomObjectIndexOfCircle(circle);
var JMapIndex = findJMapIndexOfCircle(circle);
var team = 0;

if ((circleIndexes.red !== -1 || circleIndexes.blue !== -1) && JMapIndex !== -


1) {
var playerInsideCircle = findPlayerInsideCircle(circle);
if(circleIndexes.red !== -1) team = 1;
if(circleIndexes.blue !== -1) team = 2;
if (playerInsideCircle.length == 0) {
if ((team == 1 && room.getDiscProperties(JMapIndex + 1).cMask !=
cf.wall) || (team == 2 && room.getDiscProperties(JMapIndex + 1).cMask != cf.red |
cf.c0)) {
room.setDiscProperties(JMapIndex + 1, { cMask: cf.wall });
var playersSet = players.filter(p => isPlayerInCircle(p) == false
&& room.getPlayerDiscProperties(p.id).cGroup !=
cGroups[Number(roomObject.collision)][p.team - 1]);
playersSet.forEach(p => {
room.setPlayerDiscProperties(p.id, { cGroup:
cGroups[Number(roomObject.collision)][p.team - 1] });
})
}
}
else {
var player = playerInsideCircle[0];
if ((room.getDiscProperties(JMapIndex + 1).cMask &
bias_cMasks[player.team - 1]) == 0) {
room.setDiscProperties(JMapIndex + 1, { cMask:
room.getDiscProperties(JMapIndex + 1).cMask | bias_cMasks[player.team - 1] });

var others = players.filter(p => p.id != player.id && p.team ==


player.team && isPlayerInCircle(p) == false);
others.forEach(o => {
room.setPlayerDiscProperties(o.id, { cGroup:
room.getPlayerDiscProperties(o.id).cGroup | bias_cGroups[o.team - 1] });
});
}
}
}
}

function fillCircles() {
if (roomObject.collision == true) {
roomObject.prohibitedPoints.red.circle.forEach(r => fillCircle(r));
roomObject.prohibitedPoints.blue.circle.forEach(b => fillCircle(b));
}
} */

function fillGateArea() {
var players = room.getPlayerList().filter(p =>
room.getPlayerDiscProperties(p.id) != null && isPlayerOnGate(p) == true);

if (players.length >= roomObject.tolerances.bugging.blue.gate) {


var others = players.filter(p => players.indexOf(p) != 0 &&
(room.getPlayerDiscProperties(p.id).cGroup & cf.score) == 0);
others.forEach(p => {
room.setPlayerDiscProperties(p.id, { cGroup:
room.getPlayerDiscProperties(p.id).cGroup | cf.score });
});

var blues = room.getPlayerList().filter(p =>


room.getPlayerDiscProperties(p.id) != null && p.team == 2 && isPlayerOnGate(p) ==
false);
blues.forEach(p => {
room.setPlayerDiscProperties(p.id, { cGroup:
room.getPlayerDiscProperties(p.id).cGroup | cf.score });
});
}
else {
var _players = room.getPlayerList().filter(p =>
room.getPlayerDiscProperties(p.id) != null && p.team == 2 && isPlayerOnGate(p) ==
false && (room.getPlayerDiscProperties(p.id).cGroup & cf.score) != 0);
_players.forEach(p => {
room.setPlayerDiscProperties(p.id, { cGroup: cGroups[p.team - 1]
[Number(roomObject.collision)] });
});
}
}

/* function findCircleHidesPlayer(player) {
return roomObject.prohibitedPoints[roomObject.teams[player.team]].circle.find(c
=> pointDistance({ x: c.x, y: c.y }, room.getPlayerDiscProperties(player.id)) <
c.radius - room.getPlayerDiscProperties(player.id).radius);
}

function findJMapIndexOfCircle(circle) {
return JMap.discs.findIndex(d => d.pos != undefined && d.pos[0] == circle.x &&
d.pos[1] == circle.y);
}

function findPlayerInsideCircle(circle) {
return room.getPlayerList().filter(p => room.getPlayerDiscProperties(p.id) !=
null && isPlayerInCircle(p) == true && findCircleHidesPlayer(p).x == circle.x &&
findCircleHidesPlayer(p).y == circle.y);
}

function findRoomObjectIndexOfCircle(circle) {
return { red: roomObject.prohibitedPoints.red.circle.indexOf(circle), blue:
roomObject.prohibitedPoints.blue.circle.indexOf(circle) };
} */

function getPreviousTeam(player) {
var teams = playerList[player.name].teams;
var previousTeam = 0;
previousTeam = teams.length == 0 ? 0 : teams[teams.length - 1];
return previousTeam;
}

function increaseAFKTime() {
var players = room.getPlayerList().filter(p =>
room.getPlayerDiscProperties(p.id) != null && isPlayerAFK(p) == false);
players.forEach(p => playerList[p.name].afkTime++);
}

function increaseBuggingTime() {
var players = room.getPlayerList().filter(p =>
room.getPlayerDiscProperties(p.id) != null && (isPlayerAtCorner(p) == true ||
isPlayerInCircle(p) == true) && isPlayerBugging_Circle(p) == false &&
isPlayerBugging_Corner(p) == false);
players.forEach(p => playerList[p.name].buggingTime++);
}

function isBadword(player, message) {


return badwords[playerList[player.name].language].filter(b =>
message.toLowerCase().match(b)).length > 0;
}

function isBadword2(player, message) {


return badwords[roomObject.locale].filter(b =>
message.toLowerCase().match(b)).length > 0;
}
function isCommand(player, message) {
return commands[playerList[player.name].language][message] != null ||
commands[playerList[player.name].language][message.split(" ")[0]] != null;
}

function isDuplicated(player) {
var players = room.getPlayerList().filter(p => p.id != player.id);
var duplicatedName = players.find(p => p.name == player.name);
var duplicatedAuth = players.find(p => playerList[p.name].auth == player.auth);
var duplicatedConn = players.find(p => playerList[p.name].conn == player.conn);

var result = { isDuplicatedName: false, isDuplicatedAccount: false };

if (duplicatedName && result.isDuplicatedName == false) result.isDuplicatedName


= true;
if ((duplicatedAuth || duplicatedConn) && result.isDuplicatedAccount == false)
result.isDuplicatedAccount = true;

return result;
}

function isImproper(string) {
return string.startsWith(" ") == true || string.endsWith(" ") == true ||
string.includes(" ") == true;
}

function isPlayerAFK(player) {
return room.getPlayerDiscProperties(player.id) != null &&
(playerList[player.name].afkTime >= roomObject.timeouts.AFK);
}

function isPlayerAtArrestPoint(player) {
return room.getPlayerDiscProperties(player.id) != null &&
(room.getPlayerDiscProperties(player.id).x ==
JMap.redSpawnPoints[JMap.redSpawnPoints.length - 1][0] &&
room.getPlayerDiscProperties(player.id).y ==
JMap.redSpawnPoints[JMap.redSpawnPoints.length - 1][1]);
}

function isPlayerAtCorner(player) {
if (room.getPlayerDiscProperties(player.id) != null) {
var corners =
roomObject.prohibitedPoints[roomObject.teams[player.team]].corner;
var corner_bugging = corners.filter(c => pointDistance(c,
room.getPlayerDiscProperties(player.id)) ==
roomObject.tolerances.bugging[roomObject.teams[player.team]].corner);
return corner_bugging.length != 0;
}
else return false;
}

function isPlayerBugging_Circle(player) {
return room.getPlayerDiscProperties(player.id) != null &&
isPlayerInCircle(player) == true && (playerList[player.name].buggingTime >=
roomObject.timeouts.bugging.circle);
}

function isPlayerBugging_Corner(player) {
return room.getPlayerDiscProperties(player.id) != null &&
isPlayerAtCorner(player) == true && (playerList[player.name].buggingTime >=
roomObject.timeouts.bugging.corner);
}

function isPlayerInactive(player) {
return room.getPlayerDiscProperties(player.id) != null &&
(roomObject.timeouts.AFK / 2 <= playerList[player.name].afkTime &&
playerList[player.name].afkTime <= roomObject.timeouts.AFK / 2 + 1 / 60);
}

function isPlayerInCircle(player) {
if (room.getPlayerDiscProperties(player.id) != null) {
var circles =
roomObject.prohibitedPoints[roomObject.teams[player.team]].circle;
var circle_bugging = circles.filter(c => pointDistance({ x: c.x, y: c.y },
room.getPlayerDiscProperties(player.id)) < c.radius -
room.getPlayerDiscProperties(player.id).radius);
return circle_bugging.length != 0;
}
else return false;
}

function isPlayerInPitch(player) {
return room.getPlayerDiscProperties(player.id) != null && player.team == 1 &&
(roomObject.borders.MinX <= room.getPlayerDiscProperties(player.id).x &&
room.getPlayerDiscProperties(player.id).x <= roomObject.borders.MaxX &&
roomObject.borders.MinY <= room.getPlayerDiscProperties(player.id).y &&
room.getPlayerDiscProperties(player.id).y <= roomObject.borders.MaxY);
}

function isPlayerOnGate(player) {
return room.getPlayerDiscProperties(player.id) != null && player.team == 2 &&
(roomObject.prohibitedPoints.blue.gate.MinX <=
room.getPlayerDiscProperties(player.id).x &&
room.getPlayerDiscProperties(player.id).x <=
roomObject.prohibitedPoints.blue.gate.MaxX &&
roomObject.prohibitedPoints.blue.gate.MinY <=
room.getPlayerDiscProperties(player.id).y &&
room.getPlayerDiscProperties(player.id).y <=
roomObject.prohibitedPoints.blue.gate.MaxY);
}

function isTooShortOrLong(string) {
return string.length < roomObject.join.names.length.min ||
roomObject.join.names.length.max < string.length;
}

function kickAFK() {
var players = room.getPlayerList().filter(p =>
room.getPlayerDiscProperties(p.id) != null && isPlayerAFK(p) == true);

players.forEach(p => {
room.kickPlayer(p.id, locales[playerList[p.name].language].Tick.AFK.Kick,
kickTypes.Tick.AFK);
});
}

function kickBugging_Circle() {
var players = room.getPlayerList().filter(p =>
room.getPlayerDiscProperties(p.id) != null && isPlayerBugging_Circle(p) == true);

players.forEach(p => {
room.kickPlayer(p.id, `$
{locales[playerList[p.name].language].Tick.Bugging.Circle.Kick}`,
kickTypes.Tick.Bugging);
});
}

function kickBugging_Corner() {
var players = room.getPlayerList().filter(p =>
room.getPlayerDiscProperties(p.id) != null && isPlayerBugging_Corner(p) == true);

players.forEach(p => {
room.kickPlayer(p.id, `$
{locales[playerList[p.name].language].Tick.Bugging.Corner.Kick}`,
kickTypes.Tick.Bugging);
});
}

function kickIfBadword(player) {
if (isBadword2(player, player.name) == true) {
room.kickPlayer(player.id, `$
{locales[roomObject.locale].Join.Names.Badwords}`, kickTypes.Join.Names.Badwords);
}
}

function kickIfDuplicated(player) {
if (isDuplicated(player).isDuplicatedAccount == true) {
room.kickPlayer(player.id, `$
{locales[roomObject.locale].Join.Duplicated.Account}`,
kickTypes.Join.Duplicated.Account);
}
else if (isDuplicated(player).isDuplicatedName == true) {
room.kickPlayer(player.id, `$
{locales[roomObject.locale].Join.Duplicated.Name}`,
kickTypes.Join.Duplicated.Name);
}
}

function kickIfImproper(player) {
if (isImproper(player.name) == true) {
room.kickPlayer(player.id, `$
{locales[roomObject.locale].Join.Names.Improper}`, kickTypes.Join.Names.Improper);
}
}

function pointDistance(p1, p2) {


return Math.hypot(p1.x - p2.x, p1.y - p2.y);
}

function resetBuggingTime(player) {
if (playerList[player.name].buggingTime == 0)
playerList[player.name].buggingTime = 0;
}

function resetBuggingTimes() {
var players = room.getPlayerList().filter(p => playerList[p.name].buggingTime !
= 0);

players.forEach(p => {
playerList[p.name].buggingTime = 0;
});
}

function resetBuggingTimes2() {
var players = room.getPlayerList().filter(p => isPlayerAtCorner(p) == false &&
isPlayerInCircle(p) == false && playerList[p.name].buggingTime != 0);

players.forEach(p => {
playerList[p.name].buggingTime = 0;
});
}

function resetGameEndTimer() {
if (roomObject.timers.gameEndCheck != 0) roomObject.timers.gameEndCheck = 0;
}

function rollBackOnAdminChange(changedPlayer, byPlayer) {


if (changedPlayer.id == byPlayer.id) {
updateAdmins2(byPlayer);
}
else {
room.setPlayerAdmin(changedPlayer.id, !changedPlayer.admin);
room.sendAnnouncement(`$
{locales[playerList[byPlayer.name].language].AdminChange.Rollback[Number(!
changedPlayer.admin)]}`, byPlayer.id, colors.AdminChange.Rollback,
fonts.AdminChange.Rollback, sounds.AdminChange.Rollback);
}
}

function rollBackOnTeamChange(changedPlayer, byPlayer) {


room.setPlayerTeam(changedPlayer.id, getPreviousTeam(changedPlayer));
room.sendAnnouncement(`$
{locales[playerList[byPlayer.name].language].TeamChange.Rollback}`, byPlayer.id,
colors.TeamChange.Rollback, fonts.TeamChange.Rollback, sounds.TeamChange.Rollback);
}

function startGameOnJoin() {
var players = room.getPlayerList().filter(p => playerList[p.name].afkStatus ==
false);
var scores = room.getScores();
equateTeamsOnJoin();
if (scores == null && players.length > 1) room.startGame();
}

function stopGameOnLeave() {
var players = room.getPlayerList().filter(p => playerList[p.name].afkStatus ==
false);
if (players.length == 0) {
room.stopGame();
}
}

function swapTeams() {
var players = room.getPlayerList();
var reds = players.filter(p => p.team == 1);
var blues = players.filter(p => p.team == 2);
var teams = [reds, blues];
teams.forEach(t => {
for (var i = 0; i < t.length; i++) {
room.setPlayerTeam(t[i].id, 2 - teams.indexOf(t));
}
});
}

function updateActivities() {
var players = room.getPlayerList().filter(p => playerList[p.name].afkStatus ==
false);
players.forEach(p => updatePlayerActivity(p));
}

function updateAdmins() {
var players = room.getPlayerList().filter(p => p.id != 0 &&
playerList[p.name].afkStatus == false);
if (players.length == 0) return;
if (players.find(p => p.admin == true) != null) return;
room.setPlayerAdmin(players[0].id, true);
}

function updateAdmins2(player) {
var players = room.getPlayerList().filter(p => p.id != 0 && p.id != player.id
&& playerList[p.name].afkStatus == false);
if (players.length == 0) return;
if (players.find(p => p.admin == true) != null) return;
room.setPlayerAdmin(players[0].id, true);
}

function updatePlayerActivity(player) {
playerList[player.name].afkTime = 0;
}

function warnIfAFK() {
var players = room.getPlayerList().filter(p =>
room.getPlayerDiscProperties(p.id) != null && isPlayerInactive(p) == true);

players.forEach(p => {
room.sendAnnouncement(`$
{locales[playerList[p.name].language].Tick.AFK.Warning}`, p.id,
colors.Tick.AFK.Warning, fonts.Tick.AFK.Warning, sounds.Tick.AFK.Warning);
});
}

function warnIfBadword(player, message) {


if (isBadword(player, message) == true) {
if (playerList[player.name].badwords < roomObject.tolerances.badwords) {
playerList[player.name].badwords++;
room.sendAnnouncement(`$
{locales[playerList[player.name].language].Chat.Badwords.Warning}`, player.id,
colors.Chat.Badwords, fonts.Chat.Badwords, sounds.Chat.Badwords);
return false;
}
else {
room.kickPlayer(player.id, `$
{locales[playerList[player.name].language].Chat.Badwords.Kick}`,
kickTypes.Chat.Badwords);
return false;
}
}
}

function warnIfBuggingInCircle() {
var players = room.getPlayerList().filter(p =>
room.getPlayerDiscProperties(p.id) != null && isPlayerInCircle(p) == true &&
(roomObject.timeouts.bugging.circle / 2 <= playerList[p.name].buggingTime &&
playerList[p.name].buggingTime <= roomObject.timeouts.bugging.circle / 2 + 1 /
60));

players.forEach(p => {
room.sendAnnouncement(`$
{locales[playerList[p.name].language].Tick.Bugging.Circle.Warning}`, p.id,
colors.Tick.Bugging.Warning, fonts.Tick.Bugging.Warning,
sounds.Tick.Bugging.Warning);
});
}

function warnIfBuggingAtCorner() {
var players = room.getPlayerList().filter(p =>
room.getPlayerDiscProperties(p.id) != null && isPlayerAtCorner(p) == true &&
(roomObject.timeouts.bugging.corner / 2 <= playerList[p.name].buggingTime &&
playerList[p.name].buggingTime <= roomObject.timeouts.bugging.corner / 2 + 1 /
60));

players.forEach(p => {
room.sendAnnouncement(`$
{locales[playerList[p.name].language].Tick.Bugging.Corner.Warning}`, p.id,
colors.Tick.Bugging.Warning, fonts.Tick.Bugging.Warning,
sounds.Tick.Bugging.Warning);
});
}

room.onGamePause = function (byPlayer) {


roomObject.gamePauseState = !roomObject.gamePauseState;
console.log(`${byPlayer == null ?
locales[roomObject.locale].Pause.Log[Number(byPlayer == null)] :
locales[roomObject.locale].Pause.Log[Number(byPlayer == null)] + " " +
byPlayer.name}`);
if (byPlayer != null) updatePlayerActivity(byPlayer);
updateActivities();
}

room.onGameStart = function (byPlayer) {


console.log(`${byPlayer == null ?
locales[roomObject.locale].Start.Log[Number(byPlayer != null)] :
locales[roomObject.locale].Start.Log[Number(byPlayer != null)] + " " +
byPlayer.name}`);
if (byPlayer != null) updatePlayerActivity(byPlayer);
changeCollisionStatus();
resetBuggingTimes();
updateActivities();
}

room.onGameStop = function (byPlayer) {


console.log(`${byPlayer == null ?
locales[roomObject.locale].Stop.Log[Number(byPlayer != null)] :
locales[roomObject.locale].Stop.Log[Number(byPlayer != null)] + " " +
byPlayer.name}`);
var players = room.getPlayerList().filter(p => playerList[p.name].afkStatus ==
false);
resetBuggingTimes();
updateActivities();
if (byPlayer != null) {
updatePlayerActivity(byPlayer);
}
else {
resetGameEndTimer();
if (players.length >= 2) {
swapTeams();
equateTeams();
room.startGame();
}
}
}

room.onGameTick = function () {
if (room.getScores() != null && room.getPlayerList().filter(p => p.team ==
1).length != 0 && room.getPlayerList().filter(p => p.team == 2).length != 0) {
bustingCheck();
checkForEndGame();
//fillCircles();
fillGateArea();
increaseBuggingTime();
kickBugging_Circle();
kickBugging_Corner();
resetBuggingTimes2();
warnIfBuggingAtCorner();
warnIfBuggingInCircle();
}
increaseAFKTime();
kickAFK();
warnIfAFK();
}

room.onGameUnpause = function (byPlayer) {


roomObject.gamePauseState = !roomObject.gamePauseState;
console.log(`${byPlayer == null ?
locales[roomObject.locale].Unpause.Log[Number(byPlayer != null)] :
locales[roomObject.locale].Unpause.Log[Number(byPlayer != null)] + " " +
byPlayer.name}`);
if (byPlayer != null) updatePlayerActivity(byPlayer);
updateActivities();
}

room.onPlayerActivity = function (player) {


updatePlayerActivity(player);
}

room.onPlayerAdminChange = function (changedPlayer, byPlayer) {


console.log(`${changedPlayer.name} ${byPlayer == null ?
locales[roomObject.locale].AdminChange.Log[Number(byPlayer != null)]
[Number(changedPlayer.admin)] :
locales[roomObject.locale].AdminChange.Log[Number(byPlayer != null)]
[Number(changedPlayer.admin)] + " " + byPlayer.name}`);
if (byPlayer != null) {
rollBackOnAdminChange(changedPlayer, byPlayer);
updatePlayerActivity(byPlayer);
//updatePlayerActivity(changedPlayer);
}
}

room.onPlayerChat = function (player, message) {


console.log(`${player.name}: ${message}`);
updatePlayerActivity(player);

if (message.startsWith(roomObject.commandPrefix) == true) {
if (isCommand(player, message) == true) {
warnIfBadword(player, message);
commands[playerList[player.name].language][message.split(" ")[0]]
(player, message);
return false;
}
else {
warnIfBadword(player, message);
room.sendAnnouncement(`$
{locales[playerList[player.name].language].Chat.NotACommand}`, player.id,
colors.Chat.NotACommand, fonts.Chat.NotACommand, sounds.Chat.NotACommand);
return false;
}
}
else {
warnIfBadword(player, message);
room.sendAnnouncement(`${roomObject.emojis[player.team]} [$
{playerList[player.name].points}] [$
{roomObject.playerStatus[Number(player.admin)]}] ${player.name} #${player.id}: $
{message}`, player.id, colors.Chat.Message[Number(player.admin)],
fonts.Chat.Message[Number(player.admin)],
sounds.Chat.Message[Number(player.admin)]);
return false;
}
}

room.onPlayerJoin = function (player) {


console.log(`${player.name} ${locales[roomObject.locale].Join.Log.Success}`);

kickIfBadword(player);
kickIfDuplicated(player);
kickIfImproper(player);

if (playerList[player.name] == undefined) {
playerList[player.name] = { name: player.name, auth: player.auth, conn:
player.conn, id: player.id, afkStatus: false, afkTime: 0, badwords: 0, buggingTime:
0, language: roomObject.locale, points: 0, teams: [], cops: { wins: 0, losses: 0 },
robbers: { wins: 0, losses: 0 } };
}
else if (playerList[player.name] != undefined) {
playerList[player.name].afkStatus = false;
}

updateAdmins();
updatePlayerActivity(player);
equateTeams();
startGameOnJoin();
}
room.onPlayerKicked = function (kickedPlayer, reason, ban, byPlayer) {
console.log(`${kickedPlayer.name} ${byPlayer == null ?
locales[roomObject.locale].Kick.Log[Number(byPlayer != null)][Number(ban)] :
locales[roomObject.locale].Kick.Log[Number(byPlayer != null)][Number(ban)] + " " +
byPlayer.name} ${reason == null ? "" : "(" + reason + ")"}`);
if (byPlayer != null) updatePlayerActivity(byPlayer);
updatePlayerActivity(kickedPlayer);
}

room.onPlayerLeave = function (player) {


console.log(`${player.name} ${locales[roomObject.locale].Leave.Log}`);
updateAdmins();
updatePlayerActivity(player);
equateTeams();
stopGameOnLeave();
}

room.onPositionsReset = function () {
console.log(`${locales[roomObject.locale].Reset.Log}`);
resetBuggingTimes();
updateActivities();
}

room.onPlayerTeamChange = function (changedPlayer, byPlayer) {


console.log(`${changedPlayer.name} ${byPlayer == null ?
locales[roomObject.locale].TeamChange.Log[changedPlayer.team][Number(byPlayer !=
null)] : locales[roomObject.locale].TeamChange.Log[changedPlayer.team]
[Number(byPlayer != null)] + " " + byPlayer.name}`);

if (changedPlayer.team != 0 && playerList[changedPlayer.name].afkStatus ==


true) {
room.setPlayerTeam(changedPlayer.id, 0);
}
if (byPlayer != null) {
rollBackOnTeamChange(changedPlayer, byPlayer);
updatePlayerActivity(byPlayer);
//updatePlayerActivity(changedPlayer);
}
addPlayerTeam(changedPlayer);
}

room.onRoomLink = function (url) {


if (roomObject.isRoomSet == false) {
room.setCustomStadium(Map);
room.setScoreLimit(roomObject.scoreLimit);
room.setTeamsLock(roomObject.teamsLock);
room.setTimeLimit(roomObject.timeLimit);
console.log(`${locales[roomObject.locale].Link.Log} ${url}`);
roomObject.isRoomSet = true;
}
}

room.onStadiumChange = function (newStadiumName, byPlayer) {


console.log(`${newStadiumName} ${byPlayer == null ?
locales[roomObject.locale].StadiumChange.Log[Number(byPlayer != null)] :
locales[roomObject.locale].StadiumChange.Log[Number(byPlayer != null)] + " " +
byPlayer.name}`);
if (byPlayer != null) {
updatePlayerActivity(byPlayer);
room.sendAnnouncement(`$
{locales[playerList[byPlayer.name].language].StadiumChange.NoAuthorization}`,
byPlayer.id, colors.StadiumChange.NoAuthorization,
fonts.StadiumChange.NoAuthorization, sounds.StadiumChange.NoAuthorization);
room.setCustomStadium(Map);
room.setScoreLimit(roomObject.scoreLimit);
room.setTeamsLock(roomObject.teamsLock);
room.setTimeLimit(roomObject.timeLimit);
}
}

You might also like