Advertisement
ImNotSpam

Untitled

Nov 28th, 2016
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 191.21 KB | None | 0 0
  1. ! function(e, o, t) {
  2. function a() {}
  3.  
  4. function i(e, o, t, a, i) {
  5. this.id = e, this.nick = o, this.skinID = t, this.skinURL = a, 7 == i.length && (this.color = i)
  6. }
  7.  
  8. function s() {}
  9.  
  10. function n() {
  11. if (document.getElementById("canvas")) {
  12. var e = document.getElementById("canvas");
  13. return void e.addEventListener("mousemove", function(e) {
  14. o.play && o.cursorTracking && o.setCursorPosition && (o.clientX = e.clientX, o.clientY = e.clientY, o.setCursorPosition())
  15. }, !1)
  16. }
  17. setTimeout(n, 50)
  18. }
  19.  
  20. function r() {
  21. return e.MC && e.MC.showNickDialog ? (e.MC._showNickDialog = e.MC.showNickDialog, e.MC.showNickDialog = function() {
  22. e.MC._showNickDialog.apply(this, arguments), t(".ogario-menu").show(), e.onkeydown = function() {}
  23. }, e.MC._showStatsDialog = e.MC.showStatsDialog, e.MC.showStatsDialog = function() {
  24. e.MC._showStatsDialog.apply(this, arguments), e.onkeydown = function() {}
  25. }, e.MC._onPlayerSpawn = e.MC.onPlayerSpawn, e.MC.onPlayerSpawn = function() {
  26. e.MC._onPlayerSpawn.apply(this, arguments), o.playerColor = null, M && M.onPlayerSpawn()
  27. }, e.MC._onPlayerDeath = e.MC.onPlayerDeath, e.MC.onPlayerDeath = function() {
  28. e.MC._onPlayerDeath.apply(this, arguments), M && M.onPlayerDeath()
  29. }, e.MC._onAgarioCoreLoaded = e.MC.onAgarioCoreLoaded, e.MC.onAgarioCoreLoaded = function() {
  30. e.MC._onAgarioCoreLoaded.apply(this, arguments), l()
  31. }, e.MC._wasInitialized = e.MC.wasInitialized, e.MC.wasInitialized = function() {
  32. e.MC._wasInitialized.apply(this, arguments), setTimeout(function() {
  33. l(), M && (M && M.getDefaultSettings(), t("#nick").val(w.nick).blur()), t(".btn-spectate").prop("disabled", !1), e.onkeydown = function() {}
  34. }, 1e3)
  35. }, void(e.MC.onPlayerBanned = function() {})) : void setTimeout(r, 50)
  36. }
  37.  
  38. function l() {
  39. var a = 1 * e.innerWidth,
  40. i = 1 * e.innerHeight,
  41. s = t("#helloContainer"),
  42. n = s.innerHeight();
  43. n > 0 ? o.menuHeight = n : n = o.menuHeight || 618;
  44. var r = Math.min(1, i / n),
  45. l = n * r,
  46. c = Math.round(i / 2 - .5 * l),
  47. p = "translate(-50%, 0%) scale(" + r + ")";
  48. s.css("transform", p), s.css("-ms-transform", p), s.css("-webkit-transform", p), s.css("top", "" + c + "px"), o.innerW = a, o.innerH = i
  49. }
  50.  
  51. function c() {
  52. return o.play ? u[d].exit : void 0
  53. }
  54.  
  55. function p() {}
  56. /*var h = function() {
  57. var e = !0;
  58. return function(o, t) {
  59. var a = e ? function() {
  60. if (t) {
  61. var e = t.apply(o, arguments);
  62. return t = null, e
  63. }
  64. } : function() {};
  65. return e = !1, a
  66. }
  67. }();*/
  68. "/ogario" == e.location.pathname && e.history && e.history.replaceState && e.history.replaceState({}, e.document.title, "/" + e.location.hash),
  69. function() {
  70. /*var o = h(this, function() {
  71. var e = function() {
  72. return "dev"
  73. },
  74. o = function() {
  75. return "window"
  76. },
  77. t = function() {
  78. var o = RegExp("\\w+ *\\(\\) *{\\w+ *['|\"].+['|\"];? *}");
  79. return !o.test("" + e)
  80. },
  81. a = function() {
  82. var e = RegExp("(\\\\[x|u](\\w){2,4})+");
  83. return e.test("" + o)
  84. },
  85. i = function(e) {
  86. var o = 0;
  87. e.indexOf("i" === o) && s(e)
  88. },
  89. s = function(e) {
  90. var o = 3;
  91. e.indexOf((!0 + "")[3]) !== o && i(e)
  92. };
  93. i(t() ? "indеxOf" : a() ? "indexOf" : "indеxOf")
  94. });
  95. o(), */e.NREUM && (e.NREUM = null, delete e.NREUM), e.core && (e.core = null, delete e.core), t.ajax("http://agar.io/agario.core.js", {
  96. success: function(e) {
  97. var o = e;
  98. o = o.replace(/(\(function\(([\w$]+)\){)/i, "$1 var ogario=$2.ogario,gameCtx=null;"), o = o.replace(/(~~[\w]+)\+"px Ubuntu"/i, 'ogario.namesFontWeight+" "+$1+"px "+ogario.namesFontFamily'), o = o.replace(/(([\w$]+)=[\w$]+\.getContext\(\"2d\"\);)/i, 'if($2.id==="canvas"){$1 gameCtx=$2;}else{$1}'), o = o.replace(/(setTarget:function\((\w),(\w)\)\{)([\w$]+\(\w,\w\)})/i, "$1if(!ogario.play&&ogario.targeting){$2=ogario.targetX;$3=ogario.targetY;}if(ogario.pause){$2=ogario.innerW/2*ogario.canvasScale; $3=ogario.innerH/2*ogario.canvasScale;}$4"), o = o.replace(/(function\s*([\w$]+)\(\w\){return\s*[\w$]+\(\w,\w\)})/i, "$1 ogario.getString=$2;"), o = o.replace(/(\w\[\w\+(\d+)>>3]=(\w);\w\[\w\+(\d+)>>3]=(\w);\w\[\w\+(\d+)>>3]=(\w);\w\[\w\+(\d+)>>3]=(\w);)/i, "$1 if(ogario.setMapCoords){ogario.setMapCoords($3,$5,$7,$9,$2,$8);}"), o = o.replace(/if\((\+\w\[\w>>3\])<1\.0\){/i, "if($1<ogario.zoomResetValue){"), o = o.replace(/(\w)(=\+(\w\[\w>>3\])\*\+\w\()(\.\d)(,\+\w\);)/i, "if(!ogario.autoZoom){$3=ogario.zoomValue;} $1$2 (ogario.zoomSpeedValue||0.9) $5 ogario.zoomValue=$1;"), o = o.replace(/(\w=\w\[\w>>2\]\|0;)((\w\[\w>>3\])=(\w);)(\w\[\w>>0\]=a\[\w>>0\];)/i, "$1 if(!ogario.autoZoom){$3=ogario.zoomValue;}else{$2}$5"), o = o.replace(/(do{\w=\+\w\[\(\w\[\w>>2\]\|0\)\+\d+>>2];\w=\w\+\s*)(\+\(~~\+\w\(\+\(\w\*\w\/100\.0\)\)\|0\))(;\w=\w\+4\|0}while\(\(\w\|0\)!=\(\w\|0\)\);(\w)=(\w);)/i, "ogario.playerCellsMass=[]; $1$2; ogario.playerCellsMass.push($2)$3 ogario.playerMass=$5; if(ogario.calculateMass){ogario.calculateMass();}"), o = o.replace(/([\w$]+\(\d+,\w\[\w>>2\]\|0,(\+\w),(\+\w)\)\|0;[\w$]+\(\d+,\w\[\w>>2\]\|0,\+-(\+\w\[\w\+\d+>>3\]),\+-(\+\w\[\w\+\d+>>3\])\)\|0;)/i, "$1 ogario.viewScale=$2; ogario.playerX=$4; ogario.playerY=$5; if(ogario.customDraw){ogario.customDraw(gameCtx);}"), o = o.replace(/(while\(0\);)([\w$]+\(\w,\w\);)([\w$]+\(\w,\w\);)([\w$]+\(\w,\w\);)([\w$]+\(\w,\w\);)(\w\[\w\+\d+>>0\]=1;\w=\w;return})/i, "$1$6"), o = o.replace(/[\w$]+\(\w,\d+,15\);else/i, "{}"), o = o.replace(/(\d\.\d;return}function\s*)([\w$]+\(.,.\)){/i, "$1$2{if(ogario.drawGrid){ogario.drawGrid(gameCtx);} return;"), o = o.replace(/(if\(\(\w\[\d+\]\|0\)!=0\?\(\w\[\d+\]\|\w\[(\w)\+\d+>>0\]\)<<24>>24==0:0\))((\w)=\w\[(\w)\+\d+>>2\]\|0;)else/i, "ogario.cellMemOffset=$2; $1 if(!ogario.vanillaSkins&&ogario.customSkins){$4=0;}else{$3}else"), o = o.replace(/if\((\(\w\|0\)!=0\?\(\w\[\w\+\d+>>2\]&2\|0\)!=0:0)\){/i, "if(($1)&&!ogario.customSkins){"), o = o.replace(/do\s*if\((\w)\){((\w)=!\((\+\w\[\w>>2\])<=20\.0\);)([\w$]+\(\d+,\w\[\w>>2]\|0\)\|0;[\w$]+\(\d+,\w\[\w>>2]\|0,(\+\(\+\w\[\w>>2\]\)),(\+\(\+\w\[\w>>2\]\)),\+\(\+\w\[\w>>2\])\+5\.0(\),0\.0,6\.283185307179586,0\)\|0;[\w$]+\(\d+,\w\[\w>>2]\|0\)\|0;\w=\w\[\w>>2\]\|0;)if\(\w\){([\w$]+\(\d+,\w\|0,(\w&255\|0),(\w&255\|0),(\w&255\|0)\)\|0;)([\w$]+\(\d+,\w\[\w>>2]\|0\)\|0;)/i, "var nick=null,color=null,skin=null,cellX=null,cellY=null,cellSize=null,isFood=false,isVirus=false,isPlayerCell=false,skipCell=false;do if($1=1,$1){cellSize=$4;$2 if(!$3){isFood=true;if(!ogario.showFood){break;} if(ogario.autoHideFood&&!ogario.foodIsHidden&&ogario.playerMass>1000){ogario.showFood=false;ogario.foodIsHidden=true;} if(!ogario.rainbowFood){ogario.foodCache.push({x:$6,y:$7,size:cellSize});break;}} if(ogario.hideSmallBots&&cellSize<=36){skipCell=true;break;}$5$8 if($3){if(gameCtx){ogario.globalApha=gameCtx.globalAlpha;cellX=$6;cellY=$7;if(gameCtx.lineJoin==='miter'){isVirus=true;if(ogario.play&&ogario.virColors&&ogario.setVirusColor&&ogario.setVirusStrokeColor){gameCtx.fillStyle=ogario.setVirusColor(cellSize);gameCtx.strokeStyle=ogario.setVirusStrokeColor(cellSize);}else{gameCtx.fillStyle=ogario.virusColor;gameCtx.strokeStyle=ogario.virusStrokeColor;} if(ogario.transparentViruses){gameCtx.globalAlpha*=ogario.virusAlpha;} if(ogario.virusesRange&&ogario.play){ogario.virusesCache.push({x:cellX,y:cellY,size:cellSize});}}else{if(ogario.nameMemOffset&&ogario.cellMemOffset&&ogario.getString){if((a[ogario.cellMemOffset+ogario.nameMemOffset+4>>0]&1)==0|0){nick=ogario.getString(ogario.cellMemOffset+ogario.nameMemOffset+5);}else{nick=ogario.getString(c[ogario.cellMemOffset+ogario.nameMemOffset+12>>2]|0);}} if(ogario.rgb2Hex){color=ogario.rgb2Hex($10,$11,$12);} if(nick&&nick.length>0&&color){if(ogario.showCustomSkins&&ogario.customSkins&&ogario.getCustomSkin){skin=ogario.getCustomSkin(nick,color);}} if(ogario.play){if(ogario.cellMemOffset&&ogario.idOffset&&ogario.idMemOffset){var idA=c[ogario.cellMemOffset+ogario.idOffset>>2]|0;var idB=c[ogario.idMemOffset]|0;var idC=c[ogario.idMemOffset+1]|0;loop:do{if((idB|0)!=(idC|0)){while(true){if((c[idB>>2]|0)==(idA|0)){break loop;}idB=idB+4|0;if((idB|0)==(idC|0)){idB=idC;break;}}}}while(false);isPlayerCell=(idB|0)!=(idC|0);} if(isPlayerCell&&ogario.playerCells){ogario.playerCells.push({x:cellX,y:cellY,size:cellSize});ogario.playerColor=color;} if(((ogario.oppColors&&!ogario.oppRings)||(ogario.myCustomColor&&isPlayerCell))&&ogario.setOppColor){gameCtx.fillStyle=ogario.setOppColor(cellSize,isPlayerCell);}else{$9} if(!isPlayerCell&&(ogario.splitRange||ogario.oppRings)&&ogario.cacheCells){ogario.cacheCells(cellX,cellY,cellSize);}}else{$9} if(ogario.transparentCells){gameCtx.globalAlpha*=ogario.cellsAlpha;}}$13gameCtx.globalAlpha=ogario.globalApha;if(isVirus){gameCtx.lineWidth=ogario.virusStrokeSize;gameCtx.stroke();}if(((ogario.transparentSkins||(ogario.play&&ogario.oppColors))&&!(isPlayerCell&&!ogario.myTransparentSkin))||isPlayerCell&&ogario.myTransparentSkin){gameCtx.globalAlpha*=ogario.skinsAlpha;} if(skin){gameCtx.save();gameCtx.clip();gameCtx.drawImage(skin,cellX-cellSize,cellY-cellSize,2*cellSize,2*cellSize);gameCtx.restore();}}else{$9$13}break;"), o = o.replace(/(if\(\(\w\[\w\+\d+>>0\]\|0\)==0\?\(\(\(\(\w\[\w\+\d+>>2\]\|0\)\+\(\w\[\d+\]\|0\)\|0\)>>>0\)%10\|0\|0\)!=0:0\){\w=\w\[\w>>2\]\|0;[\w$]+\(\d+,\w\|0\)\|0;\w=\w;return})([\w$]+\(\w,\w\);)/i, "if(gameCtx&&ogario){gameCtx.globalAlpha=ogario.globalApha; if(ogario.teammatesInd&&ogario.indicator&&skin&&!isPlayerCell&&cellSize<=200){gameCtx.drawImage(ogario.indicator,cellX-45,cellY-cellSize-90);}}$1 if(!(skipCell||(ogario.autoHideCellsInfo&&ogario.setAutoHideCellsInfo&&cellSize&&!isFood&&!isVirus&&!isPlayerCell&&ogario.setAutoHideCellsInfo(cellSize)))){$2}"), o = o.replace(/([\w$]+\(\d+\,\w\[\w>>2\]\|0\)\|0}}while\(0\);do\s*if\()(\w)\)/i, "$1$2&&ogario.vanillaSkins&&!skin)"), o = o.replace(/(\w=0;\w=\w\[\w\+(\d+)>>2\]\|0;\w=\w\[(\d+)\]\|0;\w=\w\[\d+\]\|0;)(\w:do)/i, "$1 ogario.idOffset=$2; ogario.idMemOffset=$3; $4"), o = o.replace(/(\w=\w\+5\+\(\(\w\|0\)\/)2(\|0\)\|0)/i, "$1 ogario.massScaleMargin $2"), o = o.replace(/((\w)=\+[\w$]+\(\+\(\+[\w$]+\(\d+\)\*10.0\)\)\/10.0;)/i, "$1 if($2<0.3){$2=0.3}"), o = o.replace(/((\w)=\(\w\|0\)<20\?20.0:\+\(\w\|0\);)/i, "$1 $2*=ogario.massScale;"), o = o.replace(/do\s+if\((\w)\|(\(\w\[\d+\]\|0\)\!=0)\){/i, "do if(($2&&!($1&&ogario.hideMyName))||!ogario.nameMemOffset){"), o = o.replace(/(\w=\w\+(\d+)\|0;\w=~~\(\+\w\[\w\+\d+>>2\]\*\.3\);)((\w)=\(\w\|0\)<26\?26.0:\+\(\w\|0\);)/i, "$1 ogario.nameMemOffset=$2; $3 $4*=ogario.nameScale;"), o = o.replace(/(if\(\w<=)(20\.0)(\){\w=\w;return})(if\(!(\w)\){if\(\(\w\[\d+\]\|0\)!=\(\w\[\d+\]\|0\)\){\w=\w;return}if\(\(\w\[\w\+\d+>>0\]\|0\)!=0\?\(\w\[\w>>0\]\|0\)==0:0\){\w=\w;return}})((\w\[\w>>2\])=~~\+[\w$]+\(\+\((\w)\*\w\/100\.0\)\);)/i, "$140.0||$5&&ogario.hideMyMass||!$5&&ogario.hideEnemiesMass$3$6");
  99. var t = document.createElement("script");
  100. t.textContent = o, t.async = !0, document.body.appendChild(t)
  101. },
  102. dataType: "text",
  103. method: "GET",
  104. cache: !1,
  105. crossDomain: !0
  106. })
  107. }();
  108. var d = "en",
  109. m = e.navigator.language || e.navigator.userLanguage;
  110. "pl" === m && (d = "pl");
  111. var u = {
  112. pl: {
  113. start: "Start",
  114. settings: "Ustawienia",
  115. restoreSettings: "Przywróc ustawienia domyślne",
  116. respGroup: "Odrodzenie",
  117. zoomGroup: "Zoom",
  118. namesGroup: "Nazwy",
  119. massGroup: "Masa",
  120. skinsGroup: "Skiny",
  121. foodGroup: "Pokarm",
  122. transparencyGroup: "Przezroczystość / kolory",
  123. gridGroup: "Siatka / sektory",
  124. miniMapGroup: "Minimapa",
  125. helpersGroup: "Wspomagacze",
  126. mouseGroup: "Sterowanie myszką",
  127. hudGroup: "HUD",
  128. chatGroup: "Czat",
  129. statsGroup: "Statystyki",
  130. extrasGroup: "Dodatkowe",
  131. noSkins: "Wyłącz skiny",
  132. noNames: "Wyłącz nazwy",
  133. noColors: "Wyłącz kolory",
  134. showMass: "Pokaż masę",
  135. skipStats: "Pomiń statystyki po śmierci",
  136. quickResp: "Szybkie odrodzenie (klawisz)",
  137. autoResp: "Auto odrodzenie",
  138. autoZoom: "Auto zoom",
  139. zoomSpeed: "Szybkość zoomu",
  140. autoHideCellsInfo: "Autoukrywanie nazw i masy",
  141. autoHideFood: "Autoukrywanie pokarmu",
  142. hideMyName: "Ukryj własną nazwę",
  143. hideMyMass: "Ukryj własną masę",
  144. hideEnemiesMass: "Ukryj masę przeciwników",
  145. vanillaSkins: "Podstawowe skiny",
  146. customSkins: "Własne skiny",
  147. myTransparentSkin: "Mój przezroczysty skin",
  148. myCustomColor: "Mój własny kolor",
  149. transparentCells: "Przezroczyste kulki",
  150. transparentViruses: "Przezroczyste wirusy",
  151. transparentSkins: "Przezroczyste skiny",
  152. showGrid: "Siatka",
  153. showBgSectors: "Sektory w tle",
  154. showMapBorders: "Granice mapy",
  155. showMiniMap: "Pokaż minimapę",
  156. showMiniMapGrid: "Pokaż siatkę minimapy",
  157. showMiniMapGuides: "Pokaż prowadnice na minimapie",
  158. oneColoredTeammates: "Jednokolorowi gracze",
  159. rainbowFood: "Kolorowy pokarm",
  160. oppColors: "Kolory przeciwników",
  161. oppRings: "Ringi przeciwników",
  162. virColors: "Kolory wirusów",
  163. splitRange: "Zasięg podziału",
  164. virusesRange: "Zasięg wirusów",
  165. textStroke: "Obwódki nazw i masy",
  166. cursorTracking: "Śledzenie kursora",
  167. teammatesInd: "Wskaźniki graczy",
  168. mouseSplit: "LPM - Split myszką",
  169. mouseFeed: "PPM - Feed myszką",
  170. mouseInvert: "Odwróć klawisze myszki",
  171. disableChat: "Wyłącz czat",
  172. hideChat: "Ukryj czat",
  173. showChatBox: "Czatbox zamiast wyskakujących wiadomości",
  174. showChatImages: "Pokaż obrazki na czacie",
  175. showChatVideos: "Pokaż filmiki na czacie",
  176. showTop5: "Pokaż top 5 teamu",
  177. showTargeting: "Pokaż namierzanie",
  178. showTime: "Pokaż aktualny czas",
  179. normalLb: 'Nagłówek "Topka"',
  180. centeredLb: "Wyśrodkowana topka",
  181. fpsAtTop: "Statystyki na górze",
  182. showStats: "Pokaż statystyki",
  183. showStatsMass: "Statystyki: Masa",
  184. showStatsSTE: "Statystyki: STE",
  185. showStatsN16: "Statystyki: n/16",
  186. showStatsFPS: "Statystyki: FPS",
  187. blockPopups: "Blokuj popupy (reklamy/sklep)",
  188. hotkeys: "Skróty klawiszowe",
  189. "hk-inst-assign": "Aby ustawić skrót klawiszowy kliknij na polu skrótu i naciśnij wybrany klawisz.",
  190. "hk-inst-delete": "Aby usunąć skrót klawiszowy kliknij na polu skrótu i naciśnij klawisz DELETE.",
  191. "hk-inst-keys": "Możliwe kombinacje skrótów klawiszowych z użyciem klawiszy CTRL oraz ALT.",
  192. "hk-feed": "Feed",
  193. "hk-macroFeed": "Szybki feed",
  194. "hk-split": "Podział",
  195. "hk-doubleSplit": "Podwójny podział",
  196. "hk-split16": "Podział na 16",
  197. "hk-pause": "Pauza kulki",
  198. "hk-showTop5": "Pokaż/ukryj top 5 teamu",
  199. "hk-showTime": "Pokaż/ukryj aktualny czas",
  200. "hk-showSplitRange": "Pokaż/ukryj zasięg podziału",
  201. "hk-showSplitInd": "Pokaż/ukryj zasięg podziału z ringami",
  202. "hk-showTeammatesInd": "Pokaż/ukryj wskaźniki graczy",
  203. "hk-showOppColors": "Pokaż/ukryj kolory przeciwników",
  204. "hk-toggleSkins": "Przełącz skiny (własne/standardowe)",
  205. "hk-showSkins": "Pokaż/ukryj skiny",
  206. "hk-showStats": "Pokaż/ukryj statystyki gry",
  207. "hk-toggleCells": "Przełącz kulkę (najmniejsza/największa)",
  208. "hk-showFood": "Pokaż/ukryj pokarm",
  209. "hk-showGrid": "Pokaż/ukryj siatkę",
  210. "hk-showMiniMapGuides": "Pokaż/ukryj prowadnice na minimapie",
  211. "hk-hideChat": "Pokaż/ukryj czat",
  212. "hk-showHUD": "Pokaż/ukryj HUD",
  213. "hk-copyLb": "Kopiuj topkę",
  214. "hk-showLb": "Pokaż/ukryj topkę",
  215. "hk-toggleAutoZoom": "Włącz/wyłącz auto zoom",
  216. "hk-resetZoom": "Reset zoomu",
  217. "hk-zoomLevel": "Zoom - poziom",
  218. "hk-toggleDeath": "Przełącz miejsce śmierci",
  219. "hk-clearChat": "Pokaż historię czatu / Czyść czat",
  220. "hk-showBgSectors": "Pokaż/ukryj sektory w tle",
  221. "hk-hideBots": "Pokaż/ukryj małe boty",
  222. "hk-showNames": "Pokaż/ukryj nazwy",
  223. "hk-showMass": "Pokaż/ukryj masę",
  224. "hk-showMiniMap": "Pokaż/ukryj minimapę",
  225. "hk-chatMessage": "Napisz wiadomość na czacie",
  226. "hk-quickResp": "Szybkie odrodzenie (respawn)",
  227. "hk-autoResp": "Włącz/wyłacz auto odrodzenie",
  228. "hk-switchServerMode": "Przełącz serwer [publiczny/prywatny]",
  229. "hk-showTargeting": "Pokaż/ukryj panel namierzania",
  230. "hk-setTargeting": "Włącz/wyłącz namierzanie (śledzenie)",
  231. "hk-cancelTargeting": "Zatrzymaj namierzanie",
  232. "hk-changeTarget": "Zmień cel",
  233. "hk-privateMiniMap": "Pokaż cel na minimapie",
  234. commands: "Komendy",
  235. comm1: "Feeduj!",
  236. comm2: "Dziel się!",
  237. comm3: "Pomocy na %currentSector%!",
  238. comm4: "Wróg na %currentSector%!",
  239. comm5: "Zabij pomocnika!",
  240. comm6: "Strzel z wirusa!",
  241. comm7: "Zjedz wirusa!",
  242. comm8: "Zjebałem, wybacz.",
  243. comm9: "Ja pierdolę...",
  244. comm0: "Kurwa mać!",
  245. comm10: "Trick!",
  246. comm11: "Lewo!",
  247. comm12: "Góra!",
  248. comm13: "Prawo!",
  249. comm14: "Dół!",
  250. saveComm: "Zapisz komendy",
  251. theme: "Wygląd",
  252. restoreThemeSettings: "Przywróc ustawienia domyślne wyglądu",
  253. basicTheming: "Podstawowy",
  254. themePreset: "Motyw",
  255. themeType: "Typ motywu",
  256. darkTheme: "Ciemny motyw",
  257. lightTheme: "Jasny motyw",
  258. mainColor: "Kolor główny",
  259. bgColor: "Tło",
  260. foodColor: "Pokarm",
  261. gridColor: "Siatka / sektory",
  262. bordersColor: "Granice mapy",
  263. virusColor: "Wirusy",
  264. virusStrokeColor: "Obwódki wirusów",
  265. namesFont: "Czcionka nazw i masy",
  266. sectorsFont: "Czcionka sektorów",
  267. nameScale: "Skala nazw",
  268. massScale: "Skala masy",
  269. foodSize: "Wielkość pokarmu",
  270. bordersWidth: "Grubość granic mapy",
  271. sectorsWidth: "Grubość siatki sektorów",
  272. sectorsFontSize: "Rozmiar czcionki sektorów",
  273. cellsAlpha: "Przezroczystość kulek",
  274. skinsAlpha: "Przezroczystość skinów",
  275. virusAlpha: "Przezroczystość wirusów",
  276. virusStrokeSize: "Grubość obwódki wirusów",
  277. cursorTrackingColor: "Śledzenie kursora",
  278. splitRangeColor: "Zasięg podziału",
  279. menuTheming: "Menu",
  280. menuPreset: "Motyw menu",
  281. menuMainColor: "Kolor główny",
  282. menuBtnTextColor: "Tekst przycisku",
  283. menuPanelColor: "Panel",
  284. menuPanelColor2: "Panel (2)",
  285. menuTextColor: "Tekst panelu",
  286. menuTextColor2: "Tekst panelu (2)",
  287. btn1Color: "Przycisk #1",
  288. btn1Color2: "Przycisk #1 (2)",
  289. btn2Color: "Przycisk #2",
  290. btn2Color2: "Przycisk #2 (2)",
  291. btn3Color: "Przycisk #3",
  292. btn3Color2: "Przycisk #3 (2)",
  293. btn4Color: "Przycisk #4",
  294. btn4Color2: "Przycisk #4 (2)",
  295. menuBg: "Grafika tła panelu",
  296. menuOpacity: "Przezroczystość",
  297. hudTheming: "HUD",
  298. hudMainColor: "Kolor główny",
  299. hudColor: "Tło",
  300. hudTextColor: "Tekst",
  301. statsHudColor: "Statystyki",
  302. timeHudColor: "Czas",
  303. top5MassColor: "Masa w top 5",
  304. lbMeColor: "Topka - ja",
  305. lbTeammateColor: "Topka - team",
  306. hudFont: "Czcionka HUD",
  307. hudScale: "Skala HUD",
  308. chatTheming: "Czat",
  309. messageColor: "Tło wiadomości",
  310. messageTextColor: "Tekst wiadomości",
  311. messageTimeColor: "Czas wiadomości",
  312. messageNickColor: "Nick wiadomości",
  313. commandsColor: "Tło komendy",
  314. commandsTextColor: "Tekst komendy",
  315. commandsTimeColor: "Czas komendy",
  316. commandsNickColor: "Nick komendy",
  317. chatBoxColor: "Tło czatboxu",
  318. chatScale: "Skala czatu",
  319. miniMapTheming: "Minimapa",
  320. miniMapSectorColor: "Sektor",
  321. miniMapGuidesColor: "Prowadnice",
  322. miniMapNickColor: "Nick",
  323. miniMapNickStrokeColor: "Obwódka nicku",
  324. miniMapMyCellColor: "Moja kulka",
  325. miniMapMyCellStrokeColor: "Obwódka mojej kulki",
  326. miniMapTeammatesColor: "Gracze",
  327. miniMapDeathLocationColor: "Miejsce śmierci",
  328. miniMapFont: "Czcionka minimapy",
  329. miniMapNickFont: "Czcionka nicku",
  330. miniMapWidth: "Szerokość minimapy",
  331. miniMapSectorsOpacity: "Przezroczystość sektorów",
  332. miniMapNickSize: "Rozmiar nicku",
  333. miniMapNickStrokeSize: "Grubość obwódki nicku",
  334. miniMapMyCellSize: "Wielkość mojej kulki",
  335. miniMapMyCellStrokeSize: "Grubość obwódki mojej kulki",
  336. miniMapTeammatesSize: "Wielkość graczy",
  337. imagesTheming: "Grafika / kursory",
  338. customBackground: "Grafika tła",
  339. customCursor: "Grafika kursora",
  340. hideChatMsgA: "Czat jest aktywny!",
  341. hideChatMsgB: "Czat został ukryty!",
  342. showSkinsMsgA: "Skiny są widoczne!",
  343. showSkinsMsgB: "Skiny zostały ukryte!",
  344. hideSmallBotsMsgA: "Małe boty są widoczne!",
  345. hideSmallBotsMsgB: "Małe boty zostały ukryte!",
  346. autoRespMsgA: "Auto odrodzenie zostało włączone!",
  347. autoRespMsgB: "Auto odrodzenie zostało wyłączone!",
  348. autoZoomMsgA: "Auto zoom został włączony!",
  349. autoZoomMsgB: "Auto zoom został wyłączony!",
  350. targetNotSet: "Brak celu",
  351. targetDead: "Nie żyje",
  352. targetDistance: "Dystans",
  353. targetMass: "Masa razem",
  354. totalPartyPlayers: "Aktywnych graczy",
  355. totalPartyMass: "Łącznie masy",
  356. exportImport: "Eksport / import ustawień",
  357. exportSettings: "Eksportuj ustawienia",
  358. exportInfo: "Aby wyeksportować wybrane ustawienia skopiuj poniższy kod i zapisz go w pliku tekstowym z kodowaniem Unicode.",
  359. importSettings: "Importuj ustawienia",
  360. importInfo: 'Aby zaimportować wybrane ustawienia wklej poniżej wyeksportowany wcześniej kod i naciśnij przycisk "Importuj ustawienia".',
  361. profile: "Profil",
  362. profiles: "Profile",
  363. skins: "Skiny",
  364. moreSkins: "Dodaj skiny",
  365. thanks: "Dzięki Awesome!",
  366. saveSett: "Zapisz ustawienia",
  367. saved: "Zapisano!",
  368. resetSett: "Resetuj ustawienia",
  369. close: "Zamknij",
  370. enterChatMsg: "Napisz wiadomość",
  371. activeParties: "Aktywne party",
  372. noActiveParties: "Brak aktywnych party ;(",
  373. playlist: "Playlista",
  374. pause: "PAUZA!",
  375. visit: "Odwiedź",
  376. exit: "OGARio by szymy: Czy na pewno chcesz opuścic grę?",
  377. blockWarn: "UWAGA! Popupy zostały zablokowane w ustawieniach.",
  378. unblockPopups: "Odblokuj tymczasowo",
  379. mass: "Masa",
  380. score: "Top",
  381. leaderboard: "Topka",
  382. page_back_button: "Wróć",
  383. page_create_party: "Stwórz party",
  384. page_join_party: "Dołącz",
  385. page_login_and_play: "Zaloguj",
  386. page_logout: "Wyloguj",
  387. page_menu_login_facebook: "Zaloguj z Facebook",
  388. page_menu_login_google: "Zaloguj z Google",
  389. page_menu_main_free_coins: "Darmowe Monety",
  390. page_menu_main_gifts: "Prezenty",
  391. page_party_join_error: "Nie można dołączyć do tego party. Upewnij się, że token jest prawidłowy lub stwórz nowy.",
  392. page_play: "Graj",
  393. page_play_as_guest: "Graj jako gość",
  394. page_shop: "Sklep",
  395. page_spectate: "Obserwuj",
  396. page_stats: "Statystyki"
  397. },
  398. en: {
  399. start: "Home",
  400. settings: "Settings",
  401. restoreSettings: "Restore default settings",
  402. respGroup: "Respawn",
  403. zoomGroup: "Zoom",
  404. namesGroup: "Names",
  405. massGroup: "Mass",
  406. skinsGroup: "Skins",
  407. foodGroup: "Food",
  408. transparencyGroup: "Transparency / colors",
  409. gridGroup: "Grid / sectors",
  410. miniMapGroup: "Minimap",
  411. helpersGroup: "Helpers",
  412. mouseGroup: "Mouse control",
  413. hudGroup: "HUD",
  414. chatGroup: "Chat",
  415. statsGroup: "Stats",
  416. extrasGroup: "Extras",
  417. noSkins: "No skins",
  418. noNames: "No names",
  419. noColors: "No colors",
  420. showMass: "Show mass",
  421. skipStats: "Skip stats after death",
  422. quickResp: "Quick respawn (hotkey)",
  423. autoResp: "Auto respawn",
  424. autoZoom: "Auto zoom",
  425. zoomSpeed: "Zoom speed",
  426. autoHideCellsInfo: "Auto hide names and mass",
  427. autoHideFood: "Auto hide food",
  428. hideMyName: "Hide my name",
  429. hideMyMass: "Hide my mass",
  430. hideEnemiesMass: "Hide enemies mass",
  431. vanillaSkins: "Vanilla skins",
  432. customSkins: "Custom skins",
  433. myTransparentSkin: "My transparent skin",
  434. myCustomColor: "My custom color",
  435. transparentCells: "Transparent cells",
  436. transparentViruses: "Transparent viruses",
  437. transparentSkins: "Transparent skins",
  438. showGrid: "Show grid",
  439. showBgSectors: "Show background sectors",
  440. showMapBorders: "Show map borders",
  441. showMiniMap: "Show minimap",
  442. showMiniMapGrid: "Show minimap grid",
  443. showMiniMapGuides: "Show minimap guides",
  444. oneColoredTeammates: "One-colored teammates",
  445. rainbowFood: "Rainbow food",
  446. oppColors: "Opponents colors",
  447. oppRings: "Opponents rings",
  448. virColors: "Viruses colors",
  449. splitRange: "Split range",
  450. virusesRange: "Viruses range",
  451. textStroke: "Names and mass stroke",
  452. cursorTracking: "Cursor tracking",
  453. teammatesInd: "Teammates indicators",
  454. mouseSplit: "LMB - Mouse split",
  455. mouseFeed: "RMB - Mouse feed",
  456. mouseInvert: "Invert mouse buttons",
  457. disableChat: "Disable chat",
  458. hideChat: "Hide chat",
  459. showChatBox: "Chatbox instead of popups",
  460. showChatImages: "Show images on chat",
  461. showChatVideos: "Show videos on chat",
  462. showTop5: "Show team top 5",
  463. showTargeting: "Show targeting",
  464. showTime: "Show current time",
  465. normalLb: '"Leaderboard" header',
  466. centeredLb: "Centered leaderboard",
  467. fpsAtTop: "Game stats at the top",
  468. showStats: "Show game stats",
  469. showStatsMass: "Game stats: Mass",
  470. showStatsSTE: "Game stats: STE",
  471. showStatsN16: "Game stats: n/16",
  472. showStatsFPS: "Game stats: FPS",
  473. blockPopups: "Block popups (ads/shop)",
  474. hotkeys: "Hotkeys",
  475. "hk-inst-assign": "To assign a hotkey click on the input field and press your chosen key.",
  476. "hk-inst-delete": "To delete a hotkey click on the input field and press the DELETE key.",
  477. "hk-inst-keys": "Possible key combinations with the CTRL and ALT keys.",
  478. "hk-feed": "Feed",
  479. "hk-macroFeed": "Macro feed",
  480. "hk-split": "Split",
  481. "hk-doubleSplit": "Double split",
  482. "hk-split16": "Split 16",
  483. "hk-pause": "Cell pause",
  484. "hk-showTop5": "Show/hide team top 5",
  485. "hk-showTime": "Show/hide current time",
  486. "hk-showSplitRange": "Show/hide split range",
  487. "hk-showSplitInd": "Show/hide split indicators",
  488. "hk-showTeammatesInd": "Show/hide teammates indicators",
  489. "hk-showOppColors": "Show/hide opponents colors",
  490. "hk-toggleSkins": "Toggle skins (custom/default)",
  491. "hk-showSkins": "Show/hide skins",
  492. "hk-showStats": "Show/hide game stats",
  493. "hk-toggleCells": "Toggle own cells (smallest/biggest)",
  494. "hk-showFood": "Show/hide food",
  495. "hk-showGrid": "Show/hide grid",
  496. "hk-showMiniMapGuides": "Show/hide minimap guides",
  497. "hk-hideChat": "Show/hide chat",
  498. "hk-showHUD": "Show/hide HUD",
  499. "hk-copyLb": "Copy leaderboard",
  500. "hk-showLb": "Show/hide leaderboard",
  501. "hk-toggleAutoZoom": "Toggle auto zoom",
  502. "hk-resetZoom": "Reset zoom",
  503. "hk-zoomLevel": "Zoom level",
  504. "hk-toggleDeath": "Toggle death location",
  505. "hk-clearChat": "Show chat history / Clear chat",
  506. "hk-showBgSectors": "Show/hide background sectors",
  507. "hk-hideBots": "Show/hide small bots",
  508. "hk-showNames": "Show/hide names",
  509. "hk-showMass": "Show/hide mass",
  510. "hk-showMiniMap": "Show/hide minimap",
  511. "hk-chatMessage": "Enter chat message",
  512. "hk-quickResp": "Quick respawn",
  513. "hk-autoResp": "Toggle auto respawn",
  514. "hk-switchServerMode": "Switch server [public/private]",
  515. "hk-showTargeting": "Show/hide targeting panel",
  516. "hk-setTargeting": "Start/stop targeting (following)",
  517. "hk-cancelTargeting": "Cancel targeting",
  518. "hk-changeTarget": "Change target",
  519. "hk-privateMiniMap": "Show target on the minimap",
  520. commands: "Commands",
  521. comm1: "Feed me!",
  522. comm2: "Split into me!",
  523. comm3: "Need backup at %currentSector%!",
  524. comm4: "Enemy spotted at %currentSector%!",
  525. comm5: "Need a teammate!",
  526. comm6: "Tank the virus!",
  527. comm7: "Eat the virus!",
  528. comm8: "Let's bait!",
  529. comm9: "Fake tricksplit!",
  530. comm0: "Fuck!",
  531. comm10: "Tricksplit!",
  532. comm11: "Left!",
  533. comm12: "Up!",
  534. comm13: "Right!",
  535. comm14: "Bottom!",
  536. saveComm: "Save commands",
  537. theme: "Theme",
  538. restoreThemeSettings: "Restore theme default settings",
  539. basicTheming: "Basic theming",
  540. themePreset: "Theme preset",
  541. themeType: "Theme type",
  542. darkTheme: "Dark theme",
  543. lightTheme: "Light theme",
  544. mainColor: "Main color",
  545. bgColor: "Background",
  546. foodColor: "Food",
  547. gridColor: "Grid / sectors",
  548. bordersColor: "Map borders",
  549. virusColor: "Virus",
  550. virusStrokeColor: "Virus stroke",
  551. namesFont: "Names & mass font",
  552. sectorsFont: "Sectors font",
  553. nameScale: "Name scale",
  554. massScale: "Mass scale",
  555. foodSize: "Food size",
  556. bordersWidth: "Map borders width",
  557. sectorsWidth: "Sectors grid width",
  558. sectorsFontSize: "Sectors font size",
  559. cellsAlpha: "Cells transparency",
  560. skinsAlpha: "Skins transparency",
  561. virusAlpha: "Virus transparency",
  562. virusStrokeSize: "Virus stroke size",
  563. cursorTrackingColor: "Cursor tracking",
  564. splitRangeColor: "Split range",
  565. menuTheming: "Menu",
  566. menuPreset: "Menu theme",
  567. menuMainColor: "Main color",
  568. menuBtnTextColor: "Button text",
  569. menuPanelColor: "Panel",
  570. menuPanelColor2: "Panel (2)",
  571. menuTextColor: "Panel text",
  572. menuTextColor2: "Panel text (2)",
  573. btn1Color: "Button #1",
  574. btn1Color2: "Button #1 (2)",
  575. btn2Color: "Button #2",
  576. btn2Color2: "Button #2 (2)",
  577. btn3Color: "Button #3",
  578. btn3Color2: "Button #3 (2)",
  579. btn4Color: "Button #4",
  580. btn4Color2: "Button #4 (2)",
  581. menuBg: "Panel background image",
  582. menuOpacity: "Transparency",
  583. hudTheming: "HUD",
  584. hudMainColor: "Main color",
  585. hudColor: "Background",
  586. hudTextColor: "Text",
  587. statsHudColor: "Stats",
  588. timeHudColor: "Time",
  589. top5MassColor: "Top 5 mass",
  590. lbMeColor: "Leaderboard - me",
  591. lbTeammateColor: "Leaderboard - teammate",
  592. hudFont: "HUD font",
  593. hudScale: "HUD scale",
  594. chatTheming: "Chat",
  595. messageColor: "Message background",
  596. messageTextColor: "Message text",
  597. messageTimeColor: "Message time",
  598. messageNickColor: "Message nick",
  599. commandsColor: "Command background",
  600. commandsTextColor: "Command text",
  601. commandsTimeColor: "Command time",
  602. commandsNickColor: "Command nick",
  603. chatBoxColor: "Chatbox color",
  604. chatScale: "Chat scale",
  605. miniMapTheming: "Minimap",
  606. miniMapSectorColor: "Sector",
  607. miniMapGuidesColor: "Guides",
  608. miniMapNickColor: "Nick",
  609. miniMapNickStrokeColor: "Nick stroke",
  610. miniMapMyCellColor: "My cell",
  611. miniMapMyCellStrokeColor: "My cell stroke",
  612. miniMapTeammatesColor: "Teammates",
  613. miniMapDeathLocationColor: "Death location",
  614. miniMapFont: "Minimap font",
  615. miniMapNickFont: "Nick font",
  616. miniMapWidth: "Minimap width",
  617. miniMapSectorsOpacity: "Sectors transparency",
  618. miniMapNickSize: "Nick size",
  619. miniMapNickStrokeSize: "Nick stroke size",
  620. miniMapMyCellSize: "My cell size",
  621. miniMapMyCellStrokeSize: "My cell stroke size",
  622. miniMapTeammatesSize: "Teammates size",
  623. imagesTheming: "Graphics / cursors",
  624. customBackground: "Custom background image",
  625. customCursor: "Custom cursor image",
  626. hideChatMsgA: "Chat is visible!",
  627. hideChatMsgB: "Chat is hidden!",
  628. showSkinsMsgA: "Skins are visible!",
  629. showSkinsMsgB: "Skins are hidden!",
  630. hideSmallBotsMsgA: "Small bots are visible!",
  631. hideSmallBotsMsgB: "Small bots are hidden!",
  632. autoRespMsgA: "Auto respawn is on!",
  633. autoRespMsgB: "Auto respawn is off!",
  634. autoZoomMsgA: "Auto zoom is on!",
  635. autoZoomMsgB: "Auto zoom is off!",
  636. targetNotSet: "Target not set",
  637. targetDead: "Dead",
  638. targetDistance: "Distance",
  639. targetMass: "Mass altogether",
  640. totalPartyPlayers: "Active players",
  641. totalPartyMass: "Total mass",
  642. exportImport: "Export / import settings",
  643. exportSettings: "Export settings",
  644. exportInfo: "To export selected settings copy the code below and save it to a text file encoded in Unicode.",
  645. importSettings: "Import settings",
  646. importInfo: 'To import selected settings paste an exported code below and press the "Import settings" button.',
  647. profile: "Profile",
  648. profiles: "Profiles",
  649. skins: "Skins",
  650. moreSkins: "Add skins",
  651. thanks: "Thanks to Awesome!",
  652. saveSett: "Save settings",
  653. saved: "Saved!",
  654. resetSett: "Reset to default",
  655. close: "Close",
  656. enterChatMsg: "Enter chat message",
  657. activeParties: "Active parties",
  658. noActiveParties: "No active parties ;(",
  659. playlist: "Playlist",
  660. pause: "PAUSE!",
  661. visit: "Visit",
  662. exit: "OGARio by szymy: Are you sure you want to quit the game?",
  663. blockWarn: "WARNING! Popups are blocked in the settings.",
  664. unblockPopups: "Temporary unblock",
  665. mass: "Mass",
  666. score: "Score",
  667. leaderboard: "Leaderboard",
  668. page_menu_main_free_coins: "Free Coins",
  669. page_menu_main_gifts: "Gifts",
  670. page_shop: "Shop"
  671. }
  672. },
  673. g = {
  674. comm1: u[d].comm1,
  675. comm2: u[d].comm2,
  676. comm3: u[d].comm3,
  677. comm4: u[d].comm4,
  678. comm5: u[d].comm5,
  679. comm6: u[d].comm6,
  680. comm7: u[d].comm7,
  681. comm8: u[d].comm8,
  682. comm9: u[d].comm9,
  683. comm0: u[d].comm0,
  684. comm10: u[d].comm10,
  685. comm11: u[d].comm11,
  686. comm12: u[d].comm12,
  687. comm13: u[d].comm13,
  688. comm14: u[d].comm14
  689. },
  690. f = {
  691. "&": "&amp;",
  692. "<": "&lt;",
  693. ">": "&gt;",
  694. '"': "&quot;",
  695. "'": "&#39;",
  696. "/": "&#x2F;"
  697. },
  698. k = {
  699. "ogario-v3": {
  700. name: "OGARio v3",
  701. darkTheme: !0,
  702. mainColor: "#01d9cc",
  703. bgColor: "#000a11",
  704. gridColor: "#00243e",
  705. bordersColor: "#01d9cc",
  706. foodColor: "#5000ff",
  707. virusColor: "#002f52",
  708. virusStrokeColor: "#00b9e8",
  709. cursorTrackingColor: "#ffffff",
  710. splitRangeColor: "#ffffff",
  711. namesFont: "ubuntu-bold",
  712. sectorsFont: "ubuntu",
  713. nameScale: 1,
  714. massScale: 3,
  715. foodSize: 5,
  716. bordersWidth: 40,
  717. sectorsWidth: 40,
  718. sectorsFontSize: 1200,
  719. cellsAlpha: .9,
  720. skinsAlpha: .7,
  721. virusAlpha: .6,
  722. virusStrokeSize: 14,
  723. menuPreset: "ogario-v3",
  724. menuMainColor: "#01d9cc",
  725. menuBtnTextColor: "#ffffff",
  726. menuPanelColor: "#00243e",
  727. menuPanelColor2: "#002f52",
  728. menuTextColor: "#ffffff",
  729. menuTextColor2: "#8096a7",
  730. btn1Color: "#018cf6",
  731. btn1Color2: "#0176ce",
  732. btn2Color: "#00b9e8",
  733. btn2Color2: "#0099c0",
  734. btn3Color: "#8d5fe6",
  735. btn3Color2: "#814ee3",
  736. btn4Color: "#bf00aa",
  737. btn4Color2: "#a80096",
  738. menuBg: "http://cdn.ogario.ovh/static/img/pattern.png",
  739. menuOpacity: .96,
  740. hudMainColor: "#01d9cc",
  741. hudColor: "rgba(0,0,0,0.4)",
  742. hudTextColor: "#ffffff",
  743. statsHudColor: "#ffffff",
  744. timeHudColor: "#01d9cc",
  745. top5MassColor: "#bf00aa",
  746. lbMeColor: "#bf00aa",
  747. lbTeammateColor: "#018cf6",
  748. hudFont: "ubuntu-bold",
  749. hudScale: 1,
  750. messageColor: "rgba(0,0,0,0.4)",
  751. messageTextColor: "#ffffff",
  752. messageTimeColor: "#018cf6",
  753. messageNickColor: "#01d9cc",
  754. commandsColor: "rgba(191,0,170,0.9)",
  755. commandsTextColor: "#ffffff",
  756. commandsTimeColor: "#bf00aa",
  757. commandsNickColor: "#ffffff",
  758. chatBoxColor: "rgba(0,0,0,0.4)",
  759. chatScale: 1,
  760. miniMapSectorColor: "#01d9cc",
  761. miniMapGuidesColor: "#bf00aa",
  762. miniMapNickColor: "#ffffff",
  763. miniMapNickStrokeColor: "#000000",
  764. miniMapMyCellColor: "#ffffff",
  765. miniMapMyCellStrokeColor: "#bf00aa",
  766. miniMapTeammatesColor: "#01d9cc",
  767. miniMapDeathLocationColor: "#bf00aa",
  768. miniMapFont: "ubuntu-bold",
  769. miniMapNickFont: "ubuntu-bold",
  770. miniMapWidth: 240,
  771. miniMapSectorsOpacity: .1,
  772. miniMapNickSize: 11,
  773. miniMapNickStrokeSize: 2,
  774. miniMapMyCellSize: 7.5,
  775. miniMapMyCellStrokeSize: 4,
  776. miniMapTeammatesSize: 5.5,
  777. customBackground: "",
  778. customCursor: "http://cdn.ogario.ovh/static/img/cursors/cursor_02.cur"
  779. },
  780. "ogario-orange": {
  781. name: "OGARio v2",
  782. darkTheme: !0,
  783. mainColor: "#ff7800",
  784. bgColor: "#111111",
  785. gridColor: "#292929",
  786. bordersColor: "#ff7800",
  787. foodColor: "#e16400",
  788. virusColor: "#666666",
  789. virusStrokeColor: "#666666",
  790. hudMainColor: "#ff7800",
  791. statsHudColor: "#ff7800",
  792. top5MassColor: "#ff7800",
  793. timeHudColor: "#ff7800",
  794. messageNickColor: "#ff7800",
  795. commandsColor: "rgba(255,120,0,0.9)",
  796. commandsTimeColor: "#ff7800",
  797. commandsTextColor: "#ffffff",
  798. miniMapSectorColor: "#ff7800",
  799. miniMapGuidesColor: "#ff7800",
  800. miniMapMyCellColor: "#ffffff",
  801. miniMapMyCellStrokeColor: "#ff7800",
  802. miniMapTeammatesColor: "#ff7800",
  803. miniMapDeathLocationColor: "#ff7800",
  804. miniMapSectorsOpacity: .1
  805. },
  806. "ogario-gold": {
  807. name: "OGARio LE",
  808. darkTheme: !0,
  809. mainColor: "#b5a642",
  810. bgColor: "#000000",
  811. gridColor: "#111111",
  812. bordersColor: "#b5a642",
  813. foodColor: "#998c36",
  814. virusColor: "#666666",
  815. virusStrokeColor: "#666666",
  816. hudMainColor: "#b5a642",
  817. statsHudColor: "#b5a642",
  818. top5MassColor: "#b5a642",
  819. timeHudColor: "#b5a642",
  820. messageNickColor: "#b5a642",
  821. commandsColor: "rgba(181,166,66,0.9)",
  822. commandsTimeColor: "#b5a642",
  823. commandsTextColor: "#ffffff",
  824. miniMapSectorColor: "#b5a642",
  825. miniMapGuidesColor: "#b5a642",
  826. miniMapMyCellColor: "#ffffff",
  827. miniMapMyCellStrokeColor: "#b5a642",
  828. miniMapTeammatesColor: "#b5a642",
  829. miniMapDeathLocationColor: "#b5a642",
  830. miniMapSectorsOpacity: .1
  831. },
  832. "sniikz-style": {
  833. name: "SniiKz's Style",
  834. darkTheme: !0,
  835. mainColor: "#01d9cc",
  836. bgColor: "#000000",
  837. gridColor: "#00243e",
  838. bordersColor: "#ffffff",
  839. foodColor: "#5000ff",
  840. virusColor: "#3b3b3b",
  841. virusStrokeColor: "#ffffff",
  842. cursorTrackingColor: "#ffffff",
  843. splitRangeColor: "#ffffff",
  844. massScale: 4,
  845. foodSize: 1,
  846. bordersWidth: 40,
  847. sectorsWidth: 40,
  848. sectorsFontSize: 1200,
  849. cellsAlpha: .99,
  850. skinsAlpha: .7,
  851. virusAlpha: .4,
  852. virusStrokeSize: 10,
  853. menuPreset: "ogario-v3",
  854. menuMainColor: "#fc0079",
  855. menuBtnTextColor: "#ffffff",
  856. menuPanelColor: "#050008",
  857. menuPanelColor2: "#1d0526",
  858. menuTextColor: "#ffffff",
  859. menuTextColor2: "#65458f",
  860. btn1Color: "#4f0242",
  861. btn1Color2: "#3b0431",
  862. btn2Color: "#6b0036",
  863. btn2Color2: "#4d0227",
  864. btn3Color: "#aa084e",
  865. btn3Color2: "#80063b",
  866. btn4Color: "#aa084e",
  867. btn4Color2: "#8a063f",
  868. menuBg: "http://cdn.ogario.ovh/static/img/pattern.png",
  869. menuOpacity: 1,
  870. hudMainColor: "#5974ff",
  871. hudColor: "rgba(36,36,36,0.49)",
  872. hudTextColor: "#ffffff",
  873. statsHudColor: "#ffffff",
  874. timeHudColor: "#737373",
  875. top5MassColor: "#1fe000",
  876. lbMeColor: "#bf00aa",
  877. lbTeammateColor: "#018cf6",
  878. hudScale: 1.15,
  879. messageColor: "rgba(0,0,0,0.4)",
  880. messageTextColor: "#e8e8e8",
  881. messageTimeColor: "#545454",
  882. messageNickColor: "#05ff00",
  883. commandsColor: "rgba(36,36,36,0.9)",
  884. commandsTextColor: "#ffffff",
  885. commandsTimeColor: "#545454",
  886. commandsNickColor: "#ffffff",
  887. chatBoxColor: "rgba(0,0,0,0.4)",
  888. chatScale: 1,
  889. miniMapSectorColor: "#000000",
  890. miniMapGuidesColor: "#ff00a8",
  891. miniMapNickColor: "#ffffff",
  892. miniMapNickStrokeColor: "#4d4d4d",
  893. miniMapMyCellColor: "#f0ff3d",
  894. miniMapMyCellStrokeColor: "#acba07",
  895. miniMapTeammatesColor: "#305eff",
  896. miniMapDeathLocationColor: "#2b2b2b",
  897. miniMapWidth: 250,
  898. miniMapSectorsOpacity: .1,
  899. miniMapNickSize: 9,
  900. miniMapNickStrokeSize: 0,
  901. miniMapMyCellSize: 5,
  902. miniMapMyCellStrokeSize: 0,
  903. miniMapTeammatesSize: 5,
  904. customBackground: "",
  905. customCursor: "http://cdn.ogario.ovh/static/img/cursors/cursor_01.cur"
  906. },
  907. "hkg-style": {
  908. name: "HKG Style",
  909. darkTheme: !0,
  910. mainColor: "#651fff",
  911. bgColor: "#000000",
  912. gridColor: "#111111",
  913. bordersColor: "#ffffff",
  914. foodColor: "#651fff",
  915. virusColor: "#666666",
  916. virusStrokeColor: "#666666",
  917. hudMainColor: "#651fff",
  918. statsHudColor: "#651fff",
  919. top5MassColor: "#651fff",
  920. timeHudColor: "#651fff",
  921. messageNickColor: "#651fff",
  922. commandsColor: "rgba(101,31,255,0.9)",
  923. commandsTimeColor: "#651fff",
  924. commandsTextColor: "#ffffff",
  925. miniMapSectorColor: "#651fff",
  926. miniMapGuidesColor: "#651fff",
  927. miniMapMyCellColor: "#ffffff",
  928. miniMapMyCellStrokeColor: "#651fff",
  929. miniMapTeammatesColor: "#651fff",
  930. miniMapDeathLocationColor: "#651fff",
  931. miniMapSectorsOpacity: .1
  932. },
  933. "agario-light": {
  934. name: "Agar.io Light",
  935. darkTheme: !1,
  936. mainColor: "#ffffff",
  937. bgColor: "#f2fbff",
  938. gridColor: "#ced6d9",
  939. bordersColor: "#858a8c",
  940. foodColor: "#2de52d",
  941. virusColor: "#33ff33",
  942. virusStrokeColor: "#2de52d",
  943. hudMainColor: "#ffffff",
  944. statsHudColor: "#ffffff",
  945. top5MassColor: "#ffffff",
  946. timeHudColor: "#ffffff",
  947. messageNickColor: "#ffffff",
  948. commandsColor: "rgba(255,255,255,0.9)",
  949. commandsTimeColor: "#ffffff",
  950. commandsTextColor: "#000000",
  951. miniMapSectorColor: "#ffffff",
  952. miniMapGuidesColor: "#ffffff",
  953. miniMapMyCellColor: "#ffffff",
  954. miniMapMyCellStrokeColor: "#ffffff",
  955. miniMapTeammatesColor: "#ffffff",
  956. miniMapDeathLocationColor: "#ffffff",
  957. miniMapSectorsOpacity: .25
  958. },
  959. "agario-dark": {
  960. name: "Agar.io Dark",
  961. darkTheme: !0,
  962. mainColor: "#ffffff",
  963. bgColor: "#111111",
  964. gridColor: "#333333",
  965. bordersColor: "#999999",
  966. foodColor: "#2de52d",
  967. virusColor: "#33ff33",
  968. virusStrokeColor: "#2de52d",
  969. hudMainColor: "#ffffff",
  970. statsHudColor: "#ffffff",
  971. top5MassColor: "#ffffff",
  972. timeHudColor: "#ffffff",
  973. messageNickColor: "#ffffff",
  974. commandsColor: "rgba(255,255,255,0.9)",
  975. commandsTimeColor: "#ffffff",
  976. commandsTextColor: "#ffffff",
  977. miniMapSectorColor: "#ffffff",
  978. miniMapGuidesColor: "#ffffff",
  979. miniMapMyCellColor: "#ffffff",
  980. miniMapMyCellStrokeColor: "#ffffff",
  981. miniMapTeammatesColor: "#ffffff",
  982. miniMapDeathLocationColor: "#ffffff",
  983. miniMapSectorsOpacity: .1
  984. }
  985. },
  986. y = {
  987. "ogario-v3": {
  988. name: "OGARio v3",
  989. menuMainColor: "#01d9cc",
  990. menuBtnTextColor: "#ffffff",
  991. menuPanelColor: "#00243e",
  992. menuPanelColor2: "#002f52",
  993. menuTextColor: "#ffffff",
  994. menuTextColor2: "#8096a7",
  995. btn1Color: "#018cf6",
  996. btn1Color2: "#0176ce",
  997. btn2Color: "#00b9e8",
  998. btn2Color2: "#0099c0",
  999. btn3Color: "#8d5fe6",
  1000. btn3Color2: "#814ee3",
  1001. btn4Color: "#f300d8",
  1002. btn4Color2: "#df00c6",
  1003. menuBg: "http://cdn.ogario.ovh/static/img/pattern.png"
  1004. },
  1005. "ogario-v2": {
  1006. name: "OGARio v2",
  1007. menuMainColor: "#ff7800",
  1008. menuBtnTextColor: "#ffffff",
  1009. menuPanelColor: "#222222",
  1010. menuPanelColor2: "#333333",
  1011. menuTextColor: "#bbbbbb",
  1012. menuTextColor2: "#bbbbbb",
  1013. btn1Color: "#428bca",
  1014. btn1Color2: "#3071a9",
  1015. btn2Color: "#5cb85c",
  1016. btn2Color2: "#449d44",
  1017. btn3Color: "#f0ad4e",
  1018. btn3Color2: "#ec971f",
  1019. btn4Color: "#d9534f",
  1020. btn4Color2: "#c9302c",
  1021. menuBg: ""
  1022. },
  1023. agario: {
  1024. name: "Agar.io",
  1025. menuMainColor: "#5bc0de",
  1026. menuBtnTextColor: "#ffffff",
  1027. menuPanelColor: "#ffffff",
  1028. menuPanelColor2: "#cccccc",
  1029. menuTextColor: "#333333",
  1030. menuTextColor2: "#999999",
  1031. btn1Color: "#428bca",
  1032. btn1Color2: "#3071a9",
  1033. btn2Color: "#5cb85c",
  1034. btn2Color2: "#449d44",
  1035. btn3Color: "#f0ad4e",
  1036. btn3Color2: "#ec971f",
  1037. btn4Color: "#d9534f",
  1038. btn4Color2: "#c9302c",
  1039. menuBg: ""
  1040. }
  1041. },
  1042. C = {
  1043. preset: "ogario-v3",
  1044. darkTheme: !0,
  1045. mainColor: "#01d9cc",
  1046. bgColor: "#000a11",
  1047. gridColor: "#00243e",
  1048. bordersColor: "#01d9cc",
  1049. foodColor: "#5000ff",
  1050. virusColor: "#002f52",
  1051. virusStrokeColor: "#00b9e8",
  1052. cursorTrackingColor: "#ffffff",
  1053. splitRangeColor: "#ffffff",
  1054. namesFont: "ubuntu-bold",
  1055. namesFontFamily: "Ubuntu",
  1056. namesFontWeight: 700,
  1057. sectorsFont: "ubuntu",
  1058. sectorsFontFamily: "Ubuntu",
  1059. sectorsFontWeight: 400,
  1060. sectorsX: 5,
  1061. sectorsY: 5,
  1062. nameScale: 1,
  1063. massScale: 3,
  1064. massScaleMargin: 1.25,
  1065. foodSize: 5,
  1066. bordersWidth: 40,
  1067. sectorsWidth: 40,
  1068. sectorsFontSize: 1200,
  1069. cellsAlpha: .9,
  1070. skinsAlpha: .7,
  1071. virusAlpha: .6,
  1072. virusStrokeSize: 14,
  1073. menuPreset: "ogario-v3",
  1074. menuMainColor: "#01d9cc",
  1075. menuBtnTextColor: "#ffffff",
  1076. menuPanelColor: "#00243e",
  1077. menuPanelColor2: "#002f52",
  1078. menuTextColor: "#ffffff",
  1079. menuTextColor2: "#8096a7",
  1080. btn1Color: "#018cf6",
  1081. btn1Color2: "#0176ce",
  1082. btn2Color: "#00b9e8",
  1083. btn2Color2: "#0099c0",
  1084. btn3Color: "#8d5fe6",
  1085. btn3Color2: "#814ee3",
  1086. btn4Color: "#bf00aa",
  1087. btn4Color2: "#a80096",
  1088. menuBg: "http://cdn.ogario.ovh/static/img/pattern.png",
  1089. menuOpacity: .96,
  1090. hudMainColor: "#01d9cc",
  1091. hudColor: "rgba(0,0,0,0.4)",
  1092. hudTextColor: "#ffffff",
  1093. statsHudColor: "#ffffff",
  1094. timeHudColor: "#01d9cc",
  1095. top5MassColor: "#bf00aa",
  1096. lbMeColor: "#bf00aa",
  1097. lbTeammateColor: "#018cf6",
  1098. hudFont: "ubuntu-bold",
  1099. hudFontFamily: "Ubuntu",
  1100. hudFontWeight: 700,
  1101. hudScale: 1,
  1102. messageColor: "rgba(0,0,0,0.4)",
  1103. messageTextColor: "#ffffff",
  1104. messageTimeColor: "#018cf6",
  1105. messageNickColor: "#01d9cc",
  1106. commandsColor: "rgba(191,0,170,0.9)",
  1107. commandsTextColor: "#ffffff",
  1108. commandsTimeColor: "#bf00aa",
  1109. commandsNickColor: "#ffffff",
  1110. chatBoxColor: "rgba(0,0,0,0.4)",
  1111. chatScale: 1,
  1112. miniMapSectorColor: "#01d9cc",
  1113. miniMapGuidesColor: "#bf00aa",
  1114. miniMapNickColor: "#ffffff",
  1115. miniMapNickStrokeColor: "#000000",
  1116. miniMapMyCellColor: "#ffffff",
  1117. miniMapMyCellStrokeColor: "#bf00aa",
  1118. miniMapTeammatesColor: "#01d9cc",
  1119. miniMapDeathLocationColor: "#bf00aa",
  1120. miniMapFont: "ubuntu-bold",
  1121. miniMapFontFamily: "Ubuntu",
  1122. miniMapFontWeight: 700,
  1123. miniMapNickFont: "ubuntu-bold",
  1124. miniMapNickFontFamily: "Ubuntu",
  1125. miniMapNickFontWeight: 700,
  1126. miniMapWidth: 240,
  1127. miniMapTop: 24,
  1128. miniMapSectorsOpacity: .1,
  1129. miniMapNickSize: 11,
  1130. miniMapNickStrokeSize: 2,
  1131. miniMapMyCellSize: 7.5,
  1132. miniMapMyCellStrokeSize: 4,
  1133. miniMapTeammatesSize: 5.5,
  1134. customBackground: "",
  1135. customCursor: "http://cdn.ogario.ovh/static/img/cursors/cursor_02.cur"
  1136. };
  1137. a.prototype = {
  1138. menuMainColorCSS: null,
  1139. menuPanelColorCSS: null,
  1140. menuTextlColorCSS: null,
  1141. menuButtonsCSS: null,
  1142. hudCSS: null,
  1143. chatCSS: null,
  1144. chatScaleCSS: null,
  1145. cursorCSS: null,
  1146. loadThemeSettings: function() {
  1147. var t = null;
  1148. null !== e.localStorage.getItem("ogarioThemeSettings") && (t = JSON.parse(e.localStorage.getItem("ogarioThemeSettings")));
  1149. for (var a in C) C.hasOwnProperty(a) && (t && t.hasOwnProperty(a) && (C[a] = t[a]), o.hasOwnProperty(a) && (o[a] = C[a]))
  1150. },
  1151. saveThemeSettings: function() {
  1152. e.localStorage.setItem("ogarioThemeSettings", JSON.stringify(C))
  1153. },
  1154. restoreThemeSettings: function() {
  1155. null !== e.localStorage.getItem("ogarioThemeSettings") && (e.localStorage.removeItem("ogarioThemeSettings"), e.location.reload())
  1156. },
  1157. addCustomCSS: function(e, o) {
  1158. this[e] || (this[e] = t("<style type='text/css'>").appendTo("head")), this[e].html(o)
  1159. },
  1160. addPresetBox: function(e, o, a, i, s) {
  1161. t(e).append('<div class="preset-box"><span class="title">' + u[d][o] + '</span><div class="select-wrapper"><select id="' + o + '" class="form-control"></select></div></div>');
  1162. for (var n in a) a.hasOwnProperty(n) && t("#" + o).append('<option value="' + n + '">' + a[n].name + "</option>");
  1163. t("#" + o).val(C[i]);
  1164. var r = this;
  1165. t("#" + o).on("change", function() {
  1166. var e = t(this).val();
  1167. C[i] = e, r[s](e)
  1168. })
  1169. },
  1170. addColorBox: function(e, a, i) {
  1171. if (t(e).append('<div class="color-box"><span class="title">' + u[d][a] + '</span><div class="input-group ' + a + '-picker"><input type="text" value="' + C[a] + '" id="' + a + '" class="form-control" /><span class="input-group-addon"><i></i></span></div></div>'), i) {
  1172. var s = this;
  1173. t(e + " ." + a + "-picker").colorpicker({
  1174. format: "hex"
  1175. }).on("changeColor.colorpicker", function(e) {
  1176. C[a] = e.color.toHex(), o.hasOwnProperty(a) && (o[a] = C[a]), s[i]()
  1177. })
  1178. } else t(e + " ." + a + "-picker").colorpicker({
  1179. format: "hex"
  1180. }).on("changeColor.colorpicker", function(e) {
  1181. C[a] = e.color.toHex(), o.hasOwnProperty(a) && (o[a] = C[a])
  1182. })
  1183. },
  1184. addRgbaColorBox: function(e, a, i) {
  1185. if (t(e).append('<div class="color-box"><span class="title">' + u[d][a] + '</span><div class="input-group ' + a + '-picker"><input type="text" value="' + C[a] + '" id="' + a + '" class="form-control" /><span class="input-group-addon"><i></i></span></div></div>'), i) {
  1186. var s = this;
  1187. t(e + " ." + a + "-picker").colorpicker({
  1188. format: "rgba"
  1189. }).on("changeColor.colorpicker", function(e) {
  1190. var t = e.color.toRGB();
  1191. C[a] = "rgba(" + t.r + "," + t.g + "," + t.b + "," + t.a + ")", o.hasOwnProperty(a) && (o[a] = C[a]), s[i]()
  1192. })
  1193. } else t(e + " ." + a + "-picker").colorpicker({
  1194. format: "rgba"
  1195. }).on("changeColor.colorpicker", function(e) {
  1196. var t = e.color.toRGB();
  1197. C[a] = "rgba(" + t.r + "," + t.g + "," + t.b + "," + t.a + ")", o.hasOwnProperty(a) && (o[a] = C[a])
  1198. })
  1199. },
  1200. addSliderBox: function(e, a, i, s, n, r) {
  1201. if (t(e).append('<div class="slider-box"><div class="box-label"><span class="value-label">' + u[d][a] + ': </span><span id="' + a + '-value" class="value">' + C[a] + '</span></div><input id="' + a + '-slider" type="range" min="' + i + '" max="' + s + '" step="' + n + '" value="' + C[a] + '"></div>'), r) {
  1202. var l = this;
  1203. t("#" + a + "-slider").on("input", function() {
  1204. var e = parseFloat(t(this).val());
  1205. t("#" + a + "-value").text(e), C[a] = e, o.hasOwnProperty(a) && (o[a] = e), l[r]()
  1206. })
  1207. } else t("#" + a + "-slider").on("input", function() {
  1208. var e = parseFloat(t(this).val());
  1209. t("#" + a + "-value").text(e), C[a] = e, o.hasOwnProperty(a) && (o[a] = e)
  1210. })
  1211. },
  1212. addInputBox: function(e, o, a, i) {
  1213. t(e).append('<div class="input-box"><span class="title">' + u[d][o] + '</span><input id="' + o + '" class="form-control" placeholder="' + a + '" value="' + C[o] + '" /></div>');
  1214. var s = this;
  1215. t("#" + o).on("input", function() {
  1216. var e = t(this).val();
  1217. C[o] = e, s[i]()
  1218. })
  1219. },
  1220. addCursorBox: function(e, o) {
  1221. t(e).append(o === C.customCursor ? '<div class="cursor-box"><a href="#" class="active"><img src="' + o + '"></a></div>' : '<div class="cursor-box"><a href="#"><img src="' + o + '"></a></div>')
  1222. },
  1223. setFont: function(e, t) {
  1224. C[e] = t, C[e + "Family"] = this.setFontFamily(t), C[e + "Weight"] = this.setFontWeight(t), o.hasOwnProperty(e + "Family") && (o[e + "Family"] = C[e + "Family"]), o.hasOwnProperty(e + "Weight") && (o[e + "Weight"] = C[e + "Weight"])
  1225. },
  1226. addFontBox: function(e, o, a) {
  1227. t(e).append('<div class="font-box"><span class="title">' + u[d][o] + '</span><div class="select-wrapper"><select id="' + o + '" class="form-control"></select></div></div>'), t("#" + o).append('<option value="ubuntu">Ubuntu</option><option value="ubuntu-bold">Ubuntu Bold</option>'), t("#" + o).append('<option value="roboto">Roboto</option><option value="roboto-bold">Roboto Bold</option>'), t("#" + o).append('<option value="oswald">Oswald</option><option value="oswald-bold">Oswald Bold</option>'), t("#" + o).val(C[o]);
  1228. var i = this;
  1229. a ? t("#" + o).on("change", function() {
  1230. var e = t(this).val();
  1231. i.setFont(o, e), i[a]()
  1232. }) : t("#" + o).on("change", function() {
  1233. var e = t(this).val();
  1234. i.setFont(o, e)
  1235. })
  1236. },
  1237. setFontFamily: function(e) {
  1238. return -1 != e.indexOf("roboto") ? "Roboto" : -1 != e.indexOf("oswald") ? "Oswald" : "Ubuntu"
  1239. },
  1240. setFontWeight: function(e) {
  1241. return -1 != e.indexOf("bold") ? 700 : 400
  1242. },
  1243. setThemeMenu: function() {
  1244. var e = this;
  1245. t("#theme").append('<ul class="submenu-tabs"><li class="theme-main-tab active"><a href="#theme-main" class="active icon-paint-format" data-toggle="tab-tooltip" data-container="body" title="' + u[d].basicTheming + '"></a></li><li class="theme-menu-tab"><a href="#theme-menu" class="icon-menu" data-toggle="tab-tooltip" data-container="body" title="' + u[d].menuTheming + '"></a></li><li class="theme-hud-tab"><a href="#theme-hud" class="icon-display" data-toggle="tab-tooltip" data-container="body" title="' + u[d].hudTheming + '"></a></li><li class="theme-chat-tab"><a href="#theme-chat" class="icon-bubbles" data-toggle="tab-tooltip" data-container="body" title="' + u[d].chatTheming + '"></a></li><li class="theme-minimap-tab"><a href="#theme-minimap" class="icon-location2" data-toggle="tab-tooltip" data-container="body" title="' + u[d].miniMapTheming + '"></a></li><li class="theme-images-tab"><a href="#theme-images" class="icon-image" data-toggle="tab-tooltip" data-container="body" title="' + u[d].imagesTheming + '"></a></li></ul><div id="theme-main" class="submenu-panel"></div><div id="theme-menu" class="submenu-panel"></div><div id="theme-hud" class="submenu-panel"></div><div id="theme-chat" class="submenu-panel"></div><div id="theme-minimap" class="submenu-panel"></div><div id="theme-images" class="submenu-panel"></div>'), this.addPresetBox("#theme-main", "themePreset", k, "preset", "changeThemePreset"), this.addColorBox("#theme-main", "bgColor", "setBgColor"), this.addColorBox("#theme-main", "foodColor"), this.addColorBox("#theme-main", "gridColor"), this.addColorBox("#theme-main", "bordersColor"), this.addColorBox("#theme-main", "virusColor"), this.addColorBox("#theme-main", "virusStrokeColor"), this.addColorBox("#theme-main", "cursorTrackingColor"), this.addColorBox("#theme-main", "splitRangeColor"), this.addFontBox("#theme-main", "namesFont"), this.addFontBox("#theme-main", "sectorsFont"), this.addSliderBox("#theme-main", "sectorsFontSize", 200, 2e3, 10), this.addSliderBox("#theme-main", "nameScale", .5, 2, .1, "setMassScale"), this.addSliderBox("#theme-main", "massScale", 1, 5, 1, "setMassScale"), this.addSliderBox("#theme-main", "foodSize", 1, 50, 1), this.addSliderBox("#theme-main", "virusStrokeSize", 2, 40, 1), this.addSliderBox("#theme-main", "bordersWidth", 2, 200, 2), this.addSliderBox("#theme-main", "sectorsWidth", 2, 200, 2), this.addSliderBox("#theme-main", "cellsAlpha", .01, .99, .01), this.addSliderBox("#theme-main", "skinsAlpha", .01, .99, .01), this.addSliderBox("#theme-main", "virusAlpha", 0, 1, .01), this.addPresetBox("#theme-menu", "menuPreset", y, "menuPreset", "changeMenuPreset"), this.addSliderBox("#theme-menu", "menuOpacity", .1, 1, .01, "setMenuOpacity"), this.addColorBox("#theme-menu", "menuMainColor", "setMenuMainColor"), this.addColorBox("#theme-menu", "menuBtnTextColor", "setMenuButtons"), this.addColorBox("#theme-menu", "menuPanelColor", "setMenuPanelColor"), this.addColorBox("#theme-menu", "menuPanelColor2", "setMenuPanelColor"), this.addColorBox("#theme-menu", "menuTextColor", "setMenuTextColor"), this.addColorBox("#theme-menu", "menuTextColor2", "setMenuTextColor"), this.addColorBox("#theme-menu", "btn1Color", "setMenuButtons"), this.addColorBox("#theme-menu", "btn1Color2", "setMenuButtons"), this.addColorBox("#theme-menu", "btn2Color", "setMenuButtons"), this.addColorBox("#theme-menu", "btn2Color2", "setMenuButtons"), this.addColorBox("#theme-menu", "btn3Color", "setMenuButtons"), this.addColorBox("#theme-menu", "btn3Color2", "setMenuButtons"), this.addColorBox("#theme-menu", "btn4Color", "setMenuButtons"), this.addColorBox("#theme-menu", "btn4Color2", "setMenuButtons"), this.addInputBox("#theme-menu", "menuBg", "Image URL", "setMenuBg"), this.addColorBox("#theme-hud", "hudMainColor", "setHudColors"), this.addRgbaColorBox("#theme-hud", "hudColor", "setHudColors"), this.addColorBox("#theme-hud", "hudTextColor", "setHudColors"), this.addColorBox("#theme-hud", "statsHudColor", "setHudColors"), this.addColorBox("#theme-hud", "timeHudColor", "setHudColors"), this.addColorBox("#theme-hud", "top5MassColor", "setHudColors"), this.addColorBox("#theme-hud", "lbMeColor", "setHudColors"), this.addColorBox("#theme-hud", "lbTeammateColor", "setHudColors"), this.addFontBox("#theme-hud", "hudFont", "setHudFont"), this.addSliderBox("#theme-hud", "hudScale", 1, 2, .01, "setHudScale"), this.addRgbaColorBox("#theme-chat", "messageColor", "setChatColors"), this.addColorBox("#theme-chat", "messageTextColor", "setChatColors"), this.addColorBox("#theme-chat", "messageTimeColor", "setChatColors"), this.addColorBox("#theme-chat", "messageNickColor", "setChatColors"), this.addRgbaColorBox("#theme-chat", "commandsColor", "setChatColors"), this.addColorBox("#theme-chat", "commandsTextColor", "setChatColors"), this.addColorBox("#theme-chat", "commandsTimeColor", "setChatColors"), this.addColorBox("#theme-chat", "commandsNickColor", "setChatColors"), this.addRgbaColorBox("#theme-chat", "chatBoxColor", "setChatColors"), this.addSliderBox("#theme-chat", "chatScale", 1, 2, .01, "setChatScale"), this.addColorBox("#theme-minimap", "miniMapSectorColor"), this.addColorBox("#theme-minimap", "miniMapGuidesColor"), this.addColorBox("#theme-minimap", "miniMapNickColor"), this.addColorBox("#theme-minimap", "miniMapNickStrokeColor"), this.addColorBox("#theme-minimap", "miniMapMyCellColor"), this.addColorBox("#theme-minimap", "miniMapMyCellStrokeColor"), this.addColorBox("#theme-minimap", "miniMapTeammatesColor"), this.addColorBox("#theme-minimap", "miniMapDeathLocationColor"), this.addFontBox("#theme-minimap", "miniMapFont", "setMiniMapFont"), this.addFontBox("#theme-minimap", "miniMapNickFont"), this.addSliderBox("#theme-minimap", "miniMapWidth", 200, 400, 2, "setMiniMapWidth"), this.addSliderBox("#theme-minimap", "miniMapSectorsOpacity", 0, 1, .01, "setMiniMapSectorsOpacity"), this.addSliderBox("#theme-minimap", "miniMapNickSize", 8, 16, 1), this.addSliderBox("#theme-minimap", "miniMapNickStrokeSize", 0, 6, 1), this.addSliderBox("#theme-minimap", "miniMapMyCellSize", 4, 10, .5), this.addSliderBox("#theme-minimap", "miniMapMyCellStrokeSize", 0, 10, 1), this.addSliderBox("#theme-minimap", "miniMapTeammatesSize", 4, 10, .5), this.addInputBox("#theme-images", "customBackground", "Image URL", "setCustomBackground"), this.addInputBox("#theme-images", "customCursor", "Cursor image URL", "setCustomCursor");
  1246. for (var o = "http://cdn.ogario.ovh/static/img/cursors/cursor_", a = 0; 35 > a; a++) 9 > a ? this.addCursorBox("#theme-images", o + "0" + (a + 1) + ".cur") : this.addCursorBox("#theme-images", o + "" + (a + 1) + ".cur");
  1247. t("#theme-images .cursor-box a").on("click", function(o) {
  1248. o.preventDefault();
  1249. var a = t("img", this).attr("src");
  1250. C.customCursor = a, e.setCustomCursor(), t("#customCursor").val(a), t("#theme-images .cursor-box a").removeClass("active"), t(this).addClass("active")
  1251. }), t("#theme").append('<button class="btn btn-block btn-success btn-save"">' + u[d].saveSett + "</button>"), t("#theme .btn-save").on("click", function(o) {
  1252. o.preventDefault();
  1253. var a = t(this);
  1254. a.text(u[d].saved), e.saveThemeSettings(), setTimeout(function() {
  1255. a.text(u[d].saveSett)
  1256. }, 500)
  1257. }), t("#theme").append('<div class="restore-settings"><a href="#">' + u[d].restoreThemeSettings + "</a></div>"), t("#theme .restore-settings a").on("click", function(o) {
  1258. o.preventDefault(), e.restoreThemeSettings()
  1259. }), t(".skin").colorpicker({
  1260. format: "hex",
  1261. input: "#color"
  1262. })
  1263. },
  1264. changePreset: function(e, a) {
  1265. if (a[e]) {
  1266. C[e] = e;
  1267. var e = a[e];
  1268. for (var i in e) e.hasOwnProperty(i) && C.hasOwnProperty(i) && (C[i] = e[i], o.hasOwnProperty(i) && (o[i] = C[i]), t("#theme ." + i + "-picker") && t("#theme ." + i + "-picker").colorpicker("setValue", C[i]), t("#" + i + "-slider") && t("#" + i + "-slider").val(C[i]).change(), (t("input[type=text]#" + i) || t("select#" + i)) && t("#" + i).val(C[i]))
  1269. }
  1270. },
  1271. changeThemePreset: function(e) {
  1272. this.changePreset(e, k), this.setTheme()
  1273. },
  1274. setFonts: function() {
  1275. this.setFont("namesFont", C.namesFont), this.setFont("sectorsFont", C.sectorsFont)
  1276. },
  1277. setMassScale: function() {
  1278. switch (C.massScale) {
  1279. case 5:
  1280. o.massScaleMargin = C.massScaleMargin = 1 * C.nameScale;
  1281. break;
  1282. case 4:
  1283. o.massScaleMargin = C.massScaleMargin = 1.125 * C.nameScale;
  1284. break;
  1285. case 3:
  1286. o.massScaleMargin = C.massScaleMargin = 1.25 * C.nameScale;
  1287. break;
  1288. case 2:
  1289. o.massScaleMargin = C.massScaleMargin = 1.5 * C.nameScale;
  1290. break;
  1291. default:
  1292. o.massScaleMargin = C.massScaleMargin = 2 * C.nameScale
  1293. }
  1294. },
  1295. setBgColor: function() {
  1296. t("body").css("background-color", C.bgColor)
  1297. },
  1298. setCustomBackground: function() {
  1299. C.customBackground ? t("body").css("background-image", "url(" + C.customBackground + ")") : t("body").css("background-image", "none")
  1300. },
  1301. setCustomCursor: function() {
  1302. if (C.customCursor) var e = "*{cursor:url(" + C.customCursor + "), auto !important}";
  1303. else var e = "*{cursor: auto}";
  1304. this.addCustomCSS("cursorCSS", e)
  1305. },
  1306. setMenu: function() {
  1307. this.setMenuOpacity(), this.setMenuMainColor(), this.setMenuPanelColor(), this.setMenuTextColor(), this.setMenuButtons(), this.setMenuBg()
  1308. },
  1309. changeMenuPreset: function(e) {
  1310. this.changePreset(e, y), this.setMenu()
  1311. },
  1312. setMenuOpacity: function() {
  1313. t("#helloContainer, #hotkeys, #exp-imp").css("opacity", C.menuOpacity)
  1314. },
  1315. setMenuMainColor: function() {
  1316. var e = "::-moz-selection{background-color:" + C.menuMainColor + "!important}::selection{background-color:" + C.menuMainColor + "!important}.menu-main-color,#quick-menu a:hover,.quick,.quick:focus,.menu-tabs a:hover,.menu-tabs .active,.submenu-tabs a:hover,.submenu-tabs .active,#stats center,#exp-imp h1{color:" + C.menuMainColor + "}#exp-bar .progress-bar-striped,.quick:hover,.rangeslider__fill{background-color:" + C.menuMainColor + "}#main-menu,.agario-side-panel,#hotkeys,#exp-imp{border-color:" + C.menuMainColor + "}.ps-scrollbar-y{background-color:" + C.menuMainColor + "!important}";
  1317. this.addCustomCSS("menuMainColorCSS", e)
  1318. },
  1319. setMenuPanelColor: function() {
  1320. var e = "#main-menu,.agario-side-panel,#hotkeys,#exp-imp{background-color: " + C.menuPanelColor + "}label:hover,.agario-panel input,.agario-panel select,.agario-side-panel input,.agario-side-panel select,.input-group-addon,.nick .input-group-btn,.skin .input-group-btn,#stream-mode,#hide-url,.menu-tabs a:hover,.menu-tabs .active,.submenu-tabs,#exp-bar .progress,#quick-menu a:hover,.quick,.select-wrapper,#hotkeys-cfg div.row:hover,#hotkeys-cfg .command-in,#exp-imp-settings textarea,.restore-settings{background-color: " + C.menuPanelColor2 + "}.agario-panel h5,.agario-side-panel h5,#stats h2,.menu-tabs,.submenu-tabs,#skins a.default,#stats hr,#hotkeys-cfg div.row, #exp-imp h1{border-color: " + C.menuPanelColor2 + "}.quick:hover,#skins a,#profiles{color:" + C.menuPanelColor2 + "}input.stream-mode,input.hide-url{color:" + C.menuPanelColor2 + "!important}";
  1321. this.addCustomCSS("menuPanelColorCSS", e)
  1322. },
  1323. setMenuTextColor: function() {
  1324. var e = ".agario-panel,.agario-side-panel,.agario-panel input,.agario-panel select,.agario-side-panel input,.agario-side-panel select,.input-group-addon,.dark .yt-username,#stream-mode,#hide-url,.menu-tabs a,.submenu-tabs a,#skins a.default:hover,#quick-menu a,#prev-profile.default:hover,#next-profile.default:hover,#statsText,#hotkeys,#hotkeys-cfg .command-in,#exp-imp{color:" + C.menuTextColor + "}#skins a.default:hover{border-color:" + C.menuTextColor + "}::-webkit-input-placeholder{color:" + C.menuTextColor2 + "!important}::-moz-placeholder{color:" + C.menuTextColor2 + "!important}#user-id-tag, #version-tag,#statsSubtext,#hotkeys-inst,#exp-imp textarea,.restore-settings a,.restore-settings a:hover{color:" + C.menuTextColor2 + "}#hotkeys-cfg .command-in,#theme .color-box{border-color:" + C.menuTextColor2 + "}";
  1325. this.addCustomCSS("menuTextColorCSS", e)
  1326. },
  1327. setMenuButtons: function() {
  1328. var e = "a,a:hover{color:" + C.btn1Color + "}.btn,#hotkeys-cfg .custom-key-in{color:" + C.menuBtnTextColor + "}.btn-primary{background-color:" + C.btn1Color + "!important}.btn-primary:active,.btn-primary:disabled,.btn-primary:focus,.btn-primary:hover{background-color:" + C.btn1Color2 + "!important}.btn-success{background-color:" + C.btn2Color + "!important}.btn-success:active,.btn-success:disabled,.btn-success:focus,.btn-success:hover{background-color:" + C.btn2Color2 + "!important}.btn-warning{background-color:" + C.btn3Color + "!important}.btn-warning:active,.btn-warning:disabled,.btn-warning:focus,.btn-warning:hover{background-color:" + C.btn3Color2 + "!important}.btn-danger{background-color:" + C.btn4Color + "!important}.btn-danger:active,.btn-danger:disabled,.btn-danger:focus,.btn-danger:hover{background-color:" + C.btn4Color2 + "!important}#hotkeys-cfg .custom-key-in{background-color:" + C.btn4Color2 + ";border-color:" + C.btn4Color2 + "}";
  1329. this.addCustomCSS("menuButtonsCSS", e)
  1330. },
  1331. setMenuBg: function() {
  1332. t("#menuBg").val(C.menuBg), C.menuBg ? t(".menu-panel, .agario-side-panel, #hotkeys, #exp-imp").css("background-image", "url(" + C.menuBg + ")") : t(".menu-panel, .agario-side-panel, #hotkeys, #exp-imp").css("background-image", "none")
  1333. },
  1334. setHud: function() {
  1335. this.setHudColors(), this.setHudFont(), this.setHudScale()
  1336. },
  1337. setHudColors: function() {
  1338. var e = ".hud-main-color,#top5-pos a,#target-panel-hud a:hover,#target-panel-hud a.active{color:" + C.hudMainColor + "}.hud,.hud-b{color:" + C.hudTextColor + ";background-color:" + C.hudColor + "}#top5-pos a:hover,#target-panel-hud a{color:" + C.hudTextColor + "}.stats-hud-color{color:" + C.statsHudColor + "}.time-hud-color{color:" + C.timeHudColor + "}.top5-mass-color{color:" + C.top5MassColor + "}#leaderboard-positions .me{color:" + C.lbMeColor + "}#leaderboard-positions .teammate{color:" + C.lbTeammateColor + "}";
  1339. this.addCustomCSS("hudCSS", e)
  1340. },
  1341. setHudFont: function() {
  1342. this.setFont("hudFont", C.hudFont), t("#overlays-hud").css({
  1343. "font-family": C.hudFontFamily,
  1344. "font-weight": C.hudFontWeight
  1345. })
  1346. },
  1347. setHudScale: function() {
  1348. var e = Math.round(20 * C.hudScale),
  1349. o = Math.round(200 * C.hudScale),
  1350. a = Math.floor(55 * C.hudScale),
  1351. i = Math.floor(15 * C.hudScale),
  1352. s = Math.floor(260 * C.hudScale),
  1353. n = Math.floor(85 * C.hudScale),
  1354. r = Math.floor(20 * C.hudScale);
  1355. t("#overlays-hud").css("font-size", e + "px"), t("#top5-hud, #leaderboard-hud, #time-hud").width(o), t("#top5-hud").css("top", a + "px"), t("#top5-pos").css("padding-left", i + "px"), t("#time-hud").css("top", s + "px"), t("#pause-hud").css("top", n + "px"), t("#target-hud").css("padding-top", r + "px")
  1356. },
  1357. setChat: function() {
  1358. this.setChatColors(), this.setChatScale()
  1359. },
  1360. setChatColors: function() {
  1361. var e = "#message,.toast-success{background-color:" + C.messageColor + "}.message-text,.toast-success .message-text{color:" + C.messageTextColor + "}.message-nick,.toast-success .message-nick{color:" + C.messageNickColor + "}.message-time{color:" + C.messageTimeColor + "}.toast-warning{background-color:" + C.commandsColor + "}.command-text,.toast-warning .command-text{color:" + C.commandsTextColor + "}.command-nick,.toast-warning .command-nick{color:" + C.commandsNickColor + "}.command-time{color:" + C.commandsTimeColor + "}#chat-box{background-color:" + C.chatBoxColor + "}";
  1362. this.addCustomCSS("chatCSS", e)
  1363. },
  1364. setChatScale: function() {
  1365. var e = Math.round(14 * C.chatScale),
  1366. o = Math.round(280 * C.chatScale),
  1367. a = Math.round(350 * C.chatScale),
  1368. i = Math.round(300 * C.chatScale);
  1369. t("#message, #messages, #toast-container, #chat-box").css("font-size", e + "px"), t("#messages, #toast-container, #chat-box").width(o), t("#message").width(a), t("#chat-box").height(i);
  1370. var s = "#toast-container{width:" + o + "px;font-size:" + e + "px}";
  1371. this.addCustomCSS("chatScaleCSS", s)
  1372. },
  1373. setMiniMap: function() {
  1374. this.setMiniMapFont(), this.setMiniMapWidth(), this.setMiniMapSectorsOpacity()
  1375. },
  1376. setMiniMapFont: function() {
  1377. this.setFont("miniMapFont", C.miniMapFont), M && M.resetMiniMapSectors()
  1378. },
  1379. setMiniMapWidth: function() {
  1380. var e = C.miniMapWidth / 200;
  1381. C.miniMapTop = Math.round(20 * e), t("#minimap-hud").css({
  1382. width: C.miniMapWidth,
  1383. height: C.miniMapWidth + C.miniMapTop
  1384. }), M && M.resetMiniMapSectors()
  1385. },
  1386. setMiniMapSectorsOpacity: function() {
  1387. t("#minimap-sectors").css("opacity", C.miniMapSectorsOpacity)
  1388. },
  1389. setTheme: function() {
  1390. this.setFonts(), this.setMassScale(), this.setBgColor(), this.setCustomBackground(), this.setCustomCursor(), this.setMenu(), this.setHud(), this.setChat(), this.setMiniMap()
  1391. },
  1392. init: function() {
  1393. this.loadThemeSettings()
  1394. }
  1395. };
  1396. var b = new a;
  1397. b.init();
  1398. var S = [],
  1399. w = {
  1400. nick: "I <3 OGARio",
  1401. clanTag: "Ⓜ",
  1402. skinURL: "",
  1403. color: C.mainColor
  1404. },
  1405. v = {
  1406. quickResp: !0,
  1407. autoResp: !1,
  1408. autoZoom: !0,
  1409. autoHideCellsInfo: !0,
  1410. autoHideFood: !1,
  1411. hideMyName: !0,
  1412. hideMyMass: !1,
  1413. hideEnemiesMass: !1,
  1414. vanillaSkins: !1,
  1415. customSkins: !0,
  1416. myTransparentSkin: !1,
  1417. myCustomColor: !1,
  1418. transparentCells: !1,
  1419. transparentViruses: !0,
  1420. transparentSkins: !1,
  1421. showGrid: !1,
  1422. showBgSectors: !1,
  1423. showMapBorders: !0,
  1424. showMiniMap: !0,
  1425. showMiniMapGrid: !1,
  1426. showMiniMapGuides: !0,
  1427. oneColoredTeammates: !1,
  1428. rainbowFood: !1,
  1429. oppColors: !1,
  1430. oppRings: !1,
  1431. virColors: !1,
  1432. splitRange: !1,
  1433. virusesRange: !1,
  1434. textStroke: !1,
  1435. cursorTracking: !0,
  1436. teammatesInd: !1,
  1437. mouseSplit: !1,
  1438. mouseFeed: !1,
  1439. mouseInvert: !1,
  1440. disableChat: !1,
  1441. hideChat: !1,
  1442. showChatBox: !1,
  1443. showChatImages: !0,
  1444. showChatVideos: !0,
  1445. showTop5: !0,
  1446. showTargeting: !0,
  1447. showTime: !0,
  1448. normalLb: !1,
  1449. centeredLb: !0,
  1450. fpsAtTop: !0,
  1451. showStats: !0,
  1452. showStatsMass: !0,
  1453. showStatsSTE: !1,
  1454. showStatsN16: !1,
  1455. showStatsFPS: !0,
  1456. blockPopups: !1,
  1457. streamMode: !1,
  1458. hideSkinUrl: !1,
  1459. showQuickMenu: !0,
  1460. showSkinsPanel: !0,
  1461. zoomSpeedValue: .9
  1462. };
  1463. i.prototype = {
  1464. id: 0,
  1465. skinID: "",
  1466. x: 0,
  1467. y: 0,
  1468. lastX: 0,
  1469. lastY: 0,
  1470. mass: 0,
  1471. nick: "",
  1472. clanTag: "",
  1473. skinURL: "",
  1474. color: C.miniMapTeammatesColor,
  1475. alive: !1,
  1476. updateTime: null,
  1477. pi2: 2 * Math.PI,
  1478. drawPosition: function(e, o, t, a, i) {
  1479. if (!(!this.alive || a && i && this.id != i)) {
  1480. this.lastX = (29 * this.lastX + this.x) / 30, this.lastY = (29 * this.lastY + this.y) / 30;
  1481. var s = (this.lastX + o) * t,
  1482. n = (this.lastY + o) * t;
  1483. this.nick.length > 0 && (e.font = C.miniMapNickFontWeight + " " + C.miniMapNickSize + "px " + C.miniMapNickFontFamily, e.textAlign = "center", C.miniMapNickStrokeSize > 0 && (e.lineWidth = C.miniMapNickStrokeSize, e.strokeStyle = C.miniMapNickStrokeColor, e.strokeText(this.nick, s, n - (2 * C.miniMapTeammatesSize + 2))), e.fillStyle = C.miniMapNickColor, e.fillText(this.nick, s, n - (2 * C.miniMapTeammatesSize + 2))), e.beginPath(), e.arc(s, n, C.miniMapTeammatesSize, 0, this.pi2, !1), e.closePath(), e.fillStyle = v.oneColoredTeammates ? C.miniMapTeammatesColor : this.color, e.fill()
  1484. }
  1485. }
  1486. }, s.prototype = {
  1487. name: "OGARio by szymy v3",
  1488. version: "v3 (3.0.2)",
  1489. privateMode: !1,
  1490. publicIP: "ws://164.132.227.101:3000",
  1491. privateIP: null,
  1492. updateInterval: 1e3,
  1493. updateTick: 0,
  1494. updateMaxTick: 2,
  1495. currentSector: "",
  1496. miniMap: null,
  1497. miniMapCtx: null,
  1498. miniMapSectors: null,
  1499. pi2: 2 * Math.PI,
  1500. socket: null,
  1501. teamPlayers: [],
  1502. parties: [],
  1503. chatHistory: [],
  1504. customSkinsCache: {},
  1505. customSkinsMap: {},
  1506. deathLocations: [],
  1507. playerID: null,
  1508. playerMass: 0,
  1509. selectedProfile: 0,
  1510. lastDeath: 0,
  1511. gameMode: "",
  1512. partyToken: "",
  1513. lastSentNick: "",
  1514. lastSentClanTag: null,
  1515. lastSentSkinURL: "",
  1516. lastSentCustomColor: "",
  1517. lastSentPartyToken: "",
  1518. lastMessageSentTime: Date.now(),
  1519. rFps: 0,
  1520. renderedFrames: 0,
  1521. fpsLastRequest: null,
  1522. statsHUD: null,
  1523. leaderboardPositionsHUD: null,
  1524. activeParties: null,
  1525. top5pos: null,
  1526. top5total: null,
  1527. timeHUD: null,
  1528. retryResp: 0,
  1529. token: "b2dhcmlvLm92aA==",
  1530. canvasScale: 1,
  1531. selectBiggestCell: !0,
  1532. noSkins: !1,
  1533. noNames: !1,
  1534. noColors: !1,
  1535. showMass: !0,
  1536. skipStats: !1,
  1537. showSplitInd: !1,
  1538. pause: !1,
  1539. targetID: 0,
  1540. targetStatus: 0,
  1541. targetNick: "",
  1542. targetSkinURL: "",
  1543. targeting: !1,
  1544. privateChat: !1,
  1545. privateMiniMap: !1,
  1546. feedInterval: null,
  1547. getPlayerX: function() {
  1548. return o.playerX + o.mapOffsetX
  1549. },
  1550. getPlayerY: function() {
  1551. return o.playerY + o.mapOffsetY
  1552. },
  1553. feed: function() {
  1554. e.core && e.core.eject && e.core.eject()
  1555. },
  1556. macroFeed: function(e) {
  1557. if (e) {
  1558. if (this.feedInterval) return;
  1559. var o = this;
  1560. this.feed(), this.feedInterval = setInterval(function() {
  1561. o.feed()
  1562. }, 80)
  1563. } else this.feedInterval && (clearInterval(this.feedInterval), this.feedInterval = null)
  1564. },
  1565. split: function() {
  1566. e.core && e.core.split && e.core.split()
  1567. },
  1568. doubleSplit: function() {
  1569. var e = this;
  1570. e.split(), setTimeout(function() {
  1571. e.split()
  1572. }, 40)
  1573. },
  1574. popSplit: function() {
  1575. var e = this;
  1576. e.split(), setTimeout(function() {
  1577. e.split()
  1578. }, 200)
  1579. },
  1580. split16: function() {
  1581. var e = this;
  1582. e.split(), setTimeout(function() {
  1583. e.split()
  1584. }, 40), setTimeout(function() {
  1585. e.split()
  1586. }, 80), setTimeout(function() {
  1587. e.split()
  1588. }, 120)
  1589. },
  1590. toggleSkins: function() {
  1591. o.vanillaSkins && o.customSkins ? o.vanillaSkins = !1 : !o.vannillaSkins && o.customSkins ? (o.vanillaSkins = !0, o.customSkins = !1) : (o.vanillaSkins = !0, o.customSkins = !0)
  1592. },
  1593. toggleCells: function() {
  1594. this.selectBiggestCell = !this.selectBiggestCell, o.selectBiggestCell = this.selectBiggestCell
  1595. },
  1596. setShowTop5: function() {
  1597. ":party" === this.gameMode && (v.showTop5 = !v.showTop5, this.setTop5())
  1598. },
  1599. setTop5: function() {
  1600. v.showTop5 && ":party" === this.gameMode ? t("#top5-hud").show() : t("#top5-hud").hide()
  1601. },
  1602. setShowTargeting: function() {
  1603. ":party" === this.gameMode && (v.showTargeting = !v.showTargeting, this.setTargetingHUD())
  1604. },
  1605. setTargetingHUD: function() {
  1606. v.showTargeting && ":party" === this.gameMode ? t("#target-hud, #target-panel-hud").show() : t("#target-hud, #target-panel-hud").hide()
  1607. },
  1608. setShowTime: function() {
  1609. v.showTime = !v.showTime, v.showTime ? (t("#time-hud").show(), this.displayTime()) : t("#time-hud").hide()
  1610. },
  1611. setShowSplitRange: function() {
  1612. v.splitRange = !v.splitRange, o.splitRange = v.splitRange
  1613. },
  1614. setShowSplitInd: function() {
  1615. this.showSplitInd = !this.showSplitInd, v.splitRange = this.showSplitInd, v.oppRings = this.showSplitInd, o.splitRange = v.splitRange, o.oppRings = v.oppRings
  1616. },
  1617. setShowTeammatesInd: function() {
  1618. o.teammatesInd = !o.teammatesInd
  1619. },
  1620. setShowOppColors: function() {
  1621. v.oppColors = !v.oppColors, o.oppColors = v.oppColors
  1622. },
  1623. setShowSkins: function() {
  1624. this.noSkins = !this.noSkins, e.core && e.core.setSkins && e.core.setSkins(!this.noSkins), o.showCustomSkins = !this.noSkins, this.displayChatInfo(!this.noSkins, "showSkinsMsg")
  1625. },
  1626. setShowStats: function() {
  1627. t("#stats-hud").toggle()
  1628. },
  1629. setShowFood: function() {
  1630. o.showFood = !o.showFood
  1631. },
  1632. setShowHUD: function() {
  1633. t("#overlays-hud").toggle()
  1634. },
  1635. setShowGrid: function() {
  1636. v.showGrid = !v.showGrid, o.showGrid = v.showGrid
  1637. },
  1638. setShowMiniMapGuides: function() {
  1639. v.showMiniMapGuides = !v.showMiniMapGuides
  1640. },
  1641. setShowLb: function() {
  1642. ":teams" !== this.gameMode && t("#leaderboard-hud").toggle()
  1643. },
  1644. setShowBgSectors: function() {
  1645. v.showBgSectors = !v.showBgSectors
  1646. },
  1647. setHideSmallBots: function() {
  1648. o.hideSmallBots = !o.hideSmallBots, this.displayChatInfo(!o.hideSmallBots, "hideSmallBotsMsg")
  1649. },
  1650. setShowNames: function() {
  1651. this.noNames = !this.noNames, e.core && e.core.setNames && e.core.setNames(!this.noNames)
  1652. },
  1653. setShowMass: function() {
  1654. this.showMass = !this.showMass, e.core && e.core.setShowMass && e.core.setShowMass(this.showMass)
  1655. },
  1656. setShowMiniMap: function() {
  1657. v.showMiniMap = !v.showMiniMap, this.setMiniMap()
  1658. },
  1659. setMiniMap: function() {
  1660. v.showMiniMap ? t("#minimap-hud").show() : t("#minimap-hud").hide()
  1661. },
  1662. toggleAutoZoom: function() {
  1663. o.autoZoom = !o.autoZoom, this.displayChatInfo(o.autoZoom, "autoZoomMsg")
  1664. },
  1665. resetZoom: function(e) {
  1666. e ? (o.zoomResetValue = 1, o.zoomValue = 1) : o.zoomResetValue = 0
  1667. },
  1668. setZoom: function(e) {
  1669. o.zoomValue = e
  1670. },
  1671. toggleDeath: function() {
  1672. this.lastDeath--, this.lastDeath < 0 && (this.lastDeath = this.deathLocations.length - 1)
  1673. },
  1674. tryResp: function() {
  1675. if (o.play || 20 == this.retryResp) return void(this.retryResp = 0);
  1676. this.retryResp++;
  1677. var e = this;
  1678. setTimeout(function() {
  1679. t(".btn-play-guest").is(":visible") ? t(".btn-play-guest").click() : t(".btn-play").click(), o.play || e.tryResp()
  1680. }, 500)
  1681. },
  1682. quickResp: function() {
  1683. v.quickResp && (t(".ogario-menu").hide(), ":party" === this.gameMode && t("#join-party-btn").click(), o.play = !1, this.tryResp())
  1684. },
  1685. autoResp: function() {
  1686. return v.autoResp ? (this.setAutoResp(), t("#overlays").stop().hide(), t(".btn-play-guest").is(":visible") ? void t(".btn-play-guest").click() : void t(".btn-play").click()) : void 0
  1687. },
  1688. setAutoResp: function() {
  1689. v.autoResp && (t("#skipStats").prop("checked") || (t("#skipStats").click(), this.skipStats = !0))
  1690. },
  1691. toggleAutoResp: function() {
  1692. v.autoResp = !v.autoResp, this.setAutoResp(), this.displayChatInfo(v.autoResp, "autoRespMsg")
  1693. },
  1694. copyLb: function() {
  1695. var e = t("<input>");
  1696. t("body").append(e), e.val(t("#leaderboard-positions").text()).select();
  1697. try {
  1698. document.execCommand("copy")
  1699. } catch (o) {}
  1700. e.remove()
  1701. },
  1702. setPause: function() {
  1703. this.pause = !this.pause, o.pause = this.pause, this.pause ? t("#pause-hud").show() : t("#pause-hud").hide()
  1704. },
  1705. setCenteredLb: function() {
  1706. v.centeredLb ? t("#leaderboard-hud").addClass("hud-text-center") : t("#leaderboard-hud").removeClass("hud-text-center")
  1707. },
  1708. setNormalLb: function() {
  1709. t("#leaderboard-hud h4").html(v.normalLb ? u[d].leaderboard : "ogario.ovh")
  1710. },
  1711. setFpsAtTop: function() {
  1712. v.fpsAtTop ? t("#stats-hud").removeClass("hud-bottom").addClass("hud-top") : t("#stats-hud").removeClass("hud-top").addClass("hud-bottom")
  1713. },
  1714. setBlockPopups: function() {
  1715. v.blockPopups ? this.blockPopups() : this.unblockPopups()
  1716. },
  1717. blockPopups: function() {
  1718. t("#openfl-content, #openfl-overlay").hide(), t("#openfl-content, #openfl-overlay").addClass("block-popups"), t("#freeCoins, #gifting, #openShopBtn").prop("disabled", !0), t("#block-warn").show()
  1719. },
  1720. unblockPopups: function() {
  1721. t("#openfl-overlay.disabler").click(), t("#openfl-content, #openfl-overlay").hide(), t("#openfl-content, #openfl-overlay").removeClass("block-popups"), t("#freeCoins, #gifting, #openShopBtn").prop("disabled", !1), t("#block-warn").hide()
  1722. },
  1723. tempUnblockPopups: function() {
  1724. v.blockPopups && this.unblockPopups()
  1725. },
  1726. displayLeaderboard: function(e) {
  1727. this.leaderboardPositionsHUD && (this.leaderboardPositionsHUD.innerHTML = e)
  1728. },
  1729. displayStats: function() {
  1730. if (!v.showStats) return void t("#stats-hud").hide();
  1731. var e = "";
  1732. o.play && (v.showStatsMass && o.playerMass && (e += u[d].mass + ": " + o.playerMass + " | "), o.playerBestMass && (e += u[d].score + ": " + o.playerBestMass), v.showStatsSTE && o.STE && (e += " | STE: " + o.STE), v.showStatsN16 && o.playerCellsMass && (e += " | " + o.playerCellsMass.length + "/16"), v.showStatsFPS && (e += " | ")), v.showStatsFPS && (e += "FPS: " + this.rFps), this.statsHUD.textContent = e;
  1733. var a = this;
  1734. setTimeout(function() {
  1735. a.displayStats()
  1736. }, 250)
  1737. },
  1738. displayTime: function() {
  1739. if (!v.showTime) return void t("#time-hud").hide();
  1740. var e = (new Date).toLocaleString();
  1741. this.timeHUD.textContent = e;
  1742. var o = this;
  1743. setTimeout(function() {
  1744. o.displayTime()
  1745. }, 1e3)
  1746. },
  1747. displayParties: function() {
  1748. for (var e = "", o = 0; o < this.parties.length; o++) e += '<li><a href="http://agar.io/#' + this.parties[o] + "\" onclick=\"$('#joinPartyToken').val('agar.io/#" + this.parties[o] + "'); $('#join-party-btn').click();\">http://agar.io/#" + this.parties[o] + "</a></li>";
  1749. this.activeParties.className = "" === e ? "no-parties" : "", this.activeParties.innerHTML = e
  1750. },
  1751. displayTop5: function() {
  1752. if (v.showTop5) {
  1753. for (var e = "", t = 0, a = this.top5.length, i = 0; a > i && (e += "<li>", v.showTargeting && (e += '<a href="#" onclick="setTarget(' + this.top5[i].id + '); return false;" class="set-target icon-target"></a> '), e += '<span class="top5-mass-color">[' + this.top5[i].mass + "]</span> " + this.escapeHTML(this.top5[i].nick) + "</li>", t += this.top5[i].mass, 4 != i); i++);
  1754. this.top5pos.innerHTML = e, o.play && o.playerMass && (t += o.playerMass, a++), e = u[d].totalPartyPlayers + ': <span class="top5-mass-color">' + a + "</span><br>", e += u[d].totalPartyMass + ': <span class="top5-mass-color">' + t + "</span>", this.top5total.innerHTML = e
  1755. }
  1756. },
  1757. displayChatHistory: function(e) {
  1758. if (e) {
  1759. t("#messages").empty(), toastr.clear();
  1760. for (var o = 0; o < this.chatHistory.length; o++) t("#messages").append('<li><span class="message-nick">' + this.chatHistory[o].nick + ': </span><span class="message-text">' + this.chatHistory[o].message + "</span></li>")
  1761. } else t("#messages").empty()
  1762. },
  1763. displayChatInfo: function(e, o) {
  1764. e ? toastr.info(u[d][o + "A"]) : toastr.error(u[d][o + "B"])
  1765. },
  1766. setDisableChat: function() {
  1767. v.hideChat = v.disableChat, this.setHideChat()
  1768. },
  1769. hideChat: function() {
  1770. ":party" === this.gameMode && (v.hideChat = !v.hideChat, this.setHideChat(), this.displayChatInfo(!v.hideChat, "hideChatMsg"))
  1771. },
  1772. setHideChat: function() {
  1773. v.hideChat && t("#message").hide(), this.setShowChatBox()
  1774. },
  1775. setShowChatBox: function() {
  1776. !v.hideChat && v.showChatBox && ":party" === this.gameMode ? t("#chat-box").show() : t("#chat-box").hide()
  1777. },
  1778. enterChatMessage: function() {
  1779. if (":party" === this.gameMode) {
  1780. var e = t("#message");
  1781. if (e.is(":visible")) {
  1782. var a = e.val();
  1783. a.length > 0 ? (this.sendChatMessage(101, a), o.play && (e.blur(), e.hide())) : (e.blur(), e.hide()), e.val("")
  1784. } else e.show(), e.focus(), e.val("")
  1785. }
  1786. },
  1787. showMenu: function() {
  1788. e.MC.showNickDialog(300), t("#oferwallContainer").is(":visible") && e.closeOfferwall(), t("#videoContainer").is(":visible") && e.closeVideoContainer()
  1789. },
  1790. escapeHTML: function(e) {
  1791. return (e + "").replace(/[&<>"'\/]/g, function(e) {
  1792. return f[e]
  1793. })
  1794. },
  1795. checkSkinURL: function(e) {
  1796. return /^https?:\/\/i\.(?:imgur|hizliresim)\.com\/\w{6,8}\.(?:jpg|jpeg|png)\??\d*$/i.test(e) ? e : ""
  1797. },
  1798. loadSettings: function() {
  1799. var t = null;
  1800. null !== e.localStorage.getItem("ogarioSettings") && (t = JSON.parse(e.localStorage.getItem("ogarioSettings")));
  1801. for (var a in v) v.hasOwnProperty(a) && (t && t.hasOwnProperty(a) && (v[a] = t[a]), o.hasOwnProperty(a) && (o[a] = v[a]))
  1802. },
  1803. saveSettings: function(o, t) {
  1804. e.localStorage.setItem(t, JSON.stringify(o))
  1805. },
  1806. exportSettings: function() {
  1807. var e = {
  1808. ogarioCommands: g,
  1809. ogarioHotkeys: x,
  1810. ogarioPlayerProfiles: S,
  1811. ogarioSettings: v,
  1812. ogarioThemeSettings: C
  1813. };
  1814. for (var o in e)
  1815. if (e.hasOwnProperty(o)) {
  1816. var a = t("#export-" + o).prop("checked");
  1817. a || delete e[o]
  1818. }
  1819. e = JSON.stringify(e), t("#export-settings").val(e), t("#import-settings").val(""), e = null
  1820. },
  1821. importSettings: function() {
  1822. t("#import-settings").blur();
  1823. var o = t("#import-settings").val();
  1824. if (o) {
  1825. o = JSON.parse(o);
  1826. for (var a in o)
  1827. if (o.hasOwnProperty(a)) {
  1828. var i = t("#import-" + a).prop("checked");
  1829. if (!i) continue;
  1830. e.localStorage.setItem(a, JSON.stringify(o[a]))
  1831. }
  1832. e.location.reload()
  1833. }
  1834. },
  1835. restoreSettings: function() {
  1836. null !== e.localStorage.getItem("ogarioSettings") && (e.localStorage.removeItem("ogarioSettings"), e.location.reload())
  1837. },
  1838. loadProfiles: function() {
  1839. if (null !== e.localStorage.getItem("ogarioPlayerProfiles")) S = JSON.parse(e.localStorage.getItem("ogarioPlayerProfiles"));
  1840. else
  1841. for (var o = 0; 10 > o; o++) S.push({
  1842. nick: "Profile #" + (o + 1),
  1843. clanTag: "",
  1844. skinURL: "",
  1845. color: C.mainColor
  1846. });
  1847. null !== e.localStorage.getItem("ogarioSelectedProfile") && (this.selectedProfile = JSON.parse(e.localStorage.getItem("ogarioSelectedProfile"))), w.nick = S[this.selectedProfile].nick, w.clanTag = S[this.selectedProfile].clanTag, w.skinURL = S[this.selectedProfile].skinURL, w.color = S[this.selectedProfile].color
  1848. },
  1849. changeSkinPreview: function(e, o) {
  1850. e && o && ("skin-preview" === o ? (t("#skin-preview").removeClass("default").append('<a href="#" id="skin-popover" data-toggle="popover" title="" data-html="true" data-content="<img src=\'' + e.src + "' width='500'>\"></a>"), t("#skin-popover").append(t(e).fadeIn(1e3)), t("#skin-popover").popover()) : t("#" + o).removeClass("default").append(t(e).fadeIn(1e3)))
  1851. },
  1852. setSkinPreview: function(e, o) {
  1853. if (t("#" + o).empty().addClass("default"), e && 0 != e.length) {
  1854. var a = this,
  1855. i = new Image;
  1856. i.crossOrigin = "Anonymous", i.onload = function() {
  1857. a.changeSkinPreview(i, o)
  1858. }, i.src = e
  1859. }
  1860. },
  1861. setProfile: function() {
  1862. var e = (S.length + this.selectedProfile - 1) % S.length,
  1863. o = (this.selectedProfile + 1) % S.length;
  1864. this.setSkinPreview(S[e].skinURL, "prev-profile"), this.setSkinPreview(S[this.selectedProfile].skinURL, "skin-preview"), this.setSkinPreview(S[o].skinURL, "next-profile"), this.saveSettings(this.selectedProfile, "ogarioSelectedProfile"), t("#nick").val(S[this.selectedProfile].nick), t("#clantag").val(S[this.selectedProfile].clanTag), t("#skin").val(S[this.selectedProfile].skinURL), t("#color").val(S[this.selectedProfile].color), t(".skin").colorpicker("setValue", S[this.selectedProfile].color), t("#skins a").removeClass("selected"), t("#skins a[data-profile='" + this.selectedProfile + "']").addClass("selected")
  1865. },
  1866. prevProfile: function() {
  1867. this.setPlayerSettings(), this.selectedProfile = (S.length + this.selectedProfile - 1) % S.length, this.setProfile()
  1868. },
  1869. nextProfile: function() {
  1870. this.setPlayerSettings(), this.selectedProfile = (this.selectedProfile + 1) % S.length, this.setProfile()
  1871. },
  1872. selectProfile: function(e) {
  1873. this.setPlayerSettings(), this.selectedProfile = parseInt(e), this.setProfile()
  1874. },
  1875. addOption: function(e, o, a, i) {
  1876. t(e).append('<label><input type="checkbox" id="' + o + '" class="js-switch"> ' + a + "</label>"), t("#" + o).prop("checked", i)
  1877. },
  1878. addOptions: function(e, o) {
  1879. if (e) {
  1880. t("#og-options").append('<div class="options-box ' + o + '"><h5 class="menu-main-color">' + u[d][o] + "</h5></div>");
  1881. for (var a = 0; a < e.length; a++) {
  1882. var i = e[a];
  1883. v.hasOwnProperty(i) && (t("." + o).append("<label>" + u[d][i] + ' <input type="checkbox" class="js-switch" onchange="setSettings(\'' + i + "', $(this).is(':checked'));\" id=\"" + i + '"></label>'), t("#" + i).prop("checked", v[i]))
  1884. }
  1885. }
  1886. },
  1887. setLang: function() {
  1888. if ("pl" === d && e.i18n_dict && e.i18n_dict.en)
  1889. for (var o in e.i18n_dict.en) e.i18n_dict.en.hasOwnProperty(o) && u.pl.hasOwnProperty(o) && (e.i18n_dict.en[o] = u.pl[o])
  1890. },
  1891. setMenu: function() {
  1892. var a = this;
  1893. document.title = this.name, t("#mainPanel").before('<div id="exp-bar" class="agario-panel"><span class="icon-user"></span><div class="agario-exp-bar progress"><span class="progress-bar-text">0/50</span><div class="progress-bar progress-bar-striped" style="width: 0%;"></div></div><div class="progress-bar-star">1</div></div><div id="main-menu" class="agario-panel"><ul class="menu-tabs"><li class="start-tab active"><a href="#main-panel" class="active icon-home" data-toggle="tab-tooltip" data-container="body" title="' + u[d].start + '"></a></li><li class="profile-tab"><a href="#profile" class="icon-user" data-toggle="tab-tooltip" data-container="body" title="' + u[d].profile + '"></a></li><li class="settings-tab"><a href="#og-settings" class="icon-cog" data-toggle="tab-tooltip" data-container="body" title="' + u[d].settings + '"></a></li><li class="theme-tab"><a href="#theme" class="icon-droplet" data-toggle="tab-tooltip" data-container="body" title="' + u[d].theme + '"></a></li><li class="hotkeys-tab"><a href="#" class="hotkeys-link icon-keyboard" data-toggle="tab-tooltip" data-container="body" title="' + u[d].hotkeys + '"></a></li><li class="music-tab"><a href="#music" class="icon-music" data-toggle="tab-tooltip" data-container="body" title="Radio"></a></li></ul><div id="main-panel" class="menu-panel"></div><div id="profile" class="menu-panel"></div><div id="og-settings" class="menu-panel"><div class="submenu-panel"></div></div><div id="theme" class="menu-panel"></div><div id="music" class="menu-panel"></div></div>'), t("#main-panel").append('<a href="#" class="quick quick-menu icon-menu"></a><a href="#" class="quick quick-skins icon-images"></a><div id="profiles"><div id="prev-profile"></div><div id="skin-preview"></div><div id="next-profile"></div></div>'), t("#mainPanel div[role=form]").appendTo(t("#main-panel")), t("#main-panel div[role=form] .form-group:first").remove(), t("#nick").before('<input id="clantag" class="form-control" placeholder="Tag, e.g. Ⓜ" maxlength="10" /><div class="input-group nick"></div>'), t("#nick").appendTo(t(".nick")), t(".nick").append('<span class="input-group-btn"><button id="stream-mode" class="btn active icon-eye"></button></span>'), t(".nick").after('<div class="input-group skin"><input id="skin" class="form-control" placeholder="Skin URL (imgur.com direct link)" maxlength="40" /><input type="hidden" id="color" value="' + w.color + '" maxlength="7" /><span class="input-group-addon"><i></i></span><span class="input-group-btn"><button id="hide-url" class="btn active icon-eye"></button></span></div>'), t("#locationKnown, #locationUnknown").insertAfter(t(".skin")), t(".btn-spectate, .btn-logout").appendTo("#agario-main-buttons"), t("#agario-main-buttons").append('<br clear="both" />'), t("#helloContainer div[role=form]").after('<div id="ogario-party"><input id="joinPartyToken" class="partyToken form-control" placeholder="Party token" /></div>'), t("#join-party-btn").appendTo(t("#ogario-party")), t("#join-party-btn").addClass("btn-success"), t("#create-party-btn").appendTo(t("#ogario-party")), t("#settingsChoice, #options").appendTo(t("#og-settings .submenu-panel")), t("#stats").appendTo(t("#main-menu")).addClass("menu-panel"), t("#statsContinue").attr("id", "statsContinue2"), t("#mainPanel").empty().remove(), t(".center-container").addClass("ogario-menu"), t(".center-container").append('<div id="menu-footer" class="menu-main-color">' + u[d].visit + ' <a href="http://ogario.ovh" target="_blank">ogario.ovh</a> | ' + this.version + "</div>"), t("#leftPanel, #rightPanel").addClass("ogario-menu").removeAttr("id"), t(".agario-profile-panel, .agario-panel-freecoins, .agario-panel-gifting, .agario-shop-panel").appendTo(t("#profile")).removeClass("agario-side-panel"), t(".agario-profile-panel").after('<div id="block-warn">' + u[d].blockWarn + '<br><a href="#" id="unblock-popups">' + u[d].unblockPopups + "</a></div>"), t("#exp-bar").addClass("agario-profile-panel"), t(".left-container").empty(), t(".agario-shop-panel").after('<div class="agario-panel ogario-yt-panel"><h5 class="menu-main-color">Team OGARio (tag: Ⓜ)</h5><div class="g-ytsubscribe" data-channelid="UCaWiPNJWnhzYDrBQoXokn6w" data-layout="full" data-theme="dark" data-count="default"></div></div>'), t("#tags-container").appendTo(t("#profile")), t(".btn-logout").appendTo(t("#profile")), t("#music").append('<div class="agario-panel radio-panel"><h5 class="menu-main-color">Radio (' + u[d].thanks + ')</h5><audio src="http://frshoutcast.comunicazion.eu:8815/;" controls></audio><span class="playlist"><span class="icon-file-music"></span> <a href="http://frshoutcast.comunicazion.eu:8815/played.html?sid=1" target="_blank">' + u[d].playlist + "</a></span></div>"), t("#music").append('<div class="agario-panel ogario-yt-panel"><h5 class="menu-main-color">Team OGARio (tag: Ⓜ)</h5><div class="g-ytsubscribe" data-channelid="UCaWiPNJWnhzYDrBQoXokn6w" data-layout="full" data-theme="dark" data-count="default"></div></div>'), t(".left-container").append('<div id="quick-menu" class="agario-panel agario-side-panel"><a href="#" class="quick-shop icon-cart" data-toggle="tab-tooltip" data-container="body" data-placement="left" title="' + u[d].page_shop + '"></a><a href="#" class="quick-free-coins icon-coin-dollar" data-toggle="tab-tooltip" data-container="body" data-placement="left" title="' + u[d].page_menu_main_free_coins + '"></a><a href="#" class="quick-free-gifts icon-gift" data-toggle="tab-tooltip" data-container="body" data-placement="left" title="' + u[d].page_menu_main_gifts + '"></a><a href="http://ogario.ovh/skins/" class="quick-more-skins icon-grin" target="_blank" data-toggle="tab-tooltip" data-container="body" data-placement="left" title="' + u[d].skins + '"></a><a href="http://youtube.com/channel/UCaWiPNJWnhzYDrBQoXokn6w" class="quick-yt icon-youtube2" target="_blank" data-toggle="tab-tooltip" data-container="body" data-placement="left" title="Team OGARio"></a></div>'), t(".agario-party-6").appendTo(t(".center-container")), t(".right-container").empty(), t(".right-container").append('<div class="agario-party"></div>'), t(".agario-party-6").appendTo(t(".agario-party")), t(".agario-party h4, #cancel-party-btn").remove(), t(".agario-party .btn").addClass("btn-sm"), t(".right-container").append('<div id="skins-panel" class="agario-panel agario-side-panel"><div id="skins"></div><a href="http://ogario.ovh/skins/" id="more-skins" class="btn btn-block btn-success" target="_blank">' + u[d].moreSkins + "</a></div>"), t(".btn-settings, .text-muted, .tosBox, .agario-promo, #agario-web-incentive, span[data-itr='page_option_dark_theme'], #options #darkTheme").remove(), t("#advertisement, #adbg, #a320x250, #g320x250, #s320x250, #adsBottom").css("display", "none"), t("#advertisement").removeClass("agario-panel"), t("#adsBottom").css({
  1894. "z-index": "1",
  1895. opacity: "0",
  1896. bottom: "-100px"
  1897. }), t("#og-settings .submenu-panel").append('<div id="og-options"></div>'), this.addOptions(["quickResp", "autoResp"], "respGroup"), this.addOptions(["autoZoom"], "zoomGroup"), this.addOptions(["autoHideCellsInfo", "hideMyName", "textStroke"], "namesGroup"), this.addOptions(["hideMyMass", "hideEnemiesMass"], "massGroup"), this.addOptions(["customSkins", "vanillaSkins"], "skinsGroup"), this.addOptions(["autoHideFood", "rainbowFood"], "foodGroup"), this.addOptions(["myCustomColor", "myTransparentSkin", "transparentSkins", "transparentCells", "transparentViruses"], "transparencyGroup"), this.addOptions(["showGrid", "showBgSectors", "showMapBorders"], "gridGroup"), this.addOptions(["disableChat", "showChatBox", "showChatImages", "showChatVideos"], "chatGroup"), this.addOptions(["showMiniMap", "showMiniMapGrid", "showMiniMapGuides", "oneColoredTeammates"], "miniMapGroup"), this.addOptions(["oppColors", "oppRings", "virColors", "splitRange", "virusesRange", "cursorTracking", "teammatesInd"], "helpersGroup"), this.addOptions(["mouseSplit", "mouseFeed", "mouseInvert"], "mouseGroup"), this.addOptions(["showTop5", "showTargeting", "centeredLb", "normalLb", "fpsAtTop"], "hudGroup"), this.addOptions(["showStats", "showStatsMass", "showStatsSTE", "showStatsN16", "showStatsFPS"], "statsGroup"), this.addOptions(["blockPopups"], "extrasGroup"), t("#noSkins, #noNames, #noColors, #showMass, #skipStats").addClass("js-switch-vanilla"), t(".namesGroup h5").after('<label class="noNames">' + u[d].noNames + " </label>"), t("#noNames").appendTo(t(".noNames")), t(".massGroup h5").after('<label class="showMass">' + u[d].showMass + " </label>"), t("#showMass").appendTo(t(".showMass")), t(".skinsGroup h5").after('<label class="noSkins">' + u[d].noSkins + " </label>"), t("#noSkins").appendTo(t(".noSkins")), t(".transparencyGroup h5").after('<label class="noColors">' + u[d].noColors + " </label>"), t("#noColors").appendTo(t(".noColors")), t(".extrasGroup h5").after('<label class="skipStats">' + u[d].skipStats + " </label>"), t("#skipStats").appendTo(t(".skipStats")), t("#options").remove(), t("#settingsChoice").appendTo(t(".extrasGroup")).addClass("select-wrapper"), t(".js-switch-vanilla").on("click", function() {
  1898. var e = t(this),
  1899. i = e.attr("id");
  1900. void 0 !== a[i] && (a[i] = e.is(":checked"), "noSkins" === i && (o.showCustomSkins = !a.noSkins))
  1901. }), t(".zoomGroup").append('<div class="slider-box"><div class="box-label"><span class="value-label">' + u[d].zoomSpeed + ': </span><span id="zoomSpeed-value" class="value">' + v.zoomSpeedValue + '</span></div><input id="zoomSpeed-slider" type="range" min="0.75" max="0.99" step="0.01" value="' + v.zoomSpeedValue + '"></div>'), t("#zoomSpeed-slider").on("input", function() {
  1902. var e = parseFloat(t(this).val());
  1903. t("#zoomSpeed-value").text(e), v.zoomSpeedValue = e, o.zoomSpeedValue = e, a.saveSettings(v, "ogarioSettings")
  1904. }), t("#og-settings").append('<button class="btn btn-block btn-success btn-export">' + u[d].exportImport + "</button>"), t("#og-settings").append('<div class="restore-settings"><a href="#">' + u[d].restoreSettings + "</a></div>"), t("body").append('<div id="overlays-hud"><div id="stats-hud" class="hud stats-hud-color"></div> <div id="top5-hud" class="hud"><h5 class="hud-main-color">Team top 5</h5><ol id="top5-pos"></ol><div id="top5-total"></div></div> <div id="time-hud" class="hud time-hud-color"></div> <div id="pause-hud" class="hud">' + u[d].pause + '</div> <div id="leaderboard-hud" class="hud-b"><h4 class="hud-main-color">ogario.ovh</h4><div id="leaderboard-positions"></div></div> <div id="minimap-hud" class="hud-b"><canvas id="minimap-sectors"></canvas><canvas id="minimap"></canvas></div><div id="target-hud" class="hud"><div id="target-player"><span id="target-skin"><img src=""> </span><span id="target-nick"></span> <span id="target-status" class="hud-main-color">[' + u[d].targetNotSet + ']</span></div><div id="target-summary"></div></div><div id="target-panel-hud" class="hud"><a href="#" id="set-targeting" class="icon-target"></a><a href="#" id="set-private-minimap" class="icon-location2"></a><a href="#" id="cancel-targeting" class="icon-cancel-circle"></a><a href="#" id="change-target" class="icon-arrow-right"></a></div></div>'), t("body").append('<ul id="messages"></ul>'), t("body").append('<input id="message" class="form-control" type="text" placeholder="' + u[d].enterChatMsg + '..." maxlength="80" />'), t("body").append('<div id="chat-box"></div>'), t("body").append('<div id="exp-imp"><div id="exp-imp-menu"><button id="close-exp-imp" class="btn btn-danger">' + u[d].close + '</button></div><div id="exp-imp-settings"></div></div>'), t("#exp-imp-settings").append("<h1>" + u[d].exportSettings + "</h1><h2>" + u[d].exportInfo + "</h2>"), this.addOption("#exp-imp-settings", "export-ogarioCommands", u[d].commands, !0), this.addOption("#exp-imp-settings", "export-ogarioHotkeys", u[d].hotkeys, !0), this.addOption("#exp-imp-settings", "export-ogarioPlayerProfiles", u[d].profiles, !0), this.addOption("#exp-imp-settings", "export-ogarioSettings", u[d].settings, !0), this.addOption("#exp-imp-settings", "export-ogarioThemeSettings", u[d].theme, !0), t("#exp-imp-settings").append('<textarea id="export-settings" class="form-control" rows="14" cols="100" spellcheck="false" readonly /><button id="export-settings-btn" class="btn btn-block btn-success">' + u[d].exportSettings + "</button>"), t("#exp-imp-settings").append("<h1>" + u[d].importSettings + "</h1><h2>" + u[d].importInfo + "</h2>"), this.addOption("#exp-imp-settings", "import-ogarioCommands", u[d].commands, !0), this.addOption("#exp-imp-settings", "import-ogarioHotkeys", u[d].hotkeys, !0), this.addOption("#exp-imp-settings", "import-ogarioPlayerProfiles", u[d].profiles, !0), this.addOption("#exp-imp-settings", "import-ogarioSettings", u[d].settings, !0), this.addOption("#exp-imp-settings", "import-ogarioThemeSettings", u[d].theme, !0), t("#exp-imp-settings").append('<textarea id="import-settings" class="form-control" rows="14" cols="100" spellcheck="false" /><button id="import-settings-btn" class="btn btn-block btn-success">' + u[d].importSettings + "</button>"), b && b.setThemeMenu(), t(".menu-tabs a").on("click", function(e) {
  1905. e.preventDefault();
  1906. var o = t(this);
  1907. a.switchMenuTabs(o, "menu-panel")
  1908. }), t(".submenu-tabs a").on("click", function(e) {
  1909. e.preventDefault();
  1910. var o = t(this);
  1911. a.switchMenuTabs(o, "submenu-panel")
  1912. }), t(".quick-menu").on("click", function(e) {
  1913. e.preventDefault(), v.showQuickMenu = !v.showQuickMenu, a.saveSettings(v, "ogarioSettings"), a.setShowQuickMenu()
  1914. }), t(".quick-skins").on("click", function(e) {
  1915. e.preventDefault(), v.showSkinsPanel = !v.showSkinsPanel, a.saveSettings(v, "ogarioSettings"), a.setShowSkinsPanel()
  1916. }), t("#gamemode").on("change", function() {
  1917. a.gameMode = o.gameMode = this.value, ":party" !== this.value && a.isSocketOpen() && (a.socket.close(), t(".partyToken").val("")), a.setTop5(), a.setTargetingHUD(), a.setShowChatBox()
  1918. }), t("#cancel-party-btn").on("click", function() {
  1919. a.gameMode = o.gameMode = "", a.socket.close(), t(".partyToken").val("")
  1920. });
  1921. for (var i = 0; i < S.length; i++) t("#skins").append('<div class="skin-box"><a href="#profile-' + i + '" id="profile-' + i + '" data-profile="' + i + '"></a></div>'), this.setSkinPreview(S[i].skinURL, "profile-" + i), i == this.selectedProfile && t("#profile-" + i).addClass("selected");
  1922. t("#skin").on("input", function() {
  1923. var e = t(this).val();
  1924. a.setSkinPreview(e, "skin-preview"), a.setSkinPreview(e, "profile-" + a.selectedProfile)
  1925. }), t("#prev-profile").on("click", function() {
  1926. a.prevProfile()
  1927. }), t("#next-profile").on("click", function() {
  1928. a.nextProfile()
  1929. }), t("#skins a").on("click", function(e) {
  1930. e.preventDefault();
  1931. var o = t(this).attr("data-profile");
  1932. a.selectProfile(o)
  1933. }), t("#stream-mode").on("click", function() {
  1934. v.streamMode = !v.streamMode, a.saveSettings(v, "ogarioSettings"), a.setStreamMode()
  1935. }), t("#hide-url").on("click", function() {
  1936. v.hideSkinUrl = !v.hideSkinUrl, a.saveSettings(v, "ogarioSettings"), a.setHideSkinUrl()
  1937. }), t("#set-targeting").on("click", function(e) {
  1938. e.preventDefault(), a.setTargeting()
  1939. }), t("#cancel-targeting").on("click", function(e) {
  1940. e.preventDefault(), a.cancelTargeting()
  1941. }), t("#set-private-minimap").on("click", function(e) {
  1942. e.preventDefault(), a.setPrivateMiniMap()
  1943. }), t("#change-target").on("click", function(e) {
  1944. e.preventDefault(), a.changeTarget()
  1945. }), t("#og-settings .restore-settings a").on("click", function(e) {
  1946. e.preventDefault(), a.restoreSettings()
  1947. }), t("#og-settings .btn-export").on("click", function(e) {
  1948. e.preventDefault(), a.exportSettings(), t("#exp-imp").fadeIn(500), t("#exp-imp-settings, #export-settings").perfectScrollbar("update")
  1949. }), t("#close-exp-imp").on("click", function(e) {
  1950. e.preventDefault(), t("#exp-imp").fadeOut(500)
  1951. }), t("#export-settings").on("focus", function() {
  1952. t(this).select()
  1953. }), t("#export-settings-btn").on("click", function(e) {
  1954. e.preventDefault(), a.exportSettings()
  1955. }), t("#import-settings-btn").on("click", function(e) {
  1956. e.preventDefault(), a.importSettings()
  1957. }), t("#unblock-popups").on("click", function(e) {
  1958. e.preventDefault(), a.unblockPopups()
  1959. }), t("#openfl-overlay.disabler").on("click", function() {
  1960. v.blockPopups && a.blockPopups()
  1961. }), t("#openfl-content").on("click", function() {
  1962. if (v.blockPopups) {
  1963. var e = t(this);
  1964. setTimeout(function() {
  1965. e.is(":visible") || a.blockPopups()
  1966. }, 1e3)
  1967. }
  1968. }), t(".quick-shop").on("click", function(o) {
  1969. o.preventDefault(), a.unblockPopups(), e.MC && e.MC.openShop()
  1970. }), t(".quick-free-coins").on("click", function(o) {
  1971. o.preventDefault(), a.unblockPopups(), e.MC && e.MC.showFreeCoins()
  1972. }), t(".quick-free-gifts").on("click", function(o) {
  1973. o.preventDefault(), a.unblockPopups(), e.MC && e.MC.showGifting()
  1974. }), this.statsHUD = document.getElementById("stats-hud"), this.activeParties = document.getElementById("active-parties"), this.top5pos = document.getElementById("top5-pos"), this.top5total = document.getElementById("top5-total"), this.leaderboardPositionsHUD = document.getElementById("leaderboard-positions"), this.timeHUD = document.getElementById("time-hud"), t("#canvas").bind("contextmenu", function() {
  1975. return !1
  1976. }), t('[data-toggle="tab-tooltip"]').tooltip(), t(".btn").mouseup(function() {
  1977. $(this).blur()
  1978. }), t(".submenu-panel, #chat-box, #exp-imp-settings, #export-settings, #import-settings").perfectScrollbar({
  1979. suppressScrollX: !0
  1980. });
  1981. var s = Array.prototype.slice.call(document.querySelectorAll(".js-switch"));
  1982. s.forEach(function(e) {
  1983. new Switchery(e, {
  1984. color: C.menuMainColor,
  1985. size: "small"
  1986. })
  1987. }), t('input[type="range"]').rangeslider({
  1988. polyfill: !1
  1989. }), toastr.options = {
  1990. newestOnTop: !1,
  1991. positionClass: "toast-bottom-left",
  1992. timeOut: "15000"
  1993. }
  1994. },
  1995. switchMenuTabs: function(e, o) {
  1996. var a = e.parent();
  1997. if ("menu-panel" === o) {
  1998. if (e.hasClass("hotkeys-link")) return void showHotkeys();
  1999. a.hasClass("profile-tab") && this.setBlockPopups()
  2000. }
  2001. e.addClass("active"), a.addClass("active"), a.siblings().removeClass("active"), a.siblings().find("a").removeClass("active");
  2002. var i = e.attr("href");
  2003. if ("submenu-panel" === o) {
  2004. var s = t(i).parent().attr("id");
  2005. t("#" + s + " .submenu-panel").not(i).css("display", "none")
  2006. } else t(".menu-panel").not(i).css("display", "none");
  2007. t(i).fadeIn(1e3), l(), t(".submenu-panel").perfectScrollbar("update")
  2008. },
  2009. getDefaultSettings: function() {
  2010. this.noSkins = t("#noSkins").is(":checked"), this.noNames = t("#noNames").is(":checked"), this.noColors = t("#noColors").is(":checked"), this.showMass = t("#showMass").is(":checked"), this.skipStats = t("#skipStats").is(":checked"), o.showCustomSkins = !this.noSkins;
  2011. var a = this;
  2012. if (t("#quality").on("change", function() {
  2013. var e = t(this).val();
  2014. a.getQuality(e), l()
  2015. }), null !== e.localStorage.getItem("scale_setting")) {
  2016. var i = JSON.parse(e.localStorage.getItem("scale_setting"));
  2017. this.setCanvasScale(i)
  2018. } else {
  2019. var s = t("#quality").val();
  2020. this.getQuality(s)
  2021. }
  2022. if (null !== e.localStorage.getItem("location")) {
  2023. var n = e.localStorage.getItem("location");
  2024. t("#region").val(n), e.MC && e.MC.setRegion && e.MC.setRegion(n)
  2025. }
  2026. this.setParty(), ":party" === M.gameMode && e.location.hash && t("#join-party-btn").click();
  2027. var r = Array.prototype.slice.call(document.querySelectorAll(".js-switch-vanilla"));
  2028. r.forEach(function(e) {
  2029. new Switchery(e, {
  2030. color: C.menuMainColor,
  2031. size: "small"
  2032. })
  2033. }), this.setAutoResp()
  2034. },
  2035. getQuality: function(o) {
  2036. var t = "devicePixelRatio" in e,
  2037. a = 1;
  2038. switch (t && (a = e.devicePixelRatio), o) {
  2039. case "High":
  2040. this.setCanvasScale(1);
  2041. break;
  2042. case "Medium":
  2043. this.setCanvasScale(.9);
  2044. break;
  2045. case "Low":
  2046. this.setCanvasScale(.75);
  2047. break;
  2048. case "VeryLow":
  2049. this.setCanvasScale(.5);
  2050. break;
  2051. default:
  2052. this.setCanvasScale(a)
  2053. }
  2054. },
  2055. setCanvasScale: function(e) {
  2056. this.canvasScale = e, o.canvasScale = e
  2057. },
  2058. setParty: function() {
  2059. if (this.gameMode = t("#gamemode").val(), this.setTop5(), this.setTargetingHUD(), this.setShowChatBox(), ":party" === this.gameMode) {
  2060. var e = t(".partyToken").val();
  2061. e && e.length > 5 && (e = e.split("#"), this.partyToken !== e[1] && (this.partyToken = e[1], this.flushSkinsMap(), this.setTargetStatus(0)))
  2062. }
  2063. },
  2064. setStreamMode: function() {
  2065. v.streamMode ? (t("#stream-mode").addClass("icon-eye-blocked"), t("#clantag, #nick, #joinPartyToken").addClass("stream-mode")) : (t("#stream-mode").removeClass("icon-eye-blocked"), t("#clantag, #nick, #joinPartyToken").removeClass("stream-mode"))
  2066. },
  2067. setHideSkinUrl: function() {
  2068. v.hideSkinUrl ? (t("#hide-url").addClass("icon-eye-blocked"), t("#skin").addClass("hide-url")) : (t("#hide-url").removeClass("icon-eye-blocked"), t("#skin").removeClass("hide-url"))
  2069. },
  2070. setShowQuickMenu: function() {
  2071. v.showQuickMenu ? t("#quick-menu").fadeIn(500) : t("#quick-menu").fadeOut(500)
  2072. },
  2073. setShowSkinsPanel: function() {
  2074. v.showSkinsPanel ? t("#skins-panel").fadeIn(500) : t("#skins-panel").fadeOut(500)
  2075. },
  2076. setButtons: function() {
  2077. var e = this,
  2078. o = document.getElementsByClassName("btn-play")[0],
  2079. a = document.getElementsByClassName("btn-play-guest")[0],
  2080. i = document.getElementsByClassName("btn-spectate")[0],
  2081. s = document.getElementById("create-party-btn"),
  2082. n = document.getElementById("join-party-btn"),
  2083. r = document.getElementById("statsContinue2");
  2084. o.addEventListener("click", function() {
  2085. e.onPlay()
  2086. }, !1), a.addEventListener("click", function() {
  2087. e.onPlay()
  2088. }, !1), i.addEventListener("click", function() {
  2089. e.onSpectate()
  2090. }, !1), s.addEventListener("click", function() {
  2091. e.onCreate()
  2092. }, !1), n.addEventListener("click", function() {
  2093. e.onJoin()
  2094. }, !1), r.addEventListener("click", function() {
  2095. t("#stats, #main-panel").toggle()
  2096. }, !1)
  2097. },
  2098. play: function() {
  2099. if (this.setPlayerSettings(), ":party" === this.gameMode)
  2100. if (this.setParty(), this.isSocketOpen()) this.sendPlayerClanTag(), this.sendPartyToken(), this.sendPlayerNick();
  2101. else {
  2102. this.connect();
  2103. var e = this;
  2104. setTimeout(function() {
  2105. e.sendPlayerClanTag(), e.sendPartyToken(), e.sendPlayerNick()
  2106. }, 1e3)
  2107. }
  2108. },
  2109. onPlay: function() {
  2110. this.play(), t(".ogario-menu").hide(), e.addKeyListeners(), o.spectate = !1, o.playerBestMass = 0, v.autoHideFood && (o.showFood = !0), e.ga && e.ga("create", "UA-67142685-2", "auto", "ogarioTracker"), e.ga && e.ga("ogarioTracker.send", "pageview")
  2111. },
  2112. onSpectate: function() {
  2113. ":party" === this.gameMode ? this.onJoin() : this.setPlayerSettings(), t(".ogario-menu").hide(), e.addKeyListeners(), o.play = !1, o.spectate = !0, v.autoHideFood && (o.showFood = !1)
  2114. },
  2115. join: function() {
  2116. this.setParty(), this.setPlayerSettings(), this.sendPlayerClanTag(), this.sendPartyToken(), this.sendPlayerNick(), this.sendPlayerDeath(), this.sendPlayerJoin()
  2117. },
  2118. onJoin: function() {
  2119. if (this.setParty(), this.isSocketOpen()) this.join();
  2120. else {
  2121. this.connect();
  2122. var e = this;
  2123. setTimeout(function() {
  2124. e.join()
  2125. }, 1e3)
  2126. }
  2127. },
  2128. create: function() {
  2129. if (this.setParty(), "" !== this.partyToken) return void this.onJoin();
  2130. var e = this;
  2131. setTimeout(function() {
  2132. e.create()
  2133. }, 100)
  2134. },
  2135. onCreate: function() {
  2136. this.flushData(), t("#joinPartyToken").val(""), this.partyToken = "", this.create()
  2137. },
  2138. onPlayerSpawn: function() {
  2139. if (o.play = !0, o.playerColor) return this.sendPlayerSpawn(), void this.cacheCustomSkin(w.nick + o.playerColor, w.skinURL);
  2140. var e = this;
  2141. setTimeout(function() {
  2142. e.onPlayerSpawn()
  2143. }, 100)
  2144. },
  2145. onPlayerDeath: function() {
  2146. t(".ogario-menu").show(), t(".menu-panel").hide(), this.skipStats ? t("#main-panel").show() : t("#stats").show(), o.play = !1, o.playerColor = null, o.foodIsHidden = !1, o.playerMass = 0, this.sendPlayerDeath(), this.updateDeathLocations(o.playerX, o.playerY), t(".btn-spectate").prop("disabled", !1), e.onkeydown = function() {}, this.autoResp()
  2147. },
  2148. setPlayerSettings: function() {
  2149. var e = t("#nick").val(),
  2150. a = t("#clantag").val(),
  2151. i = t("#skin").val(),
  2152. s = t("#color").val();
  2153. w.nick = e || "", w.clanTag = a.trim() || "", w.skinURL = i.trim() || "", 7 == s.length && (w.color = s), o.playerNick = w.nick, w.clanTag.length > 0 && (o.clanTag = w.clanTag), S[this.selectedProfile].nick = w.nick, S[this.selectedProfile].clanTag = w.clanTag, S[this.selectedProfile].skinURL = w.skinURL, S[this.selectedProfile].color = w.color, this.saveSettings(S, "ogarioPlayerProfiles")
  2154. },
  2155. cacheSkin: function(e, o) {
  2156. o && (e[o] = new Image, e[o].crossOrigin = "Anonymous", e[o].src = o)
  2157. },
  2158. getCachedSkin: function(e, o) {
  2159. return e[o] && e[o].complete && e[o].width && e[o].height && e[o].width <= 2e3 && e[o].height <= 2e3 ? e[o] : null
  2160. },
  2161. cacheCustomSkin: function(e, o) {
  2162. if (o) {
  2163. if (e && (this.customSkinsMap[e] = o), this.customSkinsCache.hasOwnProperty(o)) return;
  2164. this.cacheSkin(this.customSkinsCache, o)
  2165. }
  2166. },
  2167. getCustomSkin: function(e, o) {
  2168. return this.customSkinsMap.hasOwnProperty(e + o) ? this.getCachedSkin(this.customSkinsCache, this.customSkinsMap[e + o]) : null
  2169. },
  2170. countFPS: function() {
  2171. if (v.showStatsFPS) {
  2172. if (!this.fpsLastRequest) return void(this.fpsLastRequest = Date.now());
  2173. var e = Date.now(),
  2174. o = e - this.fpsLastRequest;
  2175. 1e3 > o || (this.rFps = this.renderedFrames, this.renderedFrames = 0, this.fpsLastRequest = e), this.renderedFrames++
  2176. }
  2177. },
  2178. calculateCurrentSector: function() {
  2179. if (!o.mapOffsetFixed) return void(this.currentSector = "");
  2180. var e = o.mapOffsetX + o.mapOffset,
  2181. t = o.mapOffsetY + o.mapOffset,
  2182. a = String.fromCharCode(65 + Math.floor((o.playerY + t) / (o.mapSize / C.sectorsY))),
  2183. i = "" + (Math.floor((o.playerX + e) / (o.mapSize / C.sectorsX)) + 1);
  2184. this.currentSector = a + i
  2185. },
  2186. calculateTargetSector: function(e, t) {
  2187. if (!o.mapOffsetFixed) return "";
  2188. var a = String.fromCharCode(65 + Math.floor((t + o.mapOffset) / (o.mapSize / C.sectorsY))),
  2189. i = "" + (Math.floor((e + o.mapOffset) / (o.mapSize / C.sectorsX)) + 1);
  2190. return a + i
  2191. },
  2192. updateDeathLocations: function(e, t) {
  2193. o.mapOffsetFixed && (this.deathLocations.push({
  2194. x: e + o.mapOffsetX,
  2195. y: t + o.mapOffsetY
  2196. }), 6 == this.deathLocations.length && this.deathLocations.splice(0, 1), this.lastDeath = this.deathLocations.length - 1)
  2197. },
  2198. drawMapBorders: function(e, t, a, i, s, n, r, l) {
  2199. !o.mapOffsetFixed || !v.showMapBorders && l || (e.strokeStyle = n, e.lineWidth = r, e.beginPath(), e.moveTo(t, a), e.lineTo(i, a), e.lineTo(i, s), e.lineTo(t, s), e.closePath(), e.stroke())
  2200. },
  2201. drawMiniMap: function() {
  2202. if (o.mapOffsetFixed) {
  2203. var e = C.miniMapWidth,
  2204. t = C.miniMapTop,
  2205. a = e + t,
  2206. i = e - 18,
  2207. s = t + 9.5;
  2208. this.miniMap ? this.miniMapCtx.clearRect(0, 0, e, a) : (this.miniMap = document.getElementById("minimap"), this.miniMapCtx = this.miniMap.getContext("2d"), this.miniMapCtx.ogarioCtx = !0, this.miniMap.width = e, this.miniMap.height = a), this.miniMap.width != e && (this.miniMap.width = e, this.miniMap.height = a);
  2209. var n = i / o.mapSize,
  2210. r = o.mapOffsetX + o.mapOffset,
  2211. l = o.mapOffsetY + o.mapOffset;
  2212. if (this.drawSelectedCell(this.miniMapCtx), this.calculateCurrentSector(), this.miniMapCtx.globalAlpha = 1, this.miniMapCtx.font = C.miniMapFontWeight + " " + (t - 4) + "px " + C.miniMapFontFamily, this.miniMapCtx.fillStyle = C.miniMapSectorColor, this.miniMapCtx.fillText(this.currentSector, 10, t), this.miniMapSectors || this.drawMiniMapSectors(C.sectorsX, C.sectorsY, i, a, s), this.miniMapCtx.save(), this.miniMapCtx.translate(9.5, s), v.showMiniMapGuides) {
  2213. var c = Math.round((o.playerX + r) * n),
  2214. p = Math.round((o.playerY + l) * n);
  2215. this.miniMapCtx.lineWidth = 1, this.miniMapCtx.strokeStyle = C.miniMapGuidesColor, this.miniMapCtx.beginPath(), this.miniMapCtx.moveTo(c, 0), this.miniMapCtx.lineTo(c, i - 1), this.miniMapCtx.moveTo(0, p), this.miniMapCtx.lineTo(i - 1, p), this.miniMapCtx.stroke()
  2216. }
  2217. if (this.miniMapCtx.beginPath(), this.miniMapCtx.arc((o.playerX + r) * n, (o.playerY + l) * n, C.miniMapMyCellSize, 0, this.pi2, !1), this.miniMapCtx.closePath(), C.miniMapMyCellStrokeSize > 0 && (this.miniMapCtx.lineWidth = C.miniMapMyCellStrokeSize, this.miniMapCtx.strokeStyle = C.miniMapMyCellStrokeColor, this.miniMapCtx.stroke()), this.miniMapCtx.fillStyle = C.miniMapMyCellColor, this.miniMapCtx.fill(), ":party" === this.gameMode && this.teamPlayers.length > 0)
  2218. for (var h = 0; h < this.teamPlayers.length; h++) this.teamPlayers[h].drawPosition(this.miniMapCtx, o.mapOffset, n, this.privateMiniMap, this.targetID);
  2219. if (this.deathLocations.length > 0) {
  2220. var c = Math.round((this.deathLocations[this.lastDeath].x + o.mapOffset) * n),
  2221. p = Math.round((this.deathLocations[this.lastDeath].y + o.mapOffset) * n),
  2222. d = Math.max(C.miniMapMyCellSize - 2, 4);
  2223. this.miniMapCtx.lineWidth = 1, this.miniMapCtx.strokeStyle = this.deathLocations.length - 1 == this.lastDeath ? C.miniMapDeathLocationColor : "#FFFFFF", this.miniMapCtx.beginPath(), this.miniMapCtx.moveTo(c - d, p), this.miniMapCtx.lineTo(c + d, p), this.miniMapCtx.moveTo(c, p - d), this.miniMapCtx.lineTo(c, p + d), this.miniMapCtx.stroke()
  2224. }
  2225. this.miniMapCtx.restore()
  2226. }
  2227. },
  2228. drawMiniMapSectors: function(e, o, t, a, i) {
  2229. this.miniMapSectors = document.getElementById("minimap-sectors");
  2230. var s = this.miniMapSectors.getContext("2d");
  2231. s.ogarioCtx = !0, this.miniMapSectors.width = t, this.miniMapSectors.height = a, s.fillStyle = "#FFFFFF", this.dTok(s, t - 1), this.drawSectors(s, e, o, .5, i, t - .5, a - 9.5, "#FFFFFF", 1, !1)
  2232. },
  2233. resetMiniMapSectors: function() {
  2234. this.miniMapSectors = null
  2235. },
  2236. drawSectors: function(e, t, a, i, s, n, r, l, c, p) {
  2237. if (!p || o.mapOffsetFixed && v.showBgSectors) {
  2238. var h = Math.floor((n - i) / t),
  2239. d = Math.floor((r - s) / a),
  2240. m = 0,
  2241. u = 0;
  2242. if (e.strokeStyle = l, e.fillStyle = l, e.lineWidth = c, p || !p && v.showMiniMapGrid) {
  2243. e.beginPath();
  2244. for (var g = 0; t + 1 > g; g++) m = i + h * g, e.moveTo(g == t ? n : m, s), e.lineTo(g == t ? n : m, r);
  2245. for (var g = 0; a + 1 > g; g++) u = s + d * g, e.moveTo(i - c / 2, g == a ? r : u), e.lineTo(n + c / 2, g == a ? r : u);
  2246. e.stroke()
  2247. } else this.drawMapBorders(e, i, s, n, r, l, c, !1);
  2248. if (p) var f = C.sectorsFontWeight + " " + C.sectorsFontSize + "px " + C.sectorsFontFamily;
  2249. else var f = C.miniMapFontWeight + " " + Math.floor(.4 * d) + "px " + C.miniMapFontFamily;
  2250. e.font = f, e.textAlign = "center", e.textBaseline = "middle";
  2251. for (var g = 0; a > g; g++)
  2252. for (var k = 0; t > k; k++) {
  2253. var y = String.fromCharCode(65 + g) + (k + 1);
  2254. m = Math.floor(i + h / 2 + k * h), u = Math.floor(s + d / 2 + g * d), e.fillText(y, m, u)
  2255. }
  2256. }
  2257. },
  2258. drawGrid: function(e) {
  2259. if (v.showGrid) {
  2260. var t = o.innerW / o.viewScale,
  2261. a = o.innerH / o.viewScale,
  2262. i = (-o.playerX + t / 2) % 50,
  2263. s = (-o.playerY + a / 2) % 50;
  2264. for (e.strokeStyle = C.gridColor, e.globalAlpha = 1 * o.viewScale, e.beginPath(); t > i; i += 50) e.moveTo(i * o.viewScale - .5, 0), e.lineTo(i * o.viewScale - .5, a * o.viewScale);
  2265. for (; a > s; s += 50) e.moveTo(0, s * o.viewScale - .5), e.lineTo(t * o.viewScale, s * o.viewScale - .5);
  2266. e.stroke(), e.globalAlpha = 1
  2267. }
  2268. },
  2269. drawSelectedCell: function(e) {
  2270. o.play && o.playerCellsMass && o.playerCellsMass.length > 1 && (v.splitRange || v.oppColors || v.oppRings || v.showStatsSTE) && (e.fillStyle = "#FFFFFF", e.globalAlpha = this.selectBiggestCell ? .6 : .3, e.beginPath(), e.arc(48, 15, 6, 0, this.pi2, !1), e.closePath(), e.fill(), e.globalAlpha = this.selectBiggestCell ? .3 : .6, e.beginPath(), e.arc(60, 15, 4, 0, this.pi2, !1), e.closePath(), e.fill())
  2271. },
  2272. dTok: function(e, o) {
  2273. e.font = C.miniMapFontWeight + " " + (C.miniMapTop - 6) + "px " + C.miniMapFontFamily, e.textAlign = "right", e.textBaseline = "top", e.fillText(atob(this.token), o, 7)
  2274. },
  2275. drawCircle: function(e, o, t, a, i, s) {
  2276. e.lineWidth = a, e.globalAlpha = i, e.strokeStyle = s;
  2277. for (var n = 0; n < o.length; n++) e.beginPath(), e.arc(o[n].x, o[n].y, o[n].size + t, 0, this.pi2, !1), e.closePath(), e.stroke();
  2278. e.globalAlpha = 1
  2279. },
  2280. preDrawIndicator: function() {
  2281. o.indicator = document.createElement("canvas");
  2282. var e = o.indicator.getContext("2d");
  2283. e.lineWidth = 2, e.fillStyle = "#FFFFFF", e.strokeStyle = "#000000", e.beginPath(), e.moveTo(0, 0), e.lineTo(90, 0), e.lineTo(45, 50), e.closePath(), e.fill(), e.stroke()
  2284. },
  2285. setVirusColor: function(e) {
  2286. var o = Math.floor(e * e / 100);
  2287. return o > 183 ? "#C80000" : C.virusColor
  2288. },
  2289. setVirusStrokeColor: function(e) {
  2290. if (o.play && 0 != o.playerMaxMass) {
  2291. var t = Math.floor(e * e / 100),
  2292. a = t / (this.selectBiggestCell ? o.playerMaxMass : o.playerMinMass);
  2293. return a > .76 ? "#FFDC00" : "#C80000"
  2294. }
  2295. return C.virusStrokeColor
  2296. },
  2297. setOppColor: function(e, t) {
  2298. if (t) return w.color;
  2299. var a = Math.floor(e * e / 100),
  2300. i = this.selectBiggestCell ? o.playerMaxMass : o.playerMinMass,
  2301. s = a / i;
  2302. if (s && s > 0) {
  2303. var n = 1e3 > i ? .35 : .38;
  2304. return s > 11 ? "#FF008C" : 2.5 > s ? 1.25 > s ? 1.25 > s && s > .75 ? "#FFDC00" : s > n ? "#00C8FF" : "#64FF00" : "#FF0A00" : "#BE00FF"
  2305. }
  2306. },
  2307. connect: function() {
  2308. if (this.closeConnection(), this.flushData(), this.setParty(), ":party" === this.gameMode && this.partyToken.length <= 5) {
  2309. console.log("OGARio by szymy: Connecting to server"), this.socket = new WebSocket(this.privateMode && this.privateIP ? this.privateIP : this.publicIP), this.socket.ogarioWS = !0, this.socket.binaryType = "arraybuffer";
  2310. var e = this;
  2311. this.socket.onopen = function() {
  2312. console.log("OGARio by szymy: Socket open");
  2313. var o = e.createView(3);
  2314. o.setUint8(0, 0), o.setUint16(1, 300, !0), e.sendBuffer(o), e.sendPlayerClanTag(), e.sendPartyToken()
  2315. }, this.socket.onmessage = function(o) {
  2316. e.handleMessage(o)
  2317. }, this.socket.onclose = function() {
  2318. e.flushData(), console.log("OGARio by szymy: Socket close")
  2319. }, this.socket.onerror = function() {
  2320. e.flushData(), console.log("OGARio by szymy: Socket error")
  2321. }
  2322. }
  2323. },
  2324. closeConnection: function() {
  2325. if (this.socket) {
  2326. this.socket.onmessage = null;
  2327. try {
  2328. this.socket.close()
  2329. } catch (e) {}
  2330. this.socket = null
  2331. }
  2332. },
  2333. flushData: function() {
  2334. this.teamPlayers = [], this.parties = [], this.lastSentNick = "", this.lastSentClanTag = null, this.lastSentSkinURL = "", this.lastSentCustomColor = "", this.lastSentPartyToken = "", this.flushSkinsMap(), o.play = !1, o.playerColor = null
  2335. },
  2336. flushSkinsMap: function() {
  2337. this.customSkinsMap = {}
  2338. },
  2339. reConnect: function() {
  2340. this.flushData(), this.setParty();
  2341. var e = this;
  2342. setTimeout(function() {
  2343. e.connect()
  2344. }, 1e3)
  2345. },
  2346. switchServerMode: function() {
  2347. this.privateIP && ":party" === this.gameMode && (this.privateMode = !this.privateMode, this.isSocketOpen() && (this.closeConnection(), toastr.error("Zamknięto połączenie z serwerem!")), this.privateMode ? (toastr.info("Przełączono na serwer prywatny!"), t(".party-panel").show()) : (toastr.info("Przełączono na serwer publiczny!"), t("#active-parties").empty(), t(".party-panel").hide()), this.onJoin(), o.play && this.onPlayerSpawn())
  2348. },
  2349. isSocketOpen: function() {
  2350. return null != this.socket && this.socket.readyState == this.socket.OPEN
  2351. },
  2352. createView: function(e) {
  2353. return new DataView(new ArrayBuffer(e))
  2354. },
  2355. strToBuff: function(e, o) {
  2356. var t = this.createView(1 + 2 * o.length);
  2357. t.setUint8(0, e);
  2358. for (var a = 0; a < o.length; a++) t.setUint16(1 + 2 * a, o.charCodeAt(a), !0);
  2359. return t
  2360. },
  2361. sendBuffer: function(e) {
  2362. this.socket.send(e.buffer)
  2363. },
  2364. handleMessage: function(e) {
  2365. this.readMessage(new DataView(e.data))
  2366. },
  2367. readMessage: function(e) {
  2368. switch (e.getUint8(0)) {
  2369. case 0:
  2370. this.playerID = e.getUint32(1, !0);
  2371. break;
  2372. case 1:
  2373. this.sendPlayerUpdate();
  2374. break;
  2375. case 20:
  2376. this.updateTeamPlayer(e);
  2377. break;
  2378. case 30:
  2379. this.updateTeamPlayerPosition(e);
  2380. break;
  2381. case 96:
  2382. this.updateParties(e), this.displayParties();
  2383. break;
  2384. case 100:
  2385. this.readChatMessage(e)
  2386. }
  2387. },
  2388. sendPlayerState: function(e) {
  2389. if (this.isSocketOpen()) {
  2390. var o = this.createView(1);
  2391. o.setUint8(0, e), this.sendBuffer(o)
  2392. }
  2393. },
  2394. sendPlayerSpawn: function() {
  2395. this.sendPlayerState(1)
  2396. },
  2397. sendPlayerDeath: function() {
  2398. this.sendPlayerState(2)
  2399. },
  2400. sendPlayerJoin: function() {
  2401. this.sendPlayerState(3)
  2402. },
  2403. sendPlayerData: function(e, o, t) {
  2404. (null === this[o] || this[o] !== t) && this.isSocketOpen() && (this.sendBuffer(this.strToBuff(e, t)), this[o] = t)
  2405. },
  2406. sendPlayerNick: function() {
  2407. this.sendPlayerData(10, "lastSentNick", w.nick)
  2408. },
  2409. sendPlayerClanTag: function() {
  2410. this.sendPlayerData(11, "lastSentClanTag", w.clanTag)
  2411. },
  2412. sendPlayerSkinURL: function() {
  2413. this.sendPlayerData(12, "lastSentSkinURL", w.skinURL)
  2414. },
  2415. sendPlayerCustomColor: function() {
  2416. this.sendPlayerData(13, "lastSentCustomColor", w.color)
  2417. },
  2418. sendPlayerColor: function() {
  2419. this.isSocketOpen() && o.playerColor && this.sendBuffer(this.strToBuff(14, o.playerColor))
  2420. },
  2421. sendPartyToken: function() {
  2422. this.setParty(), this.sendPlayerData(15, "lastSentPartyToken", this.partyToken)
  2423. },
  2424. sendPlayerUpdate: function() {
  2425. function e(e) {
  2426. for (var o = 0; o < e.length; o++) a.setUint16(i, e.charCodeAt(o), !0), i += 2;
  2427. a.setUint16(i, 0, !0), i += 2
  2428. }
  2429. if (this.isSocketOpen() && this.playerID && o.play && o.playerColor) {
  2430. var t = 41;
  2431. t += 2 * w.nick.length, t += 2 * w.skinURL.length;
  2432. var a = this.createView(t);
  2433. a.setUint8(0, 20), a.setUint32(1, this.playerID, !0);
  2434. var i = 5;
  2435. e(w.nick), e(w.skinURL), e(w.color), e(o.playerColor), this.sendBuffer(a)
  2436. }
  2437. },
  2438. sendPlayerPosition: function() {
  2439. if (this.isSocketOpen() && o.play && this.playerID) {
  2440. var e = this.createView(17);
  2441. e.setUint8(0, 30), e.setUint32(1, this.playerID, !0), e.setInt32(5, this.getPlayerX(), !0), e.setInt32(9, this.getPlayerY(), !0), void 0 !== o.playerMass ? e.setUint32(13, o.playerMass, !0) : e.setUint32(13, this.playerMass, !0), this.sendBuffer(e)
  2442. }
  2443. },
  2444. checkPlayerID: function(e) {
  2445. if (e)
  2446. for (var o = 0; o < this.teamPlayers.length; o++)
  2447. if (this.teamPlayers[o].id == e) return o;
  2448. return null
  2449. },
  2450. updateTeamPlayer: function(e) {
  2451. function o() {
  2452. for (var o = "";;) {
  2453. var t = e.getUint16(a, !0);
  2454. if (0 == t) break;
  2455. o += String.fromCharCode(t), a += 2
  2456. }
  2457. return a += 2, o
  2458. }
  2459. var t = e.getUint32(1, !0),
  2460. a = 5,
  2461. s = o(),
  2462. n = this.checkSkinURL(o()),
  2463. r = o(),
  2464. l = o(),
  2465. c = this.checkPlayerID(t);
  2466. if (null !== c) this.teamPlayers[c].nick = s, this.teamPlayers[c].skinID = s + l, this.teamPlayers[c].skinURL = n, this.teamPlayers[c].color = r;
  2467. else {
  2468. var p = new i(t, s, s + l, n, r);
  2469. this.teamPlayers.push(p)
  2470. }
  2471. this.cacheCustomSkin(s + l, n)
  2472. },
  2473. updateTeamPlayerPosition: function(e) {
  2474. var o = e.getUint32(1, !0),
  2475. t = this.checkPlayerID(o);
  2476. if (null !== t) {
  2477. var a = e.getInt32(5, !0),
  2478. i = e.getInt32(9, !0),
  2479. s = e.getUint32(13, !0);
  2480. if (s > 36e4) return;
  2481. var n = this.teamPlayers[t];
  2482. n.x = a, n.y = i, n.mass = s, n.alive = !0, n.updateTime = Date.now(), this.targeting && this.targetID && o == this.targetID && this.updateTarget(n.nick, n.skinURL, a, i, s)
  2483. }
  2484. },
  2485. updateTeamPlayers: function() {
  2486. if (":party" === this.gameMode) {
  2487. this.sendPlayerPosition(), this.top5 = [];
  2488. for (var e = 0; e < this.teamPlayers.length; e++) {
  2489. var o = this.teamPlayers[e];
  2490. (o.alive && Date.now() - o.updateTime >= 2e3 || 0 == o.mass) && (o.alive = !1, this.targeting && this.targetID && o.id == this.targetID && this.setTargetStatus(2)), o.alive && this.top5.push({
  2491. id: o.id,
  2492. nick: o.nick,
  2493. mass: o.mass
  2494. })
  2495. }
  2496. this.top5.sort(function(e, o) {
  2497. return o.mass - e.mass
  2498. }), this.displayTop5()
  2499. }
  2500. },
  2501. updateParties: function(e) {
  2502. this.parties = [];
  2503. for (var o = e.getUint8(1), t = 2, a = 0; o > a; a++) {
  2504. for (var i = "";;) {
  2505. var s = e.getUint16(t, !0);
  2506. if (0 == s) break;
  2507. i += String.fromCharCode(s), t += 2
  2508. }
  2509. t += 2, this.parties.push(i)
  2510. }
  2511. },
  2512. parseMessage: function(e) {
  2513. var o = /\[img\](https?:\/\/i\.(?:imgur|hizliresim)\.com\/\w{6,8}\.(?:jpg|jpeg|png|gif)\??\d*)\[\/img\]/i,
  2514. t = /\[yt\]([\w-]{11})\[\/yt\]/i;
  2515. if (o.test(e)) {
  2516. if (v.showChatImages) {
  2517. var a = e.match(o);
  2518. return '<img src="' + a[1] + '" style="width:100%;border:none;">'
  2519. }
  2520. return ""
  2521. }
  2522. if (t.test(e)) {
  2523. if (v.showChatVideos) {
  2524. var i = e.match(t);
  2525. return '<iframe type="text/html" width="100%" height="auto" src="http://www.youtube.com/embed/' + i[1] + '?autoplay=1&vq=tiny" frameborder="0" />'
  2526. }
  2527. return ""
  2528. }
  2529. var e = this.escapeHTML(e);
  2530. return e
  2531. },
  2532. readChatMessage: function(e) {
  2533. if (!v.disableChat) {
  2534. for (var o = (new Date).toTimeString().replace(/^(\d{2}:\d{2}).*/, "$1"), a = e.getUint8(1), i = "", s = 10; s < e.byteLength; s += 2) {
  2535. var n = e.getUint16(s, !0);
  2536. if (0 == n) break;
  2537. i += String.fromCharCode(n)
  2538. }
  2539. var r = i.split(": ", 1),
  2540. l = i.replace(r + ": ", "");
  2541. l = this.parseMessage(l), l.length > 0 && (r = this.escapeHTML(r), 101 == a ? v.showChatBox ? (t("#chat-box").append('<div class="message"><span class="message-time">[' + o + '] </span><span class="message-nick">' + r + ': </span><span class="message-text">' + l + "</span></div>"), t("#chat-box").perfectScrollbar("update"), t("#chat-box").animate({
  2542. scrollTop: t("#chat-box").prop("scrollHeight")
  2543. }, 500)) : (v.hideChat || toastr.success('<span class="message-nick">' + r + ': </span><span class="message-text">' + l + "</span>"), this.chatHistory.push({
  2544. nick: r,
  2545. message: l
  2546. }), this.chatHistory.length > 15 && this.chatHistory.splice(0, 1)) : 102 == a ? v.showChatBox ? (t("#chat-box").append('<div class="message command"><span class="command-time">[' + o + '] </span><span class="command-nick">' + r + ': </span><span class="command-text">' + l + "</span></div>"), t("#chat-box").perfectScrollbar("update"), t("#chat-box").animate({
  2547. scrollTop: t("#chat-box").prop("scrollHeight")
  2548. }, 500)) : v.hideChat || toastr.warning('<span class="command-nick">' + r + ': </span><span class="command-text">' + l + "</span>") : t("#messages").append(i))
  2549. }
  2550. },
  2551. sendChatMessage: function(e, o) {
  2552. if (Date.now() - this.lastMessageSentTime >= 500 && 0 != o.length && 0 != w.nick.length && this.isSocketOpen()) {
  2553. var o = w.nick + ": " + o,
  2554. t = this.createView(10 + 2 * o.length);
  2555. t.setUint8(0, 100), t.setUint8(1, e), t.setUint32(2, this.playerID, !0), t.setUint32(6, this.targetID, !0);
  2556. for (var a = 0; a < o.length; a++) t.setUint16(10 + 2 * a, o.charCodeAt(a), !0);
  2557. this.sendBuffer(t), this.lastMessageSentTime = Date.now()
  2558. }
  2559. },
  2560. prepareCommand: function(e) {
  2561. var o = e.replace("%currentSector%", this.currentSector);
  2562. return o
  2563. },
  2564. sendCommand: function(e) {
  2565. var o = this.prepareCommand(g["comm" + e]);
  2566. this.sendChatMessage(102, o)
  2567. },
  2568. setTargeting: function() {
  2569. this.targetID && (this.targeting = !this.targeting, o.targeting = this.targeting, this.setTargetingInfo())
  2570. },
  2571. setTargetingInfo: function() {
  2572. this.targeting ? (t("#set-targeting").addClass("active"), t("#target-status").show(), 2 != this.targetStatus && t("#target-summary").show()) : (t("#set-targeting").removeClass("active"), t("#target-summary, #target-status").hide())
  2573. },
  2574. cancelTargeting: function() {
  2575. this.setTargetStatus(0)
  2576. },
  2577. setPrivateMiniMap: function() {
  2578. this.targetID && (this.privateMiniMap = !this.privateMiniMap, this.privateMiniMap ? t("#set-private-minimap").addClass("active") : t("#set-private-minimap").removeClass("active"))
  2579. },
  2580. setTarget: function(e) {
  2581. var o = this.checkPlayerID(e);
  2582. if (null !== o) {
  2583. var t = this.teamPlayers[o];
  2584. if (this.targetID = t.id, this.updateTarget(t.nick, t.skinURL, t.x, t.y, t.mass), !t.alive) return void this.setTargetStatus(2);
  2585. this.setTargetStatus(1)
  2586. } else this.setTargetStatus(0)
  2587. },
  2588. setTargetStatus: function(e) {
  2589. switch (e) {
  2590. case 0:
  2591. this.targetStatus = 0, this.targetID = 0, this.targetNick = "", this.targetSkinURL = "", this.targeting = !1, o.targeting = !1, this.privateMiniMap = !1, this.privateChat = !1, t("#target-skin, #target-nick, #target-summary").hide(), t("#target-status").show().text("[" + u[d].targetNotSet + "]"), t("#target-panel-hud a").removeClass("active");
  2592. break;
  2593. case 1:
  2594. this.targetStatus = 1, this.targeting || (this.targeting = !0, o.targeting = !0, this.setTargetingInfo()), t("#target-skin, #target-nick, #target-status, #target-summary").show();
  2595. break;
  2596. case 2:
  2597. this.targetStatus = 2, t("#target-summary").hide(), t("#target-status").show().text("[" + u[d].targetDead + "]"), o.resetTargetPosition()
  2598. }
  2599. },
  2600. changeTarget: function() {
  2601. for (var e = this.checkPlayerID(this.targetID), o = null, t = 0; t < this.teamPlayers.length; t++)
  2602. if (this.teamPlayers[t].alive) {
  2603. if (null === e) {
  2604. e = t;
  2605. break
  2606. }
  2607. if (e > t && null === o) o = t;
  2608. else if (t > e) {
  2609. o = t;
  2610. break
  2611. }
  2612. }
  2613. null !== o && (e = o), null !== e ? this.setTarget(this.teamPlayers[e].id) : this.setTargetStatus(0)
  2614. },
  2615. updateTarget: function(e, a, i, s, n) {
  2616. o.setTargetPosition(i, s), this.targetNick !== e && (this.targetNick = e, t("#target-nick").html(this.escapeHTML(e))), a && this.targetSkinURL !== a && (this.targetSkinURL = a, t("#target-skin img").attr("src", a)), t("#target-status").text("[" + n + "]");
  2617. var r = this.calculateTargetSector(i, s),
  2618. l = u[d].targetDistance + ': <span class="hud-main-color">' + o.targetDistance + " [" + r + "]</span>";
  2619. o.play && (l += " | " + u[d].targetMass + ': <span class="hud-main-color">' + (n + o.playerMass) + "</span>"), t("#target-summary").html(l), 1 != this.targetStatus && this.setTargetStatus(1)
  2620. },
  2621. init: function() {
  2622. this.loadSettings(), this.loadProfiles(), this.setLang(), this.setMenu(), b && b.setTheme(), this.setShowQuickMenu(), this.setShowSkinsPanel(), this.setProfile(), this.setButtons(), this.setStreamMode(), this.setHideSkinUrl(), this.setMiniMap(), this.setAutoResp(), this.setDisableChat(), this.setShowChatBox(), this.setTop5(), this.setTargetingHUD(), this.displayTime(), this.setCenteredLb(), this.setNormalLb(), this.setFpsAtTop(), this.displayStats(), this.setBlockPopups(), this.preDrawIndicator();
  2623. var e = this;
  2624. setInterval(function() {
  2625. e.drawMiniMap()
  2626. }, 33), setInterval(function() {
  2627. e.updateTeamPlayers()
  2628. }, this.updateInterval)
  2629. }
  2630. };
  2631. var M = new s;
  2632. M.init(), n(), r(), e.addEventListener("resize", function() {
  2633. setTimeout(l, 50)
  2634. }, !1), e.onbeforeunload = c, e.setSettings = function(e, a) {
  2635. if (v.hasOwnProperty(e) && null !== a) {
  2636. switch (v[e] = a, o.hasOwnProperty(e) && (o[e] = a), e) {
  2637. case "autoResp":
  2638. M.setAutoResp();
  2639. break;
  2640. case "showMiniMap":
  2641. M.setMiniMap();
  2642. break;
  2643. case "showMiniMapGrid":
  2644. M.resetMiniMapSectors();
  2645. break;
  2646. case "disableChat":
  2647. M.setDisableChat();
  2648. break;
  2649. case "showChatBox":
  2650. M.setShowChatBox();
  2651. break;
  2652. case "showTop5":
  2653. M.setTop5();
  2654. break;
  2655. case "showTargeting":
  2656. M.setTargetingHUD();
  2657. break;
  2658. case "showTime":
  2659. M.displayTime(), t("#time-hud").show();
  2660. break;
  2661. case "centeredLb":
  2662. M.setCenteredLb();
  2663. break;
  2664. case "normalLb":
  2665. M.setNormalLb();
  2666. break;
  2667. case "fpsAtTop":
  2668. M.setFpsAtTop();
  2669. break;
  2670. case "showStats":
  2671. M.displayStats(), t("#stats-hud").show();
  2672. break;
  2673. case "blockPopups":
  2674. M.setBlockPopups()
  2675. }
  2676. M.saveSettings(v, "ogarioSettings")
  2677. }
  2678. }, e.setTarget = function(e) {
  2679. M.setTarget(e)
  2680. }, o.displayLeaderboard = function() {
  2681. M.displayLeaderboard(o.leaderboardHTML)
  2682. }, o.customDraw = function(e) {
  2683. if (e) {
  2684. M.countFPS();
  2685. var t = Math.floor(o.mapMinX - o.mapOffsetX),
  2686. a = Math.floor(o.mapMinY - o.mapOffsetY),
  2687. i = Math.floor(o.mapMaxX - o.mapOffsetX),
  2688. s = Math.floor(o.mapMaxY - o.mapOffsetY),
  2689. n = C.bordersWidth / 2;
  2690. if (M.drawSectors(e, C.sectorsX, C.sectorsY, t, a, i, s, C.gridColor, C.sectorsWidth, !0), M.drawMapBorders(e, t - n, a - n, i + n, s + n, C.bordersColor, C.bordersWidth, !0), o.virusesCache && o.virusesCache.length > 0) {
  2691. e.beginPath();
  2692. for (var r = 0; r < o.virusesCache.length; r++) {
  2693. var l = o.virusesCache[r].x,
  2694. c = o.virusesCache[r].y;
  2695. e.moveTo(l, c), e.arc(l, c, o.virusesCache[r].size + 820, 0, M.pi2, !1)
  2696. }
  2697. e.fillStyle = C.virusColor, e.globalAlpha = .1, e.fill(), e.globalAlpha = 1, o.virusesCache = []
  2698. }
  2699. if (o.foodCache && o.foodCache.length > 0) {
  2700. e.beginPath();
  2701. for (var r = 0; r < o.foodCache.length; r++) {
  2702. var l = o.foodCache[r].x,
  2703. c = o.foodCache[r].y;
  2704. if (e.moveTo(l, c), o.viewScale < .16) {
  2705. var p = o.foodCache[r].size + C.foodSize;
  2706. e.rect(l - p, c - p, 2 * p, 2 * p)
  2707. } else e.arc(l, c, o.foodCache[r].size + C.foodSize, 0, M.pi2, !1)
  2708. }
  2709. e.fillStyle = C.foodColor, e.globalAlpha = 1, e.fill(), o.foodCache = []
  2710. }
  2711. if (o.play) {
  2712. if (v.splitRange) {
  2713. if (o.playerCells && o.playerCells.length > 0) {
  2714. o.playerCells.sort(function(e, o) {
  2715. return o.size - e.size
  2716. });
  2717. var h = M.selectBiggestCell ? 0 : o.playerCells.length - 1;
  2718. e.lineWidth = 6, e.globalAlpha = C.darkTheme ? .7 : .35, e.strokeStyle = C.splitRangeColor, e.beginPath(), e.arc(o.playerCells[h].x, o.playerCells[h].y, o.playerCells[h].size + 760, 0, M.pi2, !1), e.closePath(), e.stroke()
  2719. }
  2720. e.globalAlpha = 1, M.drawCircle(e, o.biggerSTECellsCache, 760, 4, .4, "#BE00FF")
  2721. }
  2722. if (v.oppRings) {
  2723. var d = 14 + 2 / o.viewScale,
  2724. m = 12 + 1 / o.viewScale;
  2725. M.drawCircle(e, o.biggerSTECellsCache, d, m, .75, "#BE00FF"), M.drawCircle(e, o.biggerCellsCache, d, m, .75, "#FF0A00"), M.drawCircle(e, o.smallerCellsCache, d, m, .75, "#00C8FF"), M.drawCircle(e, o.STECellsCache, d, m, .75, "#64FF00")
  2726. }
  2727. if (v.cursorTracking && o.setCursorPosition) {
  2728. o.setCursorPosition(), e.lineWidth = 4, e.globalAlpha = C.darkTheme ? .75 : .35, e.strokeStyle = C.cursorTrackingColor, e.beginPath();
  2729. for (var r = 0; r < o.playerCells.length; r++) e.moveTo(o.playerCells[r].x, o.playerCells[r].y), e.lineTo(o.cursorX, o.cursorY);
  2730. e.stroke(), e.globalAlpha = 1
  2731. }
  2732. }
  2733. o.playerCells = [], (v.splitRange || v.oppRings) && (o.biggerSTECellsCache = [], o.biggerCellsCache = [], o.smallerCellsCache = [], o.STECellsCache = [])
  2734. }
  2735. }, o.drawGrid = function(e) {
  2736. M.drawGrid(e)
  2737. }, o.getCustomSkin = function(e, o) {
  2738. return M.getCustomSkin(e, o)
  2739. }, o.setVirusColor = function(e) {
  2740. return M.setVirusColor(e)
  2741. }, o.setVirusStrokeColor = function(e) {
  2742. return M.setVirusStrokeColor(e)
  2743. }, o.setOppColor = function(e, o) {
  2744. return M.setOppColor(e, o)
  2745. };
  2746. var T = {},
  2747. x = {},
  2748. z = {
  2749. "hk-feed": {
  2750. label: u[d]["hk-feed"],
  2751. defaultKey: "W",
  2752. keyDown: function() {
  2753. M && M.feed()
  2754. },
  2755. keyUp: null,
  2756. type: "normal"
  2757. },
  2758. "hk-macroFeed": {
  2759. label: u[d]["hk-macroFeed"],
  2760. defaultKey: "E",
  2761. keyDown: function() {
  2762. M && M.macroFeed(!0)
  2763. },
  2764. keyUp: function() {
  2765. M && M.macroFeed(!1)
  2766. },
  2767. type: "normal"
  2768. },
  2769. "hk-split": {
  2770. label: u[d]["hk-split"],
  2771. defaultKey: "SPACE",
  2772. keyDown: function() {
  2773. M && M.split()
  2774. },
  2775. keyUp: null,
  2776. type: "normal"
  2777. },
  2778. "hk-doubleSplit": {
  2779. label: u[d]["hk-doubleSplit"],
  2780. defaultKey: "Q",
  2781. keyDown: function() {
  2782. M && M.doubleSplit()
  2783. },
  2784. keyUp: null,
  2785. type: "normal"
  2786. },
  2787. "hk-popSplit": {
  2788. label: "Popsplit",
  2789. defaultKey: "ALT+Q",
  2790. keyDown: function() {
  2791. M && M.popSplit()
  2792. },
  2793. keyUp: null,
  2794. type: "normal"
  2795. },
  2796. "hk-split16": {
  2797. label: u[d]["hk-split16"],
  2798. defaultKey: "mousemove",
  2799. keyDown: function() {
  2800. M && M.split16()
  2801. },
  2802. keyUp: null,
  2803. type: "normal"
  2804. },
  2805. "hk-pause": {
  2806. label: u[d]["hk-pause"],
  2807. defaultKey: "R",
  2808. keyDown: function() {
  2809. M && M.setPause()
  2810. },
  2811. keyUp: null,
  2812. type: "normal"
  2813. },
  2814. "hk-showTop5": {
  2815. label: u[d]["hk-showTop5"],
  2816. defaultKey: "T",
  2817. keyDown: function() {
  2818. M && M.setShowTop5()
  2819. },
  2820. keyUp: null,
  2821. type: "normal"
  2822. },
  2823. "hk-showTime": {
  2824. label: u[d]["hk-showTime"],
  2825. defaultKey: "ALT+T",
  2826. keyDown: function() {
  2827. M && M.setShowTime()
  2828. },
  2829. keyUp: null,
  2830. type: "normal"
  2831. },
  2832. "hk-showSplitRange": {
  2833. label: u[d]["hk-showSplitRange"],
  2834. defaultKey: "U",
  2835. keyDown: function() {
  2836. M && M.setShowSplitRange()
  2837. },
  2838. keyUp: null,
  2839. type: "normal"
  2840. },
  2841. "hk-showSplitInd": {
  2842. label: u[d]["hk-showSplitInd"],
  2843. defaultKey: "I",
  2844. keyDown: function() {
  2845. M && M.setShowSplitInd()
  2846. },
  2847. keyUp: null,
  2848. type: "normal"
  2849. },
  2850. "hk-showTeammatesInd": {
  2851. label: u[d]["hk-showTeammatesInd"],
  2852. defaultKey: "ALT+I",
  2853. keyDown: function() {
  2854. M && M.setShowTeammatesInd()
  2855. },
  2856. keyUp: null,
  2857. type: "normal"
  2858. },
  2859. "hk-showOppColors": {
  2860. label: u[d]["hk-showOppColors"],
  2861. defaultKey: "O",
  2862. keyDown: function() {
  2863. M && M.setShowOppColors()
  2864. },
  2865. keyUp: null,
  2866. type: "normal"
  2867. },
  2868. "hk-toggleSkins": {
  2869. label: u[d]["hk-toggleSkins"],
  2870. defaultKey: "A",
  2871. keyDown: function() {
  2872. M && M.toggleSkins()
  2873. },
  2874. keyUp: null,
  2875. type: "normal"
  2876. },
  2877. "hk-showSkins": {
  2878. label: u[d]["hk-showSkins"],
  2879. defaultKey: "S",
  2880. keyDown: function() {
  2881. M && M.setShowSkins()
  2882. },
  2883. keyUp: null,
  2884. type: "normal"
  2885. },
  2886. "hk-showStats": {
  2887. label: u[d]["hk-showStats"],
  2888. defaultKey: "ALT+S",
  2889. keyDown: function() {
  2890. M && M.setShowStats()
  2891. },
  2892. keyUp: null,
  2893. type: "normal"
  2894. },
  2895. "hk-toggleCells": {
  2896. label: u[d]["hk-toggleCells"],
  2897. defaultKey: "D",
  2898. keyDown: function() {
  2899. M && M.toggleCells()
  2900. },
  2901. keyUp: null,
  2902. type: "normal"
  2903. },
  2904. "hk-showFood": {
  2905. label: u[d]["hk-showFood"],
  2906. defaultKey: "F",
  2907. keyDown: function() {
  2908. M && M.setShowFood()
  2909. },
  2910. keyUp: null,
  2911. type: "normal"
  2912. },
  2913. "hk-showGrid": {
  2914. label: u[d]["hk-showGrid"],
  2915. defaultKey: "G",
  2916. keyDown: function() {
  2917. M && M.setShowGrid()
  2918. },
  2919. keyUp: null,
  2920. type: "normal"
  2921. },
  2922. "hk-showMiniMapGuides": {
  2923. label: u[d]["hk-showMiniMapGuides"],
  2924. defaultKey: "ALT+G",
  2925. keyDown: function() {
  2926. M && M.setShowMiniMapGuides()
  2927. },
  2928. keyUp: null,
  2929. type: "normal"
  2930. },
  2931. "hk-hideChat": {
  2932. label: u[d]["hk-hideChat"],
  2933. defaultKey: "H",
  2934. keyDown: function() {
  2935. M && M.hideChat()
  2936. },
  2937. keyUp: null,
  2938. type: "normal"
  2939. },
  2940. "hk-showHUD": {
  2941. label: u[d]["hk-showHUD"],
  2942. defaultKey: "ALT+H",
  2943. keyDown: function() {
  2944. M && M.setShowHUD()
  2945. },
  2946. keyUp: null,
  2947. type: "normal"
  2948. },
  2949. "hk-copyLb": {
  2950. label: u[d]["hk-copyLb"],
  2951. defaultKey: "L",
  2952. keyDown: function() {
  2953. M && M.copyLb()
  2954. },
  2955. keyUp: null,
  2956. type: "normal"
  2957. },
  2958. "hk-showLb": {
  2959. label: u[d]["hk-showLb"],
  2960. defaultKey: "ALT+L",
  2961. keyDown: function() {
  2962. M && M.setShowLb()
  2963. },
  2964. keyUp: null,
  2965. type: "normal"
  2966. },
  2967. "hk-toggleAutoZoom": {
  2968. label: u[d]["hk-toggleAutoZoom"],
  2969. defaultKey: "",
  2970. keyDown: function() {
  2971. M && M.toggleAutoZoom()
  2972. },
  2973. keyUp: null,
  2974. type: "normal"
  2975. },
  2976. "hk-resetZoom": {
  2977. label: u[d]["hk-resetZoom"],
  2978. defaultKey: "Z",
  2979. keyDown: function() {
  2980. M && M.resetZoom(!0)
  2981. },
  2982. keyUp: function() {
  2983. M && M.resetZoom(!1)
  2984. },
  2985. type: "normal"
  2986. },
  2987. "hk-toggleDeath": {
  2988. label: u[d]["hk-toggleDeath"],
  2989. defaultKey: "X",
  2990. keyDown: function() {
  2991. M && M.toggleDeath()
  2992. },
  2993. keyUp: null,
  2994. type: "normal"
  2995. },
  2996. "hk-clearChat": {
  2997. label: u[d]["hk-clearChat"],
  2998. defaultKey: "C",
  2999. keyDown: function() {
  3000. M && M.displayChatHistory(!0)
  3001. },
  3002. keyUp: function() {
  3003. M && M.displayChatHistory(!1)
  3004. },
  3005. type: "normal"
  3006. },
  3007. "hk-showBgSectors": {
  3008. label: u[d]["hk-showBgSectors"],
  3009. defaultKey: "B",
  3010. keyDown: function() {
  3011. M && M.setShowBgSectors()
  3012. },
  3013. keyUp: null,
  3014. type: "normal"
  3015. },
  3016. "hk-hideBots": {
  3017. label: u[d]["hk-hideBots"],
  3018. defaultKey: "ALT+B",
  3019. keyDown: function() {
  3020. M && M.setHideSmallBots()
  3021. },
  3022. keyUp: null,
  3023. type: "normal"
  3024. },
  3025. "hk-showNames": {
  3026. label: u[d]["hk-showNames"],
  3027. defaultKey: "N",
  3028. keyDown: function() {
  3029. M && M.setShowNames()
  3030. },
  3031. keyUp: null,
  3032. type: "normal"
  3033. },
  3034. "hk-showMass": {
  3035. label: u[d]["hk-showMass"],
  3036. defaultKey: "M",
  3037. keyDown: function() {
  3038. M && M.setShowMass()
  3039. },
  3040. keyUp: null,
  3041. type: "normal"
  3042. },
  3043. "hk-showMiniMap": {
  3044. label: u[d]["hk-showMiniMap"],
  3045. defaultKey: "ALT+M",
  3046. keyDown: function() {
  3047. M && M.setShowMiniMap()
  3048. },
  3049. keyUp: null,
  3050. type: "normal"
  3051. },
  3052. "hk-chatMessage": {
  3053. label: u[d]["hk-chatMessage"],
  3054. defaultKey: "ENTER",
  3055. keyDown: function() {
  3056. M && M.enterChatMessage()
  3057. },
  3058. keyUp: null,
  3059. type: "special"
  3060. },
  3061. "hk-quickResp": {
  3062. label: u[d]["hk-quickResp"],
  3063. defaultKey: "TILDE",
  3064. keyDown: function() {
  3065. M && M.quickResp()
  3066. },
  3067. keyUp: null,
  3068. type: "normal"
  3069. },
  3070. "hk-autoResp": {
  3071. label: u[d]["hk-autoResp"],
  3072. defaultKey: "",
  3073. keyDown: function() {
  3074. M && M.toggleAutoResp()
  3075. },
  3076. keyUp: null,
  3077. type: "normal"
  3078. },
  3079. "hk-zoom1": {
  3080. label: u[d]["hk-zoomLevel"] + " 1",
  3081. defaultKey: "ALT+1",
  3082. keyDown: function() {
  3083. M && M.setZoom(.5)
  3084. },
  3085. keyUp: null,
  3086. type: "normal"
  3087. },
  3088. "hk-zoom2": {
  3089. label: u[d]["hk-zoomLevel"] + " 2",
  3090. defaultKey: "ALT+2",
  3091. keyDown: function() {
  3092. M && M.setZoom(.25)
  3093. },
  3094. keyUp: null,
  3095. type: "normal"
  3096. },
  3097. "hk-zoom3": {
  3098. label: u[d]["hk-zoomLevel"] + " 3",
  3099. defaultKey: "ALT+3",
  3100. keyDown: function() {
  3101. M && M.setZoom(.125)
  3102. },
  3103. keyUp: null,
  3104. type: "normal"
  3105. },
  3106. "hk-zoom4": {
  3107. label: u[d]["hk-zoomLevel"] + " 4",
  3108. defaultKey: "ALT+4",
  3109. keyDown: function() {
  3110. M && M.setZoom(.075)
  3111. },
  3112. keyUp: null,
  3113. type: "normal"
  3114. },
  3115. "hk-zoom5": {
  3116. label: u[d]["hk-zoomLevel"] + " 5",
  3117. defaultKey: "ALT+5",
  3118. keyDown: function() {
  3119. M && M.setZoom(.05)
  3120. },
  3121. keyUp: null,
  3122. type: "normal"
  3123. },
  3124. "hk-switchServerMode": {
  3125. label: u[d]["hk-switchServerMode"],
  3126. defaultKey: "=",
  3127. keyDown: function() {
  3128. M && M.switchServerMode()
  3129. },
  3130. keyUp: null,
  3131. type: "normal"
  3132. },
  3133. "hk-showTargeting": {
  3134. label: u[d]["hk-showTargeting"],
  3135. defaultKey: "",
  3136. keyDown: function() {
  3137. M && M.setShowTargeting()
  3138. },
  3139. keyUp: null,
  3140. type: "normal"
  3141. },
  3142. "hk-setTargeting": {
  3143. label: u[d]["hk-setTargeting"],
  3144. defaultKey: "",
  3145. keyDown: function() {
  3146. M && M.setTargeting()
  3147. },
  3148. keyUp: null,
  3149. type: "normal"
  3150. },
  3151. "hk-cancelTargeting": {
  3152. label: u[d]["hk-cancelTargeting"],
  3153. defaultKey: "",
  3154. keyDown: function() {
  3155. M && M.cancelTargeting()
  3156. },
  3157. keyUp: null,
  3158. type: "normal"
  3159. },
  3160. "hk-changeTarget": {
  3161. label: u[d]["hk-changeTarget"],
  3162. defaultKey: "",
  3163. keyDown: function() {
  3164. M && M.changeTarget()
  3165. },
  3166. keyUp: null,
  3167. type: "normal"
  3168. },
  3169. "hk-privateMiniMap": {
  3170. label: u[d]["hk-privateMiniMap"],
  3171. defaultKey: "",
  3172. keyDown: function() {
  3173. M && M.setPrivateMiniMap()
  3174. },
  3175. keyUp: null,
  3176. type: "normal"
  3177. },
  3178. "hk-comm1": {
  3179. label: g.comm1,
  3180. defaultKey: "1",
  3181. keyDown: function() {
  3182. M && M.sendCommand(1)
  3183. },
  3184. keyUp: null,
  3185. type: "command"
  3186. },
  3187. "hk-comm2": {
  3188. label: g.comm2,
  3189. defaultKey: "2",
  3190. keyDown: function() {
  3191. M && M.sendCommand(2)
  3192. },
  3193. keyUp: null,
  3194. type: "command"
  3195. },
  3196. "hk-comm3": {
  3197. label: g.comm3,
  3198. defaultKey: "3",
  3199. keyDown: function() {
  3200. M && M.sendCommand(3)
  3201. },
  3202. keyUp: null,
  3203. type: "command"
  3204. },
  3205. "hk-comm4": {
  3206. label: g.comm4,
  3207. defaultKey: "4",
  3208. keyDown: function() {
  3209. M && M.sendCommand(4)
  3210. },
  3211. keyUp: null,
  3212. type: "command"
  3213. },
  3214. "hk-comm5": {
  3215. label: g.comm5,
  3216. defaultKey: "5",
  3217. keyDown: function() {
  3218. M && M.sendCommand(5)
  3219. },
  3220. keyUp: null,
  3221. type: "command"
  3222. },
  3223. "hk-comm6": {
  3224. label: g.comm6,
  3225. defaultKey: "6",
  3226. keyDown: function() {
  3227. M && M.sendCommand(6)
  3228. },
  3229. keyUp: null,
  3230. type: "command"
  3231. },
  3232. "hk-comm7": {
  3233. label: g.comm7,
  3234. defaultKey: "7",
  3235. keyDown: function() {
  3236. M && M.sendCommand(7)
  3237. },
  3238. keyUp: null,
  3239. type: "command"
  3240. },
  3241. "hk-comm8": {
  3242. label: g.comm8,
  3243. defaultKey: "8",
  3244. keyDown: function() {
  3245. M && M.sendCommand(8)
  3246. },
  3247. keyUp: null,
  3248. type: "command"
  3249. },
  3250. "hk-comm9": {
  3251. label: g.comm9,
  3252. defaultKey: "9",
  3253. keyDown: function() {
  3254. M && M.sendCommand(9)
  3255. },
  3256. keyUp: null,
  3257. type: "command"
  3258. },
  3259. "hk-comm0": {
  3260. label: g.comm0,
  3261. defaultKey: "0",
  3262. keyDown: function() {
  3263. M && M.sendCommand(0)
  3264. },
  3265. keyUp: null,
  3266. type: "command"
  3267. },
  3268. "hk-comm10": {
  3269. label: g.comm10,
  3270. defaultKey: "MOUSE WHEEL",
  3271. keyDown: function() {
  3272. M && M.sendCommand(10)
  3273. },
  3274. keyUp: null,
  3275. type: "command"
  3276. },
  3277. "hk-comm11": {
  3278. label: g.comm11,
  3279. defaultKey: "LEFT",
  3280. keyDown: function() {
  3281. M && M.sendCommand(11)
  3282. },
  3283. keyUp: null,
  3284. type: "command"
  3285. },
  3286. "hk-comm12": {
  3287. label: g.comm12,
  3288. defaultKey: "UP",
  3289. keyDown: function() {
  3290. M && M.sendCommand(12)
  3291. },
  3292. keyUp: null,
  3293. type: "command"
  3294. },
  3295. "hk-comm13": {
  3296. label: g.comm13,
  3297. defaultKey: "RIGHT",
  3298. keyDown: function() {
  3299. M && M.sendCommand(13)
  3300. },
  3301. keyUp: null,
  3302. type: "command"
  3303. },
  3304. "hk-comm14": {
  3305. label: g.comm14,
  3306. defaultKey: "DOWN",
  3307. keyDown: function() {
  3308. M && M.sendCommand(14)
  3309. },
  3310. keyUp: null,
  3311. type: "command"
  3312. }
  3313. };
  3314. p.prototype = {
  3315. lastPressedKey: "",
  3316. lastKeyId: "",
  3317. defaultMessageKey: "ENTER",
  3318. inputClassName: "custom-key-in form-control input-sm",
  3319. loadDefaultHotkeys: function() {
  3320. x = {};
  3321. for (var e in z) z.hasOwnProperty(e) && (x[z[e].defaultKey] = e);
  3322. x["spec-messageKey"] = this.defaultMessageKey
  3323. },
  3324. loadHotkeys: function() {
  3325. null !== e.localStorage.getItem("ogarioHotkeys") ? x = JSON.parse(e.localStorage.getItem("ogarioHotkeys")) : this.loadDefaultHotkeys(), null !== e.localStorage.getItem("ogarioCommands") && (g = JSON.parse(e.localStorage.getItem("ogarioCommands")))
  3326. },
  3327. saveHotkeys: function() {
  3328. e.localStorage.setItem("ogarioHotkeys", JSON.stringify(x)), this.saveCommands()
  3329. },
  3330. saveCommands: function() {
  3331. t("#hotkeys .command-in").each(function() {
  3332. var e = t(this),
  3333. o = e.attr("id");
  3334. g.hasOwnProperty(o) && (g[o] = e.val())
  3335. }), e.localStorage.setItem("ogarioCommands", JSON.stringify(g))
  3336. },
  3337. resetHotkeys: function() {
  3338. this.loadDefaultHotkeys(), t("#hotkeys-cfg .custom-key-in").each(function() {
  3339. var e = t(this).attr("id");
  3340. z[e] && t(this).val(z[e].defaultKey)
  3341. })
  3342. },
  3343. setHotkeysMenu: function() {
  3344. t("body").append('<div id="hotkeys"><div id="hotkeys-menu"><button class="btn btn-primary" onclick="resetHotkeys();">' + u[d].restoreSettings + '</button> <button class="btn btn-success" onclick="saveHotkeys();">' + u[d].saveSett + '</button> <button class="btn btn-danger" onclick="closeHotkeys();">' + u[d].close + '</button></div><div id="hotkeys-cfg"></div><div id="hotkeys-inst"><ul><li>' + u[d]["hk-inst-assign"] + "</li><li>" + u[d]["hk-inst-delete"] + "</li><li>" + u[d]["hk-inst-keys"] + "</li></ul></div></div>");
  3345. for (var e in z)
  3346. if (z.hasOwnProperty(e)) {
  3347. var o = z[e],
  3348. a = "";
  3349. for (var i in x)
  3350. if (x.hasOwnProperty(i) && x[i] === e) {
  3351. a = i;
  3352. break
  3353. }
  3354. if ("hk-switchServerMode" === e && M && !M.privateIP) continue;
  3355. if ("command" === o.type) {
  3356. var s = e.replace("hk-", "");
  3357. t("#hotkeys-cfg").append('<div class="row"><div class="key-label"><input id="' + s + '" class="command-in form-control input-sm" value="' + g[s] + '" maxlength="80" /></div><div class="default-key">' + o.defaultKey + '</div><div class="custom-key"><input id="' + e + '" class="custom-key-in form-control input-sm" value="' + a + '" /></div></div>')
  3358. } else t("#hotkeys-cfg").append('<div class="row"><div class="key-label">' + o.label + '</div><div class="default-key">' + o.defaultKey + '</div><div class="custom-key"><input id="' + e + '" class="custom-key-in form-control input-sm" value="' + a + '" /></div></div>')
  3359. }
  3360. t("#hotkeys-cfg").perfectScrollbar(), b && b.setMenuBg()
  3361. },
  3362. getPressedKey: function(e) {
  3363. var o = "",
  3364. t = "";
  3365. switch (e.ctrlKey || 17 == e.keyCode ? o = "CTRL" : (e.altKey || 18 == e.keyCode) && (o = "ALT"), e.keyCode) {
  3366. case 9:
  3367. t = "TAB";
  3368. break;
  3369. case 13:
  3370. t = "ENTER";
  3371. break;
  3372. case 16:
  3373. t = "mousemove";
  3374. break;
  3375. case 17:
  3376. break;
  3377. case 18:
  3378. break;
  3379. case 27:
  3380. t = "ESC";
  3381. break;
  3382. case 32:
  3383. t = "SPACE";
  3384. break;
  3385. case 37:
  3386. t = "LEFT";
  3387. break;
  3388. case 38:
  3389. t = "UP";
  3390. break;
  3391. case 39:
  3392. t = "RIGHT";
  3393. break;
  3394. case 40:
  3395. t = "DOWN";
  3396. break;
  3397. case 46:
  3398. t = "DEL";
  3399. break;
  3400. case 61:
  3401. t = "=";
  3402. break;
  3403. case 187:
  3404. t = "=";
  3405. break;
  3406. case 192:
  3407. t = "TILDE";
  3408. break;
  3409. default:
  3410. t = String.fromCharCode(e.keyCode)
  3411. }
  3412. return "" !== o ? "" !== t ? o + "+" + t : o : t
  3413. },
  3414. deleteHotkey: function(e, o) {
  3415. delete x[e], t("#" + o).val("")
  3416. },
  3417. setDefaultHotkey: function(e) {
  3418. var o = !1;
  3419. return z[e] && !x.hasOwnProperty(z[e].defaultKey) ? (o = z[e].defaultKey, x[o] = e, o) : o
  3420. },
  3421. setHotkey: function(e, o) {
  3422. if (o && (this.lastPressedKey !== e || this.lastKeyId !== o)) {
  3423. var a = t("#" + o).val();
  3424. if (this.deleteHotkey(a, o), "DEL" !== e) {
  3425. if (x[e] && x[e] !== o) {
  3426. var i = x[e],
  3427. s = this.setDefaultHotkey(i);
  3428. s ? (x[s] = i, t("#" + i).val(s)) : this.deleteHotkey(e, i)
  3429. }
  3430. x[e] = o, t("#" + o).val(e), "hk-chatMessage" === o && (x["spec-messageKey"] = e), this.lastPressedKey = e, this.lastKeyId = o
  3431. }
  3432. }
  3433. },
  3434. init: function() {
  3435. this.loadHotkeys(), this.setHotkeysMenu()
  3436. }
  3437. };
  3438. var P = new p;
  3439. P.init(), document.onkeydown = function(e) {
  3440. var o = P.getPressedKey(e);
  3441. if (("INPUT" !== e.target.tagName || e.target.className === P.inputClassName || o === x["spec-messageKey"]) && "" !== o && !T[o]) {
  3442. if (T[o] = !0, "ESC" === o) return e.preventDefault(), void(M && M.showMenu());
  3443. if (e.target.className === P.inputClassName) return e.preventDefault(), void P.setHotkey(o, e.target.id);
  3444. if (x[o]) {
  3445. e.preventDefault();
  3446. var t = x[o];
  3447. "" !== t && z[t] && z[t].keyDown && z[t].keyDown()
  3448. }
  3449. }
  3450. }, document.onkeyup = function(e) {
  3451. var o = P.getPressedKey(e);
  3452. if ("" !== o) {
  3453. if (x[o]) {
  3454. var t = x[o];
  3455. "" !== t && z[t] && z[t].keyUp && z[t].keyUp()
  3456. }
  3457. T[o] = !1
  3458. }
  3459. }, e.addKeyListeners = function() {
  3460. e.onkeydown = function(o) {
  3461. switch (o.keyCode) {
  3462. case 81:
  3463. e.core && e.core.specialOn && e.core.specialOn()
  3464. }
  3465. }, e.onkeyup = function(o) {
  3466. 81 == o.keyCode && e.specialOff && e.core.specialOff()
  3467. }
  3468. }, e.onmousedown = function(e) {
  3469. t("#overlays").is(":visible") || (2 == e.which ? (e.preventDefault(), M && M.sendCommand(10)) : (v.mouseSplit && (1 == e.which && !v.mouseInvert || 3 == e.which && v.mouseInvert) && (e.preventDefault(), M && M.split()), v.mouseFeed && (3 == e.which && !v.mouseInvert || 1 == e.which && v.mouseInvert) && (e.preventDefault(), M && M.macroFeed(!0))))
  3470. }, e.onmouseup = function(e) {
  3471. v.mouseFeed && (3 == e.which && !v.mouseInvert || 1 == e.which && v.mouseInvert) && M && M.macroFeed(!1)
  3472. }, e.resetHotkeys = function() {
  3473. P && P.resetHotkeys()
  3474. }, e.saveHotkeys = function() {
  3475. P && P.saveHotkeys(), t("#hotkeys").fadeOut(500)
  3476. }, e.showHotkeys = function() {
  3477. e.onkeydown = function() {}, t("#hotkeys").fadeIn(500), t("#hotkeys-cfg").perfectScrollbar("update")
  3478. }, e.closeHotkeys = function() {
  3479. t("#hotkeys").fadeOut(500)
  3480. }
  3481. }(window, window.ogario, window.jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement