Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ! function(e, o, t) {
- function a() {}
- function i(e, o, t, a, i) {
- this.id = e, this.nick = o, this.skinID = t, this.skinURL = a, 7 == i.length && (this.color = i)
- }
- function s() {}
- function n() {
- if (document.getElementById("canvas")) {
- var e = document.getElementById("canvas");
- return void e.addEventListener("mousemove", function(e) {
- o.play && o.cursorTracking && o.setCursorPosition && (o.clientX = e.clientX, o.clientY = e.clientY, o.setCursorPosition())
- }, !1)
- }
- setTimeout(n, 50)
- }
- function r() {
- return e.MC && e.MC.showNickDialog ? (e.MC._showNickDialog = e.MC.showNickDialog, e.MC.showNickDialog = function() {
- e.MC._showNickDialog.apply(this, arguments), t(".ogario-menu").show(), e.onkeydown = function() {}
- }, e.MC._showStatsDialog = e.MC.showStatsDialog, e.MC.showStatsDialog = function() {
- e.MC._showStatsDialog.apply(this, arguments), e.onkeydown = function() {}
- }, e.MC._onPlayerSpawn = e.MC.onPlayerSpawn, e.MC.onPlayerSpawn = function() {
- e.MC._onPlayerSpawn.apply(this, arguments), o.playerColor = null, M && M.onPlayerSpawn()
- }, e.MC._onPlayerDeath = e.MC.onPlayerDeath, e.MC.onPlayerDeath = function() {
- e.MC._onPlayerDeath.apply(this, arguments), M && M.onPlayerDeath()
- }, e.MC._onAgarioCoreLoaded = e.MC.onAgarioCoreLoaded, e.MC.onAgarioCoreLoaded = function() {
- e.MC._onAgarioCoreLoaded.apply(this, arguments), l()
- }, e.MC._wasInitialized = e.MC.wasInitialized, e.MC.wasInitialized = function() {
- e.MC._wasInitialized.apply(this, arguments), setTimeout(function() {
- l(), M && (M && M.getDefaultSettings(), t("#nick").val(w.nick).blur()), t(".btn-spectate").prop("disabled", !1), e.onkeydown = function() {}
- }, 1e3)
- }, void(e.MC.onPlayerBanned = function() {})) : void setTimeout(r, 50)
- }
- function l() {
- var a = 1 * e.innerWidth,
- i = 1 * e.innerHeight,
- s = t("#helloContainer"),
- n = s.innerHeight();
- n > 0 ? o.menuHeight = n : n = o.menuHeight || 618;
- var r = Math.min(1, i / n),
- l = n * r,
- c = Math.round(i / 2 - .5 * l),
- p = "translate(-50%, 0%) scale(" + r + ")";
- 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
- }
- function c() {
- return o.play ? u[d].exit : void 0
- }
- function p() {}
- /*var h = function() {
- var e = !0;
- return function(o, t) {
- var a = e ? function() {
- if (t) {
- var e = t.apply(o, arguments);
- return t = null, e
- }
- } : function() {};
- return e = !1, a
- }
- }();*/
- "/ogario" == e.location.pathname && e.history && e.history.replaceState && e.history.replaceState({}, e.document.title, "/" + e.location.hash),
- function() {
- /*var o = h(this, function() {
- var e = function() {
- return "dev"
- },
- o = function() {
- return "window"
- },
- t = function() {
- var o = RegExp("\\w+ *\\(\\) *{\\w+ *['|\"].+['|\"];? *}");
- return !o.test("" + e)
- },
- a = function() {
- var e = RegExp("(\\\\[x|u](\\w){2,4})+");
- return e.test("" + o)
- },
- i = function(e) {
- var o = 0;
- e.indexOf("i" === o) && s(e)
- },
- s = function(e) {
- var o = 3;
- e.indexOf((!0 + "")[3]) !== o && i(e)
- };
- i(t() ? "indеxOf" : a() ? "indexOf" : "indеxOf")
- });
- 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", {
- success: function(e) {
- var o = e;
- 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");
- var t = document.createElement("script");
- t.textContent = o, t.async = !0, document.body.appendChild(t)
- },
- dataType: "text",
- method: "GET",
- cache: !1,
- crossDomain: !0
- })
- }();
- var d = "en",
- m = e.navigator.language || e.navigator.userLanguage;
- "pl" === m && (d = "pl");
- var u = {
- pl: {
- start: "Start",
- settings: "Ustawienia",
- restoreSettings: "Przywróc ustawienia domyślne",
- respGroup: "Odrodzenie",
- zoomGroup: "Zoom",
- namesGroup: "Nazwy",
- massGroup: "Masa",
- skinsGroup: "Skiny",
- foodGroup: "Pokarm",
- transparencyGroup: "Przezroczystość / kolory",
- gridGroup: "Siatka / sektory",
- miniMapGroup: "Minimapa",
- helpersGroup: "Wspomagacze",
- mouseGroup: "Sterowanie myszką",
- hudGroup: "HUD",
- chatGroup: "Czat",
- statsGroup: "Statystyki",
- extrasGroup: "Dodatkowe",
- noSkins: "Wyłącz skiny",
- noNames: "Wyłącz nazwy",
- noColors: "Wyłącz kolory",
- showMass: "Pokaż masę",
- skipStats: "Pomiń statystyki po śmierci",
- quickResp: "Szybkie odrodzenie (klawisz)",
- autoResp: "Auto odrodzenie",
- autoZoom: "Auto zoom",
- zoomSpeed: "Szybkość zoomu",
- autoHideCellsInfo: "Autoukrywanie nazw i masy",
- autoHideFood: "Autoukrywanie pokarmu",
- hideMyName: "Ukryj własną nazwę",
- hideMyMass: "Ukryj własną masę",
- hideEnemiesMass: "Ukryj masę przeciwników",
- vanillaSkins: "Podstawowe skiny",
- customSkins: "Własne skiny",
- myTransparentSkin: "Mój przezroczysty skin",
- myCustomColor: "Mój własny kolor",
- transparentCells: "Przezroczyste kulki",
- transparentViruses: "Przezroczyste wirusy",
- transparentSkins: "Przezroczyste skiny",
- showGrid: "Siatka",
- showBgSectors: "Sektory w tle",
- showMapBorders: "Granice mapy",
- showMiniMap: "Pokaż minimapę",
- showMiniMapGrid: "Pokaż siatkę minimapy",
- showMiniMapGuides: "Pokaż prowadnice na minimapie",
- oneColoredTeammates: "Jednokolorowi gracze",
- rainbowFood: "Kolorowy pokarm",
- oppColors: "Kolory przeciwników",
- oppRings: "Ringi przeciwników",
- virColors: "Kolory wirusów",
- splitRange: "Zasięg podziału",
- virusesRange: "Zasięg wirusów",
- textStroke: "Obwódki nazw i masy",
- cursorTracking: "Śledzenie kursora",
- teammatesInd: "Wskaźniki graczy",
- mouseSplit: "LPM - Split myszką",
- mouseFeed: "PPM - Feed myszką",
- mouseInvert: "Odwróć klawisze myszki",
- disableChat: "Wyłącz czat",
- hideChat: "Ukryj czat",
- showChatBox: "Czatbox zamiast wyskakujących wiadomości",
- showChatImages: "Pokaż obrazki na czacie",
- showChatVideos: "Pokaż filmiki na czacie",
- showTop5: "Pokaż top 5 teamu",
- showTargeting: "Pokaż namierzanie",
- showTime: "Pokaż aktualny czas",
- normalLb: 'Nagłówek "Topka"',
- centeredLb: "Wyśrodkowana topka",
- fpsAtTop: "Statystyki na górze",
- showStats: "Pokaż statystyki",
- showStatsMass: "Statystyki: Masa",
- showStatsSTE: "Statystyki: STE",
- showStatsN16: "Statystyki: n/16",
- showStatsFPS: "Statystyki: FPS",
- blockPopups: "Blokuj popupy (reklamy/sklep)",
- hotkeys: "Skróty klawiszowe",
- "hk-inst-assign": "Aby ustawić skrót klawiszowy kliknij na polu skrótu i naciśnij wybrany klawisz.",
- "hk-inst-delete": "Aby usunąć skrót klawiszowy kliknij na polu skrótu i naciśnij klawisz DELETE.",
- "hk-inst-keys": "Możliwe kombinacje skrótów klawiszowych z użyciem klawiszy CTRL oraz ALT.",
- "hk-feed": "Feed",
- "hk-macroFeed": "Szybki feed",
- "hk-split": "Podział",
- "hk-doubleSplit": "Podwójny podział",
- "hk-split16": "Podział na 16",
- "hk-pause": "Pauza kulki",
- "hk-showTop5": "Pokaż/ukryj top 5 teamu",
- "hk-showTime": "Pokaż/ukryj aktualny czas",
- "hk-showSplitRange": "Pokaż/ukryj zasięg podziału",
- "hk-showSplitInd": "Pokaż/ukryj zasięg podziału z ringami",
- "hk-showTeammatesInd": "Pokaż/ukryj wskaźniki graczy",
- "hk-showOppColors": "Pokaż/ukryj kolory przeciwników",
- "hk-toggleSkins": "Przełącz skiny (własne/standardowe)",
- "hk-showSkins": "Pokaż/ukryj skiny",
- "hk-showStats": "Pokaż/ukryj statystyki gry",
- "hk-toggleCells": "Przełącz kulkę (najmniejsza/największa)",
- "hk-showFood": "Pokaż/ukryj pokarm",
- "hk-showGrid": "Pokaż/ukryj siatkę",
- "hk-showMiniMapGuides": "Pokaż/ukryj prowadnice na minimapie",
- "hk-hideChat": "Pokaż/ukryj czat",
- "hk-showHUD": "Pokaż/ukryj HUD",
- "hk-copyLb": "Kopiuj topkę",
- "hk-showLb": "Pokaż/ukryj topkę",
- "hk-toggleAutoZoom": "Włącz/wyłącz auto zoom",
- "hk-resetZoom": "Reset zoomu",
- "hk-zoomLevel": "Zoom - poziom",
- "hk-toggleDeath": "Przełącz miejsce śmierci",
- "hk-clearChat": "Pokaż historię czatu / Czyść czat",
- "hk-showBgSectors": "Pokaż/ukryj sektory w tle",
- "hk-hideBots": "Pokaż/ukryj małe boty",
- "hk-showNames": "Pokaż/ukryj nazwy",
- "hk-showMass": "Pokaż/ukryj masę",
- "hk-showMiniMap": "Pokaż/ukryj minimapę",
- "hk-chatMessage": "Napisz wiadomość na czacie",
- "hk-quickResp": "Szybkie odrodzenie (respawn)",
- "hk-autoResp": "Włącz/wyłacz auto odrodzenie",
- "hk-switchServerMode": "Przełącz serwer [publiczny/prywatny]",
- "hk-showTargeting": "Pokaż/ukryj panel namierzania",
- "hk-setTargeting": "Włącz/wyłącz namierzanie (śledzenie)",
- "hk-cancelTargeting": "Zatrzymaj namierzanie",
- "hk-changeTarget": "Zmień cel",
- "hk-privateMiniMap": "Pokaż cel na minimapie",
- commands: "Komendy",
- comm1: "Feeduj!",
- comm2: "Dziel się!",
- comm3: "Pomocy na %currentSector%!",
- comm4: "Wróg na %currentSector%!",
- comm5: "Zabij pomocnika!",
- comm6: "Strzel z wirusa!",
- comm7: "Zjedz wirusa!",
- comm8: "Zjebałem, wybacz.",
- comm9: "Ja pierdolę...",
- comm0: "Kurwa mać!",
- comm10: "Trick!",
- comm11: "Lewo!",
- comm12: "Góra!",
- comm13: "Prawo!",
- comm14: "Dół!",
- saveComm: "Zapisz komendy",
- theme: "Wygląd",
- restoreThemeSettings: "Przywróc ustawienia domyślne wyglądu",
- basicTheming: "Podstawowy",
- themePreset: "Motyw",
- themeType: "Typ motywu",
- darkTheme: "Ciemny motyw",
- lightTheme: "Jasny motyw",
- mainColor: "Kolor główny",
- bgColor: "Tło",
- foodColor: "Pokarm",
- gridColor: "Siatka / sektory",
- bordersColor: "Granice mapy",
- virusColor: "Wirusy",
- virusStrokeColor: "Obwódki wirusów",
- namesFont: "Czcionka nazw i masy",
- sectorsFont: "Czcionka sektorów",
- nameScale: "Skala nazw",
- massScale: "Skala masy",
- foodSize: "Wielkość pokarmu",
- bordersWidth: "Grubość granic mapy",
- sectorsWidth: "Grubość siatki sektorów",
- sectorsFontSize: "Rozmiar czcionki sektorów",
- cellsAlpha: "Przezroczystość kulek",
- skinsAlpha: "Przezroczystość skinów",
- virusAlpha: "Przezroczystość wirusów",
- virusStrokeSize: "Grubość obwódki wirusów",
- cursorTrackingColor: "Śledzenie kursora",
- splitRangeColor: "Zasięg podziału",
- menuTheming: "Menu",
- menuPreset: "Motyw menu",
- menuMainColor: "Kolor główny",
- menuBtnTextColor: "Tekst przycisku",
- menuPanelColor: "Panel",
- menuPanelColor2: "Panel (2)",
- menuTextColor: "Tekst panelu",
- menuTextColor2: "Tekst panelu (2)",
- btn1Color: "Przycisk #1",
- btn1Color2: "Przycisk #1 (2)",
- btn2Color: "Przycisk #2",
- btn2Color2: "Przycisk #2 (2)",
- btn3Color: "Przycisk #3",
- btn3Color2: "Przycisk #3 (2)",
- btn4Color: "Przycisk #4",
- btn4Color2: "Przycisk #4 (2)",
- menuBg: "Grafika tła panelu",
- menuOpacity: "Przezroczystość",
- hudTheming: "HUD",
- hudMainColor: "Kolor główny",
- hudColor: "Tło",
- hudTextColor: "Tekst",
- statsHudColor: "Statystyki",
- timeHudColor: "Czas",
- top5MassColor: "Masa w top 5",
- lbMeColor: "Topka - ja",
- lbTeammateColor: "Topka - team",
- hudFont: "Czcionka HUD",
- hudScale: "Skala HUD",
- chatTheming: "Czat",
- messageColor: "Tło wiadomości",
- messageTextColor: "Tekst wiadomości",
- messageTimeColor: "Czas wiadomości",
- messageNickColor: "Nick wiadomości",
- commandsColor: "Tło komendy",
- commandsTextColor: "Tekst komendy",
- commandsTimeColor: "Czas komendy",
- commandsNickColor: "Nick komendy",
- chatBoxColor: "Tło czatboxu",
- chatScale: "Skala czatu",
- miniMapTheming: "Minimapa",
- miniMapSectorColor: "Sektor",
- miniMapGuidesColor: "Prowadnice",
- miniMapNickColor: "Nick",
- miniMapNickStrokeColor: "Obwódka nicku",
- miniMapMyCellColor: "Moja kulka",
- miniMapMyCellStrokeColor: "Obwódka mojej kulki",
- miniMapTeammatesColor: "Gracze",
- miniMapDeathLocationColor: "Miejsce śmierci",
- miniMapFont: "Czcionka minimapy",
- miniMapNickFont: "Czcionka nicku",
- miniMapWidth: "Szerokość minimapy",
- miniMapSectorsOpacity: "Przezroczystość sektorów",
- miniMapNickSize: "Rozmiar nicku",
- miniMapNickStrokeSize: "Grubość obwódki nicku",
- miniMapMyCellSize: "Wielkość mojej kulki",
- miniMapMyCellStrokeSize: "Grubość obwódki mojej kulki",
- miniMapTeammatesSize: "Wielkość graczy",
- imagesTheming: "Grafika / kursory",
- customBackground: "Grafika tła",
- customCursor: "Grafika kursora",
- hideChatMsgA: "Czat jest aktywny!",
- hideChatMsgB: "Czat został ukryty!",
- showSkinsMsgA: "Skiny są widoczne!",
- showSkinsMsgB: "Skiny zostały ukryte!",
- hideSmallBotsMsgA: "Małe boty są widoczne!",
- hideSmallBotsMsgB: "Małe boty zostały ukryte!",
- autoRespMsgA: "Auto odrodzenie zostało włączone!",
- autoRespMsgB: "Auto odrodzenie zostało wyłączone!",
- autoZoomMsgA: "Auto zoom został włączony!",
- autoZoomMsgB: "Auto zoom został wyłączony!",
- targetNotSet: "Brak celu",
- targetDead: "Nie żyje",
- targetDistance: "Dystans",
- targetMass: "Masa razem",
- totalPartyPlayers: "Aktywnych graczy",
- totalPartyMass: "Łącznie masy",
- exportImport: "Eksport / import ustawień",
- exportSettings: "Eksportuj ustawienia",
- exportInfo: "Aby wyeksportować wybrane ustawienia skopiuj poniższy kod i zapisz go w pliku tekstowym z kodowaniem Unicode.",
- importSettings: "Importuj ustawienia",
- importInfo: 'Aby zaimportować wybrane ustawienia wklej poniżej wyeksportowany wcześniej kod i naciśnij przycisk "Importuj ustawienia".',
- profile: "Profil",
- profiles: "Profile",
- skins: "Skiny",
- moreSkins: "Dodaj skiny",
- thanks: "Dzięki Awesome!",
- saveSett: "Zapisz ustawienia",
- saved: "Zapisano!",
- resetSett: "Resetuj ustawienia",
- close: "Zamknij",
- enterChatMsg: "Napisz wiadomość",
- activeParties: "Aktywne party",
- noActiveParties: "Brak aktywnych party ;(",
- playlist: "Playlista",
- pause: "PAUZA!",
- visit: "Odwiedź",
- exit: "OGARio by szymy: Czy na pewno chcesz opuścic grę?",
- blockWarn: "UWAGA! Popupy zostały zablokowane w ustawieniach.",
- unblockPopups: "Odblokuj tymczasowo",
- mass: "Masa",
- score: "Top",
- leaderboard: "Topka",
- page_back_button: "Wróć",
- page_create_party: "Stwórz party",
- page_join_party: "Dołącz",
- page_login_and_play: "Zaloguj",
- page_logout: "Wyloguj",
- page_menu_login_facebook: "Zaloguj z Facebook",
- page_menu_login_google: "Zaloguj z Google",
- page_menu_main_free_coins: "Darmowe Monety",
- page_menu_main_gifts: "Prezenty",
- page_party_join_error: "Nie można dołączyć do tego party. Upewnij się, że token jest prawidłowy lub stwórz nowy.",
- page_play: "Graj",
- page_play_as_guest: "Graj jako gość",
- page_shop: "Sklep",
- page_spectate: "Obserwuj",
- page_stats: "Statystyki"
- },
- en: {
- start: "Home",
- settings: "Settings",
- restoreSettings: "Restore default settings",
- respGroup: "Respawn",
- zoomGroup: "Zoom",
- namesGroup: "Names",
- massGroup: "Mass",
- skinsGroup: "Skins",
- foodGroup: "Food",
- transparencyGroup: "Transparency / colors",
- gridGroup: "Grid / sectors",
- miniMapGroup: "Minimap",
- helpersGroup: "Helpers",
- mouseGroup: "Mouse control",
- hudGroup: "HUD",
- chatGroup: "Chat",
- statsGroup: "Stats",
- extrasGroup: "Extras",
- noSkins: "No skins",
- noNames: "No names",
- noColors: "No colors",
- showMass: "Show mass",
- skipStats: "Skip stats after death",
- quickResp: "Quick respawn (hotkey)",
- autoResp: "Auto respawn",
- autoZoom: "Auto zoom",
- zoomSpeed: "Zoom speed",
- autoHideCellsInfo: "Auto hide names and mass",
- autoHideFood: "Auto hide food",
- hideMyName: "Hide my name",
- hideMyMass: "Hide my mass",
- hideEnemiesMass: "Hide enemies mass",
- vanillaSkins: "Vanilla skins",
- customSkins: "Custom skins",
- myTransparentSkin: "My transparent skin",
- myCustomColor: "My custom color",
- transparentCells: "Transparent cells",
- transparentViruses: "Transparent viruses",
- transparentSkins: "Transparent skins",
- showGrid: "Show grid",
- showBgSectors: "Show background sectors",
- showMapBorders: "Show map borders",
- showMiniMap: "Show minimap",
- showMiniMapGrid: "Show minimap grid",
- showMiniMapGuides: "Show minimap guides",
- oneColoredTeammates: "One-colored teammates",
- rainbowFood: "Rainbow food",
- oppColors: "Opponents colors",
- oppRings: "Opponents rings",
- virColors: "Viruses colors",
- splitRange: "Split range",
- virusesRange: "Viruses range",
- textStroke: "Names and mass stroke",
- cursorTracking: "Cursor tracking",
- teammatesInd: "Teammates indicators",
- mouseSplit: "LMB - Mouse split",
- mouseFeed: "RMB - Mouse feed",
- mouseInvert: "Invert mouse buttons",
- disableChat: "Disable chat",
- hideChat: "Hide chat",
- showChatBox: "Chatbox instead of popups",
- showChatImages: "Show images on chat",
- showChatVideos: "Show videos on chat",
- showTop5: "Show team top 5",
- showTargeting: "Show targeting",
- showTime: "Show current time",
- normalLb: '"Leaderboard" header',
- centeredLb: "Centered leaderboard",
- fpsAtTop: "Game stats at the top",
- showStats: "Show game stats",
- showStatsMass: "Game stats: Mass",
- showStatsSTE: "Game stats: STE",
- showStatsN16: "Game stats: n/16",
- showStatsFPS: "Game stats: FPS",
- blockPopups: "Block popups (ads/shop)",
- hotkeys: "Hotkeys",
- "hk-inst-assign": "To assign a hotkey click on the input field and press your chosen key.",
- "hk-inst-delete": "To delete a hotkey click on the input field and press the DELETE key.",
- "hk-inst-keys": "Possible key combinations with the CTRL and ALT keys.",
- "hk-feed": "Feed",
- "hk-macroFeed": "Macro feed",
- "hk-split": "Split",
- "hk-doubleSplit": "Double split",
- "hk-split16": "Split 16",
- "hk-pause": "Cell pause",
- "hk-showTop5": "Show/hide team top 5",
- "hk-showTime": "Show/hide current time",
- "hk-showSplitRange": "Show/hide split range",
- "hk-showSplitInd": "Show/hide split indicators",
- "hk-showTeammatesInd": "Show/hide teammates indicators",
- "hk-showOppColors": "Show/hide opponents colors",
- "hk-toggleSkins": "Toggle skins (custom/default)",
- "hk-showSkins": "Show/hide skins",
- "hk-showStats": "Show/hide game stats",
- "hk-toggleCells": "Toggle own cells (smallest/biggest)",
- "hk-showFood": "Show/hide food",
- "hk-showGrid": "Show/hide grid",
- "hk-showMiniMapGuides": "Show/hide minimap guides",
- "hk-hideChat": "Show/hide chat",
- "hk-showHUD": "Show/hide HUD",
- "hk-copyLb": "Copy leaderboard",
- "hk-showLb": "Show/hide leaderboard",
- "hk-toggleAutoZoom": "Toggle auto zoom",
- "hk-resetZoom": "Reset zoom",
- "hk-zoomLevel": "Zoom level",
- "hk-toggleDeath": "Toggle death location",
- "hk-clearChat": "Show chat history / Clear chat",
- "hk-showBgSectors": "Show/hide background sectors",
- "hk-hideBots": "Show/hide small bots",
- "hk-showNames": "Show/hide names",
- "hk-showMass": "Show/hide mass",
- "hk-showMiniMap": "Show/hide minimap",
- "hk-chatMessage": "Enter chat message",
- "hk-quickResp": "Quick respawn",
- "hk-autoResp": "Toggle auto respawn",
- "hk-switchServerMode": "Switch server [public/private]",
- "hk-showTargeting": "Show/hide targeting panel",
- "hk-setTargeting": "Start/stop targeting (following)",
- "hk-cancelTargeting": "Cancel targeting",
- "hk-changeTarget": "Change target",
- "hk-privateMiniMap": "Show target on the minimap",
- commands: "Commands",
- comm1: "Feed me!",
- comm2: "Split into me!",
- comm3: "Need backup at %currentSector%!",
- comm4: "Enemy spotted at %currentSector%!",
- comm5: "Need a teammate!",
- comm6: "Tank the virus!",
- comm7: "Eat the virus!",
- comm8: "Let's bait!",
- comm9: "Fake tricksplit!",
- comm0: "Fuck!",
- comm10: "Tricksplit!",
- comm11: "Left!",
- comm12: "Up!",
- comm13: "Right!",
- comm14: "Bottom!",
- saveComm: "Save commands",
- theme: "Theme",
- restoreThemeSettings: "Restore theme default settings",
- basicTheming: "Basic theming",
- themePreset: "Theme preset",
- themeType: "Theme type",
- darkTheme: "Dark theme",
- lightTheme: "Light theme",
- mainColor: "Main color",
- bgColor: "Background",
- foodColor: "Food",
- gridColor: "Grid / sectors",
- bordersColor: "Map borders",
- virusColor: "Virus",
- virusStrokeColor: "Virus stroke",
- namesFont: "Names & mass font",
- sectorsFont: "Sectors font",
- nameScale: "Name scale",
- massScale: "Mass scale",
- foodSize: "Food size",
- bordersWidth: "Map borders width",
- sectorsWidth: "Sectors grid width",
- sectorsFontSize: "Sectors font size",
- cellsAlpha: "Cells transparency",
- skinsAlpha: "Skins transparency",
- virusAlpha: "Virus transparency",
- virusStrokeSize: "Virus stroke size",
- cursorTrackingColor: "Cursor tracking",
- splitRangeColor: "Split range",
- menuTheming: "Menu",
- menuPreset: "Menu theme",
- menuMainColor: "Main color",
- menuBtnTextColor: "Button text",
- menuPanelColor: "Panel",
- menuPanelColor2: "Panel (2)",
- menuTextColor: "Panel text",
- menuTextColor2: "Panel text (2)",
- btn1Color: "Button #1",
- btn1Color2: "Button #1 (2)",
- btn2Color: "Button #2",
- btn2Color2: "Button #2 (2)",
- btn3Color: "Button #3",
- btn3Color2: "Button #3 (2)",
- btn4Color: "Button #4",
- btn4Color2: "Button #4 (2)",
- menuBg: "Panel background image",
- menuOpacity: "Transparency",
- hudTheming: "HUD",
- hudMainColor: "Main color",
- hudColor: "Background",
- hudTextColor: "Text",
- statsHudColor: "Stats",
- timeHudColor: "Time",
- top5MassColor: "Top 5 mass",
- lbMeColor: "Leaderboard - me",
- lbTeammateColor: "Leaderboard - teammate",
- hudFont: "HUD font",
- hudScale: "HUD scale",
- chatTheming: "Chat",
- messageColor: "Message background",
- messageTextColor: "Message text",
- messageTimeColor: "Message time",
- messageNickColor: "Message nick",
- commandsColor: "Command background",
- commandsTextColor: "Command text",
- commandsTimeColor: "Command time",
- commandsNickColor: "Command nick",
- chatBoxColor: "Chatbox color",
- chatScale: "Chat scale",
- miniMapTheming: "Minimap",
- miniMapSectorColor: "Sector",
- miniMapGuidesColor: "Guides",
- miniMapNickColor: "Nick",
- miniMapNickStrokeColor: "Nick stroke",
- miniMapMyCellColor: "My cell",
- miniMapMyCellStrokeColor: "My cell stroke",
- miniMapTeammatesColor: "Teammates",
- miniMapDeathLocationColor: "Death location",
- miniMapFont: "Minimap font",
- miniMapNickFont: "Nick font",
- miniMapWidth: "Minimap width",
- miniMapSectorsOpacity: "Sectors transparency",
- miniMapNickSize: "Nick size",
- miniMapNickStrokeSize: "Nick stroke size",
- miniMapMyCellSize: "My cell size",
- miniMapMyCellStrokeSize: "My cell stroke size",
- miniMapTeammatesSize: "Teammates size",
- imagesTheming: "Graphics / cursors",
- customBackground: "Custom background image",
- customCursor: "Custom cursor image",
- hideChatMsgA: "Chat is visible!",
- hideChatMsgB: "Chat is hidden!",
- showSkinsMsgA: "Skins are visible!",
- showSkinsMsgB: "Skins are hidden!",
- hideSmallBotsMsgA: "Small bots are visible!",
- hideSmallBotsMsgB: "Small bots are hidden!",
- autoRespMsgA: "Auto respawn is on!",
- autoRespMsgB: "Auto respawn is off!",
- autoZoomMsgA: "Auto zoom is on!",
- autoZoomMsgB: "Auto zoom is off!",
- targetNotSet: "Target not set",
- targetDead: "Dead",
- targetDistance: "Distance",
- targetMass: "Mass altogether",
- totalPartyPlayers: "Active players",
- totalPartyMass: "Total mass",
- exportImport: "Export / import settings",
- exportSettings: "Export settings",
- exportInfo: "To export selected settings copy the code below and save it to a text file encoded in Unicode.",
- importSettings: "Import settings",
- importInfo: 'To import selected settings paste an exported code below and press the "Import settings" button.',
- profile: "Profile",
- profiles: "Profiles",
- skins: "Skins",
- moreSkins: "Add skins",
- thanks: "Thanks to Awesome!",
- saveSett: "Save settings",
- saved: "Saved!",
- resetSett: "Reset to default",
- close: "Close",
- enterChatMsg: "Enter chat message",
- activeParties: "Active parties",
- noActiveParties: "No active parties ;(",
- playlist: "Playlist",
- pause: "PAUSE!",
- visit: "Visit",
- exit: "OGARio by szymy: Are you sure you want to quit the game?",
- blockWarn: "WARNING! Popups are blocked in the settings.",
- unblockPopups: "Temporary unblock",
- mass: "Mass",
- score: "Score",
- leaderboard: "Leaderboard",
- page_menu_main_free_coins: "Free Coins",
- page_menu_main_gifts: "Gifts",
- page_shop: "Shop"
- }
- },
- g = {
- comm1: u[d].comm1,
- comm2: u[d].comm2,
- comm3: u[d].comm3,
- comm4: u[d].comm4,
- comm5: u[d].comm5,
- comm6: u[d].comm6,
- comm7: u[d].comm7,
- comm8: u[d].comm8,
- comm9: u[d].comm9,
- comm0: u[d].comm0,
- comm10: u[d].comm10,
- comm11: u[d].comm11,
- comm12: u[d].comm12,
- comm13: u[d].comm13,
- comm14: u[d].comm14
- },
- f = {
- "&": "&",
- "<": "<",
- ">": ">",
- '"': """,
- "'": "'",
- "/": "/"
- },
- k = {
- "ogario-v3": {
- name: "OGARio v3",
- darkTheme: !0,
- mainColor: "#01d9cc",
- bgColor: "#000a11",
- gridColor: "#00243e",
- bordersColor: "#01d9cc",
- foodColor: "#5000ff",
- virusColor: "#002f52",
- virusStrokeColor: "#00b9e8",
- cursorTrackingColor: "#ffffff",
- splitRangeColor: "#ffffff",
- namesFont: "ubuntu-bold",
- sectorsFont: "ubuntu",
- nameScale: 1,
- massScale: 3,
- foodSize: 5,
- bordersWidth: 40,
- sectorsWidth: 40,
- sectorsFontSize: 1200,
- cellsAlpha: .9,
- skinsAlpha: .7,
- virusAlpha: .6,
- virusStrokeSize: 14,
- menuPreset: "ogario-v3",
- menuMainColor: "#01d9cc",
- menuBtnTextColor: "#ffffff",
- menuPanelColor: "#00243e",
- menuPanelColor2: "#002f52",
- menuTextColor: "#ffffff",
- menuTextColor2: "#8096a7",
- btn1Color: "#018cf6",
- btn1Color2: "#0176ce",
- btn2Color: "#00b9e8",
- btn2Color2: "#0099c0",
- btn3Color: "#8d5fe6",
- btn3Color2: "#814ee3",
- btn4Color: "#bf00aa",
- btn4Color2: "#a80096",
- menuBg: "http://cdn.ogario.ovh/static/img/pattern.png",
- menuOpacity: .96,
- hudMainColor: "#01d9cc",
- hudColor: "rgba(0,0,0,0.4)",
- hudTextColor: "#ffffff",
- statsHudColor: "#ffffff",
- timeHudColor: "#01d9cc",
- top5MassColor: "#bf00aa",
- lbMeColor: "#bf00aa",
- lbTeammateColor: "#018cf6",
- hudFont: "ubuntu-bold",
- hudScale: 1,
- messageColor: "rgba(0,0,0,0.4)",
- messageTextColor: "#ffffff",
- messageTimeColor: "#018cf6",
- messageNickColor: "#01d9cc",
- commandsColor: "rgba(191,0,170,0.9)",
- commandsTextColor: "#ffffff",
- commandsTimeColor: "#bf00aa",
- commandsNickColor: "#ffffff",
- chatBoxColor: "rgba(0,0,0,0.4)",
- chatScale: 1,
- miniMapSectorColor: "#01d9cc",
- miniMapGuidesColor: "#bf00aa",
- miniMapNickColor: "#ffffff",
- miniMapNickStrokeColor: "#000000",
- miniMapMyCellColor: "#ffffff",
- miniMapMyCellStrokeColor: "#bf00aa",
- miniMapTeammatesColor: "#01d9cc",
- miniMapDeathLocationColor: "#bf00aa",
- miniMapFont: "ubuntu-bold",
- miniMapNickFont: "ubuntu-bold",
- miniMapWidth: 240,
- miniMapSectorsOpacity: .1,
- miniMapNickSize: 11,
- miniMapNickStrokeSize: 2,
- miniMapMyCellSize: 7.5,
- miniMapMyCellStrokeSize: 4,
- miniMapTeammatesSize: 5.5,
- customBackground: "",
- customCursor: "http://cdn.ogario.ovh/static/img/cursors/cursor_02.cur"
- },
- "ogario-orange": {
- name: "OGARio v2",
- darkTheme: !0,
- mainColor: "#ff7800",
- bgColor: "#111111",
- gridColor: "#292929",
- bordersColor: "#ff7800",
- foodColor: "#e16400",
- virusColor: "#666666",
- virusStrokeColor: "#666666",
- hudMainColor: "#ff7800",
- statsHudColor: "#ff7800",
- top5MassColor: "#ff7800",
- timeHudColor: "#ff7800",
- messageNickColor: "#ff7800",
- commandsColor: "rgba(255,120,0,0.9)",
- commandsTimeColor: "#ff7800",
- commandsTextColor: "#ffffff",
- miniMapSectorColor: "#ff7800",
- miniMapGuidesColor: "#ff7800",
- miniMapMyCellColor: "#ffffff",
- miniMapMyCellStrokeColor: "#ff7800",
- miniMapTeammatesColor: "#ff7800",
- miniMapDeathLocationColor: "#ff7800",
- miniMapSectorsOpacity: .1
- },
- "ogario-gold": {
- name: "OGARio LE",
- darkTheme: !0,
- mainColor: "#b5a642",
- bgColor: "#000000",
- gridColor: "#111111",
- bordersColor: "#b5a642",
- foodColor: "#998c36",
- virusColor: "#666666",
- virusStrokeColor: "#666666",
- hudMainColor: "#b5a642",
- statsHudColor: "#b5a642",
- top5MassColor: "#b5a642",
- timeHudColor: "#b5a642",
- messageNickColor: "#b5a642",
- commandsColor: "rgba(181,166,66,0.9)",
- commandsTimeColor: "#b5a642",
- commandsTextColor: "#ffffff",
- miniMapSectorColor: "#b5a642",
- miniMapGuidesColor: "#b5a642",
- miniMapMyCellColor: "#ffffff",
- miniMapMyCellStrokeColor: "#b5a642",
- miniMapTeammatesColor: "#b5a642",
- miniMapDeathLocationColor: "#b5a642",
- miniMapSectorsOpacity: .1
- },
- "sniikz-style": {
- name: "SniiKz's Style",
- darkTheme: !0,
- mainColor: "#01d9cc",
- bgColor: "#000000",
- gridColor: "#00243e",
- bordersColor: "#ffffff",
- foodColor: "#5000ff",
- virusColor: "#3b3b3b",
- virusStrokeColor: "#ffffff",
- cursorTrackingColor: "#ffffff",
- splitRangeColor: "#ffffff",
- massScale: 4,
- foodSize: 1,
- bordersWidth: 40,
- sectorsWidth: 40,
- sectorsFontSize: 1200,
- cellsAlpha: .99,
- skinsAlpha: .7,
- virusAlpha: .4,
- virusStrokeSize: 10,
- menuPreset: "ogario-v3",
- menuMainColor: "#fc0079",
- menuBtnTextColor: "#ffffff",
- menuPanelColor: "#050008",
- menuPanelColor2: "#1d0526",
- menuTextColor: "#ffffff",
- menuTextColor2: "#65458f",
- btn1Color: "#4f0242",
- btn1Color2: "#3b0431",
- btn2Color: "#6b0036",
- btn2Color2: "#4d0227",
- btn3Color: "#aa084e",
- btn3Color2: "#80063b",
- btn4Color: "#aa084e",
- btn4Color2: "#8a063f",
- menuBg: "http://cdn.ogario.ovh/static/img/pattern.png",
- menuOpacity: 1,
- hudMainColor: "#5974ff",
- hudColor: "rgba(36,36,36,0.49)",
- hudTextColor: "#ffffff",
- statsHudColor: "#ffffff",
- timeHudColor: "#737373",
- top5MassColor: "#1fe000",
- lbMeColor: "#bf00aa",
- lbTeammateColor: "#018cf6",
- hudScale: 1.15,
- messageColor: "rgba(0,0,0,0.4)",
- messageTextColor: "#e8e8e8",
- messageTimeColor: "#545454",
- messageNickColor: "#05ff00",
- commandsColor: "rgba(36,36,36,0.9)",
- commandsTextColor: "#ffffff",
- commandsTimeColor: "#545454",
- commandsNickColor: "#ffffff",
- chatBoxColor: "rgba(0,0,0,0.4)",
- chatScale: 1,
- miniMapSectorColor: "#000000",
- miniMapGuidesColor: "#ff00a8",
- miniMapNickColor: "#ffffff",
- miniMapNickStrokeColor: "#4d4d4d",
- miniMapMyCellColor: "#f0ff3d",
- miniMapMyCellStrokeColor: "#acba07",
- miniMapTeammatesColor: "#305eff",
- miniMapDeathLocationColor: "#2b2b2b",
- miniMapWidth: 250,
- miniMapSectorsOpacity: .1,
- miniMapNickSize: 9,
- miniMapNickStrokeSize: 0,
- miniMapMyCellSize: 5,
- miniMapMyCellStrokeSize: 0,
- miniMapTeammatesSize: 5,
- customBackground: "",
- customCursor: "http://cdn.ogario.ovh/static/img/cursors/cursor_01.cur"
- },
- "hkg-style": {
- name: "HKG Style",
- darkTheme: !0,
- mainColor: "#651fff",
- bgColor: "#000000",
- gridColor: "#111111",
- bordersColor: "#ffffff",
- foodColor: "#651fff",
- virusColor: "#666666",
- virusStrokeColor: "#666666",
- hudMainColor: "#651fff",
- statsHudColor: "#651fff",
- top5MassColor: "#651fff",
- timeHudColor: "#651fff",
- messageNickColor: "#651fff",
- commandsColor: "rgba(101,31,255,0.9)",
- commandsTimeColor: "#651fff",
- commandsTextColor: "#ffffff",
- miniMapSectorColor: "#651fff",
- miniMapGuidesColor: "#651fff",
- miniMapMyCellColor: "#ffffff",
- miniMapMyCellStrokeColor: "#651fff",
- miniMapTeammatesColor: "#651fff",
- miniMapDeathLocationColor: "#651fff",
- miniMapSectorsOpacity: .1
- },
- "agario-light": {
- name: "Agar.io Light",
- darkTheme: !1,
- mainColor: "#ffffff",
- bgColor: "#f2fbff",
- gridColor: "#ced6d9",
- bordersColor: "#858a8c",
- foodColor: "#2de52d",
- virusColor: "#33ff33",
- virusStrokeColor: "#2de52d",
- hudMainColor: "#ffffff",
- statsHudColor: "#ffffff",
- top5MassColor: "#ffffff",
- timeHudColor: "#ffffff",
- messageNickColor: "#ffffff",
- commandsColor: "rgba(255,255,255,0.9)",
- commandsTimeColor: "#ffffff",
- commandsTextColor: "#000000",
- miniMapSectorColor: "#ffffff",
- miniMapGuidesColor: "#ffffff",
- miniMapMyCellColor: "#ffffff",
- miniMapMyCellStrokeColor: "#ffffff",
- miniMapTeammatesColor: "#ffffff",
- miniMapDeathLocationColor: "#ffffff",
- miniMapSectorsOpacity: .25
- },
- "agario-dark": {
- name: "Agar.io Dark",
- darkTheme: !0,
- mainColor: "#ffffff",
- bgColor: "#111111",
- gridColor: "#333333",
- bordersColor: "#999999",
- foodColor: "#2de52d",
- virusColor: "#33ff33",
- virusStrokeColor: "#2de52d",
- hudMainColor: "#ffffff",
- statsHudColor: "#ffffff",
- top5MassColor: "#ffffff",
- timeHudColor: "#ffffff",
- messageNickColor: "#ffffff",
- commandsColor: "rgba(255,255,255,0.9)",
- commandsTimeColor: "#ffffff",
- commandsTextColor: "#ffffff",
- miniMapSectorColor: "#ffffff",
- miniMapGuidesColor: "#ffffff",
- miniMapMyCellColor: "#ffffff",
- miniMapMyCellStrokeColor: "#ffffff",
- miniMapTeammatesColor: "#ffffff",
- miniMapDeathLocationColor: "#ffffff",
- miniMapSectorsOpacity: .1
- }
- },
- y = {
- "ogario-v3": {
- name: "OGARio v3",
- menuMainColor: "#01d9cc",
- menuBtnTextColor: "#ffffff",
- menuPanelColor: "#00243e",
- menuPanelColor2: "#002f52",
- menuTextColor: "#ffffff",
- menuTextColor2: "#8096a7",
- btn1Color: "#018cf6",
- btn1Color2: "#0176ce",
- btn2Color: "#00b9e8",
- btn2Color2: "#0099c0",
- btn3Color: "#8d5fe6",
- btn3Color2: "#814ee3",
- btn4Color: "#f300d8",
- btn4Color2: "#df00c6",
- menuBg: "http://cdn.ogario.ovh/static/img/pattern.png"
- },
- "ogario-v2": {
- name: "OGARio v2",
- menuMainColor: "#ff7800",
- menuBtnTextColor: "#ffffff",
- menuPanelColor: "#222222",
- menuPanelColor2: "#333333",
- menuTextColor: "#bbbbbb",
- menuTextColor2: "#bbbbbb",
- btn1Color: "#428bca",
- btn1Color2: "#3071a9",
- btn2Color: "#5cb85c",
- btn2Color2: "#449d44",
- btn3Color: "#f0ad4e",
- btn3Color2: "#ec971f",
- btn4Color: "#d9534f",
- btn4Color2: "#c9302c",
- menuBg: ""
- },
- agario: {
- name: "Agar.io",
- menuMainColor: "#5bc0de",
- menuBtnTextColor: "#ffffff",
- menuPanelColor: "#ffffff",
- menuPanelColor2: "#cccccc",
- menuTextColor: "#333333",
- menuTextColor2: "#999999",
- btn1Color: "#428bca",
- btn1Color2: "#3071a9",
- btn2Color: "#5cb85c",
- btn2Color2: "#449d44",
- btn3Color: "#f0ad4e",
- btn3Color2: "#ec971f",
- btn4Color: "#d9534f",
- btn4Color2: "#c9302c",
- menuBg: ""
- }
- },
- C = {
- preset: "ogario-v3",
- darkTheme: !0,
- mainColor: "#01d9cc",
- bgColor: "#000a11",
- gridColor: "#00243e",
- bordersColor: "#01d9cc",
- foodColor: "#5000ff",
- virusColor: "#002f52",
- virusStrokeColor: "#00b9e8",
- cursorTrackingColor: "#ffffff",
- splitRangeColor: "#ffffff",
- namesFont: "ubuntu-bold",
- namesFontFamily: "Ubuntu",
- namesFontWeight: 700,
- sectorsFont: "ubuntu",
- sectorsFontFamily: "Ubuntu",
- sectorsFontWeight: 400,
- sectorsX: 5,
- sectorsY: 5,
- nameScale: 1,
- massScale: 3,
- massScaleMargin: 1.25,
- foodSize: 5,
- bordersWidth: 40,
- sectorsWidth: 40,
- sectorsFontSize: 1200,
- cellsAlpha: .9,
- skinsAlpha: .7,
- virusAlpha: .6,
- virusStrokeSize: 14,
- menuPreset: "ogario-v3",
- menuMainColor: "#01d9cc",
- menuBtnTextColor: "#ffffff",
- menuPanelColor: "#00243e",
- menuPanelColor2: "#002f52",
- menuTextColor: "#ffffff",
- menuTextColor2: "#8096a7",
- btn1Color: "#018cf6",
- btn1Color2: "#0176ce",
- btn2Color: "#00b9e8",
- btn2Color2: "#0099c0",
- btn3Color: "#8d5fe6",
- btn3Color2: "#814ee3",
- btn4Color: "#bf00aa",
- btn4Color2: "#a80096",
- menuBg: "http://cdn.ogario.ovh/static/img/pattern.png",
- menuOpacity: .96,
- hudMainColor: "#01d9cc",
- hudColor: "rgba(0,0,0,0.4)",
- hudTextColor: "#ffffff",
- statsHudColor: "#ffffff",
- timeHudColor: "#01d9cc",
- top5MassColor: "#bf00aa",
- lbMeColor: "#bf00aa",
- lbTeammateColor: "#018cf6",
- hudFont: "ubuntu-bold",
- hudFontFamily: "Ubuntu",
- hudFontWeight: 700,
- hudScale: 1,
- messageColor: "rgba(0,0,0,0.4)",
- messageTextColor: "#ffffff",
- messageTimeColor: "#018cf6",
- messageNickColor: "#01d9cc",
- commandsColor: "rgba(191,0,170,0.9)",
- commandsTextColor: "#ffffff",
- commandsTimeColor: "#bf00aa",
- commandsNickColor: "#ffffff",
- chatBoxColor: "rgba(0,0,0,0.4)",
- chatScale: 1,
- miniMapSectorColor: "#01d9cc",
- miniMapGuidesColor: "#bf00aa",
- miniMapNickColor: "#ffffff",
- miniMapNickStrokeColor: "#000000",
- miniMapMyCellColor: "#ffffff",
- miniMapMyCellStrokeColor: "#bf00aa",
- miniMapTeammatesColor: "#01d9cc",
- miniMapDeathLocationColor: "#bf00aa",
- miniMapFont: "ubuntu-bold",
- miniMapFontFamily: "Ubuntu",
- miniMapFontWeight: 700,
- miniMapNickFont: "ubuntu-bold",
- miniMapNickFontFamily: "Ubuntu",
- miniMapNickFontWeight: 700,
- miniMapWidth: 240,
- miniMapTop: 24,
- miniMapSectorsOpacity: .1,
- miniMapNickSize: 11,
- miniMapNickStrokeSize: 2,
- miniMapMyCellSize: 7.5,
- miniMapMyCellStrokeSize: 4,
- miniMapTeammatesSize: 5.5,
- customBackground: "",
- customCursor: "http://cdn.ogario.ovh/static/img/cursors/cursor_02.cur"
- };
- a.prototype = {
- menuMainColorCSS: null,
- menuPanelColorCSS: null,
- menuTextlColorCSS: null,
- menuButtonsCSS: null,
- hudCSS: null,
- chatCSS: null,
- chatScaleCSS: null,
- cursorCSS: null,
- loadThemeSettings: function() {
- var t = null;
- null !== e.localStorage.getItem("ogarioThemeSettings") && (t = JSON.parse(e.localStorage.getItem("ogarioThemeSettings")));
- for (var a in C) C.hasOwnProperty(a) && (t && t.hasOwnProperty(a) && (C[a] = t[a]), o.hasOwnProperty(a) && (o[a] = C[a]))
- },
- saveThemeSettings: function() {
- e.localStorage.setItem("ogarioThemeSettings", JSON.stringify(C))
- },
- restoreThemeSettings: function() {
- null !== e.localStorage.getItem("ogarioThemeSettings") && (e.localStorage.removeItem("ogarioThemeSettings"), e.location.reload())
- },
- addCustomCSS: function(e, o) {
- this[e] || (this[e] = t("<style type='text/css'>").appendTo("head")), this[e].html(o)
- },
- addPresetBox: function(e, o, a, i, s) {
- 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>');
- for (var n in a) a.hasOwnProperty(n) && t("#" + o).append('<option value="' + n + '">' + a[n].name + "</option>");
- t("#" + o).val(C[i]);
- var r = this;
- t("#" + o).on("change", function() {
- var e = t(this).val();
- C[i] = e, r[s](e)
- })
- },
- addColorBox: function(e, a, i) {
- 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) {
- var s = this;
- t(e + " ." + a + "-picker").colorpicker({
- format: "hex"
- }).on("changeColor.colorpicker", function(e) {
- C[a] = e.color.toHex(), o.hasOwnProperty(a) && (o[a] = C[a]), s[i]()
- })
- } else t(e + " ." + a + "-picker").colorpicker({
- format: "hex"
- }).on("changeColor.colorpicker", function(e) {
- C[a] = e.color.toHex(), o.hasOwnProperty(a) && (o[a] = C[a])
- })
- },
- addRgbaColorBox: function(e, a, i) {
- 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) {
- var s = this;
- t(e + " ." + a + "-picker").colorpicker({
- format: "rgba"
- }).on("changeColor.colorpicker", function(e) {
- var t = e.color.toRGB();
- C[a] = "rgba(" + t.r + "," + t.g + "," + t.b + "," + t.a + ")", o.hasOwnProperty(a) && (o[a] = C[a]), s[i]()
- })
- } else t(e + " ." + a + "-picker").colorpicker({
- format: "rgba"
- }).on("changeColor.colorpicker", function(e) {
- var t = e.color.toRGB();
- C[a] = "rgba(" + t.r + "," + t.g + "," + t.b + "," + t.a + ")", o.hasOwnProperty(a) && (o[a] = C[a])
- })
- },
- addSliderBox: function(e, a, i, s, n, r) {
- 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) {
- var l = this;
- t("#" + a + "-slider").on("input", function() {
- var e = parseFloat(t(this).val());
- t("#" + a + "-value").text(e), C[a] = e, o.hasOwnProperty(a) && (o[a] = e), l[r]()
- })
- } else t("#" + a + "-slider").on("input", function() {
- var e = parseFloat(t(this).val());
- t("#" + a + "-value").text(e), C[a] = e, o.hasOwnProperty(a) && (o[a] = e)
- })
- },
- addInputBox: function(e, o, a, i) {
- 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>');
- var s = this;
- t("#" + o).on("input", function() {
- var e = t(this).val();
- C[o] = e, s[i]()
- })
- },
- addCursorBox: function(e, o) {
- 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>')
- },
- setFont: function(e, t) {
- 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"])
- },
- addFontBox: function(e, o, a) {
- 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]);
- var i = this;
- a ? t("#" + o).on("change", function() {
- var e = t(this).val();
- i.setFont(o, e), i[a]()
- }) : t("#" + o).on("change", function() {
- var e = t(this).val();
- i.setFont(o, e)
- })
- },
- setFontFamily: function(e) {
- return -1 != e.indexOf("roboto") ? "Roboto" : -1 != e.indexOf("oswald") ? "Oswald" : "Ubuntu"
- },
- setFontWeight: function(e) {
- return -1 != e.indexOf("bold") ? 700 : 400
- },
- setThemeMenu: function() {
- var e = this;
- 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");
- 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");
- t("#theme-images .cursor-box a").on("click", function(o) {
- o.preventDefault();
- var a = t("img", this).attr("src");
- C.customCursor = a, e.setCustomCursor(), t("#customCursor").val(a), t("#theme-images .cursor-box a").removeClass("active"), t(this).addClass("active")
- }), t("#theme").append('<button class="btn btn-block btn-success btn-save"">' + u[d].saveSett + "</button>"), t("#theme .btn-save").on("click", function(o) {
- o.preventDefault();
- var a = t(this);
- a.text(u[d].saved), e.saveThemeSettings(), setTimeout(function() {
- a.text(u[d].saveSett)
- }, 500)
- }), t("#theme").append('<div class="restore-settings"><a href="#">' + u[d].restoreThemeSettings + "</a></div>"), t("#theme .restore-settings a").on("click", function(o) {
- o.preventDefault(), e.restoreThemeSettings()
- }), t(".skin").colorpicker({
- format: "hex",
- input: "#color"
- })
- },
- changePreset: function(e, a) {
- if (a[e]) {
- C[e] = e;
- var e = a[e];
- 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]))
- }
- },
- changeThemePreset: function(e) {
- this.changePreset(e, k), this.setTheme()
- },
- setFonts: function() {
- this.setFont("namesFont", C.namesFont), this.setFont("sectorsFont", C.sectorsFont)
- },
- setMassScale: function() {
- switch (C.massScale) {
- case 5:
- o.massScaleMargin = C.massScaleMargin = 1 * C.nameScale;
- break;
- case 4:
- o.massScaleMargin = C.massScaleMargin = 1.125 * C.nameScale;
- break;
- case 3:
- o.massScaleMargin = C.massScaleMargin = 1.25 * C.nameScale;
- break;
- case 2:
- o.massScaleMargin = C.massScaleMargin = 1.5 * C.nameScale;
- break;
- default:
- o.massScaleMargin = C.massScaleMargin = 2 * C.nameScale
- }
- },
- setBgColor: function() {
- t("body").css("background-color", C.bgColor)
- },
- setCustomBackground: function() {
- C.customBackground ? t("body").css("background-image", "url(" + C.customBackground + ")") : t("body").css("background-image", "none")
- },
- setCustomCursor: function() {
- if (C.customCursor) var e = "*{cursor:url(" + C.customCursor + "), auto !important}";
- else var e = "*{cursor: auto}";
- this.addCustomCSS("cursorCSS", e)
- },
- setMenu: function() {
- this.setMenuOpacity(), this.setMenuMainColor(), this.setMenuPanelColor(), this.setMenuTextColor(), this.setMenuButtons(), this.setMenuBg()
- },
- changeMenuPreset: function(e) {
- this.changePreset(e, y), this.setMenu()
- },
- setMenuOpacity: function() {
- t("#helloContainer, #hotkeys, #exp-imp").css("opacity", C.menuOpacity)
- },
- setMenuMainColor: function() {
- 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}";
- this.addCustomCSS("menuMainColorCSS", e)
- },
- setMenuPanelColor: function() {
- 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}";
- this.addCustomCSS("menuPanelColorCSS", e)
- },
- setMenuTextColor: function() {
- 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 + "}";
- this.addCustomCSS("menuTextColorCSS", e)
- },
- setMenuButtons: function() {
- 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 + "}";
- this.addCustomCSS("menuButtonsCSS", e)
- },
- setMenuBg: function() {
- 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")
- },
- setHud: function() {
- this.setHudColors(), this.setHudFont(), this.setHudScale()
- },
- setHudColors: function() {
- 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 + "}";
- this.addCustomCSS("hudCSS", e)
- },
- setHudFont: function() {
- this.setFont("hudFont", C.hudFont), t("#overlays-hud").css({
- "font-family": C.hudFontFamily,
- "font-weight": C.hudFontWeight
- })
- },
- setHudScale: function() {
- var e = Math.round(20 * C.hudScale),
- o = Math.round(200 * C.hudScale),
- a = Math.floor(55 * C.hudScale),
- i = Math.floor(15 * C.hudScale),
- s = Math.floor(260 * C.hudScale),
- n = Math.floor(85 * C.hudScale),
- r = Math.floor(20 * C.hudScale);
- 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")
- },
- setChat: function() {
- this.setChatColors(), this.setChatScale()
- },
- setChatColors: function() {
- 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 + "}";
- this.addCustomCSS("chatCSS", e)
- },
- setChatScale: function() {
- var e = Math.round(14 * C.chatScale),
- o = Math.round(280 * C.chatScale),
- a = Math.round(350 * C.chatScale),
- i = Math.round(300 * C.chatScale);
- 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);
- var s = "#toast-container{width:" + o + "px;font-size:" + e + "px}";
- this.addCustomCSS("chatScaleCSS", s)
- },
- setMiniMap: function() {
- this.setMiniMapFont(), this.setMiniMapWidth(), this.setMiniMapSectorsOpacity()
- },
- setMiniMapFont: function() {
- this.setFont("miniMapFont", C.miniMapFont), M && M.resetMiniMapSectors()
- },
- setMiniMapWidth: function() {
- var e = C.miniMapWidth / 200;
- C.miniMapTop = Math.round(20 * e), t("#minimap-hud").css({
- width: C.miniMapWidth,
- height: C.miniMapWidth + C.miniMapTop
- }), M && M.resetMiniMapSectors()
- },
- setMiniMapSectorsOpacity: function() {
- t("#minimap-sectors").css("opacity", C.miniMapSectorsOpacity)
- },
- setTheme: function() {
- this.setFonts(), this.setMassScale(), this.setBgColor(), this.setCustomBackground(), this.setCustomCursor(), this.setMenu(), this.setHud(), this.setChat(), this.setMiniMap()
- },
- init: function() {
- this.loadThemeSettings()
- }
- };
- var b = new a;
- b.init();
- var S = [],
- w = {
- nick: "I <3 OGARio",
- clanTag: "Ⓜ",
- skinURL: "",
- color: C.mainColor
- },
- v = {
- quickResp: !0,
- autoResp: !1,
- autoZoom: !0,
- autoHideCellsInfo: !0,
- autoHideFood: !1,
- hideMyName: !0,
- hideMyMass: !1,
- hideEnemiesMass: !1,
- vanillaSkins: !1,
- customSkins: !0,
- myTransparentSkin: !1,
- myCustomColor: !1,
- transparentCells: !1,
- transparentViruses: !0,
- transparentSkins: !1,
- showGrid: !1,
- showBgSectors: !1,
- showMapBorders: !0,
- showMiniMap: !0,
- showMiniMapGrid: !1,
- showMiniMapGuides: !0,
- oneColoredTeammates: !1,
- rainbowFood: !1,
- oppColors: !1,
- oppRings: !1,
- virColors: !1,
- splitRange: !1,
- virusesRange: !1,
- textStroke: !1,
- cursorTracking: !0,
- teammatesInd: !1,
- mouseSplit: !1,
- mouseFeed: !1,
- mouseInvert: !1,
- disableChat: !1,
- hideChat: !1,
- showChatBox: !1,
- showChatImages: !0,
- showChatVideos: !0,
- showTop5: !0,
- showTargeting: !0,
- showTime: !0,
- normalLb: !1,
- centeredLb: !0,
- fpsAtTop: !0,
- showStats: !0,
- showStatsMass: !0,
- showStatsSTE: !1,
- showStatsN16: !1,
- showStatsFPS: !0,
- blockPopups: !1,
- streamMode: !1,
- hideSkinUrl: !1,
- showQuickMenu: !0,
- showSkinsPanel: !0,
- zoomSpeedValue: .9
- };
- i.prototype = {
- id: 0,
- skinID: "",
- x: 0,
- y: 0,
- lastX: 0,
- lastY: 0,
- mass: 0,
- nick: "",
- clanTag: "",
- skinURL: "",
- color: C.miniMapTeammatesColor,
- alive: !1,
- updateTime: null,
- pi2: 2 * Math.PI,
- drawPosition: function(e, o, t, a, i) {
- if (!(!this.alive || a && i && this.id != i)) {
- this.lastX = (29 * this.lastX + this.x) / 30, this.lastY = (29 * this.lastY + this.y) / 30;
- var s = (this.lastX + o) * t,
- n = (this.lastY + o) * t;
- 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()
- }
- }
- }, s.prototype = {
- name: "OGARio by szymy v3",
- version: "v3 (3.0.2)",
- privateMode: !1,
- publicIP: "ws://164.132.227.101:3000",
- privateIP: null,
- updateInterval: 1e3,
- updateTick: 0,
- updateMaxTick: 2,
- currentSector: "",
- miniMap: null,
- miniMapCtx: null,
- miniMapSectors: null,
- pi2: 2 * Math.PI,
- socket: null,
- teamPlayers: [],
- parties: [],
- chatHistory: [],
- customSkinsCache: {},
- customSkinsMap: {},
- deathLocations: [],
- playerID: null,
- playerMass: 0,
- selectedProfile: 0,
- lastDeath: 0,
- gameMode: "",
- partyToken: "",
- lastSentNick: "",
- lastSentClanTag: null,
- lastSentSkinURL: "",
- lastSentCustomColor: "",
- lastSentPartyToken: "",
- lastMessageSentTime: Date.now(),
- rFps: 0,
- renderedFrames: 0,
- fpsLastRequest: null,
- statsHUD: null,
- leaderboardPositionsHUD: null,
- activeParties: null,
- top5pos: null,
- top5total: null,
- timeHUD: null,
- retryResp: 0,
- token: "b2dhcmlvLm92aA==",
- canvasScale: 1,
- selectBiggestCell: !0,
- noSkins: !1,
- noNames: !1,
- noColors: !1,
- showMass: !0,
- skipStats: !1,
- showSplitInd: !1,
- pause: !1,
- targetID: 0,
- targetStatus: 0,
- targetNick: "",
- targetSkinURL: "",
- targeting: !1,
- privateChat: !1,
- privateMiniMap: !1,
- feedInterval: null,
- getPlayerX: function() {
- return o.playerX + o.mapOffsetX
- },
- getPlayerY: function() {
- return o.playerY + o.mapOffsetY
- },
- feed: function() {
- e.core && e.core.eject && e.core.eject()
- },
- macroFeed: function(e) {
- if (e) {
- if (this.feedInterval) return;
- var o = this;
- this.feed(), this.feedInterval = setInterval(function() {
- o.feed()
- }, 80)
- } else this.feedInterval && (clearInterval(this.feedInterval), this.feedInterval = null)
- },
- split: function() {
- e.core && e.core.split && e.core.split()
- },
- doubleSplit: function() {
- var e = this;
- e.split(), setTimeout(function() {
- e.split()
- }, 40)
- },
- popSplit: function() {
- var e = this;
- e.split(), setTimeout(function() {
- e.split()
- }, 200)
- },
- split16: function() {
- var e = this;
- e.split(), setTimeout(function() {
- e.split()
- }, 40), setTimeout(function() {
- e.split()
- }, 80), setTimeout(function() {
- e.split()
- }, 120)
- },
- toggleSkins: function() {
- o.vanillaSkins && o.customSkins ? o.vanillaSkins = !1 : !o.vannillaSkins && o.customSkins ? (o.vanillaSkins = !0, o.customSkins = !1) : (o.vanillaSkins = !0, o.customSkins = !0)
- },
- toggleCells: function() {
- this.selectBiggestCell = !this.selectBiggestCell, o.selectBiggestCell = this.selectBiggestCell
- },
- setShowTop5: function() {
- ":party" === this.gameMode && (v.showTop5 = !v.showTop5, this.setTop5())
- },
- setTop5: function() {
- v.showTop5 && ":party" === this.gameMode ? t("#top5-hud").show() : t("#top5-hud").hide()
- },
- setShowTargeting: function() {
- ":party" === this.gameMode && (v.showTargeting = !v.showTargeting, this.setTargetingHUD())
- },
- setTargetingHUD: function() {
- v.showTargeting && ":party" === this.gameMode ? t("#target-hud, #target-panel-hud").show() : t("#target-hud, #target-panel-hud").hide()
- },
- setShowTime: function() {
- v.showTime = !v.showTime, v.showTime ? (t("#time-hud").show(), this.displayTime()) : t("#time-hud").hide()
- },
- setShowSplitRange: function() {
- v.splitRange = !v.splitRange, o.splitRange = v.splitRange
- },
- setShowSplitInd: function() {
- this.showSplitInd = !this.showSplitInd, v.splitRange = this.showSplitInd, v.oppRings = this.showSplitInd, o.splitRange = v.splitRange, o.oppRings = v.oppRings
- },
- setShowTeammatesInd: function() {
- o.teammatesInd = !o.teammatesInd
- },
- setShowOppColors: function() {
- v.oppColors = !v.oppColors, o.oppColors = v.oppColors
- },
- setShowSkins: function() {
- this.noSkins = !this.noSkins, e.core && e.core.setSkins && e.core.setSkins(!this.noSkins), o.showCustomSkins = !this.noSkins, this.displayChatInfo(!this.noSkins, "showSkinsMsg")
- },
- setShowStats: function() {
- t("#stats-hud").toggle()
- },
- setShowFood: function() {
- o.showFood = !o.showFood
- },
- setShowHUD: function() {
- t("#overlays-hud").toggle()
- },
- setShowGrid: function() {
- v.showGrid = !v.showGrid, o.showGrid = v.showGrid
- },
- setShowMiniMapGuides: function() {
- v.showMiniMapGuides = !v.showMiniMapGuides
- },
- setShowLb: function() {
- ":teams" !== this.gameMode && t("#leaderboard-hud").toggle()
- },
- setShowBgSectors: function() {
- v.showBgSectors = !v.showBgSectors
- },
- setHideSmallBots: function() {
- o.hideSmallBots = !o.hideSmallBots, this.displayChatInfo(!o.hideSmallBots, "hideSmallBotsMsg")
- },
- setShowNames: function() {
- this.noNames = !this.noNames, e.core && e.core.setNames && e.core.setNames(!this.noNames)
- },
- setShowMass: function() {
- this.showMass = !this.showMass, e.core && e.core.setShowMass && e.core.setShowMass(this.showMass)
- },
- setShowMiniMap: function() {
- v.showMiniMap = !v.showMiniMap, this.setMiniMap()
- },
- setMiniMap: function() {
- v.showMiniMap ? t("#minimap-hud").show() : t("#minimap-hud").hide()
- },
- toggleAutoZoom: function() {
- o.autoZoom = !o.autoZoom, this.displayChatInfo(o.autoZoom, "autoZoomMsg")
- },
- resetZoom: function(e) {
- e ? (o.zoomResetValue = 1, o.zoomValue = 1) : o.zoomResetValue = 0
- },
- setZoom: function(e) {
- o.zoomValue = e
- },
- toggleDeath: function() {
- this.lastDeath--, this.lastDeath < 0 && (this.lastDeath = this.deathLocations.length - 1)
- },
- tryResp: function() {
- if (o.play || 20 == this.retryResp) return void(this.retryResp = 0);
- this.retryResp++;
- var e = this;
- setTimeout(function() {
- t(".btn-play-guest").is(":visible") ? t(".btn-play-guest").click() : t(".btn-play").click(), o.play || e.tryResp()
- }, 500)
- },
- quickResp: function() {
- v.quickResp && (t(".ogario-menu").hide(), ":party" === this.gameMode && t("#join-party-btn").click(), o.play = !1, this.tryResp())
- },
- autoResp: function() {
- 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
- },
- setAutoResp: function() {
- v.autoResp && (t("#skipStats").prop("checked") || (t("#skipStats").click(), this.skipStats = !0))
- },
- toggleAutoResp: function() {
- v.autoResp = !v.autoResp, this.setAutoResp(), this.displayChatInfo(v.autoResp, "autoRespMsg")
- },
- copyLb: function() {
- var e = t("<input>");
- t("body").append(e), e.val(t("#leaderboard-positions").text()).select();
- try {
- document.execCommand("copy")
- } catch (o) {}
- e.remove()
- },
- setPause: function() {
- this.pause = !this.pause, o.pause = this.pause, this.pause ? t("#pause-hud").show() : t("#pause-hud").hide()
- },
- setCenteredLb: function() {
- v.centeredLb ? t("#leaderboard-hud").addClass("hud-text-center") : t("#leaderboard-hud").removeClass("hud-text-center")
- },
- setNormalLb: function() {
- t("#leaderboard-hud h4").html(v.normalLb ? u[d].leaderboard : "ogario.ovh")
- },
- setFpsAtTop: function() {
- v.fpsAtTop ? t("#stats-hud").removeClass("hud-bottom").addClass("hud-top") : t("#stats-hud").removeClass("hud-top").addClass("hud-bottom")
- },
- setBlockPopups: function() {
- v.blockPopups ? this.blockPopups() : this.unblockPopups()
- },
- blockPopups: function() {
- 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()
- },
- unblockPopups: function() {
- 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()
- },
- tempUnblockPopups: function() {
- v.blockPopups && this.unblockPopups()
- },
- displayLeaderboard: function(e) {
- this.leaderboardPositionsHUD && (this.leaderboardPositionsHUD.innerHTML = e)
- },
- displayStats: function() {
- if (!v.showStats) return void t("#stats-hud").hide();
- var e = "";
- 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;
- var a = this;
- setTimeout(function() {
- a.displayStats()
- }, 250)
- },
- displayTime: function() {
- if (!v.showTime) return void t("#time-hud").hide();
- var e = (new Date).toLocaleString();
- this.timeHUD.textContent = e;
- var o = this;
- setTimeout(function() {
- o.displayTime()
- }, 1e3)
- },
- displayParties: function() {
- 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>";
- this.activeParties.className = "" === e ? "no-parties" : "", this.activeParties.innerHTML = e
- },
- displayTop5: function() {
- if (v.showTop5) {
- 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++);
- 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
- }
- },
- displayChatHistory: function(e) {
- if (e) {
- t("#messages").empty(), toastr.clear();
- 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>")
- } else t("#messages").empty()
- },
- displayChatInfo: function(e, o) {
- e ? toastr.info(u[d][o + "A"]) : toastr.error(u[d][o + "B"])
- },
- setDisableChat: function() {
- v.hideChat = v.disableChat, this.setHideChat()
- },
- hideChat: function() {
- ":party" === this.gameMode && (v.hideChat = !v.hideChat, this.setHideChat(), this.displayChatInfo(!v.hideChat, "hideChatMsg"))
- },
- setHideChat: function() {
- v.hideChat && t("#message").hide(), this.setShowChatBox()
- },
- setShowChatBox: function() {
- !v.hideChat && v.showChatBox && ":party" === this.gameMode ? t("#chat-box").show() : t("#chat-box").hide()
- },
- enterChatMessage: function() {
- if (":party" === this.gameMode) {
- var e = t("#message");
- if (e.is(":visible")) {
- var a = e.val();
- a.length > 0 ? (this.sendChatMessage(101, a), o.play && (e.blur(), e.hide())) : (e.blur(), e.hide()), e.val("")
- } else e.show(), e.focus(), e.val("")
- }
- },
- showMenu: function() {
- e.MC.showNickDialog(300), t("#oferwallContainer").is(":visible") && e.closeOfferwall(), t("#videoContainer").is(":visible") && e.closeVideoContainer()
- },
- escapeHTML: function(e) {
- return (e + "").replace(/[&<>"'\/]/g, function(e) {
- return f[e]
- })
- },
- checkSkinURL: function(e) {
- return /^https?:\/\/i\.(?:imgur|hizliresim)\.com\/\w{6,8}\.(?:jpg|jpeg|png)\??\d*$/i.test(e) ? e : ""
- },
- loadSettings: function() {
- var t = null;
- null !== e.localStorage.getItem("ogarioSettings") && (t = JSON.parse(e.localStorage.getItem("ogarioSettings")));
- for (var a in v) v.hasOwnProperty(a) && (t && t.hasOwnProperty(a) && (v[a] = t[a]), o.hasOwnProperty(a) && (o[a] = v[a]))
- },
- saveSettings: function(o, t) {
- e.localStorage.setItem(t, JSON.stringify(o))
- },
- exportSettings: function() {
- var e = {
- ogarioCommands: g,
- ogarioHotkeys: x,
- ogarioPlayerProfiles: S,
- ogarioSettings: v,
- ogarioThemeSettings: C
- };
- for (var o in e)
- if (e.hasOwnProperty(o)) {
- var a = t("#export-" + o).prop("checked");
- a || delete e[o]
- }
- e = JSON.stringify(e), t("#export-settings").val(e), t("#import-settings").val(""), e = null
- },
- importSettings: function() {
- t("#import-settings").blur();
- var o = t("#import-settings").val();
- if (o) {
- o = JSON.parse(o);
- for (var a in o)
- if (o.hasOwnProperty(a)) {
- var i = t("#import-" + a).prop("checked");
- if (!i) continue;
- e.localStorage.setItem(a, JSON.stringify(o[a]))
- }
- e.location.reload()
- }
- },
- restoreSettings: function() {
- null !== e.localStorage.getItem("ogarioSettings") && (e.localStorage.removeItem("ogarioSettings"), e.location.reload())
- },
- loadProfiles: function() {
- if (null !== e.localStorage.getItem("ogarioPlayerProfiles")) S = JSON.parse(e.localStorage.getItem("ogarioPlayerProfiles"));
- else
- for (var o = 0; 10 > o; o++) S.push({
- nick: "Profile #" + (o + 1),
- clanTag: "",
- skinURL: "",
- color: C.mainColor
- });
- 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
- },
- changeSkinPreview: function(e, o) {
- 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)))
- },
- setSkinPreview: function(e, o) {
- if (t("#" + o).empty().addClass("default"), e && 0 != e.length) {
- var a = this,
- i = new Image;
- i.crossOrigin = "Anonymous", i.onload = function() {
- a.changeSkinPreview(i, o)
- }, i.src = e
- }
- },
- setProfile: function() {
- var e = (S.length + this.selectedProfile - 1) % S.length,
- o = (this.selectedProfile + 1) % S.length;
- 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")
- },
- prevProfile: function() {
- this.setPlayerSettings(), this.selectedProfile = (S.length + this.selectedProfile - 1) % S.length, this.setProfile()
- },
- nextProfile: function() {
- this.setPlayerSettings(), this.selectedProfile = (this.selectedProfile + 1) % S.length, this.setProfile()
- },
- selectProfile: function(e) {
- this.setPlayerSettings(), this.selectedProfile = parseInt(e), this.setProfile()
- },
- addOption: function(e, o, a, i) {
- t(e).append('<label><input type="checkbox" id="' + o + '" class="js-switch"> ' + a + "</label>"), t("#" + o).prop("checked", i)
- },
- addOptions: function(e, o) {
- if (e) {
- t("#og-options").append('<div class="options-box ' + o + '"><h5 class="menu-main-color">' + u[d][o] + "</h5></div>");
- for (var a = 0; a < e.length; a++) {
- var i = e[a];
- 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]))
- }
- }
- },
- setLang: function() {
- if ("pl" === d && e.i18n_dict && e.i18n_dict.en)
- 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])
- },
- setMenu: function() {
- var a = this;
- 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({
- "z-index": "1",
- opacity: "0",
- bottom: "-100px"
- }), 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() {
- var e = t(this),
- i = e.attr("id");
- void 0 !== a[i] && (a[i] = e.is(":checked"), "noSkins" === i && (o.showCustomSkins = !a.noSkins))
- }), 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() {
- var e = parseFloat(t(this).val());
- t("#zoomSpeed-value").text(e), v.zoomSpeedValue = e, o.zoomSpeedValue = e, a.saveSettings(v, "ogarioSettings")
- }), 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) {
- e.preventDefault();
- var o = t(this);
- a.switchMenuTabs(o, "menu-panel")
- }), t(".submenu-tabs a").on("click", function(e) {
- e.preventDefault();
- var o = t(this);
- a.switchMenuTabs(o, "submenu-panel")
- }), t(".quick-menu").on("click", function(e) {
- e.preventDefault(), v.showQuickMenu = !v.showQuickMenu, a.saveSettings(v, "ogarioSettings"), a.setShowQuickMenu()
- }), t(".quick-skins").on("click", function(e) {
- e.preventDefault(), v.showSkinsPanel = !v.showSkinsPanel, a.saveSettings(v, "ogarioSettings"), a.setShowSkinsPanel()
- }), t("#gamemode").on("change", function() {
- a.gameMode = o.gameMode = this.value, ":party" !== this.value && a.isSocketOpen() && (a.socket.close(), t(".partyToken").val("")), a.setTop5(), a.setTargetingHUD(), a.setShowChatBox()
- }), t("#cancel-party-btn").on("click", function() {
- a.gameMode = o.gameMode = "", a.socket.close(), t(".partyToken").val("")
- });
- 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");
- t("#skin").on("input", function() {
- var e = t(this).val();
- a.setSkinPreview(e, "skin-preview"), a.setSkinPreview(e, "profile-" + a.selectedProfile)
- }), t("#prev-profile").on("click", function() {
- a.prevProfile()
- }), t("#next-profile").on("click", function() {
- a.nextProfile()
- }), t("#skins a").on("click", function(e) {
- e.preventDefault();
- var o = t(this).attr("data-profile");
- a.selectProfile(o)
- }), t("#stream-mode").on("click", function() {
- v.streamMode = !v.streamMode, a.saveSettings(v, "ogarioSettings"), a.setStreamMode()
- }), t("#hide-url").on("click", function() {
- v.hideSkinUrl = !v.hideSkinUrl, a.saveSettings(v, "ogarioSettings"), a.setHideSkinUrl()
- }), t("#set-targeting").on("click", function(e) {
- e.preventDefault(), a.setTargeting()
- }), t("#cancel-targeting").on("click", function(e) {
- e.preventDefault(), a.cancelTargeting()
- }), t("#set-private-minimap").on("click", function(e) {
- e.preventDefault(), a.setPrivateMiniMap()
- }), t("#change-target").on("click", function(e) {
- e.preventDefault(), a.changeTarget()
- }), t("#og-settings .restore-settings a").on("click", function(e) {
- e.preventDefault(), a.restoreSettings()
- }), t("#og-settings .btn-export").on("click", function(e) {
- e.preventDefault(), a.exportSettings(), t("#exp-imp").fadeIn(500), t("#exp-imp-settings, #export-settings").perfectScrollbar("update")
- }), t("#close-exp-imp").on("click", function(e) {
- e.preventDefault(), t("#exp-imp").fadeOut(500)
- }), t("#export-settings").on("focus", function() {
- t(this).select()
- }), t("#export-settings-btn").on("click", function(e) {
- e.preventDefault(), a.exportSettings()
- }), t("#import-settings-btn").on("click", function(e) {
- e.preventDefault(), a.importSettings()
- }), t("#unblock-popups").on("click", function(e) {
- e.preventDefault(), a.unblockPopups()
- }), t("#openfl-overlay.disabler").on("click", function() {
- v.blockPopups && a.blockPopups()
- }), t("#openfl-content").on("click", function() {
- if (v.blockPopups) {
- var e = t(this);
- setTimeout(function() {
- e.is(":visible") || a.blockPopups()
- }, 1e3)
- }
- }), t(".quick-shop").on("click", function(o) {
- o.preventDefault(), a.unblockPopups(), e.MC && e.MC.openShop()
- }), t(".quick-free-coins").on("click", function(o) {
- o.preventDefault(), a.unblockPopups(), e.MC && e.MC.showFreeCoins()
- }), t(".quick-free-gifts").on("click", function(o) {
- o.preventDefault(), a.unblockPopups(), e.MC && e.MC.showGifting()
- }), 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() {
- return !1
- }), t('[data-toggle="tab-tooltip"]').tooltip(), t(".btn").mouseup(function() {
- $(this).blur()
- }), t(".submenu-panel, #chat-box, #exp-imp-settings, #export-settings, #import-settings").perfectScrollbar({
- suppressScrollX: !0
- });
- var s = Array.prototype.slice.call(document.querySelectorAll(".js-switch"));
- s.forEach(function(e) {
- new Switchery(e, {
- color: C.menuMainColor,
- size: "small"
- })
- }), t('input[type="range"]').rangeslider({
- polyfill: !1
- }), toastr.options = {
- newestOnTop: !1,
- positionClass: "toast-bottom-left",
- timeOut: "15000"
- }
- },
- switchMenuTabs: function(e, o) {
- var a = e.parent();
- if ("menu-panel" === o) {
- if (e.hasClass("hotkeys-link")) return void showHotkeys();
- a.hasClass("profile-tab") && this.setBlockPopups()
- }
- e.addClass("active"), a.addClass("active"), a.siblings().removeClass("active"), a.siblings().find("a").removeClass("active");
- var i = e.attr("href");
- if ("submenu-panel" === o) {
- var s = t(i).parent().attr("id");
- t("#" + s + " .submenu-panel").not(i).css("display", "none")
- } else t(".menu-panel").not(i).css("display", "none");
- t(i).fadeIn(1e3), l(), t(".submenu-panel").perfectScrollbar("update")
- },
- getDefaultSettings: function() {
- 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;
- var a = this;
- if (t("#quality").on("change", function() {
- var e = t(this).val();
- a.getQuality(e), l()
- }), null !== e.localStorage.getItem("scale_setting")) {
- var i = JSON.parse(e.localStorage.getItem("scale_setting"));
- this.setCanvasScale(i)
- } else {
- var s = t("#quality").val();
- this.getQuality(s)
- }
- if (null !== e.localStorage.getItem("location")) {
- var n = e.localStorage.getItem("location");
- t("#region").val(n), e.MC && e.MC.setRegion && e.MC.setRegion(n)
- }
- this.setParty(), ":party" === M.gameMode && e.location.hash && t("#join-party-btn").click();
- var r = Array.prototype.slice.call(document.querySelectorAll(".js-switch-vanilla"));
- r.forEach(function(e) {
- new Switchery(e, {
- color: C.menuMainColor,
- size: "small"
- })
- }), this.setAutoResp()
- },
- getQuality: function(o) {
- var t = "devicePixelRatio" in e,
- a = 1;
- switch (t && (a = e.devicePixelRatio), o) {
- case "High":
- this.setCanvasScale(1);
- break;
- case "Medium":
- this.setCanvasScale(.9);
- break;
- case "Low":
- this.setCanvasScale(.75);
- break;
- case "VeryLow":
- this.setCanvasScale(.5);
- break;
- default:
- this.setCanvasScale(a)
- }
- },
- setCanvasScale: function(e) {
- this.canvasScale = e, o.canvasScale = e
- },
- setParty: function() {
- if (this.gameMode = t("#gamemode").val(), this.setTop5(), this.setTargetingHUD(), this.setShowChatBox(), ":party" === this.gameMode) {
- var e = t(".partyToken").val();
- e && e.length > 5 && (e = e.split("#"), this.partyToken !== e[1] && (this.partyToken = e[1], this.flushSkinsMap(), this.setTargetStatus(0)))
- }
- },
- setStreamMode: function() {
- 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"))
- },
- setHideSkinUrl: function() {
- 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"))
- },
- setShowQuickMenu: function() {
- v.showQuickMenu ? t("#quick-menu").fadeIn(500) : t("#quick-menu").fadeOut(500)
- },
- setShowSkinsPanel: function() {
- v.showSkinsPanel ? t("#skins-panel").fadeIn(500) : t("#skins-panel").fadeOut(500)
- },
- setButtons: function() {
- var e = this,
- o = document.getElementsByClassName("btn-play")[0],
- a = document.getElementsByClassName("btn-play-guest")[0],
- i = document.getElementsByClassName("btn-spectate")[0],
- s = document.getElementById("create-party-btn"),
- n = document.getElementById("join-party-btn"),
- r = document.getElementById("statsContinue2");
- o.addEventListener("click", function() {
- e.onPlay()
- }, !1), a.addEventListener("click", function() {
- e.onPlay()
- }, !1), i.addEventListener("click", function() {
- e.onSpectate()
- }, !1), s.addEventListener("click", function() {
- e.onCreate()
- }, !1), n.addEventListener("click", function() {
- e.onJoin()
- }, !1), r.addEventListener("click", function() {
- t("#stats, #main-panel").toggle()
- }, !1)
- },
- play: function() {
- if (this.setPlayerSettings(), ":party" === this.gameMode)
- if (this.setParty(), this.isSocketOpen()) this.sendPlayerClanTag(), this.sendPartyToken(), this.sendPlayerNick();
- else {
- this.connect();
- var e = this;
- setTimeout(function() {
- e.sendPlayerClanTag(), e.sendPartyToken(), e.sendPlayerNick()
- }, 1e3)
- }
- },
- onPlay: function() {
- 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")
- },
- onSpectate: function() {
- ":party" === this.gameMode ? this.onJoin() : this.setPlayerSettings(), t(".ogario-menu").hide(), e.addKeyListeners(), o.play = !1, o.spectate = !0, v.autoHideFood && (o.showFood = !1)
- },
- join: function() {
- this.setParty(), this.setPlayerSettings(), this.sendPlayerClanTag(), this.sendPartyToken(), this.sendPlayerNick(), this.sendPlayerDeath(), this.sendPlayerJoin()
- },
- onJoin: function() {
- if (this.setParty(), this.isSocketOpen()) this.join();
- else {
- this.connect();
- var e = this;
- setTimeout(function() {
- e.join()
- }, 1e3)
- }
- },
- create: function() {
- if (this.setParty(), "" !== this.partyToken) return void this.onJoin();
- var e = this;
- setTimeout(function() {
- e.create()
- }, 100)
- },
- onCreate: function() {
- this.flushData(), t("#joinPartyToken").val(""), this.partyToken = "", this.create()
- },
- onPlayerSpawn: function() {
- if (o.play = !0, o.playerColor) return this.sendPlayerSpawn(), void this.cacheCustomSkin(w.nick + o.playerColor, w.skinURL);
- var e = this;
- setTimeout(function() {
- e.onPlayerSpawn()
- }, 100)
- },
- onPlayerDeath: function() {
- 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()
- },
- setPlayerSettings: function() {
- var e = t("#nick").val(),
- a = t("#clantag").val(),
- i = t("#skin").val(),
- s = t("#color").val();
- 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")
- },
- cacheSkin: function(e, o) {
- o && (e[o] = new Image, e[o].crossOrigin = "Anonymous", e[o].src = o)
- },
- getCachedSkin: function(e, o) {
- return e[o] && e[o].complete && e[o].width && e[o].height && e[o].width <= 2e3 && e[o].height <= 2e3 ? e[o] : null
- },
- cacheCustomSkin: function(e, o) {
- if (o) {
- if (e && (this.customSkinsMap[e] = o), this.customSkinsCache.hasOwnProperty(o)) return;
- this.cacheSkin(this.customSkinsCache, o)
- }
- },
- getCustomSkin: function(e, o) {
- return this.customSkinsMap.hasOwnProperty(e + o) ? this.getCachedSkin(this.customSkinsCache, this.customSkinsMap[e + o]) : null
- },
- countFPS: function() {
- if (v.showStatsFPS) {
- if (!this.fpsLastRequest) return void(this.fpsLastRequest = Date.now());
- var e = Date.now(),
- o = e - this.fpsLastRequest;
- 1e3 > o || (this.rFps = this.renderedFrames, this.renderedFrames = 0, this.fpsLastRequest = e), this.renderedFrames++
- }
- },
- calculateCurrentSector: function() {
- if (!o.mapOffsetFixed) return void(this.currentSector = "");
- var e = o.mapOffsetX + o.mapOffset,
- t = o.mapOffsetY + o.mapOffset,
- a = String.fromCharCode(65 + Math.floor((o.playerY + t) / (o.mapSize / C.sectorsY))),
- i = "" + (Math.floor((o.playerX + e) / (o.mapSize / C.sectorsX)) + 1);
- this.currentSector = a + i
- },
- calculateTargetSector: function(e, t) {
- if (!o.mapOffsetFixed) return "";
- var a = String.fromCharCode(65 + Math.floor((t + o.mapOffset) / (o.mapSize / C.sectorsY))),
- i = "" + (Math.floor((e + o.mapOffset) / (o.mapSize / C.sectorsX)) + 1);
- return a + i
- },
- updateDeathLocations: function(e, t) {
- o.mapOffsetFixed && (this.deathLocations.push({
- x: e + o.mapOffsetX,
- y: t + o.mapOffsetY
- }), 6 == this.deathLocations.length && this.deathLocations.splice(0, 1), this.lastDeath = this.deathLocations.length - 1)
- },
- drawMapBorders: function(e, t, a, i, s, n, r, l) {
- !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())
- },
- drawMiniMap: function() {
- if (o.mapOffsetFixed) {
- var e = C.miniMapWidth,
- t = C.miniMapTop,
- a = e + t,
- i = e - 18,
- s = t + 9.5;
- 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);
- var n = i / o.mapSize,
- r = o.mapOffsetX + o.mapOffset,
- l = o.mapOffsetY + o.mapOffset;
- 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) {
- var c = Math.round((o.playerX + r) * n),
- p = Math.round((o.playerY + l) * n);
- 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()
- }
- 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)
- for (var h = 0; h < this.teamPlayers.length; h++) this.teamPlayers[h].drawPosition(this.miniMapCtx, o.mapOffset, n, this.privateMiniMap, this.targetID);
- if (this.deathLocations.length > 0) {
- var c = Math.round((this.deathLocations[this.lastDeath].x + o.mapOffset) * n),
- p = Math.round((this.deathLocations[this.lastDeath].y + o.mapOffset) * n),
- d = Math.max(C.miniMapMyCellSize - 2, 4);
- 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()
- }
- this.miniMapCtx.restore()
- }
- },
- drawMiniMapSectors: function(e, o, t, a, i) {
- this.miniMapSectors = document.getElementById("minimap-sectors");
- var s = this.miniMapSectors.getContext("2d");
- 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)
- },
- resetMiniMapSectors: function() {
- this.miniMapSectors = null
- },
- drawSectors: function(e, t, a, i, s, n, r, l, c, p) {
- if (!p || o.mapOffsetFixed && v.showBgSectors) {
- var h = Math.floor((n - i) / t),
- d = Math.floor((r - s) / a),
- m = 0,
- u = 0;
- if (e.strokeStyle = l, e.fillStyle = l, e.lineWidth = c, p || !p && v.showMiniMapGrid) {
- e.beginPath();
- 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);
- 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);
- e.stroke()
- } else this.drawMapBorders(e, i, s, n, r, l, c, !1);
- if (p) var f = C.sectorsFontWeight + " " + C.sectorsFontSize + "px " + C.sectorsFontFamily;
- else var f = C.miniMapFontWeight + " " + Math.floor(.4 * d) + "px " + C.miniMapFontFamily;
- e.font = f, e.textAlign = "center", e.textBaseline = "middle";
- for (var g = 0; a > g; g++)
- for (var k = 0; t > k; k++) {
- var y = String.fromCharCode(65 + g) + (k + 1);
- m = Math.floor(i + h / 2 + k * h), u = Math.floor(s + d / 2 + g * d), e.fillText(y, m, u)
- }
- }
- },
- drawGrid: function(e) {
- if (v.showGrid) {
- var t = o.innerW / o.viewScale,
- a = o.innerH / o.viewScale,
- i = (-o.playerX + t / 2) % 50,
- s = (-o.playerY + a / 2) % 50;
- 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);
- for (; a > s; s += 50) e.moveTo(0, s * o.viewScale - .5), e.lineTo(t * o.viewScale, s * o.viewScale - .5);
- e.stroke(), e.globalAlpha = 1
- }
- },
- drawSelectedCell: function(e) {
- 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())
- },
- dTok: function(e, o) {
- e.font = C.miniMapFontWeight + " " + (C.miniMapTop - 6) + "px " + C.miniMapFontFamily, e.textAlign = "right", e.textBaseline = "top", e.fillText(atob(this.token), o, 7)
- },
- drawCircle: function(e, o, t, a, i, s) {
- e.lineWidth = a, e.globalAlpha = i, e.strokeStyle = s;
- 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();
- e.globalAlpha = 1
- },
- preDrawIndicator: function() {
- o.indicator = document.createElement("canvas");
- var e = o.indicator.getContext("2d");
- 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()
- },
- setVirusColor: function(e) {
- var o = Math.floor(e * e / 100);
- return o > 183 ? "#C80000" : C.virusColor
- },
- setVirusStrokeColor: function(e) {
- if (o.play && 0 != o.playerMaxMass) {
- var t = Math.floor(e * e / 100),
- a = t / (this.selectBiggestCell ? o.playerMaxMass : o.playerMinMass);
- return a > .76 ? "#FFDC00" : "#C80000"
- }
- return C.virusStrokeColor
- },
- setOppColor: function(e, t) {
- if (t) return w.color;
- var a = Math.floor(e * e / 100),
- i = this.selectBiggestCell ? o.playerMaxMass : o.playerMinMass,
- s = a / i;
- if (s && s > 0) {
- var n = 1e3 > i ? .35 : .38;
- return s > 11 ? "#FF008C" : 2.5 > s ? 1.25 > s ? 1.25 > s && s > .75 ? "#FFDC00" : s > n ? "#00C8FF" : "#64FF00" : "#FF0A00" : "#BE00FF"
- }
- },
- connect: function() {
- if (this.closeConnection(), this.flushData(), this.setParty(), ":party" === this.gameMode && this.partyToken.length <= 5) {
- 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";
- var e = this;
- this.socket.onopen = function() {
- console.log("OGARio by szymy: Socket open");
- var o = e.createView(3);
- o.setUint8(0, 0), o.setUint16(1, 300, !0), e.sendBuffer(o), e.sendPlayerClanTag(), e.sendPartyToken()
- }, this.socket.onmessage = function(o) {
- e.handleMessage(o)
- }, this.socket.onclose = function() {
- e.flushData(), console.log("OGARio by szymy: Socket close")
- }, this.socket.onerror = function() {
- e.flushData(), console.log("OGARio by szymy: Socket error")
- }
- }
- },
- closeConnection: function() {
- if (this.socket) {
- this.socket.onmessage = null;
- try {
- this.socket.close()
- } catch (e) {}
- this.socket = null
- }
- },
- flushData: function() {
- this.teamPlayers = [], this.parties = [], this.lastSentNick = "", this.lastSentClanTag = null, this.lastSentSkinURL = "", this.lastSentCustomColor = "", this.lastSentPartyToken = "", this.flushSkinsMap(), o.play = !1, o.playerColor = null
- },
- flushSkinsMap: function() {
- this.customSkinsMap = {}
- },
- reConnect: function() {
- this.flushData(), this.setParty();
- var e = this;
- setTimeout(function() {
- e.connect()
- }, 1e3)
- },
- switchServerMode: function() {
- 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())
- },
- isSocketOpen: function() {
- return null != this.socket && this.socket.readyState == this.socket.OPEN
- },
- createView: function(e) {
- return new DataView(new ArrayBuffer(e))
- },
- strToBuff: function(e, o) {
- var t = this.createView(1 + 2 * o.length);
- t.setUint8(0, e);
- for (var a = 0; a < o.length; a++) t.setUint16(1 + 2 * a, o.charCodeAt(a), !0);
- return t
- },
- sendBuffer: function(e) {
- this.socket.send(e.buffer)
- },
- handleMessage: function(e) {
- this.readMessage(new DataView(e.data))
- },
- readMessage: function(e) {
- switch (e.getUint8(0)) {
- case 0:
- this.playerID = e.getUint32(1, !0);
- break;
- case 1:
- this.sendPlayerUpdate();
- break;
- case 20:
- this.updateTeamPlayer(e);
- break;
- case 30:
- this.updateTeamPlayerPosition(e);
- break;
- case 96:
- this.updateParties(e), this.displayParties();
- break;
- case 100:
- this.readChatMessage(e)
- }
- },
- sendPlayerState: function(e) {
- if (this.isSocketOpen()) {
- var o = this.createView(1);
- o.setUint8(0, e), this.sendBuffer(o)
- }
- },
- sendPlayerSpawn: function() {
- this.sendPlayerState(1)
- },
- sendPlayerDeath: function() {
- this.sendPlayerState(2)
- },
- sendPlayerJoin: function() {
- this.sendPlayerState(3)
- },
- sendPlayerData: function(e, o, t) {
- (null === this[o] || this[o] !== t) && this.isSocketOpen() && (this.sendBuffer(this.strToBuff(e, t)), this[o] = t)
- },
- sendPlayerNick: function() {
- this.sendPlayerData(10, "lastSentNick", w.nick)
- },
- sendPlayerClanTag: function() {
- this.sendPlayerData(11, "lastSentClanTag", w.clanTag)
- },
- sendPlayerSkinURL: function() {
- this.sendPlayerData(12, "lastSentSkinURL", w.skinURL)
- },
- sendPlayerCustomColor: function() {
- this.sendPlayerData(13, "lastSentCustomColor", w.color)
- },
- sendPlayerColor: function() {
- this.isSocketOpen() && o.playerColor && this.sendBuffer(this.strToBuff(14, o.playerColor))
- },
- sendPartyToken: function() {
- this.setParty(), this.sendPlayerData(15, "lastSentPartyToken", this.partyToken)
- },
- sendPlayerUpdate: function() {
- function e(e) {
- for (var o = 0; o < e.length; o++) a.setUint16(i, e.charCodeAt(o), !0), i += 2;
- a.setUint16(i, 0, !0), i += 2
- }
- if (this.isSocketOpen() && this.playerID && o.play && o.playerColor) {
- var t = 41;
- t += 2 * w.nick.length, t += 2 * w.skinURL.length;
- var a = this.createView(t);
- a.setUint8(0, 20), a.setUint32(1, this.playerID, !0);
- var i = 5;
- e(w.nick), e(w.skinURL), e(w.color), e(o.playerColor), this.sendBuffer(a)
- }
- },
- sendPlayerPosition: function() {
- if (this.isSocketOpen() && o.play && this.playerID) {
- var e = this.createView(17);
- 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)
- }
- },
- checkPlayerID: function(e) {
- if (e)
- for (var o = 0; o < this.teamPlayers.length; o++)
- if (this.teamPlayers[o].id == e) return o;
- return null
- },
- updateTeamPlayer: function(e) {
- function o() {
- for (var o = "";;) {
- var t = e.getUint16(a, !0);
- if (0 == t) break;
- o += String.fromCharCode(t), a += 2
- }
- return a += 2, o
- }
- var t = e.getUint32(1, !0),
- a = 5,
- s = o(),
- n = this.checkSkinURL(o()),
- r = o(),
- l = o(),
- c = this.checkPlayerID(t);
- if (null !== c) this.teamPlayers[c].nick = s, this.teamPlayers[c].skinID = s + l, this.teamPlayers[c].skinURL = n, this.teamPlayers[c].color = r;
- else {
- var p = new i(t, s, s + l, n, r);
- this.teamPlayers.push(p)
- }
- this.cacheCustomSkin(s + l, n)
- },
- updateTeamPlayerPosition: function(e) {
- var o = e.getUint32(1, !0),
- t = this.checkPlayerID(o);
- if (null !== t) {
- var a = e.getInt32(5, !0),
- i = e.getInt32(9, !0),
- s = e.getUint32(13, !0);
- if (s > 36e4) return;
- var n = this.teamPlayers[t];
- 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)
- }
- },
- updateTeamPlayers: function() {
- if (":party" === this.gameMode) {
- this.sendPlayerPosition(), this.top5 = [];
- for (var e = 0; e < this.teamPlayers.length; e++) {
- var o = this.teamPlayers[e];
- (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({
- id: o.id,
- nick: o.nick,
- mass: o.mass
- })
- }
- this.top5.sort(function(e, o) {
- return o.mass - e.mass
- }), this.displayTop5()
- }
- },
- updateParties: function(e) {
- this.parties = [];
- for (var o = e.getUint8(1), t = 2, a = 0; o > a; a++) {
- for (var i = "";;) {
- var s = e.getUint16(t, !0);
- if (0 == s) break;
- i += String.fromCharCode(s), t += 2
- }
- t += 2, this.parties.push(i)
- }
- },
- parseMessage: function(e) {
- var o = /\[img\](https?:\/\/i\.(?:imgur|hizliresim)\.com\/\w{6,8}\.(?:jpg|jpeg|png|gif)\??\d*)\[\/img\]/i,
- t = /\[yt\]([\w-]{11})\[\/yt\]/i;
- if (o.test(e)) {
- if (v.showChatImages) {
- var a = e.match(o);
- return '<img src="' + a[1] + '" style="width:100%;border:none;">'
- }
- return ""
- }
- if (t.test(e)) {
- if (v.showChatVideos) {
- var i = e.match(t);
- return '<iframe type="text/html" width="100%" height="auto" src="http://www.youtube.com/embed/' + i[1] + '?autoplay=1&vq=tiny" frameborder="0" />'
- }
- return ""
- }
- var e = this.escapeHTML(e);
- return e
- },
- readChatMessage: function(e) {
- if (!v.disableChat) {
- for (var o = (new Date).toTimeString().replace(/^(\d{2}:\d{2}).*/, "$1"), a = e.getUint8(1), i = "", s = 10; s < e.byteLength; s += 2) {
- var n = e.getUint16(s, !0);
- if (0 == n) break;
- i += String.fromCharCode(n)
- }
- var r = i.split(": ", 1),
- l = i.replace(r + ": ", "");
- 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({
- scrollTop: t("#chat-box").prop("scrollHeight")
- }, 500)) : (v.hideChat || toastr.success('<span class="message-nick">' + r + ': </span><span class="message-text">' + l + "</span>"), this.chatHistory.push({
- nick: r,
- message: l
- }), 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({
- scrollTop: t("#chat-box").prop("scrollHeight")
- }, 500)) : v.hideChat || toastr.warning('<span class="command-nick">' + r + ': </span><span class="command-text">' + l + "</span>") : t("#messages").append(i))
- }
- },
- sendChatMessage: function(e, o) {
- if (Date.now() - this.lastMessageSentTime >= 500 && 0 != o.length && 0 != w.nick.length && this.isSocketOpen()) {
- var o = w.nick + ": " + o,
- t = this.createView(10 + 2 * o.length);
- t.setUint8(0, 100), t.setUint8(1, e), t.setUint32(2, this.playerID, !0), t.setUint32(6, this.targetID, !0);
- for (var a = 0; a < o.length; a++) t.setUint16(10 + 2 * a, o.charCodeAt(a), !0);
- this.sendBuffer(t), this.lastMessageSentTime = Date.now()
- }
- },
- prepareCommand: function(e) {
- var o = e.replace("%currentSector%", this.currentSector);
- return o
- },
- sendCommand: function(e) {
- var o = this.prepareCommand(g["comm" + e]);
- this.sendChatMessage(102, o)
- },
- setTargeting: function() {
- this.targetID && (this.targeting = !this.targeting, o.targeting = this.targeting, this.setTargetingInfo())
- },
- setTargetingInfo: function() {
- 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())
- },
- cancelTargeting: function() {
- this.setTargetStatus(0)
- },
- setPrivateMiniMap: function() {
- this.targetID && (this.privateMiniMap = !this.privateMiniMap, this.privateMiniMap ? t("#set-private-minimap").addClass("active") : t("#set-private-minimap").removeClass("active"))
- },
- setTarget: function(e) {
- var o = this.checkPlayerID(e);
- if (null !== o) {
- var t = this.teamPlayers[o];
- if (this.targetID = t.id, this.updateTarget(t.nick, t.skinURL, t.x, t.y, t.mass), !t.alive) return void this.setTargetStatus(2);
- this.setTargetStatus(1)
- } else this.setTargetStatus(0)
- },
- setTargetStatus: function(e) {
- switch (e) {
- case 0:
- 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");
- break;
- case 1:
- this.targetStatus = 1, this.targeting || (this.targeting = !0, o.targeting = !0, this.setTargetingInfo()), t("#target-skin, #target-nick, #target-status, #target-summary").show();
- break;
- case 2:
- this.targetStatus = 2, t("#target-summary").hide(), t("#target-status").show().text("[" + u[d].targetDead + "]"), o.resetTargetPosition()
- }
- },
- changeTarget: function() {
- for (var e = this.checkPlayerID(this.targetID), o = null, t = 0; t < this.teamPlayers.length; t++)
- if (this.teamPlayers[t].alive) {
- if (null === e) {
- e = t;
- break
- }
- if (e > t && null === o) o = t;
- else if (t > e) {
- o = t;
- break
- }
- }
- null !== o && (e = o), null !== e ? this.setTarget(this.teamPlayers[e].id) : this.setTargetStatus(0)
- },
- updateTarget: function(e, a, i, s, n) {
- 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 + "]");
- var r = this.calculateTargetSector(i, s),
- l = u[d].targetDistance + ': <span class="hud-main-color">' + o.targetDistance + " [" + r + "]</span>";
- 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)
- },
- init: function() {
- 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();
- var e = this;
- setInterval(function() {
- e.drawMiniMap()
- }, 33), setInterval(function() {
- e.updateTeamPlayers()
- }, this.updateInterval)
- }
- };
- var M = new s;
- M.init(), n(), r(), e.addEventListener("resize", function() {
- setTimeout(l, 50)
- }, !1), e.onbeforeunload = c, e.setSettings = function(e, a) {
- if (v.hasOwnProperty(e) && null !== a) {
- switch (v[e] = a, o.hasOwnProperty(e) && (o[e] = a), e) {
- case "autoResp":
- M.setAutoResp();
- break;
- case "showMiniMap":
- M.setMiniMap();
- break;
- case "showMiniMapGrid":
- M.resetMiniMapSectors();
- break;
- case "disableChat":
- M.setDisableChat();
- break;
- case "showChatBox":
- M.setShowChatBox();
- break;
- case "showTop5":
- M.setTop5();
- break;
- case "showTargeting":
- M.setTargetingHUD();
- break;
- case "showTime":
- M.displayTime(), t("#time-hud").show();
- break;
- case "centeredLb":
- M.setCenteredLb();
- break;
- case "normalLb":
- M.setNormalLb();
- break;
- case "fpsAtTop":
- M.setFpsAtTop();
- break;
- case "showStats":
- M.displayStats(), t("#stats-hud").show();
- break;
- case "blockPopups":
- M.setBlockPopups()
- }
- M.saveSettings(v, "ogarioSettings")
- }
- }, e.setTarget = function(e) {
- M.setTarget(e)
- }, o.displayLeaderboard = function() {
- M.displayLeaderboard(o.leaderboardHTML)
- }, o.customDraw = function(e) {
- if (e) {
- M.countFPS();
- var t = Math.floor(o.mapMinX - o.mapOffsetX),
- a = Math.floor(o.mapMinY - o.mapOffsetY),
- i = Math.floor(o.mapMaxX - o.mapOffsetX),
- s = Math.floor(o.mapMaxY - o.mapOffsetY),
- n = C.bordersWidth / 2;
- 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) {
- e.beginPath();
- for (var r = 0; r < o.virusesCache.length; r++) {
- var l = o.virusesCache[r].x,
- c = o.virusesCache[r].y;
- e.moveTo(l, c), e.arc(l, c, o.virusesCache[r].size + 820, 0, M.pi2, !1)
- }
- e.fillStyle = C.virusColor, e.globalAlpha = .1, e.fill(), e.globalAlpha = 1, o.virusesCache = []
- }
- if (o.foodCache && o.foodCache.length > 0) {
- e.beginPath();
- for (var r = 0; r < o.foodCache.length; r++) {
- var l = o.foodCache[r].x,
- c = o.foodCache[r].y;
- if (e.moveTo(l, c), o.viewScale < .16) {
- var p = o.foodCache[r].size + C.foodSize;
- e.rect(l - p, c - p, 2 * p, 2 * p)
- } else e.arc(l, c, o.foodCache[r].size + C.foodSize, 0, M.pi2, !1)
- }
- e.fillStyle = C.foodColor, e.globalAlpha = 1, e.fill(), o.foodCache = []
- }
- if (o.play) {
- if (v.splitRange) {
- if (o.playerCells && o.playerCells.length > 0) {
- o.playerCells.sort(function(e, o) {
- return o.size - e.size
- });
- var h = M.selectBiggestCell ? 0 : o.playerCells.length - 1;
- 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()
- }
- e.globalAlpha = 1, M.drawCircle(e, o.biggerSTECellsCache, 760, 4, .4, "#BE00FF")
- }
- if (v.oppRings) {
- var d = 14 + 2 / o.viewScale,
- m = 12 + 1 / o.viewScale;
- 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")
- }
- if (v.cursorTracking && o.setCursorPosition) {
- o.setCursorPosition(), e.lineWidth = 4, e.globalAlpha = C.darkTheme ? .75 : .35, e.strokeStyle = C.cursorTrackingColor, e.beginPath();
- 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);
- e.stroke(), e.globalAlpha = 1
- }
- }
- o.playerCells = [], (v.splitRange || v.oppRings) && (o.biggerSTECellsCache = [], o.biggerCellsCache = [], o.smallerCellsCache = [], o.STECellsCache = [])
- }
- }, o.drawGrid = function(e) {
- M.drawGrid(e)
- }, o.getCustomSkin = function(e, o) {
- return M.getCustomSkin(e, o)
- }, o.setVirusColor = function(e) {
- return M.setVirusColor(e)
- }, o.setVirusStrokeColor = function(e) {
- return M.setVirusStrokeColor(e)
- }, o.setOppColor = function(e, o) {
- return M.setOppColor(e, o)
- };
- var T = {},
- x = {},
- z = {
- "hk-feed": {
- label: u[d]["hk-feed"],
- defaultKey: "W",
- keyDown: function() {
- M && M.feed()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-macroFeed": {
- label: u[d]["hk-macroFeed"],
- defaultKey: "E",
- keyDown: function() {
- M && M.macroFeed(!0)
- },
- keyUp: function() {
- M && M.macroFeed(!1)
- },
- type: "normal"
- },
- "hk-split": {
- label: u[d]["hk-split"],
- defaultKey: "SPACE",
- keyDown: function() {
- M && M.split()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-doubleSplit": {
- label: u[d]["hk-doubleSplit"],
- defaultKey: "Q",
- keyDown: function() {
- M && M.doubleSplit()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-popSplit": {
- label: "Popsplit",
- defaultKey: "ALT+Q",
- keyDown: function() {
- M && M.popSplit()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-split16": {
- label: u[d]["hk-split16"],
- defaultKey: "mousemove",
- keyDown: function() {
- M && M.split16()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-pause": {
- label: u[d]["hk-pause"],
- defaultKey: "R",
- keyDown: function() {
- M && M.setPause()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-showTop5": {
- label: u[d]["hk-showTop5"],
- defaultKey: "T",
- keyDown: function() {
- M && M.setShowTop5()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-showTime": {
- label: u[d]["hk-showTime"],
- defaultKey: "ALT+T",
- keyDown: function() {
- M && M.setShowTime()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-showSplitRange": {
- label: u[d]["hk-showSplitRange"],
- defaultKey: "U",
- keyDown: function() {
- M && M.setShowSplitRange()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-showSplitInd": {
- label: u[d]["hk-showSplitInd"],
- defaultKey: "I",
- keyDown: function() {
- M && M.setShowSplitInd()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-showTeammatesInd": {
- label: u[d]["hk-showTeammatesInd"],
- defaultKey: "ALT+I",
- keyDown: function() {
- M && M.setShowTeammatesInd()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-showOppColors": {
- label: u[d]["hk-showOppColors"],
- defaultKey: "O",
- keyDown: function() {
- M && M.setShowOppColors()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-toggleSkins": {
- label: u[d]["hk-toggleSkins"],
- defaultKey: "A",
- keyDown: function() {
- M && M.toggleSkins()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-showSkins": {
- label: u[d]["hk-showSkins"],
- defaultKey: "S",
- keyDown: function() {
- M && M.setShowSkins()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-showStats": {
- label: u[d]["hk-showStats"],
- defaultKey: "ALT+S",
- keyDown: function() {
- M && M.setShowStats()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-toggleCells": {
- label: u[d]["hk-toggleCells"],
- defaultKey: "D",
- keyDown: function() {
- M && M.toggleCells()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-showFood": {
- label: u[d]["hk-showFood"],
- defaultKey: "F",
- keyDown: function() {
- M && M.setShowFood()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-showGrid": {
- label: u[d]["hk-showGrid"],
- defaultKey: "G",
- keyDown: function() {
- M && M.setShowGrid()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-showMiniMapGuides": {
- label: u[d]["hk-showMiniMapGuides"],
- defaultKey: "ALT+G",
- keyDown: function() {
- M && M.setShowMiniMapGuides()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-hideChat": {
- label: u[d]["hk-hideChat"],
- defaultKey: "H",
- keyDown: function() {
- M && M.hideChat()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-showHUD": {
- label: u[d]["hk-showHUD"],
- defaultKey: "ALT+H",
- keyDown: function() {
- M && M.setShowHUD()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-copyLb": {
- label: u[d]["hk-copyLb"],
- defaultKey: "L",
- keyDown: function() {
- M && M.copyLb()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-showLb": {
- label: u[d]["hk-showLb"],
- defaultKey: "ALT+L",
- keyDown: function() {
- M && M.setShowLb()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-toggleAutoZoom": {
- label: u[d]["hk-toggleAutoZoom"],
- defaultKey: "",
- keyDown: function() {
- M && M.toggleAutoZoom()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-resetZoom": {
- label: u[d]["hk-resetZoom"],
- defaultKey: "Z",
- keyDown: function() {
- M && M.resetZoom(!0)
- },
- keyUp: function() {
- M && M.resetZoom(!1)
- },
- type: "normal"
- },
- "hk-toggleDeath": {
- label: u[d]["hk-toggleDeath"],
- defaultKey: "X",
- keyDown: function() {
- M && M.toggleDeath()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-clearChat": {
- label: u[d]["hk-clearChat"],
- defaultKey: "C",
- keyDown: function() {
- M && M.displayChatHistory(!0)
- },
- keyUp: function() {
- M && M.displayChatHistory(!1)
- },
- type: "normal"
- },
- "hk-showBgSectors": {
- label: u[d]["hk-showBgSectors"],
- defaultKey: "B",
- keyDown: function() {
- M && M.setShowBgSectors()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-hideBots": {
- label: u[d]["hk-hideBots"],
- defaultKey: "ALT+B",
- keyDown: function() {
- M && M.setHideSmallBots()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-showNames": {
- label: u[d]["hk-showNames"],
- defaultKey: "N",
- keyDown: function() {
- M && M.setShowNames()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-showMass": {
- label: u[d]["hk-showMass"],
- defaultKey: "M",
- keyDown: function() {
- M && M.setShowMass()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-showMiniMap": {
- label: u[d]["hk-showMiniMap"],
- defaultKey: "ALT+M",
- keyDown: function() {
- M && M.setShowMiniMap()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-chatMessage": {
- label: u[d]["hk-chatMessage"],
- defaultKey: "ENTER",
- keyDown: function() {
- M && M.enterChatMessage()
- },
- keyUp: null,
- type: "special"
- },
- "hk-quickResp": {
- label: u[d]["hk-quickResp"],
- defaultKey: "TILDE",
- keyDown: function() {
- M && M.quickResp()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-autoResp": {
- label: u[d]["hk-autoResp"],
- defaultKey: "",
- keyDown: function() {
- M && M.toggleAutoResp()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-zoom1": {
- label: u[d]["hk-zoomLevel"] + " 1",
- defaultKey: "ALT+1",
- keyDown: function() {
- M && M.setZoom(.5)
- },
- keyUp: null,
- type: "normal"
- },
- "hk-zoom2": {
- label: u[d]["hk-zoomLevel"] + " 2",
- defaultKey: "ALT+2",
- keyDown: function() {
- M && M.setZoom(.25)
- },
- keyUp: null,
- type: "normal"
- },
- "hk-zoom3": {
- label: u[d]["hk-zoomLevel"] + " 3",
- defaultKey: "ALT+3",
- keyDown: function() {
- M && M.setZoom(.125)
- },
- keyUp: null,
- type: "normal"
- },
- "hk-zoom4": {
- label: u[d]["hk-zoomLevel"] + " 4",
- defaultKey: "ALT+4",
- keyDown: function() {
- M && M.setZoom(.075)
- },
- keyUp: null,
- type: "normal"
- },
- "hk-zoom5": {
- label: u[d]["hk-zoomLevel"] + " 5",
- defaultKey: "ALT+5",
- keyDown: function() {
- M && M.setZoom(.05)
- },
- keyUp: null,
- type: "normal"
- },
- "hk-switchServerMode": {
- label: u[d]["hk-switchServerMode"],
- defaultKey: "=",
- keyDown: function() {
- M && M.switchServerMode()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-showTargeting": {
- label: u[d]["hk-showTargeting"],
- defaultKey: "",
- keyDown: function() {
- M && M.setShowTargeting()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-setTargeting": {
- label: u[d]["hk-setTargeting"],
- defaultKey: "",
- keyDown: function() {
- M && M.setTargeting()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-cancelTargeting": {
- label: u[d]["hk-cancelTargeting"],
- defaultKey: "",
- keyDown: function() {
- M && M.cancelTargeting()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-changeTarget": {
- label: u[d]["hk-changeTarget"],
- defaultKey: "",
- keyDown: function() {
- M && M.changeTarget()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-privateMiniMap": {
- label: u[d]["hk-privateMiniMap"],
- defaultKey: "",
- keyDown: function() {
- M && M.setPrivateMiniMap()
- },
- keyUp: null,
- type: "normal"
- },
- "hk-comm1": {
- label: g.comm1,
- defaultKey: "1",
- keyDown: function() {
- M && M.sendCommand(1)
- },
- keyUp: null,
- type: "command"
- },
- "hk-comm2": {
- label: g.comm2,
- defaultKey: "2",
- keyDown: function() {
- M && M.sendCommand(2)
- },
- keyUp: null,
- type: "command"
- },
- "hk-comm3": {
- label: g.comm3,
- defaultKey: "3",
- keyDown: function() {
- M && M.sendCommand(3)
- },
- keyUp: null,
- type: "command"
- },
- "hk-comm4": {
- label: g.comm4,
- defaultKey: "4",
- keyDown: function() {
- M && M.sendCommand(4)
- },
- keyUp: null,
- type: "command"
- },
- "hk-comm5": {
- label: g.comm5,
- defaultKey: "5",
- keyDown: function() {
- M && M.sendCommand(5)
- },
- keyUp: null,
- type: "command"
- },
- "hk-comm6": {
- label: g.comm6,
- defaultKey: "6",
- keyDown: function() {
- M && M.sendCommand(6)
- },
- keyUp: null,
- type: "command"
- },
- "hk-comm7": {
- label: g.comm7,
- defaultKey: "7",
- keyDown: function() {
- M && M.sendCommand(7)
- },
- keyUp: null,
- type: "command"
- },
- "hk-comm8": {
- label: g.comm8,
- defaultKey: "8",
- keyDown: function() {
- M && M.sendCommand(8)
- },
- keyUp: null,
- type: "command"
- },
- "hk-comm9": {
- label: g.comm9,
- defaultKey: "9",
- keyDown: function() {
- M && M.sendCommand(9)
- },
- keyUp: null,
- type: "command"
- },
- "hk-comm0": {
- label: g.comm0,
- defaultKey: "0",
- keyDown: function() {
- M && M.sendCommand(0)
- },
- keyUp: null,
- type: "command"
- },
- "hk-comm10": {
- label: g.comm10,
- defaultKey: "MOUSE WHEEL",
- keyDown: function() {
- M && M.sendCommand(10)
- },
- keyUp: null,
- type: "command"
- },
- "hk-comm11": {
- label: g.comm11,
- defaultKey: "LEFT",
- keyDown: function() {
- M && M.sendCommand(11)
- },
- keyUp: null,
- type: "command"
- },
- "hk-comm12": {
- label: g.comm12,
- defaultKey: "UP",
- keyDown: function() {
- M && M.sendCommand(12)
- },
- keyUp: null,
- type: "command"
- },
- "hk-comm13": {
- label: g.comm13,
- defaultKey: "RIGHT",
- keyDown: function() {
- M && M.sendCommand(13)
- },
- keyUp: null,
- type: "command"
- },
- "hk-comm14": {
- label: g.comm14,
- defaultKey: "DOWN",
- keyDown: function() {
- M && M.sendCommand(14)
- },
- keyUp: null,
- type: "command"
- }
- };
- p.prototype = {
- lastPressedKey: "",
- lastKeyId: "",
- defaultMessageKey: "ENTER",
- inputClassName: "custom-key-in form-control input-sm",
- loadDefaultHotkeys: function() {
- x = {};
- for (var e in z) z.hasOwnProperty(e) && (x[z[e].defaultKey] = e);
- x["spec-messageKey"] = this.defaultMessageKey
- },
- loadHotkeys: function() {
- 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")))
- },
- saveHotkeys: function() {
- e.localStorage.setItem("ogarioHotkeys", JSON.stringify(x)), this.saveCommands()
- },
- saveCommands: function() {
- t("#hotkeys .command-in").each(function() {
- var e = t(this),
- o = e.attr("id");
- g.hasOwnProperty(o) && (g[o] = e.val())
- }), e.localStorage.setItem("ogarioCommands", JSON.stringify(g))
- },
- resetHotkeys: function() {
- this.loadDefaultHotkeys(), t("#hotkeys-cfg .custom-key-in").each(function() {
- var e = t(this).attr("id");
- z[e] && t(this).val(z[e].defaultKey)
- })
- },
- setHotkeysMenu: function() {
- 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>");
- for (var e in z)
- if (z.hasOwnProperty(e)) {
- var o = z[e],
- a = "";
- for (var i in x)
- if (x.hasOwnProperty(i) && x[i] === e) {
- a = i;
- break
- }
- if ("hk-switchServerMode" === e && M && !M.privateIP) continue;
- if ("command" === o.type) {
- var s = e.replace("hk-", "");
- 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>')
- } 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>')
- }
- t("#hotkeys-cfg").perfectScrollbar(), b && b.setMenuBg()
- },
- getPressedKey: function(e) {
- var o = "",
- t = "";
- switch (e.ctrlKey || 17 == e.keyCode ? o = "CTRL" : (e.altKey || 18 == e.keyCode) && (o = "ALT"), e.keyCode) {
- case 9:
- t = "TAB";
- break;
- case 13:
- t = "ENTER";
- break;
- case 16:
- t = "mousemove";
- break;
- case 17:
- break;
- case 18:
- break;
- case 27:
- t = "ESC";
- break;
- case 32:
- t = "SPACE";
- break;
- case 37:
- t = "LEFT";
- break;
- case 38:
- t = "UP";
- break;
- case 39:
- t = "RIGHT";
- break;
- case 40:
- t = "DOWN";
- break;
- case 46:
- t = "DEL";
- break;
- case 61:
- t = "=";
- break;
- case 187:
- t = "=";
- break;
- case 192:
- t = "TILDE";
- break;
- default:
- t = String.fromCharCode(e.keyCode)
- }
- return "" !== o ? "" !== t ? o + "+" + t : o : t
- },
- deleteHotkey: function(e, o) {
- delete x[e], t("#" + o).val("")
- },
- setDefaultHotkey: function(e) {
- var o = !1;
- return z[e] && !x.hasOwnProperty(z[e].defaultKey) ? (o = z[e].defaultKey, x[o] = e, o) : o
- },
- setHotkey: function(e, o) {
- if (o && (this.lastPressedKey !== e || this.lastKeyId !== o)) {
- var a = t("#" + o).val();
- if (this.deleteHotkey(a, o), "DEL" !== e) {
- if (x[e] && x[e] !== o) {
- var i = x[e],
- s = this.setDefaultHotkey(i);
- s ? (x[s] = i, t("#" + i).val(s)) : this.deleteHotkey(e, i)
- }
- x[e] = o, t("#" + o).val(e), "hk-chatMessage" === o && (x["spec-messageKey"] = e), this.lastPressedKey = e, this.lastKeyId = o
- }
- }
- },
- init: function() {
- this.loadHotkeys(), this.setHotkeysMenu()
- }
- };
- var P = new p;
- P.init(), document.onkeydown = function(e) {
- var o = P.getPressedKey(e);
- if (("INPUT" !== e.target.tagName || e.target.className === P.inputClassName || o === x["spec-messageKey"]) && "" !== o && !T[o]) {
- if (T[o] = !0, "ESC" === o) return e.preventDefault(), void(M && M.showMenu());
- if (e.target.className === P.inputClassName) return e.preventDefault(), void P.setHotkey(o, e.target.id);
- if (x[o]) {
- e.preventDefault();
- var t = x[o];
- "" !== t && z[t] && z[t].keyDown && z[t].keyDown()
- }
- }
- }, document.onkeyup = function(e) {
- var o = P.getPressedKey(e);
- if ("" !== o) {
- if (x[o]) {
- var t = x[o];
- "" !== t && z[t] && z[t].keyUp && z[t].keyUp()
- }
- T[o] = !1
- }
- }, e.addKeyListeners = function() {
- e.onkeydown = function(o) {
- switch (o.keyCode) {
- case 81:
- e.core && e.core.specialOn && e.core.specialOn()
- }
- }, e.onkeyup = function(o) {
- 81 == o.keyCode && e.specialOff && e.core.specialOff()
- }
- }, e.onmousedown = function(e) {
- 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))))
- }, e.onmouseup = function(e) {
- v.mouseFeed && (3 == e.which && !v.mouseInvert || 1 == e.which && v.mouseInvert) && M && M.macroFeed(!1)
- }, e.resetHotkeys = function() {
- P && P.resetHotkeys()
- }, e.saveHotkeys = function() {
- P && P.saveHotkeys(), t("#hotkeys").fadeOut(500)
- }, e.showHotkeys = function() {
- e.onkeydown = function() {}, t("#hotkeys").fadeIn(500), t("#hotkeys-cfg").perfectScrollbar("update")
- }, e.closeHotkeys = function() {
- t("#hotkeys").fadeOut(500)
- }
- }(window, window.ogario, window.jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement