Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const SNIPER = `{
- "name" : "Minerva | Haxball Headless",
- "width" : 425,
- "height" : 200,
- "spawnDistance" : 170,
- "bg" : { "type" : "hockey", "width" : 0, "height" : 0, "kickOffRadius" : 0, "cornerRadius" : 0 },
- "vertexes" : [
- /* 0 */ { "x" : -370, "y" : 170, "trait" : "ballArea" },
- /* 1 */ { "x" : -370, "y" : -170, "trait" : "ballArea" },
- /* 2 */ { "x" : 370, "y" : -170, "trait" : "ballArea" },
- /* 3 */ { "x" : 0, "y" : -170, "cMask" : ["wall" ], "trait" : "kickOffBarrier", "color" : "f708ff" },
- /* 4 */ { "x" : -371, "y" : -144, "trait" : "goalNet", "curve" : -190, "color" : "ff0000" },
- /* 5 */ { "x" : -375, "y" : -105, "trait" : "goalNet", "curve" : -190, "color" : "ff0000" },
- /* 6 */ { "x" : 370, "y" : -143, "trait" : "goalNet", "curve" : 190, "color" : "ff0000" },
- /* 7 */ { "x" : 370, "y" : -106, "trait" : "goalNet", "curve" : 190, "color" : "ff0000" },
- /* 8 */ { "x" : -370, "y" : -38, "bCoef" : 1, "trait" : "goalNet", "curve" : -190, "color" : "ffffff" },
- /* 9 */ { "x" : -374, "y" : 35, "trait" : "goalNet", "curve" : -190, "color" : "ffffff" },
- /* 10 */ { "x" : -375, "y" : 105, "trait" : "goalNet", "curve" : -190, "color" : "ff0000" },
- /* 11 */ { "x" : -371, "y" : 143, "trait" : "goalNet", "curve" : -190, "color" : "ff0000" },
- /* 12 */ { "x" : 50, "y" : -200, "bCoef" : 0.1, "cMask" : ["blue" ], "cGroup" : ["redKO" ], "trait" : "kickOffBarrier", "curve" : 0, "vis" : true, "color" : "000000" },
- /* 13 */ { "x" : 50, "y" : 200, "bCoef" : 0.1, "cMask" : ["blue" ], "cGroup" : ["redKO" ], "trait" : "kickOffBarrier", "curve" : 0, "vis" : true, "color" : "000000" },
- /* 14 */ { "x" : 370, "y" : 104, "trait" : "goalNet", "curve" : 190, "color" : "ff0000" },
- /* 15 */ { "x" : 370, "y" : 142, "trait" : "goalNet", "curve" : 190, "color" : "ff0000" },
- /* 16 */ { "x" : 370, "y" : -37, "trait" : "goalNet", "curve" : 190, "color" : "ffffff" },
- /* 17 */ { "x" : 370, "y" : 39, "trait" : "goalNet", "curve" : 190, "color" : "ffffff" },
- /* 18 */ { "x" : 370, "y" : 142, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet", "curve" : 0, "vis" : false },
- /* 19 */ { "x" : 370, "y" : 170, "bCoef" : 1.4, "cMask" : ["ball" ], "trait" : "goalNet", "curve" : 0, "vis" : false, "color" : "ffffff" },
- /* 20 */ { "x" : -370, "y" : 146, "bCoef" : 1.5, "cMask" : ["ball" ], "trait" : "goalNet", "curve" : 0, "vis" : false },
- /* 21 */ { "x" : -370, "y" : 170, "bCoef" : 1.5, "cMask" : ["ball" ], "trait" : "goalNet", "curve" : 0, "vis" : false },
- /* 22 */ { "x" : -370, "y" : 145, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet", "curve" : 0, "vis" : false },
- /* 23 */ { "x" : -370, "y" : 170, "bCoef" : 1.4, "cMask" : ["ball" ], "trait" : "goalNet", "curve" : 0, "vis" : false, "color" : "ffffff" },
- /* 24 */ { "x" : -370, "y" : -103, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalPost", "curve" : 1 },
- /* 25 */ { "x" : -371, "y" : -34, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalPost", "curve" : 1 },
- /* 26 */ { "x" : -370, "y" : -170, "bCoef" : 1.4, "cMask" : ["ball" ], "trait" : "goalNet", "color" : "ffffff" },
- /* 27 */ { "x" : -371, "y" : -143, "bCoef" : 1.5, "cMask" : ["ball" ], "trait" : "goalPost" },
- /* 28 */ { "x" : -370, "y" : 37, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet", "color" : "ffffff" },
- /* 29 */ { "x" : -370, "y" : 99, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet", "color" : "ffffff" },
- /* 30 */ { "x" : 370, "y" : -170, "bCoef" : 1.4, "cMask" : ["ball" ], "trait" : "goalNet", "color" : "ffffff" },
- /* 31 */ { "x" : 370, "y" : -145, "bCoef" : 1.52, "cMask" : ["ball" ], "trait" : "goalPost" },
- /* 32 */ { "x" : 370, "y" : -104, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalPost" },
- /* 33 */ { "x" : 371, "y" : -37, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalPost" },
- /* 34 */ { "x" : -50, "y" : -200, "bCoef" : 0.1, "cMask" : ["red" ], "cGroup" : ["blueKO" ], "trait" : "goalPost", "curve" : 0, "vis" : true, "color" : "000000" },
- /* 35 */ { "x" : -50, "y" : 200, "bCoef" : 0.1, "cMask" : ["red" ], "cGroup" : ["blueKO" ], "trait" : "goalPost", "curve" : 0, "vis" : true, "color" : "000000" },
- /* 36 */ { "x" : 370, "y" : -152, "bCoef" : 1, "trait" : "goalNet", "color" : "ffffff" },
- /* 37 */ { "x" : -370, "y" : -152, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet", "color" : "ffffff" },
- /* 38 */ { "x" : -370, "y" : -95, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet", "color" : "000000" },
- /* 39 */ { "x" : 370, "y" : 152, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet", "color" : "ffffff" },
- /* 40 */ { "x" : 370, "y" : -96, "bCoef" : 1, "trait" : "goalNet", "color" : "ffffff" },
- /* 41 */ { "x" : 370, "y" : -44, "bCoef" : 1, "trait" : "goalNet", "color" : "ffffff" },
- /* 42 */ { "x" : -370, "y" : 153, "bCoef" : 1, "trait" : "goalNet", "color" : "ffffff" },
- /* 43 */ { "x" : 370, "y" : 49, "bCoef" : 1, "trait" : "goalNet", "color" : "ffffff" },
- /* 44 */ { "x" : 370, "y" : 96, "bCoef" : 1, "trait" : "goalNet", "color" : "ffffff" },
- /* 45 */ { "x" : 0, "y" : 170, "bCoef" : 0.1, "cMask" : ["wall" ], "color" : "f708ff" },
- /* 46 */ { "x" : -370, "y" : -144, "trait" : "goalNet", "curve" : 0, "vis" : false },
- /* 47 */ { "x" : -370, "y" : -105, "trait" : "goalNet", "curve" : 0, "vis" : false },
- /* 48 */ { "x" : -370, "y" : -38, "bCoef" : 1, "trait" : "goalNet", "curve" : 0, "color" : "000000", "vis" : false },
- /* 49 */ { "x" : -370, "y" : 35, "trait" : "goalNet", "curve" : 0, "vis" : false },
- /* 50 */ { "x" : -370, "y" : 105, "trait" : "goalNet", "curve" : 0, "vis" : false },
- /* 51 */ { "x" : -370, "y" : 143, "trait" : "goalNet", "curve" : 0, "vis" : false },
- /* 52 */ { "x" : 50, "y" : -200, "bCoef" : 0.1, "cMask" : ["red" ], "cGroup" : ["red" ], "trait" : "goalPost", "curve" : 0, "vis" : true, "color" : "08FFD6" },
- /* 53 */ { "x" : 50, "y" : 200, "bCoef" : 0.1, "cMask" : ["red" ], "cGroup" : ["red" ], "trait" : "goalPost", "curve" : 0, "vis" : true, "color" : "08FFD6" },
- /* 54 */ { "x" : -50, "y" : -200, "bCoef" : 0.1, "cMask" : ["blue" ], "cGroup" : ["blue" ], "trait" : "goalPost", "curve" : 0, "vis" : true, "color" : "08FFD6" },
- /* 55 */ { "x" : -50, "y" : 200, "bCoef" : 0.1, "cMask" : ["blue" ], "cGroup" : ["blue" ], "trait" : "goalPost", "curve" : 0, "vis" : true, "color" : "08FFD6" },
- /* 56 */ { "x" : -303.5, "y" : -175, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 57 */ { "x" : -302.5, "y" : -197, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 58 */ { "x" : -291.5, "y" : -176, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 59 */ { "x" : -284.5, "y" : -195, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 60 */ { "x" : -282.5, "y" : -174, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 61 */ { "x" : -274.5, "y" : -184, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 62 */ { "x" : -274.5, "y" : -176, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 63 */ { "x" : -266.5, "y" : -178, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 64 */ { "x" : -266.5, "y" : -188, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 65 */ { "x" : -257.5, "y" : -177, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 66 */ { "x" : -255.5, "y" : -188, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 67 */ { "x" : -245.5, "y" : -189, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 68 */ { "x" : -245.5, "y" : -175, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 69 */ { "x" : -235.5, "y" : -175, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 70 */ { "x" : -235.5, "y" : -189, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 71 */ { "x" : -245.5, "y" : -183, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 72 */ { "x" : -235.5, "y" : -183, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 73 */ { "x" : -223.5, "y" : -193, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 74 */ { "x" : -224.5, "y" : -174, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 75 */ { "x" : -213.5, "y" : -192, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 76 */ { "x" : -213.5, "y" : -184, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 77 */ { "x" : -220.5, "y" : -184, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 78 */ { "x" : -213.5, "y" : -176, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 79 */ { "x" : -206.5, "y" : -192, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 80 */ { "x" : -202.5, "y" : -176, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 81 */ { "x" : -194.5, "y" : -191, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 82 */ { "x" : -184.5, "y" : -192, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 83 */ { "x" : -193.5, "y" : -177, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 84 */ { "x" : -181.5, "y" : -174, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- /* 85 */ { "x" : -181.5, "y" : -180, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" }
- ],
- "segments" : [
- { "v0" : 4, "v1" : 5, "curve" : -190, "color" : "ff0000", "trait" : "goalNet" },
- { "v0" : 6, "v1" : 7, "curve" : 190, "color" : "ff0000", "trait" : "goalNet", "x" : 370 },
- { "v0" : 8, "v1" : 9, "curve" : -190, "color" : "ffffff", "trait" : "goalNet" },
- { "v0" : 10, "v1" : 11, "curve" : -190, "color" : "ff0000", "trait" : "goalNet" },
- { "v0" : 12, "v1" : 13, "curve" : 0, "vis" : true, "color" : "000000", "bCoef" : 0.1, "cMask" : ["blue" ], "cGroup" : ["redKO" ], "trait" : "kickOffBarrier" },
- { "v0" : 14, "v1" : 15, "curve" : 190, "color" : "ff0000", "trait" : "goalNet", "x" : 370 },
- { "v0" : 16, "v1" : 17, "curve" : 190, "color" : "ffffff", "trait" : "goalNet", "x" : 370 },
- { "v0" : 18, "v1" : 19, "curve" : 0, "vis" : false, "color" : "FFCCCC", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet" },
- { "v0" : 20, "v1" : 21, "curve" : 0, "vis" : false, "color" : "FFCCCC", "bCoef" : 1.5, "cMask" : ["ball" ], "trait" : "goalNet" },
- { "v0" : 22, "v1" : 23, "curve" : 0, "vis" : false, "color" : "FFCCCC", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet" },
- { "v0" : 24, "v1" : 25, "curve" : 1, "vis" : false, "color" : "FFCCCC", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalPost" },
- { "v0" : 28, "v1" : 29, "curve" : 0, "vis" : false, "color" : "FFCCCC", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalPost" },
- { "v0" : 32, "v1" : 33, "curve" : 0, "vis" : false, "color" : "FFCCCC", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalPost" },
- { "v0" : 34, "v1" : 35, "curve" : 0, "vis" : true, "color" : "000000", "bCoef" : 0.1, "cMask" : ["red" ], "cGroup" : ["blueKO" ], "trait" : "goalPost" },
- { "v0" : 30, "v1" : 36, "vis" : true, "color" : "ffffff", "bCoef" : 1, "trait" : "goalNet", "x" : 370 },
- { "v0" : 26, "v1" : 37, "vis" : true, "color" : "ffffff", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet", "x" : -370 },
- { "v0" : 38, "v1" : 8, "curve" : 0, "vis" : true, "color" : "000000", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet", "x" : -370 },
- { "v0" : 39, "v1" : 19, "curve" : 0, "vis" : true, "color" : "ffffff", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet", "x" : 370 },
- { "v0" : 28, "v1" : 29, "curve" : 0, "vis" : true, "color" : "ffffff", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet", "x" : -370 },
- { "v0" : 40, "v1" : 41, "curve" : 0, "vis" : true, "color" : "ffffff", "bCoef" : 1, "trait" : "goalNet", "x" : 370 },
- { "v0" : 42, "v1" : 23, "curve" : 0, "vis" : true, "color" : "ffffff", "bCoef" : 1, "trait" : "goalNet", "x" : -370 },
- { "v0" : 43, "v1" : 44, "curve" : 0, "vis" : true, "color" : "ffffff", "bCoef" : 1, "trait" : "goalNet", "x" : 370 },
- { "v0" : 23, "v1" : 19, "curve" : 0, "vis" : true, "color" : "ffffff", "bCoef" : 1.4, "cMask" : ["ball" ], "trait" : "goalNet" },
- { "v0" : 26, "v1" : 30, "curve" : 0, "vis" : true, "color" : "ffffff", "bCoef" : 1.4, "cMask" : ["ball" ], "trait" : "goalNet" },
- { "v0" : 3, "v1" : 45, "curve" : 1.50571568977, "vis" : true, "color" : "f708ff", "bCoef" : 0.1, "cMask" : ["wall" ], "x" : 0 },
- { "v0" : 52, "v1" : 53, "curve" : 0, "vis" : true, "color" : "08FFD6", "bCoef" : 0.1, "cMask" : ["red" ], "cGroup" : ["red" ], "trait" : "goalPost" },
- { "v0" : 54, "v1" : 55, "curve" : 0, "vis" : true, "color" : "08FFD6", "bCoef" : 0.1, "cMask" : ["blue" ], "cGroup" : ["blue" ], "trait" : "goalPost" },
- { "v0" : 56, "v1" : 57, "vis" : true, "color" : "9293b4", "cMask" : ["ball" ], "trait" : "ballArea" },
- { "v0" : 57, "v1" : 58, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- { "v0" : 58, "v1" : 59, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- { "v0" : 59, "v1" : 60, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- { "v0" : 61, "v1" : 62, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- { "v0" : 63, "v1" : 64, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- { "v0" : 64, "v1" : 65, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- { "v0" : 65, "v1" : 66, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- { "v0" : 67, "v1" : 68, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- { "v0" : 68, "v1" : 69, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- { "v0" : 67, "v1" : 70, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- { "v0" : 71, "v1" : 72, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- { "v0" : 73, "v1" : 74, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- { "v0" : 73, "v1" : 75, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- { "v0" : 75, "v1" : 76, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- { "v0" : 76, "v1" : 77, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- { "v0" : 77, "v1" : 78, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- { "v0" : 79, "v1" : 80, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- { "v0" : 80, "v1" : 81, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- { "v0" : 82, "v1" : 83, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- { "v0" : 82, "v1" : 84, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- { "v0" : 83, "v1" : 85, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" }
- ],
- "goals" : [
- { "p0" : [-369,-146 ], "p1" : [-369,-102 ], "team" : "red", "color" : "000000", "x" : -370 },
- { "p0" : [370,-110 ], "p1" : [370,-150 ], "team" : "blue", "x" : 370, "color" : "000000" },
- { "p0" : [-370,-35 ], "p1" : [-370,35 ], "team" : "red", "color" : "000000", "x" : -370 },
- { "p0" : [-370,103 ], "p1" : [-370,143 ], "team" : "red", "color" : "000000", "x" : -370 },
- { "p0" : [370,143 ], "p1" : [370,98 ], "team" : "blue", "x" : 370, "color" : "000000" },
- { "p0" : [370,35 ], "p1" : [370,-35 ], "team" : "blue", "x" : 370, "color" : "000000" }
- ],
- "discs" : [
- { "pos" : [-370,-105 ], "color" : "ffffff", "bCoef" : 0.5, "trait" : "goalPost" },
- { "pos" : [-370,-144 ], "color" : "ffffff", "bCoef" : 0.5, "trait" : "goalPost" },
- { "pos" : [370,-105 ], "color" : "ffffff", "bCoef" : 0.5, "trait" : "goalPost" },
- { "pos" : [370,-143 ], "color" : "ffffff", "bCoef" : 0.5, "trait" : "goalPost" },
- { "pos" : [-370,35 ], "color" : "ff0000", "bCoef" : 0.5, "trait" : "goalPost" },
- { "pos" : [-370,-35 ], "color" : "ff0000", "bCoef" : 0.5, "trait" : "goalPost" },
- { "pos" : [-370,143 ], "color" : "ffffff", "bCoef" : 0.5, "trait" : "goalPost" },
- { "pos" : [-370,105 ], "color" : "ffffff", "bCoef" : 0.5, "trait" : "goalPost" },
- { "pos" : [370,143 ], "color" : "ffffff", "bCoef" : 0.5, "trait" : "goalPost" },
- { "pos" : [370,104 ], "color" : "ffffff", "bCoef" : 0.5, "trait" : "goalPost" },
- { "pos" : [370,41 ], "color" : "ff0000", "bCoef" : 0.5, "trait" : "goalPost" },
- { "pos" : [370,-35 ], "color" : "ff0000", "bCoef" : 0.5, "trait" : "goalPost" },
- { "radius" : 3, "pos" : [-276.5,-195 ], "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" }
- ],
- "planes" : [
- { "normal" : [0,-1 ], "dist" : -170, "bCoef" : 1, "trait" : "ballArea" },
- { "normal" : [0,1 ], "dist" : -170, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
- { "normal" : [1,0 ], "dist" : -423.311779142, "bCoef" : 0.1 },
- { "normal" : [-1,0 ], "dist" : -423.310955619, "bCoef" : 0.1 },
- { "normal" : [0,-1 ], "dist" : -200, "bCoef" : 0.1 },
- { "normal" : [0,1 ], "dist" : -200, "bCoef" : 0.1 }
- ],
- "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" : 0.5,
- "invMass" : 0.5,
- "damping" : 0.96,
- "acceleration" : 0.12,
- "kickingAcceleration" : 0.12,
- "kickingDamping" : 0.96,
- "kickStrength" : 13
- },
- "ballPhysics" : {
- "color" : "FFFF0D",
- "radius" : 10
- }
- }`
- const ROOM_NAME = "🏆 Sniper 3-0 Ban Bot 🏆";
- const PLAYER_NAME = "Haxball Headless Host";
- const MAX_PLAYERS = 8;
- const PUBLIC = true;
- var room = HBInit({
- roomName: ROOM_NAME,
- playerName: PLAYER_NAME,
- maxPlayers: MAX_PLAYERS,
- public: PUBLIC
- });
- room.setCustomStadium(SNIPER);
- room.setTimeLimit(1);
- room.setScoreLimit(3);
- room.setTeamsLock(true);
- function banTeam(teamID)
- {
- var team = room.getPlayerList().filter((player) => player.team == teamID);
- for(var i = 0; i < team.length; i++){
- room.setPlayerTeam(team[i].id, 0);
- room.kickPlayer(team[i].id, "Bir Dahaki Sefere! | www.youtube.com/watch?v=agQrEDyXrS4", true);
- }
- }
- room.onTeamVictory = function(score)
- {
- if(score.red == 3 && score.blue == 0)
- banTeam(2);
- if(score.red == 0 && score.blue == 3)
- banTeam(1);
- var nextPlayer = room.getPlayerList().filter((p) => p.team == 0)[1];
- if(nextPlayer == null){
- room.stopGame();
- setTimeout(function(){
- room.startGame();
- }, 300);
- return;
- }
- if(score.red > score.blue)
- {
- var deadPlayer = room.getPlayerList().filter((p) => p.team == 2)[0];
- if(deadPlayer != null)
- {
- room.setPlayerTeam(deadPlayer.id, 0);
- }
- room.setPlayerTeam(nextPlayer.id, 2);
- }
- if(score.blue > score.red)
- {
- var deadPlayer = room.getPlayerList().filter((p) => p.team == 1)[0];
- var winPlayer = room.getPlayerList().filter((p) => p.team == 2)[0];
- if(deadPlayer != null)
- {
- room.setPlayerTeam(deadPlayer.id, 0);
- }
- room.setPlayerTeam(nextPlayer.id, 2);
- if(winPlayer != null)
- {
- room.setPlayerTeam(winPlayer.id, 1);
- }
- }
- room.stopGame();
- setTimeout(function(){
- room.startGame();
- }, 300);
- }
- function vacancy()
- {
- if(room.getPlayerList().filter((p) => p.team == 1).length == 0){
- return 1;
- }
- else return 2;
- }
- room.onPlayerLeave = function(player)
- {
- if(player.team != 0)
- {
- var nextPlayer = room.getPlayerList().filter((p) => p.team == 0)[1];
- if(nextPlayer != null)
- {
- room.stopGame();
- room.setPlayerTeam(nextPlayer.id, vacancy());
- setTimeout(function(){
- room.startGame();
- }, 300); }
- }
- }
- room.onPlayerJoin = function(player)
- {
- if(room.getPlayerList().length <= 3)
- {
- room.setPlayerTeam(player.id, vacancy());
- if(room.getPlayerList().length == 3)
- {
- room.stopGame();
- setTimeout(function(){
- room.startGame();
- }, 300); }
- }
- }
- room.onStadiumChange = function(newStadiumName, byPlayer) {
- if (newStadiumName != "Minerva | Haxball Headless") {
- room.setCustomStadium(SNIPER);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement