Coder Social home page Coder Social logo

Comments (3)

guguxh avatar guguxh commented on May 30, 2024

image

from haxball-example-scripts.

thenorthstar avatar thenorthstar commented on May 30, 2024

The map is NHL Hockey, we have the goal zone, is like a mid-circle, all rules of the game is about this zone and the goalkeeper, I need to do one of these rules, when goalkeeper is off this zone, when he touchs the ball and the lastToucher is from enemy team, script consider this is penalty, the map is under:

var Map = {"name":"NHL Staples Center 1G from HaxMaps","width":1040,"height":550,"spawnDistance":170,"bg":{"type":"hockey","height":470,"width":1000,"cornerRadius":200},"vertexes":[{"bCoef":-1.4,"cMask":["ball"],"x":-800,"y":-470,"curve":0,"color":"CC3300"},{"bCoef":0.5,"cMask":["red"],"x":800,"y":-470,"curve":90},{"bCoef":-1.4,"cMask":["ball"],"x":-800,"y":470,"color":"CC3300"},{"bCoef":-1.4,"cMask":["ball"],"x":800,"y":470,"curve":-90},{"bCoef":-1.4,"cMask":["ball"],"x":-1000,"y":-270,"curve":0},{"bCoef":-1.4,"cMask":["ball"],"x":-1000,"y":270,"curve":0},{"bCoef":-1.4,"cMask":["ball"],"x":1000,"y":-270,"curve":90},{"bCoef":-1.4,"cMask":["ball"],"x":1000,"y":270,"curve":-90},{"bCoef":-0.7,"cMask":["ball"],"x":-757,"y":97},{"bCoef":-0.7,"cMask":["ball"],"x":-790,"y":97,"curve":-90,"color":"000000"},{"bCoef":-0.7,"cMask":["ball"],"x":-757,"y":-97},{"bCoef":-0.7,"cMask":["ball"],"x":-790,"y":-97,"curve":90,"color":"000000"},{"bCoef":-0.7,"cMask":["ball"],"x":-810,"y":-70,"curve":90,"color":"000000"},{"bCoef":-0.7,"cMask":["ball"],"x":-810,"y":70,"curve":-90,"color":"000000"},{"cMask":["none"],"x":-760,"y":-467,"color":"000000"},{"cMask":["none"],"x":-760,"y":467,"color":"000000"},{"bCoef":-0.7,"cMask":["ball"],"x":757,"y":-97,"p0":[760,-90],"p1":[760,90]},{"bCoef":-0.7,"cMask":["ball"],"x":790,"y":-97,"curve":-90,"color":"000000"},{"bCoef":-0.7,"cMask":["ball"],"x":757,"y":97,"p0":[760,-90],"p1":[760,90]},{"bCoef":-0.7,"cMask":["ball"],"x":790,"y":97,"curve":90,"color":"000000"},{"bCoef":-0.7,"cMask":["ball"],"x":810,"y":70,"curve":90,"color":"000000"},{"bCoef":-0.7,"cMask":["ball"],"x":810,"y":-70,"curve":-90,"color":"000000"},{"cMask":["none"],"x":760,"y":-467,"color":"000000"},{"cMask":["none"],"x":760,"y":467,"color":"000000"},{"cMask":["none"],"x":0,"y":-470,"color":"000000"},{"cMask":["none"],"x":0,"y":470,"color":"000000"},{"cMask":["none"],"x":-230,"y":-470,"color":"818181"},{"cMask":["none"],"x":-230,"y":470,"color":"818181"},{"cMask":["none"],"x":0,"y":-130,"color":"818181","curve":-180},{"cMask":["none"],"x":0,"y":130,"color":"818181","curve":-180},{"cMask":["none"],"x":-500,"y":80,"color":"000000","curve":-180},{"cMask":["none"],"x":-500,"y":340,"color":"000000","curve":-180},{"cMask":["none"],"x":500,"y":-340,"color":"000000","curve":-180},{"cMask":["none"],"x":500,"y":-80,"color":"000000","curve":-180},{"cMask":["none"],"x":500,"y":80,"color":"000000","curve":-180},{"cMask":["none"],"x":500,"y":340,"color":"000000","curve":-180},{"cMask":["none"],"x":-500,"y":-340,"color":"000000","curve":-180},{"cMask":["none"],"x":-500,"y":-80,"color":"000000","curve":-180},{"cMask":["none"],"x":500,"y":-214,"color":"000000","curve":-180},{"cMask":["none"],"x":500,"y":-206,"color":"000000","curve":-180},{"cMask":["none"],"x":500,"y":-212,"color":"000000","curve":-180},{"cMask":["none"],"x":500,"y":-208,"color":"000000","curve":-180},{"cMask":["none"],"x":500,"y":-212,"color":"000000","curve":-180},{"cMask":["none"],"x":500,"y":-208,"color":"000000","curve":-180},{"cMask":["none"],"x":501,"y":206,"color":"000000","curve":-180},{"cMask":["none"],"x":501,"y":214,"color":"000000","curve":-180},{"cMask":["none"],"x":501,"y":208,"color":"000000","curve":-180},{"cMask":["none"],"x":501,"y":212,"color":"000000","curve":-180},{"cMask":["none"],"x":501,"y":208,"color":"000000","curve":-180},{"cMask":["none"],"x":501,"y":212,"color":"000000","curve":-180},{"cMask":["none"],"x":-499,"y":-214,"color":"000000","curve":-180},{"cMask":["none"],"x":-499,"y":-206,"color":"000000","curve":-180},{"cMask":["none"],"x":-499,"y":-212,"color":"000000","curve":-180},{"cMask":["none"],"x":-499,"y":-208,"color":"000000","curve":-180},{"cMask":["none"],"x":-499,"y":-212,"color":"000000","curve":-180},{"cMask":["none"],"x":-499,"y":-208,"color":"000000","curve":-180},{"cMask":["none"],"x":-497,"y":207,"color":"000000","curve":-180},{"cMask":["none"],"x":-497,"y":215,"color":"000000","curve":-180},{"cMask":["none"],"x":-497,"y":209,"color":"000000","curve":-180},{"cMask":["none"],"x":-497,"y":213,"color":"000000","curve":-180},{"cMask":["none"],"x":-497,"y":209,"color":"000000","curve":-180},{"cMask":["none"],"x":-497,"y":213,"color":"000000","curve":-180},{"cMask":["none"],"x":0,"y":-2,"color":"818181","curve":-180},{"cMask":["none"],"x":0,"y":6,"color":"818181","curve":-180},{"cMask":["none"],"x":0,"y":0,"color":"818181","curve":-180},{"cMask":["none"],"x":0,"y":4,"color":"818181","curve":-180},{"cMask":["none"],"x":0,"y":0,"color":"818181","curve":-180},{"cMask":["none"],"x":0,"y":4,"color":"818181","curve":-180},{"cMask":["none"],"x":-757,"y":-90,"curve":180},{"cMask":["none"],"x":-757,"y":110,"curve":180},{"cMask":["none"],"x":-757,"y":-107,"curve":180,"color":"0850A2"},{"cMask":["none"],"x":-757,"y":-107,"curve":180,"color":"0850A2"},{"cMask":["none"],"x":-757,"y":-107,"curve":180,"color":"0850A2"},{"cMask":["none"],"x":-757,"y":107,"curve":180,"color":"0850A2"},{"cMask":["none"],"x":-757,"y":-104,"curve":180,"color":"0850A2"},{"cMask":["none"],"x":-757,"y":104,"curve":180,"color":"0850A2"},{"cMask":["none"],"x":-757,"y":-101,"curve":180,"color":"0850A2"},{"cMask":["none"],"x":-757,"y":101,"curve":180,"color":"0850A2"},{"cMask":["none"],"x":-757,"y":-98,"curve":180,"color":"0850A2"},{"cMask":["none"],"x":-757,"y":98,"curve":180,"color":"0850A2"},{"cMask":["none"],"x":-757,"y":-95,"curve":180,"color":"0850A2"},{"cMask":["none"],"x":-757,"y":95,"curve":180,"color":"0850A2"},{"cMask":["none"],"x":-757,"y":-92,"curve":180,"color":"0850A2"},{"cMask":["none"],"x":-757,"y":92,"curve":180,"color":"0850A2"},{"cMask":["none"],"x":-757,"y":-89,"curve":180,"color":"0850A2"},{"cMask":["none"],"x":757,"y":101.536516602,"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"cMask":["none"],"x":757,"y":-100.463423548,"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"cMask":["none"],"x":757,"y":98.5365174904,"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"cMask":["none"],"x":757,"y":-97.4634244364,"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"cMask":["none"],"x":757,"y":95.5365183793,"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"cMask":["none"],"x":757,"y":-94.4634253253,"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"cMask":["none"],"x":757,"y":92.5365192682,"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"cMask":["none"],"x":757,"y":-91.4634262142,"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"cMask":["none"],"x":757,"y":103,"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"cMask":["none"],"x":757,"y":-103,"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"cMask":["none"],"x":757,"y":106,"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"cMask":["none"],"x":757,"y":-106,"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"cMask":["none"],"x":757,"y":109,"curve":180,"color":"000000","p0":[760,-90],"p1":[760,90]},{"cMask":["none"],"x":757,"y":-109,"curve":180,"color":"000000","p0":[760,-90],"p1":[760,90]},{"bCoef":-1.2,"cMask":["ball"],"x":800,"y":-470,"curve":0,"color":"818181","vis":true},{"bCoef":0.5,"cMask":["red","blue"],"x":1000,"y":-270,"curve":90,"color":"818181","vis":true},{"bCoef":0.5,"cMask":["red","blue"],"x":1000,"y":-270,"curve":0,"color":"818181","vis":true},{"bCoef":0.5,"cMask":["red","blue"],"x":1000,"y":270,"curve":0,"color":"818181","vis":true},{"bCoef":0.5,"cMask":["red","blue"],"x":800,"y":470,"curve":-90,"color":"818181","vis":true},{"bCoef":0.5,"cMask":["red","blue"],"x":1000,"y":270,"curve":-90,"color":"818181","vis":true},{"bCoef":0.5,"cMask":["red","blue"],"x":-800,"y":470,"color":"818181","curve":0,"vis":true},{"bCoef":0.5,"cMask":["red","blue"],"x":800,"y":470,"curve":0,"color":"818181","vis":true},{"bCoef":0.5,"cMask":["red","blue"],"x":-800,"y":470,"color":"818181","curve":-90,"vis":true},{"bCoef":0.5,"cMask":["red","blue"],"x":-1000,"y":270,"curve":-90,"color":"818181","vis":true},{"bCoef":0,"cMask":["red","blue"],"x":-1000,"y":-270,"curve":0},{"bCoef":0.5,"cMask":["blue"],"x":-800,"y":-470,"curve":-90,"color":"818181","vis":false},{"bCoef":0.5,"cMask":["red","blue"],"x":-1000,"y":-270,"curve":-90,"color":"818181","vis":true},{"bCoef":0.7,"cMask":["red","blue"],"x":-757,"y":97,"curve":0},{"bCoef":0.7,"cMask":["red","blue"],"x":-790,"y":97,"curve":-90,"color":"000000"},{"bCoef":0.7,"cMask":["red","blue"],"x":-757,"y":-97,"curve":0},{"bCoef":0.7,"cMask":["red","blue"],"x":-790,"y":-97,"curve":90,"color":"000000"},{"bCoef":0.7,"cMask":["red","blue"],"x":-810,"y":-70,"curve":0,"color":"000000"},{"bCoef":0.7,"cMask":["red","blue"],"x":-810,"y":70,"curve":-90,"color":"000000"},{"bCoef":0.7,"cMask":["red","blue"],"x":757,"y":-97,"p0":[760,-90],"p1":[760,90],"curve":0},{"bCoef":0.7,"cMask":["red","blue"],"x":790,"y":-97,"curve":-90,"color":"000000"},{"bCoef":0.7,"cMask":["red","blue"],"x":757,"y":97,"p0":[760,-90],"p1":[760,90],"curve":0},{"bCoef":0.7,"cMask":["red","blue"],"x":790,"y":97,"curve":90,"color":"000000"},{"bCoef":0.7,"cMask":["red","blue"],"x":810,"y":70,"curve":90,"color":"000000"},{"bCoef":0.7,"cMask":["red","blue"],"x":810,"y":-70,"curve":-90,"color":"000000"},{"cMask":["none"],"x":230,"y":-470,"color":"818181"},{"cMask":["none"],"x":230,"y":470,"color":"818181"},{"cMask":["none"],"x":-757,"y":109,"curve":-180,"color":"000000","p0":[760,-90],"p1":[760,90]},{"cMask":["none"],"x":-757,"y":-109,"curve":-180,"color":"000000","p0":[760,-90],"p1":[760,90]},{"bCoef":0.5,"cMask":["red","blue"],"x":-1000,"y":-270,"curve":0,"color":"818181","vis":true},{"bCoef":0.5,"cMask":["red","blue"],"x":-1000,"y":270,"curve":0,"color":"818181","vis":true},{"cMask":["ball"],"x":-800,"y":470},{"cMask":["ball"],"x":800,"y":470},{"bCoef":0.5,"cMask":["red"],"x":799,"y":-470,"curve":0,"color":"000000","vis":false},{"cMask":["red","blue"],"x":-750,"y":-470,"bCoef":0,"curve":0,"color":"818181","vis":true},{"cMask":["red","blue"],"x":750,"y":-470,"bCoef":0,"curve":0,"color":"818181","vis":true},{"bCoef":0,"cMask":["red","blue"],"x":-750,"y":-550,"vis":true},{"bCoef":0,"cMask":["red","blue"],"x":750,"y":-550,"vis":true},{"bCoef":0,"cMask":["ball"],"x":-750,"y":470},{"bCoef":0,"cMask":["ball"],"x":-750,"y":550},{"bCoef":0,"cMask":["ball"],"x":750,"y":470},{"bCoef":0,"cMask":["ball"],"x":750,"y":550},{"bCoef":0,"cMask":["red","blue"],"x":-1001,"y":64,"color":"818181","curve":90},{"bCoef":0,"cMask":["red","blue"],"x":-1042,"y":61,"color":"818181","curve":90},{"bCoef":0,"cMask":["red","blue"],"x":-1040,"y":-273,"curve":90,"color":"818181"},{"bCoef":0,"x":-796,"y":-505,"curve":0,"cMask":["wall"],"color":"818181"},{"x":-751,"y":-503,"curve":90,"bCoef":0,"cMask":["wall"],"color":"818181"},{"cMask":["red","blue"],"x":750,"y":-470,"bCoef":0,"curve":-90,"color":"818181","vis":true},{"x":751,"y":-503,"curve":-90,"bCoef":0,"cMask":["red","blue"],"color":"818181"},{"bCoef":0,"x":796,"y":-505,"curve":0,"cMask":["wall"],"color":"000000"},{"x":751,"y":-503,"curve":90,"bCoef":0,"cMask":["wall"],"color":"000000"},{"bCoef":0,"cMask":["red","blue"],"x":1040,"y":-273,"curve":-90,"color":"818181"},{"bCoef":0,"x":796,"y":-505,"curve":-90,"cMask":["red","blue"],"color":"818181"},{"bCoef":0,"cMask":["red","blue"],"x":1042,"y":61,"color":"818181","curve":90},{"bCoef":0,"cMask":["red","blue"],"x":1040,"y":-273,"curve":90,"color":"818181"},{"bCoef":0,"cMask":["red","blue"],"x":1001,"y":64,"color":"818181","curve":-90},{"bCoef":0,"cMask":["red","blue"],"x":1042,"y":61,"color":"818181","curve":-90},{"bCoef":-0.6,"cMask":["ball"],"x":-744,"y":-475,"curve":97,"color":"EEDD82"},{"bCoef":-0.6,"cMask":["ball"],"x":743,"y":-474,"curve":-95,"color":"818181"},{"bCoef":-0.6,"cMask":["ball"],"x":-800,"y":475,"curve":90,"color":"818181"},{"bCoef":-0.6,"cMask":["ball"],"x":800,"y":475,"color":"818181"},{"bCoef":-0.6,"cMask":["ball"],"x":-1007,"y":267,"curve":0,"color":"818181"},{"bCoef":-0.6,"cMask":["ball"],"x":800,"y":475,"curve":-90,"color":"818181"},{"bCoef":-0.6,"cMask":["ball"],"x":1007,"y":267,"curve":0,"color":"818181"},{"x":-1007,"y":68,"curve":0,"bCoef":-0.6,"cMask":["ball"],"color":"818181"},{"x":1007,"y":68,"curve":0,"bCoef":-0.6,"cMask":["ball"],"color":"818181"},{"x":1007,"y":-266},{"x":1007,"y":-68},{"bCoef":-0.6,"cMask":["ball"],"x":-1006,"y":-271,"curve":97,"color":"EEDD82"},{"bCoef":-0.6,"cMask":["ball"],"x":1006,"y":-271,"curve":-95,"color":"818181"},{"x":-745,"y":478},{"x":745,"y":478},{"cMask":["ball"],"x":-15,"y":-485,"color":"818181"},{"cMask":["ball"],"x":15,"y":-485,"color":"818181"},{"cMask":["ball"],"x":-20,"y":485},{"cMask":["ball"],"x":20,"y":485},{"cMask":["ball"],"x":-25,"y":-485,"color":"818181"},{"cMask":["ball"],"x":25,"y":-485,"color":"818181"},{"cMask":["ball"],"x":-29,"y":483},{"cMask":["ball"],"x":29,"y":483},{"cMask":["ball"],"x":-55,"y":-485,"color":"818181"},{"cMask":["ball"],"x":55,"y":-485,"color":"818181"},{"cMask":["ball"],"x":-57,"y":483},{"cMask":["ball"],"x":57,"y":483},{"cMask":["ball"],"x":-55,"y":-525,"color":"818181"},{"cMask":["ball"],"x":-25,"y":-525,"color":"818181"},{"cMask":["ball"],"x":-15,"y":-525,"color":"818181"},{"cMask":["ball"],"x":15,"y":-525,"color":"818181"},{"cMask":["ball"],"x":25,"y":-525,"color":"818181"},{"cMask":["ball"],"x":15,"y":-505,"color":"818181"},{"cMask":["ball"],"x":-15,"y":-505,"color":"818181"},{"cMask":["ball"],"x":65,"y":-485,"color":"000000","curve":0},{"cMask":["ball"],"x":65,"y":-515,"color":"000000","curve":220},{"cMask":["ball"],"x":65,"y":-500,"color":"000000","curve":0},{"cMask":["ball"],"x":90,"y":-485,"color":"000000","curve":260},{"cMask":["ball"],"x":90,"y":-515,"color":"000000","curve":220},{"cMask":["ball"],"x":90,"y":-500,"color":"000000","curve":260},{"cMask":["ball"],"x":115,"y":-485,"color":"000000","curve":260},{"cMask":["ball"],"x":115,"y":-515,"color":"000000","curve":220},{"cMask":["ball"],"x":115,"y":-500,"color":"000000","curve":25},{"cMask":["ball"],"x":125,"y":-485,"color":"000000","curve":25},{"cMask":["ball"],"x":85,"y":-485,"color":"000000","curve":0},{"cMask":["ball"],"x":110,"y":-485,"color":"000000","curve":260},{"cMask":["ball"],"x":110,"y":-500,"color":"000000","curve":260},{"cMask":["ball"],"x":110,"y":-515,"color":"000000","curve":220},{"cMask":["ball"],"x":85,"y":-500,"color":"000000","curve":0},{"cMask":["ball"],"x":90,"y":-485,"color":"000000","curve":0},{"cMask":["ball"],"x":91,"y":-516,"color":"000000","curve":220},{"cMask":["ball"],"x":90,"y":-500,"color":"000000","curve":0},{"cMask":["ball"],"x":115,"y":-485,"color":"000000","curve":260,"_selected":true},{"cMask":["ball"],"x":115,"y":-515,"color":"000000","curve":220},{"cMask":["ball"],"x":115,"y":-500,"color":"000000","curve":260,"_selected":true},{"cMask":["ball"],"x":110,"y":-485,"color":"000000","curve":0},{"cMask":["ball"],"x":110,"y":-500,"color":"000000","curve":0},{"cMask":["ball"],"x":135,"y":-515},{"cMask":["ball"],"x":135,"y":-485,"color":"000000","curve":260,"_selected":true}],"segments":[{"vis":false,"color":"FF0000","bCoef":-1.2,"cMask":["ball"],"v0":2,"v1":3},{"vis":false,"color":"FF0000","bCoef":-1.2,"cMask":["ball"],"v0":4,"v1":5,"x":-1000,"curve":0},{"vis":false,"color":"FF0000","bCoef":-1.2,"cMask":["ball"],"v0":6,"v1":7},{"vis":false,"color":"FF0000","bCoef":-1.2,"cMask":["ball"],"v0":0,"v1":4,"curve":-90},{"curve":-90,"vis":false,"color":"FF0000","bCoef":-1.2,"cMask":["ball"],"v0":5,"v1":2},{"curve":-90,"vis":false,"color":"FF0000","bCoef":-1.2,"cMask":["ball"],"v0":3,"v1":7},{"curve":90,"vis":false,"color":"FF0000","bCoef":-1.2,"cMask":["ball"],"v0":1,"v1":6},{"vis":true,"bCoef":-0.7,"cMask":["ball"],"v0":8,"v1":9,"y":97},{"vis":true,"bCoef":-0.7,"cMask":["ball"],"v0":10,"v1":11,"y":-97},{"vis":true,"color":"000000","bCoef":-0.7,"cMask":["ball"],"v0":12,"v1":13},{"vis":true,"color":"000000","bCoef":-0.7,"cMask":["ball"],"v0":13,"v1":9,"curve":-90},{"vis":true,"color":"000000","bCoef":-0.7,"cMask":["ball"],"v0":12,"v1":11,"curve":90},{"curve":0,"vis":true,"cMask":["none"],"color":"000000","v0":14,"v1":15},{"vis":true,"bCoef":-0.7,"cMask":["ball"],"v0":16,"v1":17,"y":-97},{"vis":true,"bCoef":-0.7,"cMask":["ball"],"v0":18,"v1":19,"y":97},{"vis":true,"color":"000000","bCoef":-0.7,"cMask":["ball"],"v0":20,"v1":21,"x":810},{"vis":true,"color":"000000","bCoef":-0.7,"cMask":["ball"],"v0":21,"v1":17,"curve":-90},{"vis":true,"color":"000000","bCoef":-0.7,"cMask":["ball"],"v0":20,"v1":19,"curve":90},{"curve":0,"vis":true,"cMask":["none"],"color":"000000","v0":22,"v1":23,"x":760},{"curve":0,"vis":true,"cMask":["none"],"color":"000000","v0":24,"v1":25,"x":0},{"curve":0,"vis":true,"cMask":["none"],"color":"818181","v0":26,"v1":27,"x":-230},{"curve":-180,"vis":true,"cMask":["none"],"color":"818181","v0":28,"v1":29,"x":-230},{"curve":180,"vis":true,"cMask":["none"],"color":"818181","v0":28,"v1":29},{"curve":-180,"vis":true,"cMask":["none"],"color":"000000","v0":30,"v1":31,"x":-230},{"curve":180,"vis":true,"cMask":["none"],"color":"000000","v0":30,"v1":31},{"curve":-180,"vis":true,"cMask":["none"],"color":"000000","v0":32,"v1":33,"x":-230},{"curve":180,"vis":true,"cMask":["none"],"color":"000000","v0":32,"v1":33},{"curve":-180,"vis":true,"cMask":["none"],"color":"000000","v0":34,"v1":35,"x":-230},{"curve":180,"vis":true,"cMask":["none"],"color":"000000","v0":34,"v1":35},{"curve":-180,"vis":true,"cMask":["none"],"color":"000000","v0":36,"v1":37,"x":-230},{"curve":180,"vis":true,"cMask":["none"],"color":"000000","v0":36,"v1":37},{"curve":-180,"vis":true,"cMask":["none"],"color":"000000","v0":38,"v1":39,"x":-230},{"curve":180,"vis":true,"cMask":["none"],"color":"000000","v0":38,"v1":39},{"curve":-180,"vis":true,"cMask":["none"],"color":"000000","v0":40,"v1":41,"x":-230},{"curve":180,"vis":true,"cMask":["none"],"color":"000000","v0":40,"v1":41},{"curve":-180,"vis":true,"cMask":["none"],"color":"000000","v0":42,"v1":43,"x":-230},{"curve":180,"vis":true,"cMask":["none"],"color":"000000","v0":42,"v1":43},{"curve":-180,"vis":true,"cMask":["none"],"color":"000000","v0":44,"v1":45,"x":-230},{"curve":180,"vis":true,"cMask":["none"],"color":"000000","v0":44,"v1":45},{"curve":-180,"vis":true,"cMask":["none"],"color":"000000","v0":46,"v1":47,"x":-230},{"curve":180,"vis":true,"cMask":["none"],"color":"000000","v0":46,"v1":47},{"curve":-180,"vis":true,"cMask":["none"],"color":"000000","v0":48,"v1":49,"x":-230},{"curve":180,"vis":true,"cMask":["none"],"color":"000000","v0":48,"v1":49},{"curve":-180,"vis":true,"cMask":["none"],"color":"000000","v0":50,"v1":51,"x":-230},{"curve":180,"vis":true,"cMask":["none"],"color":"000000","v0":50,"v1":51},{"curve":-180,"vis":true,"cMask":["none"],"color":"000000","v0":52,"v1":53,"x":-230},{"curve":180,"vis":true,"cMask":["none"],"color":"000000","v0":52,"v1":53},{"curve":-180,"vis":true,"cMask":["none"],"color":"000000","v0":54,"v1":55,"x":-230},{"curve":180,"vis":true,"cMask":["none"],"color":"000000","v0":54,"v1":55},{"curve":-180,"vis":true,"cMask":["none"],"color":"000000","v0":56,"v1":57,"x":-230},{"curve":180,"vis":true,"cMask":["none"],"color":"000000","v0":56,"v1":57},{"curve":-180,"vis":true,"cMask":["none"],"color":"000000","v0":58,"v1":59,"x":-230},{"curve":180,"vis":true,"cMask":["none"],"color":"000000","v0":58,"v1":59},{"curve":-180,"vis":true,"cMask":["none"],"color":"000000","v0":60,"v1":61,"x":-230},{"curve":180,"vis":true,"cMask":["none"],"color":"000000","v0":60,"v1":61},{"curve":-180,"vis":true,"cMask":["none"],"color":"818181","v0":62,"v1":63,"x":0},{"curve":180,"vis":true,"cMask":["none"],"color":"818181","v0":62,"v1":63,"x":0},{"curve":-180,"vis":true,"cMask":["none"],"color":"818181","v0":64,"v1":65,"x":0},{"curve":180,"vis":true,"cMask":["none"],"color":"818181","v0":64,"v1":65,"x":0},{"curve":-180,"vis":true,"cMask":["none"],"color":"818181","v0":66,"v1":67,"x":0},{"curve":180,"vis":true,"cMask":["none"],"color":"818181","v0":66,"v1":67,"x":0},{"curve":180,"vis":true,"cMask":["none"],"color":"000000","v0":97,"v1":98,"x":757,"p0":[760,-90],"p1":[760,90]},{"curve":90,"vis":true,"color":"818181","bCoef":0.5,"cMask":["red","blue"],"v0":99,"v1":100},{"vis":true,"color":"818181","bCoef":0.5,"cMask":["red","blue"],"v0":101,"v1":102,"curve":0},{"curve":-90,"vis":true,"color":"818181","bCoef":0.5,"cMask":["red","blue"],"v0":103,"v1":104},{"vis":true,"color":"818181","bCoef":0.5,"cMask":["red","blue"],"v0":105,"v1":106,"curve":0},{"curve":-90,"vis":true,"color":"818181","bCoef":0.5,"cMask":["red","blue"],"v0":108,"v1":107},{"vis":true,"color":"818181","bCoef":0.5,"cMask":["red","blue"],"v0":110,"v1":111,"curve":-90},{"vis":true,"bCoef":0,"cMask":["red","blue"],"v0":112,"v1":113,"y":97,"curve":0},{"vis":true,"bCoef":0,"cMask":["red","blue"],"v0":114,"v1":115,"y":-97,"curve":0},{"vis":true,"color":"000000","bCoef":0,"cMask":["red","blue"],"v0":116,"v1":117,"curve":0},{"vis":true,"color":"000000","bCoef":0,"cMask":["red","blue"],"v0":117,"v1":113,"curve":-90},{"vis":true,"color":"000000","bCoef":0.7,"cMask":["red","blue"],"v0":116,"v1":115,"curve":90},{"vis":true,"bCoef":0,"cMask":["red","blue"],"v0":118,"v1":119,"y":-97,"curve":0},{"vis":true,"bCoef":0,"cMask":["red","blue"],"v0":120,"v1":121,"y":97,"curve":0},{"vis":true,"color":"000000","bCoef":0,"cMask":["red","blue"],"v0":122,"v1":123,"curve":0,"x":810},{"vis":true,"color":"000000","bCoef":0,"cMask":["red","blue"],"v0":123,"v1":119,"curve":-90},{"vis":true,"color":"000000","bCoef":0.7,"cMask":["red","blue"],"v0":122,"v1":121,"curve":90},{"curve":0,"vis":true,"cMask":["none"],"color":"818181","v0":124,"v1":125,"x":230},{"curve":-180,"vis":true,"cMask":["none"],"color":"000000","v0":126,"v1":127,"x":-757,"p0":[760,-90],"p1":[760,90]},{"vis":true,"color":"818181","bCoef":0.5,"cMask":["red","blue"],"v0":128,"v1":129,"curve":0,"x":-1000},{"vis":false,"color":"FF0000","cMask":["ball"],"v0":107,"v1":130},{"vis":false,"color":"FF0000","cMask":["ball"],"v0":106,"v1":131},{"vis":false,"color":"FF0000","bCoef":-1.2,"cMask":["ball"],"v0":0,"v1":99,"curve":0},{"curve":0,"vis":true,"color":"818181","bCoef":0.5,"cMask":["red","blue"],"v0":133,"v1":134},{"curve":0,"vis":true,"color":"000000","bCoef":0.5,"cMask":["red"],"v0":134,"v1":132},{"curve":0,"vis":true,"color":"000000","bCoef":0.5,"cMask":["blue"],"v0":110,"v1":133},{"curve":90,"vis":true,"color":"818181","bCoef":0,"cMask":["red","blue"],"v0":141,"v1":142},{"vis":true,"color":"818181","bCoef":0,"cMask":["red","blue"],"v0":142,"v1":143},{"curve":90,"vis":true,"color":"818181","bCoef":0,"v0":143,"v1":144,"cMask":["red","blue"]},{"curve":0,"vis":true,"color":"000000","v0":144,"v1":145,"bCoef":0,"cMask":["wall"]},{"curve":90,"vis":true,"color":"818181","v0":145,"v1":133,"bCoef":0,"cMask":["red","blue"]},{"curve":-90,"vis":true,"color":"818181","v0":147,"v1":146,"bCoef":0,"cMask":["red","blue"]},{"curve":0,"vis":true,"color":"000000","v0":148,"v1":149,"bCoef":0,"cMask":["wall"]},{"curve":-90,"vis":true,"color":"818181","bCoef":0,"v0":150,"v1":151,"cMask":["red","blue"]},{"vis":true,"color":"818181","bCoef":0,"cMask":["red","blue"],"v0":152,"v1":153},{"curve":-90,"vis":true,"color":"818181","bCoef":0,"cMask":["red","blue"],"v0":154,"v1":155},{"vis":true,"color":"818181","bCoef":-0.6,"cMask":["ball"],"v0":156,"v1":157},{"vis":true,"color":"818181","bCoef":-0.6,"cMask":["ball"],"v0":158,"v1":159},{"curve":90,"vis":true,"color":"818181","bCoef":-0.6,"cMask":["ball"],"v0":158,"v1":160},{"curve":-90,"vis":true,"color":"818181","bCoef":-0.6,"cMask":["ball"],"v0":161,"v1":162},{"curve":0,"vis":true,"color":"818181","v0":160,"v1":163,"bCoef":-0.6,"cMask":["ball"]},{"curve":0,"vis":true,"color":"818181","v0":162,"v1":164,"bCoef":-0.6,"cMask":["ball"]},{"curve":0,"vis":false,"color":"006400","bCoef":-0.6,"cMask":["ball"],"v0":163,"v1":167},{"curve":0,"vis":false,"color":"006400","bCoef":-0.6,"cMask":["ball"],"v0":164,"v1":168},{"curve":97,"vis":false,"color":"EEDD82","v0":167,"v1":156,"bCoef":-0.6,"cMask":["ball"]},{"curve":-95,"vis":false,"color":"818181","v0":168,"v1":157,"bCoef":-0.6,"cMask":["ball"]},{"curve":0,"vis":true,"color":"818181","v0":183,"v1":179},{"curve":0,"vis":true,"color":"818181","v0":183,"v1":175},{"curve":0,"vis":true,"color":"818181","v0":175,"v1":184},{"curve":0,"vis":true,"color":"818181","cMask":["ball"],"v0":185,"v1":171},{"curve":0,"vis":true,"color":"818181","cMask":["ball"],"v0":186,"v1":172},{"curve":0,"vis":true,"color":"818181","cMask":["ball"],"v0":176,"v1":180},{"curve":0,"vis":true,"color":"818181","cMask":["ball"],"v0":189,"v1":188},{"curve":0,"vis":true,"color":"818181","cMask":["ball"],"v0":187,"v1":176},{"curve":0,"vis":true,"color":"000000","v0":197,"v1":196,"x":115},{"curve":220,"vis":true,"color":"000000","cMask":["ball"],"v0":207,"v1":212},{"curve":0,"vis":true,"color":"000000","cMask":["ball"],"v0":207,"v1":205},{"curve":0,"vis":true,"color":"000000","cMask":["ball"],"v0":212,"v1":211},{"curve":0,"vis":true,"color":"000000","cMask":["ball"],"v0":207,"v1":212},{"vis":true,"color":"000000","cMask":["ball"],"v0":191,"v1":190},{"vis":true,"color":"000000","cMask":["ball"],"v0":190,"v1":200},{"vis":true,"color":"000000","cMask":["ball"],"v0":210,"v1":213},{"vis":true,"color":"000000","cMask":["ball"],"v0":210,"v1":214,"_selected":true}],"goals":[{"team":"red","p0":[-760,95],"p1":[-760,-95],"cMask":["ball"],"bCoef":1,"x":-757},{"team":"blue","p0":[760,97],"p1":[760,-97],"cMask":["ball"],"bCoef":1}],"discs":[{"radius":6,"invMass":0,"color":"C0C0C0","bCoef":-0.7,"cMask":["ball"],"pos":[-760,-97],"x":-757},{"radius":6,"invMass":0,"pos":[-760,97],"color":"C0C0C0","bCoef":-0.7,"cMask":["ball"],"x":-757},{"radius":6,"invMass":0,"pos":[760,97],"color":"C0C0C0","bCoef":-0.7,"cMask":["ball"]},{"radius":6,"invMass":0,"color":"C0C0C0","bCoef":-0.7,"cMask":["ball"],"pos":[760,-97]},{"radius":6,"invMass":0,"color":"C0C0C0","bCoef":0.7,"cMask":["red","blue"],"pos":[-760,-97],"x":-757},{"radius":6,"invMass":0,"pos":[-760,97],"color":"C0C0C0","bCoef":0.7,"cMask":["red","blue"],"x":-757},{"radius":6,"invMass":0,"pos":[760,97],"color":"C0C0C0","bCoef":0.7,"cMask":["red","blue"]},{"radius":6,"invMass":0,"color":"C0C0C0","bCoef":0.7,"cMask":["red","blue"],"pos":[760,-97]}],"planes":[{"bCoef":-1.2,"cMask":["ball"],"dist":-473,"normal":[0,1],"color":"EEDD82"},{"bCoef":-1.2,"cMask":["ball"],"dist":-472,"normal":[0,-1],"color":"EEDD82"},{"bCoef":-0.6,"cMask":["ball"],"dist":-549,"normal":[0,-1]},{"bCoef":-0.6,"cMask":["ball"],"dist":-547,"normal":[0,1]},{"bCoef":-1.2,"cMask":["ball"],"dist":-998.098191562,"normal":[0.99990162134,-0.0140266760509],"color":"EEDD82"},{"bCoef":-0.6,"cMask":["ball"],"dist":-1039,"normal":[-1,0]},{"bCoef":-0.6,"cMask":["ball"],"dist":-1039,"normal":[1,0]},{"bCoef":-1.2,"cMask":["ball"],"dist":-1001,"normal":[-1,0],"color":"EEDD82"},{"cMask":["ball"],"dist":-960,"normal":[0.5,0.5]},{"cMask":["ball"],"dist":-960,"normal":[-0.5,0.5]},{"cMask":["ball"],"dist":-960,"normal":[-0.5,-0.5]},{"cMask":["ball"],"dist":-960,"normal":[0.5,-0.5]}],"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"]}},"ballPhysics":{"color":"000000","radius":6.5,"damping":0.996,"invMass":1.5,"bCoef":-0.5},"playerPhysics":{"damping":0.982,"kickStrength":3.5,"kickingDamping":0.974,"kickingAcceleration":0.069,"bCoef":1,"acceleration":0.079}};

@guguxh OK. After two days I have implemented a script which you can use for your future operations as well but I couldn't have resolved the problem with spamming in room.onGameTick. Sorry about that from right now. Here is your code:

var LineUp = `` //Insert your line up map scripts here

var _LineUp = {ID: 1, Name: JSON.parse(LineUp).name};

var Hockey = `{"name":"NHL Staples Center 1G from HaxMaps","width":1040,"height":550,"spawnDistance":170,"bg":{"type":"hockey","height":470,"width":1000,"cornerRadius":200},"vertexes":[{"x":-800,"y":-470,"bCoef":-1.4,"cMask":["ball"],"curve":0,"color":"CC3300"},{"x":800,"y":-470,"bCoef":0.5,"cMask":["red"],"curve":90},{"x":-800,"y":470,"bCoef":-1.4,"cMask":["ball"],"color":"CC3300"},{"x":800,"y":470,"bCoef":-1.4,"cMask":["ball"],"curve":-90},{"x":-1000,"y":-270,"bCoef":-1.4,"cMask":["ball"],"curve":0},{"x":-1000,"y":270,"bCoef":-1.4,"cMask":["ball"],"curve":0},{"x":1000,"y":-270,"bCoef":-1.4,"cMask":["ball"],"curve":90},{"x":1000,"y":270,"bCoef":-1.4,"cMask":["ball"],"curve":-90},{"x":-757,"y":97,"bCoef":-0.7,"cMask":["ball"]},{"x":-790,"y":97,"bCoef":-0.7,"cMask":["ball"],"curve":-90,"color":"000000"},{"x":-757,"y":-97,"bCoef":-0.7,"cMask":["ball"]},{"x":-790,"y":-97,"bCoef":-0.7,"cMask":["ball"],"curve":90,"color":"000000"},{"x":-810,"y":-70,"bCoef":-0.7,"cMask":["ball"],"curve":90,"color":"000000"},{"x":-810,"y":70,"bCoef":-0.7,"cMask":["ball"],"curve":-90,"color":"000000"},{"x":-760,"y":-467,"cMask":["none"],"color":"000000"},{"x":-760,"y":467,"cMask":["none"],"color":"000000"},{"x":757,"y":-97,"bCoef":-0.7,"cMask":["ball"],"p0":[760,-90],"p1":[760,90]},{"x":790,"y":-97,"bCoef":-0.7,"cMask":["ball"],"curve":-90,"color":"000000"},{"x":757,"y":97,"bCoef":-0.7,"cMask":["ball"],"p0":[760,-90],"p1":[760,90]},{"x":790,"y":97,"bCoef":-0.7,"cMask":["ball"],"curve":90,"color":"000000"},{"x":810,"y":70,"bCoef":-0.7,"cMask":["ball"],"curve":90,"color":"000000"},{"x":810,"y":-70,"bCoef":-0.7,"cMask":["ball"],"curve":-90,"color":"000000"},{"x":760,"y":-467,"cMask":["none"],"color":"000000"},{"x":760,"y":467,"cMask":["none"],"color":"000000"},{"x":0,"y":-470,"cMask":["none"],"color":"000000"},{"x":0,"y":470,"cMask":["none"],"color":"000000"},{"x":-230,"y":-470,"cMask":["none"],"color":"818181"},{"x":-230,"y":470,"cMask":["none"],"color":"818181"},{"x":0,"y":-130,"cMask":["none"],"color":"818181","curve":-180},{"x":0,"y":130,"cMask":["none"],"color":"818181","curve":-180},{"x":-500,"y":80,"cMask":["none"],"color":"000000","curve":-180},{"x":-500,"y":340,"cMask":["none"],"color":"000000","curve":-180},{"x":500,"y":-340,"cMask":["none"],"color":"000000","curve":-180},{"x":500,"y":-80,"cMask":["none"],"color":"000000","curve":-180},{"x":500,"y":80,"cMask":["none"],"color":"000000","curve":-180},{"x":500,"y":340,"cMask":["none"],"color":"000000","curve":-180},{"x":-500,"y":-340,"cMask":["none"],"color":"000000","curve":-180},{"x":-500,"y":-80,"cMask":["none"],"color":"000000","curve":-180},{"x":500,"y":-214,"cMask":["none"],"color":"000000","curve":-180},{"x":500,"y":-206,"cMask":["none"],"color":"000000","curve":-180},{"x":500,"y":-212,"cMask":["none"],"color":"000000","curve":-180},{"x":500,"y":-208,"cMask":["none"],"color":"000000","curve":-180},{"x":500,"y":-212,"cMask":["none"],"color":"000000","curve":-180},{"x":500,"y":-208,"cMask":["none"],"color":"000000","curve":-180},{"x":501,"y":206,"cMask":["none"],"color":"000000","curve":-180},{"x":501,"y":214,"cMask":["none"],"color":"000000","curve":-180},{"x":501,"y":208,"cMask":["none"],"color":"000000","curve":-180},{"x":501,"y":212,"cMask":["none"],"color":"000000","curve":-180},{"x":501,"y":208,"cMask":["none"],"color":"000000","curve":-180},{"x":501,"y":212,"cMask":["none"],"color":"000000","curve":-180},{"x":-499,"y":-214,"cMask":["none"],"color":"000000","curve":-180},{"x":-499,"y":-206,"cMask":["none"],"color":"000000","curve":-180},{"x":-499,"y":-212,"cMask":["none"],"color":"000000","curve":-180},{"x":-499,"y":-208,"cMask":["none"],"color":"000000","curve":-180},{"x":-499,"y":-212,"cMask":["none"],"color":"000000","curve":-180},{"x":-499,"y":-208,"cMask":["none"],"color":"000000","curve":-180},{"x":-497,"y":207,"cMask":["none"],"color":"000000","curve":-180},{"x":-497,"y":215,"cMask":["none"],"color":"000000","curve":-180},{"x":-497,"y":209,"cMask":["none"],"color":"000000","curve":-180},{"x":-497,"y":213,"cMask":["none"],"color":"000000","curve":-180},{"x":-497,"y":209,"cMask":["none"],"color":"000000","curve":-180},{"x":-497,"y":213,"cMask":["none"],"color":"000000","curve":-180},{"x":0,"y":-2,"cMask":["none"],"color":"818181","curve":-180},{"x":0,"y":6,"cMask":["none"],"color":"818181","curve":-180},{"x":0,"y":0,"cMask":["none"],"color":"818181","curve":-180},{"x":0,"y":4,"cMask":["none"],"color":"818181","curve":-180},{"x":0,"y":0,"cMask":["none"],"color":"818181","curve":-180},{"x":0,"y":4,"cMask":["none"],"color":"818181","curve":-180},{"x":-757,"y":-90,"cMask":["none"],"curve":180},{"x":-757,"y":110,"cMask":["none"],"curve":180},{"x":-757,"y":-107,"cMask":["none"],"curve":180,"color":"0850A2"},{"x":-757,"y":-107,"cMask":["none"],"curve":180,"color":"0850A2"},{"x":-757,"y":-107,"cMask":["none"],"curve":180,"color":"0850A2"},{"x":-757,"y":107,"cMask":["none"],"curve":180,"color":"0850A2"},{"x":-757,"y":-104,"cMask":["none"],"curve":180,"color":"0850A2"},{"x":-757,"y":104,"cMask":["none"],"curve":180,"color":"0850A2"},{"x":-757,"y":-101,"cMask":["none"],"curve":180,"color":"0850A2"},{"x":-757,"y":101,"cMask":["none"],"curve":180,"color":"0850A2"},{"x":-757,"y":-98,"cMask":["none"],"curve":180,"color":"0850A2"},{"x":-757,"y":98,"cMask":["none"],"curve":180,"color":"0850A2"},{"x":-757,"y":-95,"cMask":["none"],"curve":180,"color":"0850A2"},{"x":-757,"y":95,"cMask":["none"],"curve":180,"color":"0850A2"},{"x":-757,"y":-92,"cMask":["none"],"curve":180,"color":"0850A2"},{"x":-757,"y":92,"cMask":["none"],"curve":180,"color":"0850A2"},{"x":-757,"y":-89,"cMask":["none"],"curve":180,"color":"0850A2"},{"x":757,"y":101.536516602,"cMask":["none"],"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"x":757,"y":-100.463423548,"cMask":["none"],"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"x":757,"y":98.5365174904,"cMask":["none"],"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"x":757,"y":-97.4634244364,"cMask":["none"],"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"x":757,"y":95.5365183793,"cMask":["none"],"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"x":757,"y":-94.4634253253,"cMask":["none"],"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"x":757,"y":92.5365192682,"cMask":["none"],"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"x":757,"y":-91.4634262142,"cMask":["none"],"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"x":757,"y":103,"cMask":["none"],"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"x":757,"y":-103,"cMask":["none"],"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"x":757,"y":106,"cMask":["none"],"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"x":757,"y":-106,"cMask":["none"],"curve":180,"color":"0850A2","p0":[760,-90],"p1":[760,90]},{"x":757,"y":109,"cMask":["none"],"curve":180,"color":"000000","p0":[760,-90],"p1":[760,90]},{"x":757,"y":-109,"cMask":["none"],"curve":180,"color":"000000","p0":[760,-90],"p1":[760,90]},{"x":800,"y":-470,"bCoef":-1.2,"cMask":["ball"],"curve":0,"color":"818181","vis":true},{"x":1000,"y":-270,"bCoef":0.5,"cMask":["red","blue"],"curve":90,"color":"818181","vis":true},{"x":1000,"y":-270,"bCoef":0.5,"cMask":["red","blue"],"curve":0,"color":"818181","vis":true},{"x":1000,"y":270,"bCoef":0.5,"cMask":["red","blue"],"curve":0,"color":"818181","vis":true},{"x":800,"y":470,"bCoef":0.5,"cMask":["red","blue"],"curve":-90,"color":"818181","vis":true},{"x":1000,"y":270,"bCoef":0.5,"cMask":["red","blue"],"curve":-90,"color":"818181","vis":true},{"x":-800,"y":470,"bCoef":0.5,"cMask":["red","blue"],"color":"818181","curve":0,"vis":true},{"x":800,"y":470,"bCoef":0.5,"cMask":["red","blue"],"curve":0,"color":"818181","vis":true},{"x":-800,"y":470,"bCoef":0.5,"cMask":["red","blue"],"color":"818181","curve":-90,"vis":true},{"x":-1000,"y":270,"bCoef":0.5,"cMask":["red","blue"],"curve":-90,"color":"818181","vis":true},{"x":-1000,"y":-270,"bCoef":0,"cMask":["red","blue"],"curve":0},{"x":-800,"y":-470,"bCoef":0.5,"cMask":["blue"],"curve":-90,"color":"818181","vis":false},{"x":-1000,"y":-270,"bCoef":0.5,"cMask":["red","blue"],"curve":-90,"color":"818181","vis":true},{"x":-757,"y":97,"bCoef":0.7,"cMask":["red","blue"],"curve":0},{"x":-790,"y":97,"bCoef":0.7,"cMask":["red","blue"],"curve":-90,"color":"000000"},{"x":-757,"y":-97,"bCoef":0.7,"cMask":["red","blue"],"curve":0},{"x":-790,"y":-97,"bCoef":0.7,"cMask":["red","blue"],"curve":90,"color":"000000"},{"x":-810,"y":-70,"bCoef":0.7,"cMask":["red","blue"],"curve":0,"color":"000000"},{"x":-810,"y":70,"bCoef":0.7,"cMask":["red","blue"],"curve":-90,"color":"000000"},{"x":757,"y":-97,"bCoef":0.7,"cMask":["red","blue"],"p0":[760,-90],"p1":[760,90],"curve":0},{"x":790,"y":-97,"bCoef":0.7,"cMask":["red","blue"],"curve":-90,"color":"000000"},{"x":757,"y":97,"bCoef":0.7,"cMask":["red","blue"],"p0":[760,-90],"p1":[760,90],"curve":0},{"x":790,"y":97,"bCoef":0.7,"cMask":["red","blue"],"curve":90,"color":"000000"},{"x":810,"y":70,"bCoef":0.7,"cMask":["red","blue"],"curve":90,"color":"000000"},{"x":810,"y":-70,"bCoef":0.7,"cMask":["red","blue"],"curve":-90,"color":"000000"},{"x":230,"y":-470,"cMask":["none"],"color":"818181"},{"x":230,"y":470,"cMask":["none"],"color":"818181"},{"x":-757,"y":109,"cMask":["none"],"curve":-180,"color":"000000","p0":[760,-90],"p1":[760,90]},{"x":-757,"y":-109,"cMask":["none"],"curve":-180,"color":"000000","p0":[760,-90],"p1":[760,90]},{"x":-1000,"y":-270,"bCoef":0.5,"cMask":["red","blue"],"curve":0,"color":"818181","vis":true},{"x":-1000,"y":270,"bCoef":0.5,"cMask":["red","blue"],"curve":0,"color":"818181","vis":true},{"x":-800,"y":470,"cMask":["ball"]},{"x":800,"y":470,"cMask":["ball"]},{"x":799,"y":-470,"bCoef":0.5,"cMask":["red"],"curve":0,"color":"000000","vis":false},{"x":-750,"y":-470,"bCoef":0,"cMask":["red","blue"],"curve":0,"color":"818181","vis":true},{"x":750,"y":-470,"bCoef":0,"cMask":["red","blue"],"curve":0,"color":"818181","vis":true},{"x":-750,"y":-550,"bCoef":0,"cMask":["red","blue"],"vis":true},{"x":750,"y":-550,"bCoef":0,"cMask":["red","blue"],"vis":true},{"x":-750,"y":470,"bCoef":0,"cMask":["ball"]},{"x":-750,"y":550,"bCoef":0,"cMask":["ball"]},{"x":750,"y":470,"bCoef":0,"cMask":["ball"]},{"x":750,"y":550,"bCoef":0,"cMask":["ball"]},{"x":-1001,"y":64,"bCoef":0,"cMask":["red","blue"],"color":"818181","curve":90},{"x":-1042,"y":61,"bCoef":0,"cMask":["red","blue"],"color":"818181","curve":90},{"x":-1040,"y":-273,"bCoef":0,"cMask":["red","blue"],"curve":90,"color":"818181"},{"x":-796,"y":-505,"bCoef":0,"cMask":["wall"],"curve":0,"color":"818181"},{"x":-751,"y":-503,"bCoef":0,"cMask":["wall"],"curve":90,"color":"818181"},{"x":750,"y":-470,"bCoef":0,"cMask":["red","blue"],"curve":-90,"color":"818181","vis":true},{"x":751,"y":-503,"bCoef":0,"cMask":["red","blue"],"curve":-90,"color":"818181"},{"x":796,"y":-505,"bCoef":0,"cMask":["wall"],"curve":0,"color":"000000"},{"x":751,"y":-503,"bCoef":0,"cMask":["wall"],"curve":90,"color":"000000"},{"x":1040,"y":-273,"bCoef":0,"cMask":["red","blue"],"curve":-90,"color":"818181"},{"x":796,"y":-505,"bCoef":0,"cMask":["red","blue"],"curve":-90,"color":"818181"},{"x":1042,"y":61,"bCoef":0,"cMask":["red","blue"],"color":"818181","curve":90},{"x":1040,"y":-273,"bCoef":0,"cMask":["red","blue"],"curve":90,"color":"818181"},{"x":1001,"y":64,"bCoef":0,"cMask":["red","blue"],"color":"818181","curve":-90},{"x":1042,"y":61,"bCoef":0,"cMask":["red","blue"],"color":"818181","curve":-90},{"x":-744,"y":-475,"bCoef":-0.6,"cMask":["ball"],"curve":97,"color":"EEDD82"},{"x":743,"y":-474,"bCoef":-0.6,"cMask":["ball"],"curve":-95,"color":"818181"},{"x":-800,"y":475,"bCoef":-0.6,"cMask":["ball"],"curve":90,"color":"818181"},{"x":800,"y":475,"bCoef":-0.6,"cMask":["ball"],"color":"818181"},{"x":-1007,"y":267,"bCoef":-0.6,"cMask":["ball"],"curve":0,"color":"818181"},{"x":800,"y":475,"bCoef":-0.6,"cMask":["ball"],"curve":-90,"color":"818181"},{"x":1007,"y":267,"bCoef":-0.6,"cMask":["ball"],"curve":0,"color":"818181"},{"x":-1007,"y":68,"bCoef":-0.6,"cMask":["ball"],"curve":0,"color":"818181"},{"x":1007,"y":68,"bCoef":-0.6,"cMask":["ball"],"curve":0,"color":"818181"},{"x":1007,"y":-266},{"x":1007,"y":-68},{"x":-1006,"y":-271,"bCoef":-0.6,"cMask":["ball"],"curve":97,"color":"EEDD82"},{"x":1006,"y":-271,"bCoef":-0.6,"cMask":["ball"],"curve":-95,"color":"818181"},{"x":-745,"y":478},{"x":745,"y":478},{"x":-15,"y":-485,"cMask":["ball"],"color":"818181"},{"x":15,"y":-485,"cMask":["ball"],"color":"818181"},{"x":-20,"y":485,"cMask":["ball"]},{"x":20,"y":485,"cMask":["ball"]},{"x":-25,"y":-485,"cMask":["ball"],"color":"818181"},{"x":25,"y":-485,"cMask":["ball"],"color":"818181"},{"x":-29,"y":483,"cMask":["ball"]},{"x":29,"y":483,"cMask":["ball"]},{"x":-55,"y":-485,"cMask":["ball"],"color":"818181"},{"x":55,"y":-485,"cMask":["ball"],"color":"818181"},{"x":-57,"y":483,"cMask":["ball"]},{"x":57,"y":483,"cMask":["ball"]},{"x":-55,"y":-525,"cMask":["ball"],"color":"818181"},{"x":-25,"y":-525,"cMask":["ball"],"color":"818181"},{"x":-15,"y":-525,"cMask":["ball"],"color":"818181"},{"x":15,"y":-525,"cMask":["ball"],"color":"818181"},{"x":25,"y":-525,"cMask":["ball"],"color":"818181"},{"x":15,"y":-505,"cMask":["ball"],"color":"818181"},{"x":-15,"y":-505,"cMask":["ball"],"color":"818181"},{"x":65,"y":-485,"cMask":["ball"],"color":"000000","curve":0},{"x":65,"y":-515,"cMask":["ball"],"color":"000000","curve":220},{"x":65,"y":-500,"cMask":["ball"],"color":"000000","curve":0},{"x":90,"y":-485,"cMask":["ball"],"color":"000000","curve":260},{"x":90,"y":-515,"cMask":["ball"],"color":"000000","curve":220},{"x":90,"y":-500,"cMask":["ball"],"color":"000000","curve":260},{"x":115,"y":-485,"cMask":["ball"],"color":"000000","curve":260},{"x":115,"y":-515,"cMask":["ball"],"color":"000000","curve":220},{"x":115,"y":-500,"cMask":["ball"],"color":"000000","curve":25},{"x":125,"y":-485,"cMask":["ball"],"color":"000000","curve":25},{"x":85,"y":-485,"cMask":["ball"],"color":"000000","curve":0},{"x":110,"y":-485,"cMask":["ball"],"color":"000000","curve":260},{"x":110,"y":-500,"cMask":["ball"],"color":"000000","curve":260},{"x":110,"y":-515,"cMask":["ball"],"color":"000000","curve":220},{"x":85,"y":-500,"cMask":["ball"],"color":"000000","curve":0},{"x":90,"y":-485,"cMask":["ball"],"color":"000000","curve":0},{"x":91,"y":-516,"cMask":["ball"],"color":"000000","curve":220},{"x":90,"y":-500,"cMask":["ball"],"color":"000000","curve":0},{"x":115,"y":-485,"cMask":["ball"],"color":"000000","curve":260},{"x":115,"y":-515,"cMask":["ball"],"color":"000000","curve":220},{"x":115,"y":-500,"cMask":["ball"],"color":"000000","curve":260},{"x":110,"y":-485,"cMask":["ball"],"color":"000000","curve":0},{"x":110,"y":-500,"cMask":["ball"],"color":"000000","curve":0},{"x":135,"y":-515,"cMask":["ball"]},{"x":135,"y":-485,"cMask":["ball"],"color":"000000","curve":260}],"segments":[{"v0":2,"v1":3,"vis":false,"color":"FF0000","bCoef":-1.2,"cMask":["ball"]},{"v0":4,"v1":5,"curve":0,"vis":false,"color":"FF0000","bCoef":-1.2,"cMask":["ball"],"x":-1000},{"v0":6,"v1":7,"vis":false,"color":"FF0000","bCoef":-1.2,"cMask":["ball"]},{"v0":0,"v1":4,"curve":-90,"vis":false,"color":"FF0000","bCoef":-1.2,"cMask":["ball"]},{"v0":5,"v1":2,"curve":-90,"vis":false,"color":"FF0000","bCoef":-1.2,"cMask":["ball"]},{"v0":3,"v1":7,"curve":-90,"vis":false,"color":"FF0000","bCoef":-1.2,"cMask":["ball"]},{"v0":1,"v1":6,"curve":90,"vis":false,"color":"FF0000","bCoef":-1.2,"cMask":["ball"]},{"v0":8,"v1":9,"vis":true,"bCoef":-0.7,"cMask":["ball"],"y":97},{"v0":10,"v1":11,"vis":true,"bCoef":-0.7,"cMask":["ball"],"y":-97},{"v0":12,"v1":13,"vis":true,"color":"000000","bCoef":-0.7,"cMask":["ball"]},{"v0":13,"v1":9,"curve":-90,"vis":true,"color":"000000","bCoef":-0.7,"cMask":["ball"]},{"v0":12,"v1":11,"curve":90,"vis":true,"color":"000000","bCoef":-0.7,"cMask":["ball"]},{"v0":14,"v1":15,"curve":0,"vis":true,"color":"000000","cMask":["none"]},{"v0":16,"v1":17,"vis":true,"bCoef":-0.7,"cMask":["ball"],"y":-97},{"v0":18,"v1":19,"vis":true,"bCoef":-0.7,"cMask":["ball"],"y":97},{"v0":20,"v1":21,"vis":true,"color":"000000","bCoef":-0.7,"cMask":["ball"],"x":810},{"v0":21,"v1":17,"curve":-90,"vis":true,"color":"000000","bCoef":-0.7,"cMask":["ball"]},{"v0":20,"v1":19,"curve":90,"vis":true,"color":"000000","bCoef":-0.7,"cMask":["ball"]},{"v0":22,"v1":23,"curve":0,"vis":true,"color":"000000","cMask":["none"],"x":760},{"v0":24,"v1":25,"curve":0,"vis":true,"color":"000000","cMask":["none"],"x":0},{"v0":26,"v1":27,"curve":0,"vis":true,"color":"818181","cMask":["none"],"x":-230},{"v0":28,"v1":29,"curve":-180,"vis":true,"color":"818181","cMask":["none"],"x":-230},{"v0":28,"v1":29,"curve":180,"vis":true,"color":"818181","cMask":["none"]},{"v0":30,"v1":31,"curve":-180,"vis":true,"color":"000000","cMask":["none"],"x":-230},{"v0":30,"v1":31,"curve":180,"vis":true,"color":"000000","cMask":["none"]},{"v0":32,"v1":33,"curve":-180,"vis":true,"color":"000000","cMask":["none"],"x":-230},{"v0":32,"v1":33,"curve":180,"vis":true,"color":"000000","cMask":["none"]},{"v0":34,"v1":35,"curve":-180,"vis":true,"color":"000000","cMask":["none"],"x":-230},{"v0":34,"v1":35,"curve":180,"vis":true,"color":"000000","cMask":["none"]},{"v0":36,"v1":37,"curve":-180,"vis":true,"color":"000000","cMask":["none"],"x":-230},{"v0":36,"v1":37,"curve":180,"vis":true,"color":"000000","cMask":["none"]},{"v0":38,"v1":39,"curve":-180,"vis":true,"color":"000000","cMask":["none"],"x":-230},{"v0":38,"v1":39,"curve":180,"vis":true,"color":"000000","cMask":["none"]},{"v0":40,"v1":41,"curve":-180,"vis":true,"color":"000000","cMask":["none"],"x":-230},{"v0":40,"v1":41,"curve":180,"vis":true,"color":"000000","cMask":["none"]},{"v0":42,"v1":43,"curve":-180,"vis":true,"color":"000000","cMask":["none"],"x":-230},{"v0":42,"v1":43,"curve":180,"vis":true,"color":"000000","cMask":["none"]},{"v0":44,"v1":45,"curve":-180,"vis":true,"color":"000000","cMask":["none"],"x":-230},{"v0":44,"v1":45,"curve":180,"vis":true,"color":"000000","cMask":["none"]},{"v0":46,"v1":47,"curve":-180,"vis":true,"color":"000000","cMask":["none"],"x":-230},{"v0":46,"v1":47,"curve":180,"vis":true,"color":"000000","cMask":["none"]},{"v0":48,"v1":49,"curve":-180,"vis":true,"color":"000000","cMask":["none"],"x":-230},{"v0":48,"v1":49,"curve":180,"vis":true,"color":"000000","cMask":["none"]},{"v0":50,"v1":51,"curve":-180,"vis":true,"color":"000000","cMask":["none"],"x":-230},{"v0":50,"v1":51,"curve":180,"vis":true,"color":"000000","cMask":["none"]},{"v0":52,"v1":53,"curve":-180,"vis":true,"color":"000000","cMask":["none"],"x":-230},{"v0":52,"v1":53,"curve":180,"vis":true,"color":"000000","cMask":["none"]},{"v0":54,"v1":55,"curve":-180,"vis":true,"color":"000000","cMask":["none"],"x":-230},{"v0":54,"v1":55,"curve":180,"vis":true,"color":"000000","cMask":["none"]},{"v0":56,"v1":57,"curve":-180,"vis":true,"color":"000000","cMask":["none"],"x":-230},{"v0":56,"v1":57,"curve":180,"vis":true,"color":"000000","cMask":["none"]},{"v0":58,"v1":59,"curve":-180,"vis":true,"color":"000000","cMask":["none"],"x":-230},{"v0":58,"v1":59,"curve":180,"vis":true,"color":"000000","cMask":["none"]},{"v0":60,"v1":61,"curve":-180,"vis":true,"color":"000000","cMask":["none"],"x":-230},{"v0":60,"v1":61,"curve":180,"vis":true,"color":"000000","cMask":["none"]},{"v0":62,"v1":63,"curve":-180,"vis":true,"color":"818181","cMask":["none"],"x":0},{"v0":62,"v1":63,"curve":180,"vis":true,"color":"818181","cMask":["none"],"x":0},{"v0":64,"v1":65,"curve":-180,"vis":true,"color":"818181","cMask":["none"],"x":0},{"v0":64,"v1":65,"curve":180,"vis":true,"color":"818181","cMask":["none"],"x":0},{"v0":66,"v1":67,"curve":-180,"vis":true,"color":"818181","cMask":["none"],"x":0},{"v0":66,"v1":67,"curve":180,"vis":true,"color":"818181","cMask":["none"],"x":0},{"v0":97,"v1":98,"curve":180,"vis":true,"color":"000000","cMask":["none"],"x":757,"p0":[760,-90],"p1":[760,90]},{"v0":99,"v1":100,"curve":90,"vis":true,"color":"818181","bCoef":0.5,"cMask":["red","blue"]},{"v0":101,"v1":102,"curve":0,"vis":true,"color":"818181","bCoef":0.5,"cMask":["red","blue"]},{"v0":103,"v1":104,"curve":-90,"vis":true,"color":"818181","bCoef":0.5,"cMask":["red","blue"]},{"v0":105,"v1":106,"curve":0,"vis":true,"color":"818181","bCoef":0.5,"cMask":["red","blue"]},{"v0":108,"v1":107,"curve":-90,"vis":true,"color":"818181","bCoef":0.5,"cMask":["red","blue"]},{"v0":110,"v1":111,"curve":-90,"vis":true,"color":"818181","bCoef":0.5,"cMask":["red","blue"]},{"v0":112,"v1":113,"curve":0,"vis":true,"bCoef":0,"cMask":["red","blue"],"y":97},{"v0":114,"v1":115,"curve":0,"vis":true,"bCoef":0,"cMask":["red","blue"],"y":-97},{"v0":116,"v1":117,"curve":0,"vis":true,"color":"000000","bCoef":0,"cMask":["red","blue"]},{"v0":117,"v1":113,"curve":-90,"vis":true,"color":"000000","bCoef":0,"cMask":["red","blue"]},{"v0":116,"v1":115,"curve":90,"vis":true,"color":"000000","bCoef":0.7,"cMask":["red","blue"]},{"v0":118,"v1":119,"curve":0,"vis":true,"bCoef":0,"cMask":["red","blue"],"y":-97},{"v0":120,"v1":121,"curve":0,"vis":true,"bCoef":0,"cMask":["red","blue"],"y":97},{"v0":122,"v1":123,"curve":0,"vis":true,"color":"000000","bCoef":0,"cMask":["red","blue"],"x":810},{"v0":123,"v1":119,"curve":-90,"vis":true,"color":"000000","bCoef":0,"cMask":["red","blue"]},{"v0":122,"v1":121,"curve":90,"vis":true,"color":"000000","bCoef":0.7,"cMask":["red","blue"]},{"v0":124,"v1":125,"curve":0,"vis":true,"color":"818181","cMask":["none"],"x":230},{"v0":126,"v1":127,"curve":-180,"vis":true,"color":"000000","cMask":["none"],"x":-757,"p0":[760,-90],"p1":[760,90]},{"v0":128,"v1":129,"curve":0,"vis":true,"color":"818181","bCoef":0.5,"cMask":["red","blue"],"x":-1000},{"v0":107,"v1":130,"vis":false,"color":"FF0000","cMask":["ball"]},{"v0":106,"v1":131,"vis":false,"color":"FF0000","cMask":["ball"]},{"v0":0,"v1":99,"curve":0,"vis":false,"color":"FF0000","bCoef":-1.2,"cMask":["ball"]},{"v0":133,"v1":134,"curve":0,"vis":true,"color":"818181","bCoef":0.5,"cMask":["red","blue"]},{"v0":134,"v1":132,"curve":0,"vis":true,"color":"000000","bCoef":0.5,"cMask":["red"]},{"v0":110,"v1":133,"curve":0,"vis":true,"color":"000000","bCoef":0.5,"cMask":["blue"]},{"v0":141,"v1":142,"curve":90,"vis":true,"color":"818181","bCoef":0,"cMask":["red","blue"]},{"v0":142,"v1":143,"vis":true,"color":"818181","bCoef":0,"cMask":["red","blue"]},{"v0":143,"v1":144,"curve":90,"vis":true,"color":"818181","bCoef":0,"cMask":["red","blue"]},{"v0":144,"v1":145,"curve":0,"vis":true,"color":"000000","bCoef":0,"cMask":["wall"]},{"v0":145,"v1":133,"curve":90,"vis":true,"color":"818181","bCoef":0,"cMask":["red","blue"]},{"v0":147,"v1":146,"curve":-90,"vis":true,"color":"818181","bCoef":0,"cMask":["red","blue"]},{"v0":148,"v1":149,"curve":0,"vis":true,"color":"000000","bCoef":0,"cMask":["wall"]},{"v0":150,"v1":151,"curve":-90,"vis":true,"color":"818181","bCoef":0,"cMask":["red","blue"]},{"v0":152,"v1":153,"vis":true,"color":"818181","bCoef":0,"cMask":["red","blue"]},{"v0":154,"v1":155,"curve":-90,"vis":true,"color":"818181","bCoef":0,"cMask":["red","blue"]},{"v0":156,"v1":157,"vis":true,"color":"818181","bCoef":-0.6,"cMask":["ball"]},{"v0":158,"v1":159,"vis":true,"color":"818181","bCoef":-0.6,"cMask":["ball"]},{"v0":158,"v1":160,"curve":90,"vis":true,"color":"818181","bCoef":-0.6,"cMask":["ball"]},{"v0":161,"v1":162,"curve":-90,"vis":true,"color":"818181","bCoef":-0.6,"cMask":["ball"]},{"v0":160,"v1":163,"curve":0,"vis":true,"color":"818181","bCoef":-0.6,"cMask":["ball"]},{"v0":162,"v1":164,"curve":0,"vis":true,"color":"818181","bCoef":-0.6,"cMask":["ball"]},{"v0":163,"v1":167,"curve":0,"vis":false,"color":"006400","bCoef":-0.6,"cMask":["ball"]},{"v0":164,"v1":168,"curve":0,"vis":false,"color":"006400","bCoef":-0.6,"cMask":["ball"]},{"v0":167,"v1":156,"curve":97,"vis":false,"color":"EEDD82","bCoef":-0.6,"cMask":["ball"]},{"v0":168,"v1":157,"curve":-95,"vis":false,"color":"818181","bCoef":-0.6,"cMask":["ball"]},{"v0":183,"v1":179,"curve":0,"vis":true,"color":"818181"},{"v0":183,"v1":175,"curve":0,"vis":true,"color":"818181"},{"v0":175,"v1":184,"curve":0,"vis":true,"color":"818181"},{"v0":185,"v1":171,"curve":0,"vis":true,"color":"818181","cMask":["ball"]},{"v0":186,"v1":172,"curve":0,"vis":true,"color":"818181","cMask":["ball"]},{"v0":176,"v1":180,"curve":0,"vis":true,"color":"818181","cMask":["ball"]},{"v0":189,"v1":188,"curve":0,"vis":true,"color":"818181","cMask":["ball"]},{"v0":187,"v1":176,"curve":0,"vis":true,"color":"818181","cMask":["ball"]},{"v0":197,"v1":196,"curve":0,"vis":true,"color":"000000","x":115},{"v0":207,"v1":212,"curve":220,"vis":true,"color":"000000","cMask":["ball"]},{"v0":207,"v1":205,"curve":0,"vis":true,"color":"000000","cMask":["ball"]},{"v0":212,"v1":211,"curve":0,"vis":true,"color":"000000","cMask":["ball"]},{"v0":207,"v1":212,"curve":0,"vis":true,"color":"000000","cMask":["ball"]},{"v0":191,"v1":190,"vis":true,"color":"000000","cMask":["ball"]},{"v0":190,"v1":200,"vis":true,"color":"000000","cMask":["ball"]},{"v0":210,"v1":213,"vis":true,"color":"000000","cMask":["ball"]},{"v0":210,"v1":214,"vis":true,"color":"000000","cMask":["ball"]}],"goals":[{"p0":[-760,95],"p1":[-760,-95],"team":"red","cMask":["ball"],"bCoef":1,"x":-757},{"p0":[760,97],"p1":[760,-97],"team":"blue","cMask":["ball"],"bCoef":1}],"discs":[{"radius":6,"invMass":0,"pos":[-760,-97],"color":"C0C0C0","bCoef":-0.7,"cMask":["ball"],"x":-757},{"radius":6,"invMass":0,"pos":[-760,97],"color":"C0C0C0","bCoef":-0.7,"cMask":["ball"],"x":-757},{"radius":6,"invMass":0,"pos":[760,97],"color":"C0C0C0","bCoef":-0.7,"cMask":["ball"]},{"radius":6,"invMass":0,"pos":[760,-97],"color":"C0C0C0","bCoef":-0.7,"cMask":["ball"]},{"radius":6,"invMass":0,"pos":[-760,-97],"color":"C0C0C0","bCoef":0.7,"cMask":["red","blue"],"x":-757},{"radius":6,"invMass":0,"pos":[-760,97],"color":"C0C0C0","bCoef":0.7,"cMask":["red","blue"],"x":-757},{"radius":6,"invMass":0,"pos":[760,97],"color":"C0C0C0","bCoef":0.7,"cMask":["red","blue"]},{"radius":6,"invMass":0,"pos":[760,-97],"color":"C0C0C0","bCoef":0.7,"cMask":["red","blue"]}],"planes":[{"normal":[0,1],"dist":-473,"bCoef":-1.2,"cMask":["ball"],"color":"EEDD82","_data":{"extremes":{"normal":[0,1],"dist":-473,"canvas_rect":[-1042,-550,1042,732],"a":[-1042,-473],"b":[1042,-473]}}},{"normal":[0,-1],"dist":-472,"bCoef":-1.2,"cMask":["ball"],"color":"EEDD82","_data":{"extremes":{"normal":[0,-1],"dist":-472,"canvas_rect":[-1042,-550,1042,732],"a":[-1042,472],"b":[1042,472]}}},{"normal":[0,-1],"dist":-549,"bCoef":-0.6,"cMask":["ball"],"_data":{"extremes":{"normal":[0,-1],"dist":-549,"canvas_rect":[-1042,-550,1042,732],"a":[-1042,549],"b":[1042,549]}}},{"normal":[0,1],"dist":-547,"bCoef":-0.6,"cMask":["ball"],"_data":{"extremes":{"normal":[0,1],"dist":-547,"canvas_rect":[-1042,-550,1042,732],"a":[-1042,-547],"b":[1042,-547]}}},{"normal":[0.99990162134,-0.0140266760509],"dist":-998.098191562,"bCoef":-1.2,"cMask":["ball"],"color":"EEDD82","_data":{"extremes":{"normal":[0.99990162134,-0.0140266760509],"dist":-998.098191562,"canvas_rect":[-1042,-550,1042,732],"a":[-1005.911823646983,-550],"b":[-987.9278557110621,732]}}},{"normal":[-1,0],"dist":-1039,"bCoef":-0.6,"cMask":["ball"],"_data":{"extremes":{"normal":[-1,0],"dist":-1039,"canvas_rect":[-1042,-550,1042,732],"a":[1039,-550],"b":[1039,732]}}},{"normal":[1,0],"dist":-1039,"bCoef":-0.6,"cMask":["ball"],"_data":{"extremes":{"normal":[1,0],"dist":-1039,"canvas_rect":[-1042,-550,1042,732],"a":[-1039,-550],"b":[-1039,732]}}},{"normal":[-1,0],"dist":-1001,"bCoef":-1.2,"cMask":["ball"],"color":"EEDD82","_data":{"extremes":{"normal":[-1,0],"dist":-1001,"canvas_rect":[-1042,-550,1042,732],"a":[1001,-550],"b":[1001,732]}}},{"normal":[0.5,0.5],"dist":-960,"cMask":["ball"],"_data":{"extremes":{"normal":[0.5,0.5],"dist":-960,"canvas_rect":[-1042,-550,1042,732],"a":[-1042,-315.64501987817135],"b":[-807.6450198781714,-550]}}},{"normal":[-0.5,0.5],"dist":-960,"cMask":["ball"],"_data":{"extremes":{"normal":[-0.5,0.5],"dist":-960,"canvas_rect":[-1042,-550,1042,732],"a":[1042,-315.64501987817135],"b":[807.6450198781714,-550]}}},{"normal":[-0.5,-0.5],"dist":-960,"cMask":["ball"],"_data":{"extremes":{"normal":[-0.5,-0.5],"dist":-960,"canvas_rect":[-1042,-550,1042,732],"a":[1042,315.64501987817135],"b":[625.6450198781713,732]}}},{"normal":[0.5,-0.5],"dist":-960,"cMask":["ball"],"_data":{"extremes":{"normal":[0.5,-0.5],"dist":-960,"canvas_rect":[-1042,-550,1042,732],"a":[-1042,315.64501987817135],"b":[-625.6450198781713,732]}}}],"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"]}},"ballPhysics":{"color":"000000","radius":6.5,"damping":0.996,"invMass":1.5,"bCoef":-0.5},"playerPhysics":{"damping":0.982,"kickStrength":3.5,"kickingDamping":0.974,"kickingAcceleration":0.069,"bCoef":1,"acceleration":0.079},"canBeStored":false}` //Your map added here.

var _Hockey = {ID: 2, Name: JSON.parse(Hockey).name};

var Maps = [LineUp,Hockey];
var _Maps = [_LineUp,_Hockey];

var _Map = {ID: 0, Name: undefined};

var markedZones = [{x:-760,y:0},{x:760,y:0}];
var penaltyPoints = [{x:-700,y:0},{x:700,y:0}];
var penaltyShooterPoints = [{x:-661,y:0},{x:661,y:0}];

var borders = {MinX: -760, MaxX: 760, MinY: -470, MaxY: 470};

var red_GK_pos = {"x": -405, "y": 0, avatar: "GK", avatarSet: false, position: "GK", playerid: 0, toSet: {x: -700, y: 0}}; //Do not forget to change these x's and y's according to your map. They were gathered from my own lineup map.
var red_DF_pos = {"x": -333, "y": -90, avatar: "DF", avatarSet: false, position: "DF", playerid: 0, toSet: {x: -550, y: 0}};
var red_MF_pos = {"x": -261, "y": 90, avatar: "MF", avatarSet: false, position: "MF", playerid: 0, toSet: {x: -400, y: 0}};
var red_FW_pos = {"x": -189, "y": -45, avatar: "FW", avatarSet: false, position: "FW", playerid: 0, toSet: {x: -250, y: 0}};

var blue_GK_pos = {"x": 405, "y": 0, avatar: "GK", avatarSet: false, position: "GK", playerid: 0, toSet: {x: 700, y: 0}};
var blue_DF_pos = {"x": 333, "y": -90, avatar: "DF", avatarSet: false, position: "DF", playerid: 0, toSet: {x: 550, y: 0}};
var blue_MF_pos = {"x": 261, "y": 90, avatar: "MF", avatarSet: false, position: "MF", playerid: 0, toSet: {x: 400, y: 0}};
var blue_FW_pos = {"x": 189, "y": -45, avatar: "FW", avatarSet: false, position: "FW", playerid: 0, toSet: {x: 250, y: 0}};

var redPositions = [red_GK_pos, red_DF_pos, red_MF_pos, red_FW_pos];
var bluePositions = [blue_GK_pos, blue_DF_pos, blue_MF_pos, blue_FW_pos];
var teamPositions = [redPositions,bluePositions];
var shooterPositions = ["DF","MF","FW"];

var teams = ["spectators","red","blue"];

var colors = {mapChangeWrongName: 0xFFFF00, mapChangeDeny: 0xFF0000, penalty: 0xFFFF00, playerLeft: 0xFFFF00, positionSet: 0xFFFFFF};
var fonts = {mapChangeWrongName: "normal", mapChangeDeny: "bold", penalty: "bold", playerLeft: "normal", positionSet: "normal"};
var sounds = {mapChangeWrongName: 1, mapChangeDeny: 2, penalty: 0, playerLeft: 1, positionSet: 1};

