Advertisement
Guest User

Untitled

a guest
Feb 7th, 2020
889
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.49 KB | None | 0 0
  1. const SNIPER = `{
  2.  
  3. "name" : "Minerva | Haxball Headless",
  4.  
  5. "width" : 425,
  6.  
  7. "height" : 200,
  8.  
  9. "spawnDistance" : 170,
  10.  
  11. "bg" : { "type" : "hockey", "width" : 0, "height" : 0, "kickOffRadius" : 0, "cornerRadius" : 0 },
  12.  
  13. "vertexes" : [
  14. /* 0 */ { "x" : -370, "y" : 170, "trait" : "ballArea" },
  15. /* 1 */ { "x" : -370, "y" : -170, "trait" : "ballArea" },
  16. /* 2 */ { "x" : 370, "y" : -170, "trait" : "ballArea" },
  17.  
  18. /* 3 */ { "x" : 0, "y" : -170, "cMask" : ["wall" ], "trait" : "kickOffBarrier", "color" : "f708ff" },
  19.  
  20. /* 4 */ { "x" : -371, "y" : -144, "trait" : "goalNet", "curve" : -190, "color" : "ff0000" },
  21. /* 5 */ { "x" : -375, "y" : -105, "trait" : "goalNet", "curve" : -190, "color" : "ff0000" },
  22. /* 6 */ { "x" : 370, "y" : -143, "trait" : "goalNet", "curve" : 190, "color" : "ff0000" },
  23. /* 7 */ { "x" : 370, "y" : -106, "trait" : "goalNet", "curve" : 190, "color" : "ff0000" },
  24. /* 8 */ { "x" : -370, "y" : -38, "bCoef" : 1, "trait" : "goalNet", "curve" : -190, "color" : "ffffff" },
  25. /* 9 */ { "x" : -374, "y" : 35, "trait" : "goalNet", "curve" : -190, "color" : "ffffff" },
  26. /* 10 */ { "x" : -375, "y" : 105, "trait" : "goalNet", "curve" : -190, "color" : "ff0000" },
  27. /* 11 */ { "x" : -371, "y" : 143, "trait" : "goalNet", "curve" : -190, "color" : "ff0000" },
  28.  
  29. /* 12 */ { "x" : 50, "y" : -200, "bCoef" : 0.1, "cMask" : ["blue" ], "cGroup" : ["redKO" ], "trait" : "kickOffBarrier", "curve" : 0, "vis" : true, "color" : "000000" },
  30. /* 13 */ { "x" : 50, "y" : 200, "bCoef" : 0.1, "cMask" : ["blue" ], "cGroup" : ["redKO" ], "trait" : "kickOffBarrier", "curve" : 0, "vis" : true, "color" : "000000" },
  31.  
  32. /* 14 */ { "x" : 370, "y" : 104, "trait" : "goalNet", "curve" : 190, "color" : "ff0000" },
  33. /* 15 */ { "x" : 370, "y" : 142, "trait" : "goalNet", "curve" : 190, "color" : "ff0000" },
  34. /* 16 */ { "x" : 370, "y" : -37, "trait" : "goalNet", "curve" : 190, "color" : "ffffff" },
  35. /* 17 */ { "x" : 370, "y" : 39, "trait" : "goalNet", "curve" : 190, "color" : "ffffff" },
  36. /* 18 */ { "x" : 370, "y" : 142, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet", "curve" : 0, "vis" : false },
  37. /* 19 */ { "x" : 370, "y" : 170, "bCoef" : 1.4, "cMask" : ["ball" ], "trait" : "goalNet", "curve" : 0, "vis" : false, "color" : "ffffff" },
  38. /* 20 */ { "x" : -370, "y" : 146, "bCoef" : 1.5, "cMask" : ["ball" ], "trait" : "goalNet", "curve" : 0, "vis" : false },
  39. /* 21 */ { "x" : -370, "y" : 170, "bCoef" : 1.5, "cMask" : ["ball" ], "trait" : "goalNet", "curve" : 0, "vis" : false },
  40. /* 22 */ { "x" : -370, "y" : 145, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet", "curve" : 0, "vis" : false },
  41. /* 23 */ { "x" : -370, "y" : 170, "bCoef" : 1.4, "cMask" : ["ball" ], "trait" : "goalNet", "curve" : 0, "vis" : false, "color" : "ffffff" },
  42.  
  43. /* 24 */ { "x" : -370, "y" : -103, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalPost", "curve" : 1 },
  44. /* 25 */ { "x" : -371, "y" : -34, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalPost", "curve" : 1 },
  45.  
  46. /* 26 */ { "x" : -370, "y" : -170, "bCoef" : 1.4, "cMask" : ["ball" ], "trait" : "goalNet", "color" : "ffffff" },
  47.  
  48. /* 27 */ { "x" : -371, "y" : -143, "bCoef" : 1.5, "cMask" : ["ball" ], "trait" : "goalPost" },
  49.  
  50. /* 28 */ { "x" : -370, "y" : 37, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet", "color" : "ffffff" },
  51. /* 29 */ { "x" : -370, "y" : 99, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet", "color" : "ffffff" },
  52. /* 30 */ { "x" : 370, "y" : -170, "bCoef" : 1.4, "cMask" : ["ball" ], "trait" : "goalNet", "color" : "ffffff" },
  53.  
  54. /* 31 */ { "x" : 370, "y" : -145, "bCoef" : 1.52, "cMask" : ["ball" ], "trait" : "goalPost" },
  55. /* 32 */ { "x" : 370, "y" : -104, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalPost" },
  56. /* 33 */ { "x" : 371, "y" : -37, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalPost" },
  57. /* 34 */ { "x" : -50, "y" : -200, "bCoef" : 0.1, "cMask" : ["red" ], "cGroup" : ["blueKO" ], "trait" : "goalPost", "curve" : 0, "vis" : true, "color" : "000000" },
  58. /* 35 */ { "x" : -50, "y" : 200, "bCoef" : 0.1, "cMask" : ["red" ], "cGroup" : ["blueKO" ], "trait" : "goalPost", "curve" : 0, "vis" : true, "color" : "000000" },
  59.  
  60. /* 36 */ { "x" : 370, "y" : -152, "bCoef" : 1, "trait" : "goalNet", "color" : "ffffff" },
  61. /* 37 */ { "x" : -370, "y" : -152, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet", "color" : "ffffff" },
  62. /* 38 */ { "x" : -370, "y" : -95, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet", "color" : "000000" },
  63. /* 39 */ { "x" : 370, "y" : 152, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet", "color" : "ffffff" },
  64. /* 40 */ { "x" : 370, "y" : -96, "bCoef" : 1, "trait" : "goalNet", "color" : "ffffff" },
  65. /* 41 */ { "x" : 370, "y" : -44, "bCoef" : 1, "trait" : "goalNet", "color" : "ffffff" },
  66. /* 42 */ { "x" : -370, "y" : 153, "bCoef" : 1, "trait" : "goalNet", "color" : "ffffff" },
  67. /* 43 */ { "x" : 370, "y" : 49, "bCoef" : 1, "trait" : "goalNet", "color" : "ffffff" },
  68. /* 44 */ { "x" : 370, "y" : 96, "bCoef" : 1, "trait" : "goalNet", "color" : "ffffff" },
  69.  
  70. /* 45 */ { "x" : 0, "y" : 170, "bCoef" : 0.1, "cMask" : ["wall" ], "color" : "f708ff" },
  71.  
  72. /* 46 */ { "x" : -370, "y" : -144, "trait" : "goalNet", "curve" : 0, "vis" : false },
  73. /* 47 */ { "x" : -370, "y" : -105, "trait" : "goalNet", "curve" : 0, "vis" : false },
  74. /* 48 */ { "x" : -370, "y" : -38, "bCoef" : 1, "trait" : "goalNet", "curve" : 0, "color" : "000000", "vis" : false },
  75. /* 49 */ { "x" : -370, "y" : 35, "trait" : "goalNet", "curve" : 0, "vis" : false },
  76. /* 50 */ { "x" : -370, "y" : 105, "trait" : "goalNet", "curve" : 0, "vis" : false },
  77. /* 51 */ { "x" : -370, "y" : 143, "trait" : "goalNet", "curve" : 0, "vis" : false },
  78.  
  79. /* 52 */ { "x" : 50, "y" : -200, "bCoef" : 0.1, "cMask" : ["red" ], "cGroup" : ["red" ], "trait" : "goalPost", "curve" : 0, "vis" : true, "color" : "08FFD6" },
  80. /* 53 */ { "x" : 50, "y" : 200, "bCoef" : 0.1, "cMask" : ["red" ], "cGroup" : ["red" ], "trait" : "goalPost", "curve" : 0, "vis" : true, "color" : "08FFD6" },
  81. /* 54 */ { "x" : -50, "y" : -200, "bCoef" : 0.1, "cMask" : ["blue" ], "cGroup" : ["blue" ], "trait" : "goalPost", "curve" : 0, "vis" : true, "color" : "08FFD6" },
  82. /* 55 */ { "x" : -50, "y" : 200, "bCoef" : 0.1, "cMask" : ["blue" ], "cGroup" : ["blue" ], "trait" : "goalPost", "curve" : 0, "vis" : true, "color" : "08FFD6" },
  83.  
  84. /* 56 */ { "x" : -303.5, "y" : -175, "cMask" : ["ball" ], "trait" : "ballArea" },
  85. /* 57 */ { "x" : -302.5, "y" : -197, "cMask" : ["ball" ], "trait" : "ballArea" },
  86. /* 58 */ { "x" : -291.5, "y" : -176, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  87. /* 59 */ { "x" : -284.5, "y" : -195, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  88. /* 60 */ { "x" : -282.5, "y" : -174, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  89. /* 61 */ { "x" : -274.5, "y" : -184, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  90. /* 62 */ { "x" : -274.5, "y" : -176, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  91. /* 63 */ { "x" : -266.5, "y" : -178, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  92. /* 64 */ { "x" : -266.5, "y" : -188, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  93. /* 65 */ { "x" : -257.5, "y" : -177, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  94. /* 66 */ { "x" : -255.5, "y" : -188, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  95. /* 67 */ { "x" : -245.5, "y" : -189, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  96. /* 68 */ { "x" : -245.5, "y" : -175, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  97. /* 69 */ { "x" : -235.5, "y" : -175, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  98. /* 70 */ { "x" : -235.5, "y" : -189, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  99. /* 71 */ { "x" : -245.5, "y" : -183, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  100. /* 72 */ { "x" : -235.5, "y" : -183, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  101. /* 73 */ { "x" : -223.5, "y" : -193, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  102. /* 74 */ { "x" : -224.5, "y" : -174, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  103. /* 75 */ { "x" : -213.5, "y" : -192, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  104. /* 76 */ { "x" : -213.5, "y" : -184, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  105. /* 77 */ { "x" : -220.5, "y" : -184, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  106. /* 78 */ { "x" : -213.5, "y" : -176, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  107. /* 79 */ { "x" : -206.5, "y" : -192, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  108. /* 80 */ { "x" : -202.5, "y" : -176, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  109. /* 81 */ { "x" : -194.5, "y" : -191, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  110. /* 82 */ { "x" : -184.5, "y" : -192, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  111. /* 83 */ { "x" : -193.5, "y" : -177, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  112. /* 84 */ { "x" : -181.5, "y" : -174, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  113. /* 85 */ { "x" : -181.5, "y" : -180, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" }
  114.  
  115. ],
  116.  
  117. "segments" : [
  118. { "v0" : 4, "v1" : 5, "curve" : -190, "color" : "ff0000", "trait" : "goalNet" },
  119. { "v0" : 6, "v1" : 7, "curve" : 190, "color" : "ff0000", "trait" : "goalNet", "x" : 370 },
  120. { "v0" : 8, "v1" : 9, "curve" : -190, "color" : "ffffff", "trait" : "goalNet" },
  121. { "v0" : 10, "v1" : 11, "curve" : -190, "color" : "ff0000", "trait" : "goalNet" },
  122.  
  123. { "v0" : 12, "v1" : 13, "curve" : 0, "vis" : true, "color" : "000000", "bCoef" : 0.1, "cMask" : ["blue" ], "cGroup" : ["redKO" ], "trait" : "kickOffBarrier" },
  124.  
  125. { "v0" : 14, "v1" : 15, "curve" : 190, "color" : "ff0000", "trait" : "goalNet", "x" : 370 },
  126. { "v0" : 16, "v1" : 17, "curve" : 190, "color" : "ffffff", "trait" : "goalNet", "x" : 370 },
  127. { "v0" : 18, "v1" : 19, "curve" : 0, "vis" : false, "color" : "FFCCCC", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet" },
  128. { "v0" : 20, "v1" : 21, "curve" : 0, "vis" : false, "color" : "FFCCCC", "bCoef" : 1.5, "cMask" : ["ball" ], "trait" : "goalNet" },
  129. { "v0" : 22, "v1" : 23, "curve" : 0, "vis" : false, "color" : "FFCCCC", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet" },
  130.  
  131. { "v0" : 24, "v1" : 25, "curve" : 1, "vis" : false, "color" : "FFCCCC", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalPost" },
  132. { "v0" : 28, "v1" : 29, "curve" : 0, "vis" : false, "color" : "FFCCCC", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalPost" },
  133. { "v0" : 32, "v1" : 33, "curve" : 0, "vis" : false, "color" : "FFCCCC", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalPost" },
  134. { "v0" : 34, "v1" : 35, "curve" : 0, "vis" : true, "color" : "000000", "bCoef" : 0.1, "cMask" : ["red" ], "cGroup" : ["blueKO" ], "trait" : "goalPost" },
  135.  
  136. { "v0" : 30, "v1" : 36, "vis" : true, "color" : "ffffff", "bCoef" : 1, "trait" : "goalNet", "x" : 370 },
  137. { "v0" : 26, "v1" : 37, "vis" : true, "color" : "ffffff", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet", "x" : -370 },
  138. { "v0" : 38, "v1" : 8, "curve" : 0, "vis" : true, "color" : "000000", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet", "x" : -370 },
  139. { "v0" : 39, "v1" : 19, "curve" : 0, "vis" : true, "color" : "ffffff", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet", "x" : 370 },
  140. { "v0" : 28, "v1" : 29, "curve" : 0, "vis" : true, "color" : "ffffff", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "goalNet", "x" : -370 },
  141. { "v0" : 40, "v1" : 41, "curve" : 0, "vis" : true, "color" : "ffffff", "bCoef" : 1, "trait" : "goalNet", "x" : 370 },
  142. { "v0" : 42, "v1" : 23, "curve" : 0, "vis" : true, "color" : "ffffff", "bCoef" : 1, "trait" : "goalNet", "x" : -370 },
  143. { "v0" : 43, "v1" : 44, "curve" : 0, "vis" : true, "color" : "ffffff", "bCoef" : 1, "trait" : "goalNet", "x" : 370 },
  144. { "v0" : 23, "v1" : 19, "curve" : 0, "vis" : true, "color" : "ffffff", "bCoef" : 1.4, "cMask" : ["ball" ], "trait" : "goalNet" },
  145. { "v0" : 26, "v1" : 30, "curve" : 0, "vis" : true, "color" : "ffffff", "bCoef" : 1.4, "cMask" : ["ball" ], "trait" : "goalNet" },
  146.  
  147. { "v0" : 3, "v1" : 45, "curve" : 1.50571568977, "vis" : true, "color" : "f708ff", "bCoef" : 0.1, "cMask" : ["wall" ], "x" : 0 },
  148.  
  149. { "v0" : 52, "v1" : 53, "curve" : 0, "vis" : true, "color" : "08FFD6", "bCoef" : 0.1, "cMask" : ["red" ], "cGroup" : ["red" ], "trait" : "goalPost" },
  150. { "v0" : 54, "v1" : 55, "curve" : 0, "vis" : true, "color" : "08FFD6", "bCoef" : 0.1, "cMask" : ["blue" ], "cGroup" : ["blue" ], "trait" : "goalPost" },
  151.  
  152. { "v0" : 56, "v1" : 57, "vis" : true, "color" : "9293b4", "cMask" : ["ball" ], "trait" : "ballArea" },
  153. { "v0" : 57, "v1" : 58, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  154. { "v0" : 58, "v1" : 59, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  155. { "v0" : 59, "v1" : 60, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  156. { "v0" : 61, "v1" : 62, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  157. { "v0" : 63, "v1" : 64, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  158. { "v0" : 64, "v1" : 65, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  159. { "v0" : 65, "v1" : 66, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  160. { "v0" : 67, "v1" : 68, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  161. { "v0" : 68, "v1" : 69, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  162. { "v0" : 67, "v1" : 70, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  163. { "v0" : 71, "v1" : 72, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  164. { "v0" : 73, "v1" : 74, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  165. { "v0" : 73, "v1" : 75, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  166. { "v0" : 75, "v1" : 76, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  167. { "v0" : 76, "v1" : 77, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  168. { "v0" : 77, "v1" : 78, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  169. { "v0" : 79, "v1" : 80, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  170. { "v0" : 80, "v1" : 81, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  171. { "v0" : 82, "v1" : 83, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  172. { "v0" : 82, "v1" : 84, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  173. { "v0" : 83, "v1" : 85, "vis" : true, "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" }
  174.  
  175. ],
  176.  
  177. "goals" : [
  178. { "p0" : [-369,-146 ], "p1" : [-369,-102 ], "team" : "red", "color" : "000000", "x" : -370 },
  179. { "p0" : [370,-110 ], "p1" : [370,-150 ], "team" : "blue", "x" : 370, "color" : "000000" },
  180. { "p0" : [-370,-35 ], "p1" : [-370,35 ], "team" : "red", "color" : "000000", "x" : -370 },
  181. { "p0" : [-370,103 ], "p1" : [-370,143 ], "team" : "red", "color" : "000000", "x" : -370 },
  182. { "p0" : [370,143 ], "p1" : [370,98 ], "team" : "blue", "x" : 370, "color" : "000000" },
  183. { "p0" : [370,35 ], "p1" : [370,-35 ], "team" : "blue", "x" : 370, "color" : "000000" }
  184.  
  185. ],
  186.  
  187. "discs" : [
  188. { "pos" : [-370,-105 ], "color" : "ffffff", "bCoef" : 0.5, "trait" : "goalPost" },
  189. { "pos" : [-370,-144 ], "color" : "ffffff", "bCoef" : 0.5, "trait" : "goalPost" },
  190. { "pos" : [370,-105 ], "color" : "ffffff", "bCoef" : 0.5, "trait" : "goalPost" },
  191. { "pos" : [370,-143 ], "color" : "ffffff", "bCoef" : 0.5, "trait" : "goalPost" },
  192. { "pos" : [-370,35 ], "color" : "ff0000", "bCoef" : 0.5, "trait" : "goalPost" },
  193. { "pos" : [-370,-35 ], "color" : "ff0000", "bCoef" : 0.5, "trait" : "goalPost" },
  194. { "pos" : [-370,143 ], "color" : "ffffff", "bCoef" : 0.5, "trait" : "goalPost" },
  195. { "pos" : [-370,105 ], "color" : "ffffff", "bCoef" : 0.5, "trait" : "goalPost" },
  196. { "pos" : [370,143 ], "color" : "ffffff", "bCoef" : 0.5, "trait" : "goalPost" },
  197. { "pos" : [370,104 ], "color" : "ffffff", "bCoef" : 0.5, "trait" : "goalPost" },
  198. { "pos" : [370,41 ], "color" : "ff0000", "bCoef" : 0.5, "trait" : "goalPost" },
  199. { "pos" : [370,-35 ], "color" : "ff0000", "bCoef" : 0.5, "trait" : "goalPost" },
  200.  
  201. { "radius" : 3, "pos" : [-276.5,-195 ], "color" : "9293b4", "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" }
  202.  
  203. ],
  204.  
  205. "planes" : [
  206. { "normal" : [0,-1 ], "dist" : -170, "bCoef" : 1, "trait" : "ballArea" },
  207. { "normal" : [0,1 ], "dist" : -170, "bCoef" : 1, "cMask" : ["ball" ], "trait" : "ballArea" },
  208.  
  209. { "normal" : [1,0 ], "dist" : -423.311779142, "bCoef" : 0.1 },
  210. { "normal" : [-1,0 ], "dist" : -423.310955619, "bCoef" : 0.1 },
  211. { "normal" : [0,-1 ], "dist" : -200, "bCoef" : 0.1 },
  212. { "normal" : [0,1 ], "dist" : -200, "bCoef" : 0.1 }
  213.  
  214. ],
  215.  
  216. "traits" : {
  217. "ballArea" : { "vis" : false, "bCoef" : 1, "cMask" : ["ball" ] },
  218. "goalPost" : { "radius" : 8, "invMass" : 0, "bCoef" : 0.5 },
  219. "goalNet" : { "vis" : true, "bCoef" : 0.1, "cMask" : ["ball" ] },
  220. "kickOffBarrier" : { "vis" : false, "bCoef" : 0.1, "cGroup" : ["redKO","blueKO" ], "cMask" : ["red","blue" ] }
  221.  
  222. },
  223.  
  224. "playerPhysics" : {
  225. "bCoef" : 0.5,
  226. "invMass" : 0.5,
  227. "damping" : 0.96,
  228. "acceleration" : 0.12,
  229. "kickingAcceleration" : 0.12,
  230. "kickingDamping" : 0.96,
  231. "kickStrength" : 13
  232.  
  233. },
  234.  
  235. "ballPhysics" : {
  236. "color" : "FFFF0D",
  237. "radius" : 10
  238.  
  239. }
  240. }`
  241.  
  242. const ROOM_NAME = "🏆 Sniper 3-0 Ban Bot 🏆";
  243. const PLAYER_NAME = "Haxball Headless Host";
  244. const MAX_PLAYERS = 8;
  245. const PUBLIC = true;
  246.  
  247. var room = HBInit({
  248. roomName: ROOM_NAME,
  249. playerName: PLAYER_NAME,
  250. maxPlayers: MAX_PLAYERS,
  251. public: PUBLIC
  252. });
  253.  
  254. room.setCustomStadium(SNIPER);
  255. room.setTimeLimit(1);
  256. room.setScoreLimit(3);
  257. room.setTeamsLock(true);
  258.  
  259. function banTeam(teamID)
  260. {
  261. var team = room.getPlayerList().filter((player) => player.team == teamID);
  262. for(var i = 0; i < team.length; i++){
  263. room.setPlayerTeam(team[i].id, 0);
  264. room.kickPlayer(team[i].id, "Bir Dahaki Sefere! | www.youtube.com/watch?v=agQrEDyXrS4", true);
  265. }
  266. }
  267.  
  268. room.onTeamVictory = function(score)
  269. {
  270. if(score.red == 3 && score.blue == 0)
  271. banTeam(2);
  272. if(score.red == 0 && score.blue == 3)
  273. banTeam(1);
  274.  
  275. var nextPlayer = room.getPlayerList().filter((p) => p.team == 0)[1];
  276.  
  277. if(nextPlayer == null){
  278. room.stopGame();
  279.  
  280. setTimeout(function(){
  281. room.startGame();
  282. }, 300);
  283. return;
  284. }
  285.  
  286. if(score.red > score.blue)
  287. {
  288. var deadPlayer = room.getPlayerList().filter((p) => p.team == 2)[0];
  289. if(deadPlayer != null)
  290. {
  291. room.setPlayerTeam(deadPlayer.id, 0);
  292. }
  293. room.setPlayerTeam(nextPlayer.id, 2);
  294. }
  295.  
  296. if(score.blue > score.red)
  297. {
  298. var deadPlayer = room.getPlayerList().filter((p) => p.team == 1)[0];
  299. var winPlayer = room.getPlayerList().filter((p) => p.team == 2)[0];
  300. if(deadPlayer != null)
  301. {
  302. room.setPlayerTeam(deadPlayer.id, 0);
  303. }
  304. room.setPlayerTeam(nextPlayer.id, 2);
  305.  
  306. if(winPlayer != null)
  307. {
  308. room.setPlayerTeam(winPlayer.id, 1);
  309. }
  310. }
  311.  
  312. room.stopGame();
  313.  
  314. setTimeout(function(){
  315. room.startGame();
  316. }, 300);
  317. }
  318.  
  319. function vacancy()
  320. {
  321. if(room.getPlayerList().filter((p) => p.team == 1).length == 0){
  322. return 1;
  323. }
  324. else return 2;
  325. }
  326.  
  327. room.onPlayerLeave = function(player)
  328. {
  329. if(player.team != 0)
  330. {
  331. var nextPlayer = room.getPlayerList().filter((p) => p.team == 0)[1];
  332. if(nextPlayer != null)
  333. {
  334. room.stopGame();
  335. room.setPlayerTeam(nextPlayer.id, vacancy());
  336. setTimeout(function(){
  337. room.startGame();
  338. }, 300); }
  339. }
  340. }
  341.  
  342. room.onPlayerJoin = function(player)
  343. {
  344. if(room.getPlayerList().length <= 3)
  345. {
  346. room.setPlayerTeam(player.id, vacancy());
  347. if(room.getPlayerList().length == 3)
  348. {
  349. room.stopGame();
  350. setTimeout(function(){
  351. room.startGame();
  352. }, 300); }
  353. }
  354. }
  355.  
  356. room.onStadiumChange = function(newStadiumName, byPlayer) {
  357. if (newStadiumName != "Minerva | Haxball Headless") {
  358. room.setCustomStadium(SNIPER);
  359. }
  360. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement