function init(window, ogario, JQuery) { window.server = { host: 'ws://localhost:8083' } class Writer { constructor(size){ this.dataView = new DataView(new ArrayBuffer(size)) this.byteOffset = 0 } writeUint8(value){ this.dataView.setUint8(this.byteOffset++, value) } writeInt32(value){ this.dataView.setInt32(this.byteOffset, value, true) this.byteOffset += 4 } writeUint32(value){ this.dataView.setUint32(this.byteOffset, value, true) this.byteOffset += 4 } writeString(string){ for(let i = 0; i < string.length; i++) this.writeUint8(string.charCodeAt(i)) this.writeUint8(0) } } window.buffers = { startBots(url, protocolVersion, clientVersion, userStatus, botsName, botsAmount){ const writer = new Writer(13 + url.length + botsName.length) writer.writeUint8(0) writer.writeString(url) writer.writeUint32(protocolVersion) writer.writeUint32(clientVersion) writer.writeUint8(Number(userStatus)) writer.writeString(botsName) writer.writeUint8(botsAmount) return writer.dataView.buffer }, mousePosition(x, y){ const writer = new Writer(9) writer.writeUint8(6) writer.writeInt32(x) writer.writeInt32(y) return writer.dataView.buffer } } window.connection = { ws: null, connect(){ this.ws = new WebSocket(`${window.server.host}`) this.ws.binaryType = 'arraybuffer' this.ws.onopen = this.onopen.bind(this) this.ws.onmessage = this.onmessage.bind(this) this.ws.onclose = this.onclose.bind(this) }, send(buffer){ if(this.ws && this.ws.readyState === WebSocket.OPEN) this.ws.send(buffer) }, onopen(){ document.getElementById('userStatus').style.color = '#00C02E' document.getElementById('userStatus').innerText = 'Connected' document.getElementById('connect').disabled = true document.getElementById('startBots').disabled = false document.getElementById('stopBots').disabled = false }, onmessage(message){ const dataView = new DataView(message.data) switch(dataView.getUint8(0)){ case 0: document.getElementById('startBots').disabled = true document.getElementById('stopBots').disabled = false document.getElementById('startBots').style.display = 'none' document.getElementById('stopBots').style.display = 'inline' document.getElementById('stopBots').innerText = 'Stop Bots' window.user.startedBots = true break case 1: document.getElementById('stopBots').disabled = true document.getElementById('stopBots').innerText = 'Stopping Bots...' break case 2: document.getElementById('botsAI').style.color = '#DA0A00' document.getElementById('botsAI').innerText = 'Disabled' document.getElementById('startBots').disabled = false document.getElementById('stopBots').disabled = true document.getElementById('startBots').style.display = 'inline' document.getElementById('stopBots').style.display = 'none' document.getElementById('stopBots').innerText = 'Stop Bots' window.user.startedBots = false window.bots.ai = false break case 3: toastr.info('Your IP has captcha and bots are unable to spawn, change your ip with a VPN or something to one that doesn\'t has captcha in order to use the bots') break case 4: //Connected Bot count = getUint8(1) //Spawned Bot count = getUint8(2) //Server player amount = getUint8(3) $('#botCount').html(`${dataView.getUint8(1)}/${dataView.getUint8(2)}/${window.bots.amount}`) $('#slots').html(dataView.getUint8(3) + "/200") break; } }, onclose(){ document.getElementById('userStatus').style.color = '#DA0A00' document.getElementById('userStatus').innerText = 'Disconnected' document.getElementById('botsAI').style.color = '#DA0A00' document.getElementById('botsAI').innerText = 'Disabled' document.getElementById('connect').disabled = false document.getElementById('startBots').disabled = true document.getElementById('stopBots').disabled = true document.getElementById('startBots').style.display = 'inline' document.getElementById('stopBots').style.display = 'none' window.user.startedBots = false window.bots.ai = false } } window.game = { url: '', protocolVersion: 0, clientVersion: 0 } window.user = { startedBots: false, isAlive: false, mouseX: 0, mouseY: 0, offsetX: 0, offsetY: 0, macroFeedInterval: null } window.bots = { name: '', amount: 0, ai: false } const displayText = { pl: { start: `Start`, settings: `Ustawienia`, restoreSettings: `Przywróc ustawienia domyślne`, animationGroup: `Animacja`, zoomGroup: `Zoom`, respGroup: `Odrodzenie`, 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`, showQuest: `Pokaż zadanie (quest)`, autoZoom: `Auto zoom`, animation: `Opóźnienie animacji`, zoomSpeedValue: `Szybkość zoomu`, quickResp: `Szybkie odrodzenie (klawisz)`, autoResp: 'Auto odrodzenie', autoHideCellsInfo: `Autoukrywanie nazw i masy`, autoHideNames: `Autoukrywanie nazw`, autoHideMass: `Autoukrywanie masy`, autoHideFood: `Autoukrywanie pokarmu (masa)`, autoHideFoodOnZoom: `Autoukrywanie pokarmu (zoom)`, optimizedNames: `Zoptymalizowane nazwy`, hideMyName: `Ukryj własną nazwę`, hideTeammatesNames: `Ukryj nazwy graczy teamu`, optimizedMass: `Zoptymalizowana masa (+/-2%)`, shortMass: `Skrócona masa (k)`, virMassShots: `Licznik strzałów (wirusy)`, 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`, showGhostCells: `Duchy kulek`, showMiniMap: `Pokaż minimapę`, showMiniMapGrid: `Pokaż siatkę minimapy`, showMiniMapGuides: 'Pokaż prowadnice na minimapie', showMiniMapGhostCells: `Pokaż duchy kulek na minimapie`, oneColoredTeammates: `Jednokolorowi gracze`, optimizedFood: 'Zoptymalizowany pokarm', 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`, namesStroke: `Obwódki nazw`, massStroke: `Obwódki masy`, cursorTracking: 'Śledzenie kursora', teammatesInd: `Wskaźniki graczy teamu`, mouseSplit: `LPM - Split myszką`, mouseFeed: `PPM - Feed myszką`, mouseInvert: `Odwróć klawisze myszki`, disableChat: `Wyłącz czat`, hideChat: `Ukryj czat`, chatSounds: 'Powiadomienia dźwiękowe', chatEmoticons: `Emotikony`, showChatImages: 'Pokaż obrazki na czacie', showChatVideos: 'Pokaż filmiki na czacie', showChatBox: `Czatbox zamiast wyskakujących wiadomości`, messageSound: `Dźwięk powiadomienia o wiadomości`, commandSound: `Dźwięk powiadomienia o komendzie`, showTop5: `Pokaż top 5 teamu`, showTargeting: 'Pokaż namierzanie', showTime: `Pokaż aktualny czas`, showLbData: 'Pokaż masę w topce', 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/zadanie)`, 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-bots-split': 'Bots split', 'hk-bots-feed': 'Bots feed', 'hk-bots-ai': 'Bots AI toggle', '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 teamu`, 'hk-showOppColors': `Pokaż/ukryj kolory przeciwników`, 'hk-toggleSkins': `Przełącz skiny (własne/standardowe)`, 'hk-showSkins': `Pokaż/ukryj skiny`, 'hk-transparentSkins': `Włącz/wyłącz przezroczyste 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-hideTeammatesNames': `Pokaż/ukryj nazwy graczy teamu`, '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`, 'hk-showQuest': `Pokaż/ukryj zadanie`, 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', bordersColor: `Granice mapy`, gridColor: `Siatka`, sectorsColor: `Czcionka sektorów`, namesColor: `Nazwy`, namesStrokeColor: `Obwódki nazw`, massColor: `Masa`, massStrokeColor: `Obwódki masy`, virusColor: `Wirusy`, virusStrokeColor: 'Obwódki wirusów', foodColor: `Pokarm`, namesFont: 'Czcionka nazw', massFont: `Czcionka masy`, sectorsFont: `Czcionka sektorów`, namesScale: 'Skala nazw', massScale: 'Skala masy', virMassScale: `Skala masy wirusów`, strokeScale: `Skala obwódek tekstu`, 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`, textAlpha: 'Przezroczystość nazw i masy', virusStrokeSize: `Grubość obwódki wirusów`, teammatesIndColor: `Wskaźnik gracza`, cursorTrackingColor: 'Śledzenie kursora', splitRangeColor: `Zasięg podziału`, safeAreaColor: `Bezpieczna strefa`, dangerAreaColor: 'Strefa zagrożenia', ghostCellsColor: `Duchy kulek`, ghostCellsAlpha: 'Przezroczystość duchów kulek', 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`, 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`, miniMapSectorsColor: `Sektory`, miniMapSectorColor: `Aktualny 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`, miniMapGhostCellsColor: `Duchy kulek`, miniMapGhostCellsAlpha: `Przezroczystość duchów kulek`, imagesTheming: 'Grafika / kursory', customBackground: `Grafika tła`, customCursor: `Grafika kursora`, hideChatMsgA: `Czat został włączony!`, hideChatMsgB: `Czat został ukryty!`, showSkinsMsgA: 'Skiny zostały włączone!', showSkinsMsgB: `Skiny zostały ukryte!`, hideSmallBotsMsgA: 'Małe boty stały się 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`, user: `Użytkownik`, userMuted: `Użytkownik %user% został wyciszony.`, userUnmuted: `Wyłączono wyciszenie użytkownika %user%.`, mute: `Wycisz`, unmute: 'Wyłącz wyciszenie', mutedUsers: `Wyciszeni użytkownicy`, activeUsers: `Aktywni użytkownicy`, showActiveUsers: 'Pokaż aktywnych użytkowników', none: `Brak`, sounds: 'Dźwięki', 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_menu_main_dailyquests: `Zadania`, 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`, animationGroup: `Animation`, zoomGroup: `Zoom`, respGroup: `Respawn`, 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', showQuest: `Show quest`, autoZoom: `Auto zoom`, animation: `Animation delay`, zoomSpeedValue: `Zoom speed`, quickResp: `Quick respawn (hotkey)`, autoResp: `Auto respawn`, autoHideCellsInfo: `Auto hide names and mass`, autoHideNames: `Auto hide names`, autoHideMass: `Auto hide mass`, autoHideFood: `Auto hide food (mass)`, autoHideFoodOnZoom: 'Auto hide food (zoom)', optimizedNames: `Optimized names`, hideMyName: `Hide my name`, hideTeammatesNames: `Hide teammates names`, optimizedMass: `Optimized mass (+/-2%)`, shortMass: `Short mass (k)`, virMassShots: `Virus shots`, 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`, showGhostCells: `Ghost cells`, showMiniMap: `Show minimap`, showMiniMapGrid: `Show minimap grid`, showMiniMapGuides: `Show minimap guides`, showMiniMapGhostCells: `Show ghost cells`, oneColoredTeammates: 'One-colored teammates', optimizedFood: `Optimized food`, rainbowFood: `Rainbow food`, oppColors: `Opponents colors`, oppRings: `Opponents rings`, virColors: `Viruses colors`, splitRange: `Split range`, virusesRange: 'Viruses range', textStroke: `Names and mass stroke`, namesStroke: 'Names stroke', massStroke: `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`, chatSounds: `Sound notifications`, chatEmoticons: `Emoticons`, showChatImages: 'Show images on chat', showChatVideos: `Show videos on chat`, showChatBox: `Chatbox instead of popups`, messageSound: `Message notification sound`, commandSound: `Command notification sound`, showTop5: 'Show team top 5', showTargeting: `Show targeting`, showTime: 'Show current time', showLbData: `Show leaderboard mass`, 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/quest)`, 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-bots-split': 'Bots split', 'hk-bots-feed': 'Bots feed', 'hk-bots-ai': 'Bots AI toggle', '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-transparentSkins': 'Toggle transparent 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-hideTeammatesNames': `Show/hide teammates 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', 'hk-showQuest': 'Show/hide quest', 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`, bordersColor: 'Map borders', gridColor: `Grid`, sectorsColor: `Sectors font`, namesColor: `Names`, namesStrokeColor: `Names stroke`, massColor: 'Mass', massStrokeColor: `Mass stroke`, virusColor: `Virus`, virusStrokeColor: `Virus stroke`, foodColor: `Food`, namesFont: 'Names font', massFont: `Mass font`, sectorsFont: 'Sectors font', namesScale: `Names scale`, massScale: 'Mass scale', virMassScale: 'Virus mass scale', strokeScale: `Text stroke 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`, textAlpha: `Names & mass transparency`, virusStrokeSize: `Virus stroke size`, teammatesIndColor: `Teammate indicator`, cursorTrackingColor: `Cursor tracking`, splitRangeColor: `Split range`, safeAreaColor: `Safe area`, dangerAreaColor: `Danger area`, ghostCellsColor: `Ghost cells`, ghostCellsAlpha: 'Ghost cells transparency', 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: `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`, miniMapSectorsColor: `Sectors`, miniMapSectorColor: `Current 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', miniMapGhostCellsColor: `Ghost cells`, miniMapGhostCellsAlpha: `Ghost cells transparency`, 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`, user: 'User', userMuted: 'User %user% has been muted.', userUnmuted: `User %user% has been unmuted.`, mute: `Mute`, unmute: 'Unmute', mutedUsers: `Muted users`, activeUsers: `Active users`, showActiveUsers: `Show active users`, none: `None`, sounds: `Sounds`, page_menu_main_free_coins: 'Free Coins', page_menu_main_gifts: 'Gifts', page_menu_main_dailyquests: `Daily Quest`, page_shop: `Shop` } }; let lang = 'en'; const userLanguage = window.navigator.language || window.navigator.userLanguage; if (userLanguage && displayText.hasOwnProperty(userLanguage)) { lang = userLanguage; } const textLanguage = displayText[lang]; let chatCommand = { comm1: textLanguage.comm1, comm2: textLanguage.comm2, comm3: textLanguage.comm3, comm4: textLanguage.comm4, comm5: textLanguage.comm5, comm6: textLanguage.comm6, comm7: textLanguage.comm7, comm8: textLanguage.comm8, comm9: textLanguage.comm9, comm0: textLanguage.comm0, comm10: textLanguage.comm10, comm11: textLanguage.comm11, comm12: textLanguage.comm12, comm13: textLanguage.comm13, comm14: textLanguage.comm14 }; const escapeChar = { '&': `&`, '<': `<`, '>': `>`, '"': `"`, '\'': ''', '/': `/` }; const emojiChar = { ':)': `smile.svg`, ';)': `wink.svg`, '=)': 'smirk.svg', ':D': `grin.svg`, 'X-D': `xgrin.svg`, '=D': `joy.svg`, ':(': 'sad.svg', ';(': `cry.svg`, ':P': `tongue.svg`, ';P': 'tonguew.svg', ':*': 'kiss.svg', '$)': 'smileh.svg', '<3': `heart.svg`, '8=)': 'cool.svg', ':o': `astonished.svg`, '(:|': `sweat.svg`, ':|': `neutral.svg`, ':': 'unamused.svg', ':@': 'pouting.svg', '|-)': 'sleep.svg', '^_^': 'relaxed.svg', '-_-': `expressionless.svg`, '$_$': `money.svg`, 'O:)': `angel.svg`, '3:)': `devil.svg`, '(poop)': `poo.svg`, '(fuck)': 'finger.svg', '(clap)': `clap.svg`, '(ok)': `ok.svg`, '(victory)': 'victory.svg', '(y)': 'thumb.svg', '(n)': `thumbd.svg` }; const SkinExplain = [{ name: `imgur.com`, url: `https://imgur.com/`, example: `https://i.imgur.com/xdmUp5N.png`, pattern: `https?:\/\/\w+\.imgur\.com\/\w{6,}\.(?:%file_ext%)\??\d*` }, { name: `put.re`, url: 'https://put.re/', example: 'https://s.put.re/iYHAW65g.png', pattern: `https?:\/\/\w+\.put\.re\/\w{8,}\.(?:%file_ext%)` }, { name: `postimages.org`, url: `https://postimages.org/`, example: 'https://i.postimg.cc/zzK0sRPg/xdmUp5N.png', pattern: 'https?:\/\/\w+\.postimg\.cc\/\w{8,}\/\w+\.(?:%file_ext%)' }]; const gameTheme = { 'ogario-v3': { name: `OGARio v3`, darkTheme: true, mainColor: '#01d9cc', bgColor: '#000a11', bordersColor: `#01d9cc`, gridColor: `#00243e`, sectorsColor: `#00243e`, namesColor: '#ffffff', namesStrokeColor: `#000000`, massColor: `#ffffff`, massStrokeColor: '#000000', virusColor: `#002f52`, virusStrokeColor: `#00b9e8`, foodColor: `#5000ff`, teammatesIndColor: `#ffffff`, cursorTrackingColor: `#ffffff`, splitRangeColor: `#ffffff`, safeAreaColor: `#ffffff`, dangerAreaColor: `#bf00aa`, namesFont: 'ubuntu-bold', massFont: `ubuntu-bold`, sectorsFont: 'ubuntu', namesScale: 1, massScale: 3, foodSize: 5, bordersWidth: 40, sectorsWidth: 40, sectorsFontSize: 1200, cellsAlpha: 0.9, skinsAlpha: 0.7, virusAlpha: 0.6, textAlpha: 1, 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: `https://cdn.ogario.ovh/static/img/pattern.png`, menuOpacity: 0.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, miniMapSectorsColor: '#ffffff', 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: 0.1, miniMapNickSize: 11, miniMapNickStrokeSize: 2, miniMapMyCellSize: 7.5, miniMapMyCellStrokeSize: 4, miniMapTeammatesSize: 5.5, customBackground: '', customCursor: `https://cdn.ogario.ovh/static/img/cursors/cursor_02.cur` }, 'ogario-orange': { name: `OGARio v2`, darkTheme: true, mainColor: `#ff7800`, bgColor: `#111111`, bordersColor: `#ff7800`, gridColor: '#292929', sectorsColor: `#292929`, namesColor: '#ffffff', namesStrokeColor: `#000000`, massColor: `#ffffff`, massStrokeColor: '#000000', virusColor: `#666666`, virusStrokeColor: `#666666`, foodColor: `#e16400`, hudMainColor: '#ff7800', statsHudColor: `#ff7800`, top5MassColor: `#ff7800`, timeHudColor: `#ff7800`, messageNickColor: `#ff7800`, commandsColor: `rgba(255,120,0,0.9)`, commandsTimeColor: `#ff7800`, commandsTextColor: `#ffffff`, miniMapSectorsColor: `#ffffff`, miniMapSectorColor: `#ff7800`, miniMapGuidesColor: `#ff7800`, miniMapMyCellColor: `#ffffff`, miniMapMyCellStrokeColor: `#ff7800`, miniMapTeammatesColor: '#ff7800', miniMapDeathLocationColor: `#ff7800`, miniMapSectorsOpacity: 0.1 }, 'ogario-gold': { name: `OGARio LE`, darkTheme: true, mainColor: `#b5a642`, bgColor: `#000000`, bordersColor: `#b5a642`, gridColor: `#111111`, sectorsColor: `#111111`, namesColor: '#ffffff', namesStrokeColor: `#000000`, massColor: `#ffffff`, massStrokeColor: '#000000', virusColor: `#666666`, virusStrokeColor: '#666666', foodColor: `#998c36`, hudMainColor: '#b5a642', statsHudColor: `#b5a642`, top5MassColor: `#b5a642`, timeHudColor: '#b5a642', messageNickColor: '#b5a642', commandsColor: 'rgba(181,166,66,0.9)', commandsTimeColor: `#b5a642`, commandsTextColor: `#ffffff`, miniMapSectorsColor: `#ffffff`, miniMapSectorColor: `#b5a642`, miniMapGuidesColor: `#b5a642`, miniMapMyCellColor: `#ffffff`, miniMapMyCellStrokeColor: `#b5a642`, miniMapTeammatesColor: `#b5a642`, miniMapDeathLocationColor: `#b5a642`, miniMapSectorsOpacity: 0.1 }, 'ref-style': { name: "ReF's Style", bgColor: "#000000", bordersColor: "#0074fc", bordersWidth: 80, btn1Color: "#0074fc", btn1Color2: "#3592ff", btn2Color: "#3592ff", btn2Color2: "#3592ff", btn3Color: "#3592ff", btn3Color2: "#3592ff", btn4Color: "#3592ff", btn4Color2: "#3592ff", cellsAlpha: 0.99, chatBoxColor: "rgba(0,0,0,0.4)", chatScale: 1, commandsColor: "rgba(0,116,252,1)", commandsNickColor: "#ffffff", commandsTextColor: "#ffffff", commandsTimeColor: "#000000", cursorTrackingColor: "#ffffff", customBackground: "", customCursor: "", dangerAreaColor: "#0074fc", darkTheme: true, foodColor: "#0074fc", foodSize: 1, ghostCellsAlpha: 0.3, ghostCellsColor: "#ffffff", gridColor: "#0094ff", hudColor: "rgba(0,0,0,0.49)", hudFont: "ubuntu-bold", hudFontFamily: "Ubuntu", hudFontWeight: 700, hudMainColor: "#0074fc", hudScale: 1.15, hudTextColor: "#ffffff", lbMeColor: "#0074fc", lbTeammateColor: "#0074fc", mainColor: "#01d9cc", massColor: "#ffffff", massFont: "ubuntu-bold", massFontFamily: "Ubuntu", massFontWeight: 700, massScale: 0.9, massStrokeColor: "#000000", menuBg: "", menuBtnTextColor: "#ffffff", menuMainColor: "#0074fc", menuOpacity: 1, menuPanelColor: "#050008", menuPanelColor2: "#1d0526", menuPreset: "ogario-v3", menuTextColor: "#ffffff", menuTextColor2: "#65458f", messageColor: "rgba(0,0,0,0.4)", messageNickColor: "#0074fc", messageTextColor: "#e8e8e8", messageTimeColor: "#545454", miniMapDeathLocationColor: "#2b2b2b", miniMapFont: "ubuntu-bold", miniMapFontFamily: "Ubuntu", miniMapFontWeight: 700, miniMapGhostCellsAlpha: 0.15, miniMapGhostCellsColor: "#ffffff", miniMapGuidesColor: "#ff00a8", miniMapMyCellColor: "#f0ff3d", miniMapMyCellSize: 5, miniMapMyCellStrokeColor: "#acba07", miniMapMyCellStrokeSize: 0, miniMapNickColor: "#ffffff", miniMapNickFont: "ubuntu-bold", miniMapNickFontFamily: "Ubuntu", miniMapNickFontWeight: 700, miniMapNickSize: 9, miniMapNickStrokeColor: "#4d4d4d", miniMapNickStrokeSize: 0, miniMapSectorColor: "#000000", miniMapSectorsColor: "#ffffff", miniMapSectorsOpacity: 0.1, miniMapTeammatesColor: "#305eff", miniMapTeammatesSize: 5, miniMapTop: 25, miniMapWidth: 250, namesColor: "#ffffff", namesFont: "ubuntu-bold", namesFontFamily: "Ubuntu", namesFontWeight: 700, namesScale: 0.9, namesStrokeColor: "#000000", safeAreaColor: "#ffffff", sectorsColor: "#0074fc", sectorsFont: "ubuntu", sectorsFontFamily: "Ubuntu", sectorsFontSize: 940, sectorsFontWeight: 400, sectorsWidth: 6, sectorsX: 5, sectorsY: 5, skinsAlpha: 0.7, splitRangeColor: "#ffffff", statsHudColor: "#ffffff", strokeScale: 1, teammatesIndColor: "#ffffff", textAlpha: 1, timeHudColor: "#0074fc", top5MassColor: "#0074fc", virMassScale: 2, virusAlpha: 0.4, virusColor: "#3b3b3b", virusStrokeColor: "#ffffff", virusStrokeSize: 10, customBackground: '', customCursor: `` }, 'turbo-style': { name: "Turbo's Style", bgColor: "#000000", bordersColor: "#ff2b77", bordersWidth: 80, btn1Color: "#ff2b77", btn1Color2: "#ff005b", btn2Color: "#ff2b77", btn2Color2: "#ff005b", btn3Color: "#ff2b77", btn3Color2: "#ff005b", btn4Color: "#ff2b77", btn4Color2: "#ff005b", cellsAlpha: 0.99, chatBoxColor: "rgba(0,0,0,0.4)", chatScale: 1, commandsColor: "rgba(255,43,119,1)", commandsNickColor: "#ffffff", commandsTextColor: "#ffffff", commandsTimeColor: "#000000", cursorTrackingColor: "#ffffff", customBackground: "", customCursor: "", dangerAreaColor: "#ff2b77", darkTheme: true, foodColor: "#ff2b77", foodSize: 1, ghostCellsAlpha: 0.3, ghostCellsColor: "#ffffff", gridColor: "#ff2b77", hudColor: "rgba(0,0,0,0.49)", hudFont: "ubuntu-bold", hudFontFamily: "Ubuntu", hudFontWeight: 700, hudMainColor: "#ff2b77", hudScale: 1.15, hudTextColor: "#ffffff", lbMeColor: "#ff2b77", lbTeammateColor: "#ff2b77", mainColor: "#ff2b77", massColor: "#000000", massFont: "ubuntu-bold", massFontFamily: "Ubuntu", massFontWeight: 700, massScale: 0.9, massStrokeColor: "#ffffff", menuBg: "", menuBtnTextColor: "#ffffff", menuMainColor: "#ff2b77", menuOpacity: 1, menuPanelColor: "#23192c", menuPanelColor2: "#382946", menuPreset: "ogario-v3", menuTextColor: "#ffffff", menuTextColor2: "#65458f", messageColor: "rgba(0,0,0,0.4)", messageNickColor: "#ff2b77", messageTextColor: "#e8e8e8", messageTimeColor: "#545454", miniMapDeathLocationColor: "#2b2b2b", miniMapFont: "ubuntu-bold", miniMapFontFamily: "Ubuntu", miniMapFontWeight: 700, miniMapGhostCellsAlpha: 0.15, miniMapGhostCellsColor: "#ffffff", miniMapGuidesColor: "#ff2b77", miniMapMyCellColor: "#ffdd56", miniMapMyCellSize: 5, miniMapMyCellStrokeColor: "#ff9a6b", miniMapMyCellStrokeSize: 0, miniMapNickColor: "#ffffff", miniMapNickFont: "ubuntu-bold", miniMapNickFontFamily: "Ubuntu", miniMapNickFontWeight: 700, miniMapNickSize: 9, miniMapNickStrokeColor: "#4d4d4d", miniMapNickStrokeSize: 0, miniMapSectorColor: "#000000", miniMapSectorsColor: "#ffffff", miniMapSectorsOpacity: 0.1, miniMapTeammatesColor: "#ff005b", miniMapTeammatesSize: 5, miniMapTop: 25, miniMapWidth: 250, namesColor: "#000000", namesFont: "ubuntu-bold", namesFontFamily: "Ubuntu", namesFontWeight: 700, namesScale: 0.9, namesStrokeColor: "#ffffff", safeAreaColor: "#ffffff", sectorsColor: "#ff2b77", sectorsFont: "ubuntu", sectorsFontFamily: "Ubuntu", sectorsFontSize: 940, sectorsFontWeight: 400, sectorsWidth: 6, sectorsX: 5, sectorsY: 5, skinsAlpha: 0.7, splitRangeColor: "#ffffff", statsHudColor: "#ffffff", strokeScale: 1, teammatesIndColor: "#ffffff", textAlpha: 1, timeHudColor: "#ff2b77", top5MassColor: "#ff2b77", virMassScale: 2, virusAlpha: 0.4, virusColor: "#3b3b3b", virusStrokeColor: "#ff2b77", virusStrokeSize: 10, customBackground: '', customCursor: `` }, 'sniikz-style': { name: `SniiKz's Style`, darkTheme: true, mainColor: `#01d9cc`, bgColor: `#000000`, bordersColor: '#ffffff', gridColor: `#00243e`, sectorsColor: '#00243e', namesColor: `#ffffff`, namesStrokeColor: '#000000', massColor: '#ffffff', massStrokeColor: `#000000`, virusColor: '#3b3b3b', virusStrokeColor: `#ffffff`, foodColor: `#5000ff`, teammatesIndColor: `#ffffff`, cursorTrackingColor: `#ffffff`, splitRangeColor: '#ffffff', safeAreaColor: `#ffffff`, dangerAreaColor: '#bf00aa', massScale: 4, foodSize: 1, bordersWidth: 40, sectorsWidth: 40, sectorsFontSize: 1200, cellsAlpha: 0.99, skinsAlpha: 0.7, virusAlpha: 0.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: `https://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, miniMapSectorsColor: '#ffffff', miniMapSectorColor: `#000000`, miniMapGuidesColor: `#ff00a8`, miniMapNickColor: `#ffffff`, miniMapNickStrokeColor: `#4d4d4d`, miniMapMyCellColor: '#f0ff3d', miniMapMyCellStrokeColor: `#acba07`, miniMapTeammatesColor: '#305eff', miniMapDeathLocationColor: '#2b2b2b', miniMapWidth: 250, miniMapSectorsOpacity: 0.1, miniMapNickSize: 9, miniMapNickStrokeSize: 0, miniMapMyCellSize: 5, miniMapMyCellStrokeSize: 0, miniMapTeammatesSize: 5, customBackground: '', customCursor: `https://cdn.ogario.ovh/static/img/cursors/cursor_01.cur` }, 'hkg-style': { name: `HKG Style`, darkTheme: true, mainColor: '#651fff', bgColor: `#000000`, bordersColor: `#ffffff`, gridColor: `#111111`, sectorsColor: `#111111`, namesColor: `#ffffff`, namesStrokeColor: `#000000`, massColor: `#ffffff`, massStrokeColor: `#000000`, virusColor: `#666666`, virusStrokeColor: `#666666`, foodColor: `#651fff`, hudMainColor: `#651fff`, statsHudColor: '#651fff', top5MassColor: '#651fff', timeHudColor: `#651fff`, messageNickColor: `#651fff`, commandsColor: `rgba(101,31,255,0.9)`, commandsTimeColor: `#651fff`, commandsTextColor: `#ffffff`, miniMapSectorsColor: '#ffffff', miniMapSectorColor: `#651fff`, miniMapGuidesColor: `#651fff`, miniMapMyCellColor: `#ffffff`, miniMapMyCellStrokeColor: `#651fff`, miniMapTeammatesColor: '#651fff', miniMapDeathLocationColor: '#651fff', miniMapSectorsOpacity: 0.1 }, 'agario-light': { name: `Agar.io Light`, darkTheme: false, mainColor: `#ffffff`, bgColor: `#f2fbff`, bordersColor: `#858a8c`, gridColor: `#ced6d9`, sectorsColor: '#ced6d9', namesColor: '#ffffff', namesStrokeColor: '#000000', massColor: `#ffffff`, massStrokeColor: '#000000', virusColor: `#33ff33`, virusStrokeColor: `#2de52d`, foodColor: '#2de52d', hudMainColor: `#ffffff`, statsHudColor: `#ffffff`, top5MassColor: `#ffffff`, timeHudColor: `#ffffff`, messageNickColor: '#ffffff', commandsColor: `rgba(255,255,255,0.9)`, commandsTimeColor: `#ffffff`, commandsTextColor: `#000000`, miniMapSectorsColor: `#ffffff`, miniMapSectorColor: '#ffffff', miniMapGuidesColor: '#ffffff', miniMapMyCellColor: `#ffffff`, miniMapMyCellStrokeColor: '#ffffff', miniMapTeammatesColor: `#ffffff`, miniMapDeathLocationColor: `#ffffff`, miniMapSectorsOpacity: 0.25 }, 'agario-dark': { name: `Agar.io Dark`, darkTheme: true, mainColor: `#ffffff`, bgColor: `#111111`, bordersColor: `#999999`, gridColor: `#333333`, sectorsColor: `#333333`, namesColor: `#ffffff`, namesStrokeColor: `#000000`, massColor: `#ffffff`, massStrokeColor: `#000000`, virusColor: `#33ff33`, virusStrokeColor: `#2de52d`, foodColor: `#2de52d`, hudMainColor: `#ffffff`, statsHudColor: '#ffffff', top5MassColor: `#ffffff`, timeHudColor: `#ffffff`, messageNickColor: `#ffffff`, commandsColor: `rgba(255,255,255,0.9)`, commandsTimeColor: `#ffffff`, commandsTextColor: '#ffffff', miniMapSectorsColor: `#ffffff`, miniMapSectorColor: `#ffffff`, miniMapGuidesColor: `#ffffff`, miniMapMyCellColor: `#ffffff`, miniMapMyCellStrokeColor: '#ffffff', miniMapTeammatesColor: `#ffffff`, miniMapDeathLocationColor: `#ffffff`, miniMapSectorsOpacity: 0.1 } }; const themeSetup = { '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: 'https://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: '' } }; const gameSetupTheme = { preset: `ogario-v3`, darkTheme: true, mainColor: '#01d9cc', bgColor: `#000a11`, bordersColor: `#01d9cc`, gridColor: '#00243e', sectorsColor: `#00243e`, namesColor: `#ffffff`, namesStrokeColor: `#000000`, massColor: `#ffffff`, massStrokeColor: `#000000`, virusColor: `#002f52`, virusStrokeColor: '#00b9e8', foodColor: '#5000ff', teammatesIndColor: `#ffffff`, cursorTrackingColor: `#ffffff`, splitRangeColor: `#ffffff`, ghostCellsColor: `#ffffff`, safeAreaColor: `#ffffff`, dangerAreaColor: `#bf00aa`, namesFont: `ubuntu-bold`, namesFontFamily: `Ubuntu`, namesFontWeight: 700, massFont: 'ubuntu-bold', massFontFamily: `Ubuntu`, massFontWeight: 700, sectorsFont: `ubuntu`, sectorsFontFamily: `Ubuntu`, sectorsFontWeight: 400, sectorsX: 5, sectorsY: 5, namesScale: 1, massScale: 3, virMassScale: 3, strokeScale: 1, foodSize: 5, bordersWidth: 40, sectorsWidth: 40, sectorsFontSize: 1200, cellsAlpha: 0.9, skinsAlpha: 0.7, virusAlpha: 0.6, textAlpha: 1, ghostCellsAlpha: 0.3, 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: `https://cdn.ogario.ovh/static/img/pattern.png`, menuOpacity: 0.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, miniMapSectorsColor: `#ffffff`, miniMapSectorColor: `#01d9cc`, miniMapGuidesColor: '#bf00aa', miniMapNickColor: '#ffffff', miniMapNickStrokeColor: `#000000`, miniMapMyCellColor: `#ffffff`, miniMapMyCellStrokeColor: `#bf00aa`, miniMapTeammatesColor: `#01d9cc`, miniMapDeathLocationColor: `#bf00aa`, miniMapGhostCellsColor: `#ffffff`, miniMapFont: `ubuntu-bold`, miniMapFontFamily: 'Ubuntu', miniMapFontWeight: 700, miniMapNickFont: `ubuntu-bold`, miniMapNickFontFamily: `Ubuntu`, miniMapNickFontWeight: 700, miniMapWidth: 240, miniMapTop: 24, miniMapSectorsOpacity: 0.1, miniMapNickSize: 11, miniMapNickStrokeSize: 2, miniMapMyCellSize: 7.5, miniMapMyCellStrokeSize: 4, miniMapTeammatesSize: 5.5, miniMapGhostCellsAlpha: 0.15, customBackground: '', customCursor: 'https://cdn.ogario.ovh/static/img/cursors/cursor_02.cur' }; const OgarioSettings = { menuMainColorCSS: null, menuPanelColorCSS: null, menuTextlColorCSS: null, menuButtonsCSS: null, hudCSS: null, chatCSS: null, chatScaleCSS: null, cursorCSS: null, loadThemeSettings() { let storage = null; if (window.localStorage.getItem('ogarioThemeSettings') !== null) { storage = JSON.parse(window.localStorage.getItem('ogarioThemeSettings')); } for (const setup in gameSetupTheme) { if (gameSetupTheme.hasOwnProperty(setup)) { if (storage && storage.hasOwnProperty(setup)) { gameSetupTheme[setup] = storage[setup]; } if (ogario.hasOwnProperty(setup)) { ogario[setup] = gameSetupTheme[setup]; } } } }, saveThemeSettings() { window.localStorage.setItem(`ogarioThemeSettings`, JSON.stringify(gameSetupTheme)); }, restoreThemeSettings() { if (window.localStorage.getItem(`ogarioThemeSettings`) !== null) { window.localStorage.removeItem('ogarioThemeSettings'); window.location.reload(); } }, addCustomCSS(name, css) { if (!this[name]) { this[name] = JQuery(` ` } function loadUI(){ $('#overlays-hud').append(`
Bot Count: Waiting
ServerSlots: Waiting
`); } function setGUIEvents(){ document.getElementById('botsAmount').addEventListener('keypress', e => { e.preventDefault() }) document.getElementById('botsName').addEventListener('change', function(){ window.bots.name = this.value localStorage.setItem('localStoredBotsName', window.bots.name) }) document.getElementById('botsAmount').addEventListener('change', function(){ window.bots.amount = Number(this.value) localStorage.setItem('localStoredBotsAmount', window.bots.amount) }) document.getElementById('connect').addEventListener('click', () => { if (application.gameMode==":party"){ if(!window.connection.ws || window.connection.ws.readyState !== WebSocket.OPEN) window.connection.connect() } else{ toastr["info"]('Party bots only available for Party mode') } }) document.getElementById('startBots').addEventListener('click', () => { if (application.gameMode==":party"){ if(window.game.url && window.game.protocolVersion && window.game.clientVersion && !window.user.startedBots){ if(window.bots.name && window.bots.amount && window.getComputedStyle(document.getElementsByClassName('btn-login-play')[0]).getPropertyValue('display') === 'none') window.connection.send(window.buffers.startBots(window.game.url, window.game.protocolVersion, window.game.clientVersion, window.user.isAlive, window.unescape(window.encodeURIComponent(window.bots.name)), window.bots.amount)) else toastr.info('Bots name, amount and user login are required before starting the bots') } } else{ alert('Bots are designed for party') } }) document.getElementById('stopBots').addEventListener('click', () => { if(window.user.startedBots) window.connection.send(new Uint8Array([1]).buffer) }) document.getElementById('serverHost').addEventListener('change', function(){ window.server.host = this.value localStorage.setItem('localStoredServerHost', window.server.host) }) } function resize() { window.onresize = () => { drawRender.resizeCanvas(); menuScale(); }; }((() => { ogario = Connection; changeUrl(); resize(); spectateBlind(); start(); window.master.getClientVersion(); OgarioSettings.init(); application.init(); application.getDefaultSettings(); application.connect(); hotkeysSetup.init(); Connection.init(); drawRender.init(); window.master.init(); menuScale(); setTimeout(() => { setGUI() setGUIStyle() setGUIEvents() loadUI() }, 3500) })()); } init(window, window.ogario, window.jQuery);