var timeoutObject = {gameStart: 2000, penalty: 1000};
var gameObject = {lastPlayerTouched: undefined, previousPlayerTouched: undefined, assistingTouch: undefined, lastTeamTouched: 0, pauseState: false, tolerance: 109, triggerDistance: 25.01};

var playerList = {};

var room = HBInit({roomName:"TEST",noPlayer:true,public:true,maxPlayers:12});

function checkForViolation(){
    var players = room.getPlayerList().filter(p => room.getPlayerDiscProperties(p.id) != null && playerList[p.name].avatar == "GK");

    players.forEach(p => {
	if(ifInsidePitch(p) == true){
	    if(gameObject.tolerance - room.getPlayerDiscProperties(p.id).radius < pointDistance(room.getPlayerDiscProperties(p.id),markedZones[p.team-1])){
		if(gameObject.lastPlayerTouched != undefined && gameObject.lastPlayerTouched.team != p.team){
		    if(gameObject.pauseState == false){
			room.sendAnnouncement(`${p.name} has violated the zone, it is a PENALTY!`,null,colors.penalty,fonts.penalty,sounds.penalty);
			room.pauseGame(true);
		    }

		    var team = p.team;
		    var rival = p.team == 1 ? 2 : 1;
		    var shooter = room.getPlayerList().filter(x => x.team == rival && shooterPositions.includes(playerList[x.name].avatar) == true)[0]; //FW of the rival team uses the penalty kick.
		    var gkid = p.id;
		    var shooterid = shooter.id;
		    var shootername = shooter.name;

		    setTimeout(function(){
			if(gameObject.pauseState == true){
			    room.setDiscProperties(0,{x: penaltyPoints[team-1].x, y: penaltyPoints[team-1].y, xspeed: 0, yspeed: 0});
			    room.setPlayerDiscProperties(gkid,{x: markedZones[team-1].x, y: markedZones[team-1].y, xspeed: 0, yspeed: 0});
			    room.setPlayerDiscProperties(shooterid,{x: penaltyShooterPoints[team-1].x, y: penaltyShooterPoints[team-1].y, xspeed: 0, yspeed: 0});
			    room.sendAnnouncement(`${shootername} is going to use the penalty...`,null,colors.penalty,fonts.penalty,sounds.penalty); //The rest is your homework: Penalty kick check, freezing the goalkeeper before the rival shoots etc.
			    room.pauseGame(false);
			}
		    },timeoutObject.penalty);
		}
	    }
	}
    });
}

function checkPlayerSits(){
    var players = room.getPlayerList().filter(p => room.getPlayerDiscProperties(p.id) != null);
    var fullRedPos = redPositions.filter(r => r.avatarSet == true && r.playerid != 0);
    var fullBluePos = bluePositions.filter(b => b.avatarSet == true && b.playerid != 0);

    if(_Map.ID == 1){
	players.forEach(p => {
	    var index = teamPositions[p.team-1].findIndex(t => pointDistance({x: t.x, y: t.y},room.getPlayerDiscProperties(p.id)) == 0 && t.avatarSet == false && t.playerid == 0);
	    if(index !== -1){
		teamPositions[p.team-1][index].avatarSet = true;
		teamPositions[p.team-1][index].playerid = p.id;
		room.setPlayerAvatar(p.id,teamPositions[p.team-1][index].avatar);
		playerList[p.name].avatar = teamPositions[p.team-1][index].avatar;
		playerList[p.name].toSet.x = teamPositions[p.team-1][index].toSet.x;
		playerList[p.name].toSet.y = teamPositions[p.team-1][index].toSet.y;
		room.sendAnnouncement(`Your position set as ${teamPositions[p.team-1][index].position} please wait for the others to sit.`,p.id,colors.positionSet,fonts.positionSet,sounds.positionSet);
	    }
	    if(fullRedPos != undefined && fullBluePos != undefined && fullRedPos.length == redPositions.length && fullBluePos.length == bluePositions.length){
		room.stopGame();
		var name = p.name;
		var id = p.id;
		setTimeout(function(){
		    room.setCustomStadium(Hockey);
		    room.startGame();
		    room.setPlayerDiscProperties(id,{x: playerList[name].toSet.x, y: playerList[name].toSet.y, xspeed: 0, yspeed: 0});
		},timeoutObject.gameStart);
	    }
	});
    }
}

function getLastTouchTheBall(){
    var ballPosition = room.getDiscProperties(0);
    var players = room.getPlayerList();
    for(var i=0; i<players.length; i++){
        if(players[i].position != null){
            var distanceToBall = pointDistance(players[i].position,ballPosition);
            if(distanceToBall < gameObject.triggerDistance){
                if(gameObject.lastPlayerTouched!=players[i]){
                    if(gameObject.lastTeamTouched==players[i].team){
                        gameObject.assistingTouch = gameObject.lastPlayerTouched;
                    }
		    else gameObject.assistingTouch = undefined;
                }
                gameObject.lastTeamTouched = players[i].team;
                gameObject.previousPlayerTouched = gameObject.lastPlayerTouched;
                gameObject.lastPlayerTouched = players[i];
            }
        }
    }
    return gameObject.lastPlayerTouched;
}

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

function lineUpAuto(){
    var players = room.getPlayerList().filter(p => room.getPlayerDiscProperties(p.id) != null && playerList[p.name].avatar == 0);

    if(_Map.ID == 1){
	players.forEach(p => {
	    var index = room.getPlayerList().filter(x => x.team == p.team).findIndex(x => x.id == p.id);

	    if(index !== -1){
		room.setPlayerDiscProperties(p.id,{x: teamPositions[p.team-1][index].x, y: teamPositions[p.team-1][index].y, xspeed: 0, yspeed: 0});
	    }
	    else{
		console.log("Something went wrong in auto line up.");
	    }
	});
    }
}

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

function resetPlayerAvatars(){
    room.getPlayerList().forEach(p => {
	room.setPlayerAvatar(p.id);
	playerList[p.name].avatar = 0;
    });
}

function resetPlayerSetPositions(){
    room.getPlayerList().forEach(p => {
	room.setPlayerAvatar(p.id);
	playerList[p.name].toSet.x = 0;
	playerList[p.name].toSet.y = 0;
    });
}

function resetPositions(){
    for(var t in teamPositions){
	teamPositions[t].forEach(p => {
	    p.avatarSet = false;
	    p.playerid = 0;
	});
    }
}

room.onGamePause = function(byPlayer){
    byPlayer == null ? console.log(`Game paused`) : console.log(`Game paused by ${byPlayer.name}`);
    gameObject.pauseState = !gameObject.pauseState;
}

room.onGameStart = function(byPlayer){
    byPlayer == null ? console.log(`Game started`) : console.log(`Game started by ${byPlayer.name}`);
    if(gameObject.lastPlayerTouched != undefined || gameObject.previousPlayerTouched != undefined || gameObject.assistingTouch != undefined || gameObject.lastTeamTouched != 0){
	gameObject.lastPlayerTouched = undefined;
	gameObject.previousPlayerTouched = undefined;
	gameObject.assistingTouch = undefined;
	gameObject.lastTeamTouched = 0;
    }

    if(_Map.ID == 1){
	resetPlayerAvatars();
	resetPlayerSetPositions();
	resetPositions();
	lineUpAuto();
    }
}

room.onGameStop = function(byPlayer){
    byPlayer == null ? console.log(`Game stopped`) : console.log(`Game stopped by ${byPlayer.name}`);
}

room.onGameTick = function(){
    if(_Map.ID == 2){
	checkForViolation();
	getLastTouchTheBall();
    }
    checkPlayerSits();
}

room.onGameUnpause = function(byPlayer){
    byPlayer == null ? console.log(`Game unpaused`) : console.log(`Game unpaused by ${byPlayer.name}`);
    gameObject.pauseState = !gameObject.pauseState;
}

room.onPlayerBallKick = function(player){
    if(gameObject.lastPlayerTouched == undefined || (gameObject.lastPlayerTouched != undefined && gameObject.lastPlayerTouched.id != player.id)) gameObject.lastPlayerTouched = player;
}

room.onPlayerJoin = function(player){
    console.log(`${player.name} has joined`);
    if(playerList[player.name] == undefined) playerList[player.name] = {name: player.name, auth: player.auth, conn: player.conn, id: player.id, avatar: 0, toSet: {x:0,y:0}};
}

room.onPlayerLeave = function(player){
    console.log(`${player.name} has left`);
    if(_Map.ID == 2){
	room.sendAnnouncement(`${player.name} from ${teams[player.team]} with number ${playerList[player.name].avatar} has left the room`,null,colors.playerLeft,fonts.playerLeft,sounds.playerLeft);

	if(player.team != 0){
	    var index = teamPositions[player.team-1].findIndex(t => t.playerid == player.id);

	    if(index !== -1){
		teamPositions[player.team-1][index].playerid = 0;
	    }
	}
    }
}

room.onPositionsReset = function(){
    console.log("Positions reset");
    var players = room.getPlayerList().filter(p => room.getPlayerDiscProperties(p.id) != null);

    if(gameObject.lastPlayerTouched != undefined || gameObject.previousPlayerTouched != undefined || gameObject.assistingTouch != undefined || gameObject.lastTeamTouched != 0){
	gameObject.lastPlayerTouched = undefined;
	gameObject.previousPlayerTouched = undefined;
	gameObject.assistingTouch = undefined;
	gameObject.lastTeamTouched = 0;
    }

    players.forEach(p => {
	room.setPlayerDiscProperties(p.id,{x: playerList[p.name].toSet.x, y: playerList[p.name].toSet.y, xspeed: 0, yspeed: 0});
    });
}

room.onStadiumChange = function(newStadiumName,byPlayer){
    byPlayer == null ? console.log(`${newStadiumName} was loaded`) : console.log(`${newStadiumName} was loaded by ${byPlayer.name}`);

    var m = _Maps.find(x => x.Name == newStadiumName);
    var players = room.getPlayerList();
    var admins = room.getPlayerList().filter(p => p.admin == true);

    if(byPlayer == null){
	if(m){
	    _Map = {ID: m.ID, Name: m.Name};
	}
	else{
	    admins.length > 0 ? admins.forEach(p => room.sendAnnouncement(`Something went wrong with map ${newStadiumName}. Please try again!`,p.id,colors.mapChangeWrongName,fonts.mapChangeWrongName,sounds.mapChangeWrongName)) : room.sendAnnouncement(`Something went wrong with map ${newStadiumName}. Please call an admin to try again!`,null,colors.mapChangeWrongName,fonts.mapChangeWrongName,sounds.mapChangeWrongName);
	}
    }
    else{
	room.sendAnnouncement("You don't have authorization to change maps in this room!",byPlayer.id,colors.mapChangeDeny,fonts.mapChangeDeny,sounds.mapChangeDeny);
	room.setCustomStadium(Maps[0]);
    }
}

Output: https://thehax.pl/forum/powtorki.php?nagranie=e93c13bfc0e978dcfad9fcc82cf3af93

from haxball-example-scripts.

guguxh avatar guguxh commented on May 30, 2024

Isn't exactly what I want, but is a way to do this. Thank you so much!!

from haxball-example-scripts.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.