您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
The smash hit game!
当前为
// ==UserScript== // @name Agar.io Gold // @namespace agar.io/gold // @version 0.9.2.5 // @description The smash hit game! // @match http://agar.io/* // @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js // @connect agar.io // @run-at document-start // @grant none // ==/UserScript== var profile = 0; var skins = [null, null, null, null, null, null, null, null, null, null]; var settings = [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false]; var commands = [null, null, null, null, null, null, null, null, null, null, null, null, null]; function loadContent(){ var mainPanel_blockId = ['mainBlock', 'skinsBlock', 'partyBlock']; var mainPanel_blockName = ['Agar.io Gold', 'Skins', 'Party']; var menu_iconSrc = ['http://i.imgur.com/7eiGkwT.png', 'http://i.imgur.com/0QZpM5k.png', 'http://i.imgur.com/ny1SwTc.png', 'http://i.imgur.com/NTiAjWl.png']; var tab_blockId = ['profileBlock', 'settingsBlock', 'commandsBlock', 'themeBlock']; var tab_blockName = ['Profile', 'Settings', 'Commands', 'Theme']; var regionsValue = ['US-Atlanta', 'BR-Brazil', 'EU-London', 'RU-Russia', 'TK-Turkey', 'JP-Tokyo', 'CN-China', 'SG-Singapore']; var regionsName = ['North America', 'South America', 'Europe', 'Russia', 'Turkey', 'East Asia', 'China', 'Oceania']; var settingsName = ['No skins', 'No colors', 'No names', 'Show mass', 'Custom skins', 'Transparent skins', 'Transparent cells', 'Hide my name', 'Auto hide names and mass', 'Auto hide food', 'Game stats', 'Show indicators', 'Show background selectors', 'Show map borders', 'Show minimap', 'Enable chat', 'Enable Mouse controls', 'Invert mouse controls', 'Disable commands']; var commandsName = ['Stop movement', 'Double split', 'Split into 16', 'Eject mass', 'Toggle skins', 'Toggle colors', 'Toggle names', 'Toggle mass', 'Toggle indicators', 'Toggle background selectors', 'Toggle map borders', 'Toggle minimap', 'Toggle chat']; var themesName = ['Classic', 'Gold', 'Custom']; var newElement, newText, i; jQuery.fx.off = true; $(document.documentElement.childNodes).each(function(){ $(this.childNodes).each(function(){ if(this.nodeName !== 'SCRIPT') this.remove(); }); }); // <title> document.title = 'Agar.io Gold'; // </title> // <style> newElement = document.createElement('style'); newElement.type = 'text/css'; $(newElement).append("*{margin: 0; padding: 0; font-family: Calibri; font-size: 18px; color: #646464; text-align: left;}body{overflow: hidden;}::-webkit-scrollbar{width: 6px; background-color: #eeeeee; border-radius: 6px;}::-webkit-scrollbar-thumb{background-color: #cccccc; border-radius: 6px;}#mainPanel{position: absolute; top: 0; left: 0; bottom: 0; right: 0; background-color: rgba(0, 0, 0, 0.4);}.block{padding: 14px; background-color: #ffffff; border-radius: 14px; font-weight: bold; text-align: center;}.container{position: relative; overflow: hidden; font-weight: normal; text-align: center;}.form-control{padding: 6px;}.btn{cursor: pointer; padding: 6px; font-weight: bold; text-align: center;}#mainBlock{position: absolute; top: 50%; right: 50%; margin-top: -242px; margin-right: -361px; width: 480px; height: 398px; padding-top: 72px; font-size: 72px;}#nick{position: relative; width: 240px; border: 2px solid rgba(0, 0, 0, 0.4); border-radius: 8px; font-size: 24px;}#play-btn{position: relative; width: 120px; background-color: #ff7400; border: 2px solid rgba(0, 0, 0, 0.1); border-radius: 8px; font-size: 24px; color: #ffffff;}#play-btn:hover{background-color: #f46f00;}#skinsBlock{position: absolute; top: 50%; left: 50%; margin-top: -242px; margin-left: -361px; width: 180px; font-size: 24px;}#skin{position: relative; width: 166px; border: 1px solid rgba(0, 0, 0, 0.4); border-radius: 4px;}#skinPreview{position: relative; left: 50%; margin-left: -50px; width: 100px; height: 100px; background-image: url('http://i.imgur.com/Xny8hRU.png'); background-position: center; background-size: cover; border-radius: 100px;}#previous{position: absolute; left: 0; bottom: 0; opacity: 0.2;}#previous:hover{opacity: 0.4;}#next{position: absolute; bottom: 0; right: 0; opacity: 0.2;}#next:hover{opacity: 0.4;}#partyBlock{position: absolute; left: 50%; bottom: 50%; margin-left: -361px; margin-bottom: -242px; width: 180px; font-size: 24px;}#region{position: relative; width: 180px; height: 36px; padding: 2px; border: 1px solid rgba(0, 0, 0, 0.4); border-radius: 4px;}#joinPartyToken{position: relative; width: 138px; padding-right: 34px; border: 1px solid rgba(0, 0, 0, 0.4); border-radius: 4px;}#join-party-btn{position: relative; width: 96px; background-color: #0074ff; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 4px; color: #ffffff;}#join-party-btn:hover{background-color: #006ff4;}#create-party-btn{position: absolute; top: 50%; right: 0; margin-top: -17px; margin-right: 1px; padding: 1px; opacity: 0.2;}#create-party-btn:hover{opacity: 0.4;}#sideBar{z-index: 1; display: none; position: absolute; height: 100%; background-color: #000000; text-align: center;}#menu{position: relative; top: 50%; margin-top: -254px; text-align: center;}.icon{position: relative; margin-top: 24px; padding: 14px;}.icon:hover{background-color: rgba(255, 255, 255, 0.2);}.tab{z-index: 2; display: none; position: absolute; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.4);}#profileBlock, #settingsBlock, #commandsBlock, #themeBlock{position: absolute; top: 50%; left: 50%; margin: -254px -314px; width: 600px; height: 480px; font-size: 36px;}.close{position: absolute; top: 0; right: 0; margin: 6px; opacity: 0.2;}.close:hover{opacity: 0.4;}.container-scroll{height: 422px; overflow: auto;}.ground{position: relative; margin: 2px; padding: 14px; font-weight: normal;}.ground:hover{background-color: rgba(0, 0, 0, 0.1);}.switchOff{position: absolute; top: 50%; right: 14px; margin-top: -12px; width: 46px; height: 24px; background-color: #c4c4c4; border-radius: 24px;}.switchOff:after{content: ''; position: relative; float: left; margin: 1px; width: 22px; height: 22px; background-color: #ffffff; border-radius: 22px;}.switchOn{position: absolute; top: 50%; right: 14px; margin-top: -12px; width: 46px; height: 24px; background-color: #94cc40; border-radius: 24px;}.switchOn:after{content: ''; position: relative; float: right; margin: 1px; width: 22px; height: 22px; background-color: #ffffff; border-radius: 22px;}.key{position: absolute; top: 0; right: 0; width: 50px; height: 50px; background: none; border: none; color: #a4a4a4; text-align: center;}"); $('head').append(newElement); // </style> // <canvas id='canvas'> newElement = document.createElement('canvas'); newElement.setAttribute('id', 'canvas'); $('body').append(newElement); // </canvas> // <div id='mainPanel'> newElement = document.createElement('div'); newElement.setAttribute('id', 'mainPanel'); $('body').append(newElement); // <div id='sideBar'> newElement = document.createElement('div'); newElement.setAttribute('id', 'sideBar'); $('#mainPanel').append(newElement); // <div id='menu'> newElement = document.createElement('div'); newElement.setAttribute('id', 'menu'); $('#sideBar').append(newElement); for(i = 0; i < menu_iconSrc.length; i++){ // <div class='icon'> newElement = document.createElement('div'); newElement.setAttribute('class', 'icon'); $('#menu').append(newElement); // <img /> newElement = document.createElement('img'); newElement.src = menu_iconSrc[i]; $('.icon').last().append(newElement); // </div> } // </div> // </div> for(i = 0; i < mainPanel_blockId.length; i++){ // <div class='block'> newElement = document.createElement('div'); newElement.setAttribute('class', 'block'); newElement.setAttribute('id', mainPanel_blockId[i]); newText = document.createTextNode(mainPanel_blockName[i]); $(newElement).append(newText); $('#mainPanel').append(newElement); // </div> } // <div class='block' id='mainBlock'> // <div class='container'> newElement = document.createElement('div'); newElement.setAttribute('class', 'container'); newElement.style.marginTop = '28px'; $('#mainBlock').append(newElement); // <input type='text' class='form-control' id='nick'/> newElement = document.createElement('input'); newElement.setAttribute('type', 'text'); newElement.setAttribute('class', 'form-control'); newElement.setAttribute('id', 'nick'); newElement.placeholder = 'Nickname'; newElement.maxLength = 15; $('.container').last().append(newElement); // </div> // <div class='container'> newElement = document.createElement('div'); newElement.setAttribute('class', 'container'); newElement.style.marginTop = '28px'; $('#mainBlock').append(newElement); // <button class='btn btn-needs-server' id='play-btn'> newElement = document.createElement('button'); newElement.type = 'submit'; newElement.setAttribute('class', 'btn btn-needs-server'); newElement.setAttribute('id', 'play-btn'); newElement.disabled = true; newText = document.createTextNode('PLAY'); $(newElement).append(newText); $('.container').last().append(newElement); // </button> // </div> // <div class='container'> newElement = document.createElement('div'); newElement.setAttribute('class', 'container'); newElement.style.marginTop = '28px'; newElement.innerHTML = 'Move your mouse to control your cell<br/>Press <b>Space</b> to split<br/>Press <b>W</b> to eject some mass'; $('#mainBlock').append(newElement); // </div> // <div class='block' id='skinsBlock'> // <div class='container'> newElement = document.createElement('div'); newElement.setAttribute('class', 'container'); newElement.style.marginTop = '14px'; $('#skinsBlock').append(newElement); // <div id='skinPreview'> newElement = document.createElement('div'); newElement.setAttribute('id', 'skinPreview'); $('.container').last().append(newElement); // </div> // <div id='previous'> newElement = document.createElement('div'); newElement.setAttribute('id', 'previous'); $('.container').last().append(newElement); // <img /> newElement = document.createElement('img'); newElement.src = 'http://i.imgur.com/yMOpYxj.png'; $('#previous').append(newElement); // </div> // <div id='next'> newElement = document.createElement('div'); newElement.setAttribute('id', 'next'); $('.container').last().append(newElement); // <img /> newElement = document.createElement('img'); newElement.src = 'http://i.imgur.com/NuIdOb3.png'; $('#next').append(newElement); // </div> // </div> // <div class='container'> newElement = document.createElement('div'); newElement.setAttribute('class', 'container'); newElement.style.marginTop = '14px'; $('#skinsBlock').append(newElement); // <input type='text' class='form-control' id='skin'/> newElement = document.createElement('input'); newElement.setAttribute('type', 'text'); newElement.setAttribute('class', 'form-control'); newElement.setAttribute('id', 'skin'); newElement.placeholder = 'Skin URL'; $('.container').last().append(newElement); // </div> // </div> // <div class='block' id='partyBlock'> // <div class='container'> newElement = document.createElement('div'); newElement.setAttribute('class', 'container'); newElement.style.marginTop = '14px'; newElement.innerHTML = 'Play with your friends in the same map'; $('#partyBlock').append(newElement); // </div> // <div class='container'> newElement = document.createElement('div'); newElement.setAttribute('class', 'container'); newElement.style.marginTop = '14px'; $('#partyBlock').append(newElement); // <select id='region'> newElement = document.createElement('select'); newElement.setAttribute('id', 'region'); newElement.required = true; $('.container').last().append(newElement); for(i = 0; i < regionsValue.length; i++){ // <option> newElement = document.createElement('option'); newElement.value = regionsValue[i]; newText = document.createTextNode(regionsName[i]); $(newElement).append(newText); $('#region').append(newElement); // </option> } // </select> // </div> // <div class='container'> newElement = document.createElement('div'); newElement.setAttribute('class', 'container'); newElement.style.marginTop = '6px'; $('#partyBlock').append(newElement); // <input type='text' class='form-control partyToken' id='joinPartyToken'/> newElement = document.createElement('input'); newElement.setAttribute('type', 'text'); newElement.setAttribute('class', 'form-control partyToken'); newElement.setAttribute('id', 'joinPartyToken'); newElement.placeholder = 'Party Token'; $('.container').last().append(newElement); // <div id='create-party-btn'> newElement = document.createElement('div'); newElement.setAttribute('id', 'create-party-btn'); $('.container').last().append(newElement); // <img /> newElement = document.createElement('img'); newElement.src = 'http://i.imgur.com/Vb1cSKP.png'; $('#create-party-btn').append(newElement); // </div> // </div> // <div class='container'> newElement = document.createElement('div'); newElement.setAttribute('class', 'container'); newElement.style.marginTop = '14px'; $('#partyBlock').append(newElement); // <button class='btn' id='join-party-btn'> newElement = document.createElement('button'); newElement.setAttribute('class', 'btn'); newElement.setAttribute('id', 'join-party-btn'); newText = document.createTextNode('JOIN'); $(newElement).append(newText); $('.container').last().append(newElement); // </button> // </div> // </div> for(i = 0; i < tab_blockId.length; i++){ // <div class='tab'> newElement = document.createElement('div'); newElement.setAttribute('class', 'tab'); $('#mainPanel').append(newElement); // <div class='block'> newElement = document.createElement('div'); newElement.setAttribute('class', 'block'); newElement.setAttribute('id', tab_blockId[i]); newText = document.createTextNode(tab_blockName[i]); $(newElement).append(newText); $('.tab').last().append(newElement); // <div class='close'> newElement = document.createElement('div'); newElement.setAttribute('class', 'close'); $('.block').last().append(newElement); // <img /> newElement = document.createElement('img'); newElement.src = 'http://i.imgur.com/qiFAg2E.png'; $('.close').last().append(newElement); // </div> // </div> // </div> } // <div class='tab'> // <div class='block' id='settingsBlock'> // <div class='container container-scroll'> newElement = document.createElement('div'); newElement.setAttribute('class', 'container container-scroll'); newElement.style.marginTop = '14px'; $('#settingsBlock').append(newElement); for(i = 0; i < settingsName.length; i++){ // <div class='ground settings'> newElement = document.createElement('div'); newElement.setAttribute('class', 'ground settings'); newText = document.createTextNode(settingsName[i]); $(newElement).append(newText); $('.container').last().append(newElement); // <div class='switchOff'> newElement = document.createElement('div'); newElement.setAttribute('class', 'switchOff'); $('.ground').last().append(newElement); // </div> // </div> } // </div> // </div> // </div> // <div class='tab'> // <div class='block' id='commandsBlock'> // <div class='container container-scroll'> newElement = document.createElement('div'); newElement.setAttribute('class', 'container container-scroll'); newElement.style.marginTop = '14px'; $('#commandsBlock').append(newElement); for(i = 0; i < commandsName.length; i++){ // <div class='ground commands'> newElement = document.createElement('div'); newElement.setAttribute('class', 'ground commands'); newText = document.createTextNode(commandsName[i]); $(newElement).append(newText); $('.container').last().append(newElement); // <input type='button' class='key'/> newElement = document.createElement('input'); newElement.setAttribute('type', 'button'); newElement.setAttribute('class', 'key'); $('.ground').last().append(newElement); // </div> } // </div> // </div> // </div> // <div class='tab'> // <div class='block' id='themeBlock'> // <div class='container container-scroll'> newElement = document.createElement('div'); newElement.setAttribute('class', 'container container-scroll'); newElement.style.marginTop = '14px'; $('#themeBlock').append(newElement); for(i = 0; i < themesName.length; i++){ // <div class='ground settings'> newElement = document.createElement('div'); newElement.setAttribute('class', 'ground theme'); newText = document.createTextNode(themesName[i]); $(newElement).append(newText); $('.container').last().append(newElement); // </div> } // </div> // </div> // </div> // </div> // </body> } window.game = { play: false, playerNick: '', playerX: 0, playerY: 0, playerCells: [], playerCellsMass: [], playerMass: 0, nameMemOffset: null, cellMemOffset: null, idOffset: null, idMemOffset: null, viewScale: 1, canvasScale: 1, zoomValue: 0, customDraw: null, food: true, foodCache: [], foodColor: '#aaaaaa', virusColor: '#33ff33', virusStrokeColor: '#2de52d', globalAlpha: 1, virusAlpha: 0.8, showSkins: true, hideMass: true, customSkins: true, hideMyName: true, hideMyMass: true, autoHideFood: true, autoHideCellsStats: true, getString: null, getSkin: null, setAutoHideCellsStats: function(e){ return e < 40 || this.viewScale < 0.5 && e < 500 && e < 24 / this.viewScale? true: false; } }; function setGameProperties(){ var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function(){ if(xmlhttp.readyState == 4){ var s = xmlhttp.responseText; s = s.replace(/(\(function\(([\w$]+)\){)/i, '$1 var agario = $2.game, gameContext = null;'); s = s.replace(/[\w$]+\(\w,\w\);[\w$]+\(\w,\w\);[\w$]+\(\w,\w\);[\w$]+\(\w,\w\);(\w\[\w\+\d+>>0\]=1;\w=\w;return})/i, '$1'); s = s.replace(/[\w$]+\(\w,\d+,15\);else/i, '{}'); s = s.replace(/(\d\.\d;return}function\s*)([\w$]+\(.,.\)){/i, '$1 $2{return;'); s = s.replace(/(([\w$]+)=[\w$]+\.getContext\(\"2d\"\);)/i, "if($2.id == 'canvas'){$1 gameContext = $2;}else{$1}"); s = s.replace(/(function\s*([\w$]+)\(\w\){return\s*[\w$]+\(\w,\w\)})/i, '$1 agario.getString = $2;'); s = s.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 agario.viewScale = $2; agario.playerX = $4; agario.playerY = $5; if(agario.customDraw){agario.customDraw(gameContext);}'); s = s.replace(/if\((\+\w\[\w>>3\])<1\.0\)/i, 'if($1 < agario.zoomValue)'); s = s.replace(/(if\(\(\w\[\d+\]\|0\)!=0\?\(\w\[\d+\]\|\w\[\w\+\d+>>0\]\)<<24>>24==0:0\))(\w)=\w\[\w\+\d+>>2\]\|0;/i, '$1 $2 = 0;'); s = s.replace(/(if\(\(\w\[\d+\]\|0\)!=0\?\(\w\[\d+\]\|\w\[(\w)\+\d+>>0\]\)<<24>>24==0:0\))((\w)=\w\[(\w)\+\d+>>2\]\|0;)/i, 'agario.cellMemOffset = $2; $1 if(agario.customSkins){$4 = 0;} else{$3}'); s = s.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, skin = null, cellSize = null, food = false, virus = false, playerCell = false, skipCell = false; do if($1 = 1, $1){cellSize = $4; $2 if(!$3){food = true; if(agario.autoHideFood && agario.playerMass > 1000){agario.food = false;}agario.foodCache.push({x: $6, y: $7, size: cellSize});}$5 $8 if($3){if(gameContext){agario.globalApha = gameContext.globalAlpha; if(gameContext.lineJoin == 'miter'){virus = true; gameContext.fillStyle = agario.virusColor; gameContext.strokeStyle = agario.virusStrokeColor; gameContext.stroke(); gameContext.globalAlpha = agario.virusAlpha;}else{if(agario.nameMemOffset && agario.cellMemOffset && agario.getString){if((a[agario.cellMemOffset + agario.nameMemOffset + 4 >> 0] & 1) == 0 | 0){nick = agario.getString(agario.cellMemOffset + agario.nameMemOffset + 5);}else{nick = agario.getString(c[agario.cellMemOffset + agario.nameMemOffset + 12 >> 2] | 0);}}if(nick && nick.length > 0){if(agario.showSkins && agario.customSkins && agario.getSkin){skin = agario.getSkin(nick);}}if(agario.play){if(agario.cellMemOffset && agario.idOffset && agario.idMemOffset){var idA = c[agario.cellMemOffset + agario.idOffset >> 2] | 0; var idB = c[agario.idMemOffset] | 0; var idC = c[agario.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); playerCell = (idB | 0) != (idC | 0);}if(playerCell && agario.playerCells){agario.playerCells.push({x: $6, y: $7, size: cellSize});}}else{$9}}$13 gameContext.globalAlpha = agario.globalApha; if(skin){gameContext.save(); gameContext.clip(); gameContext.drawImage(skin, $6 - cellSize, $7 - cellSize, 2 * cellSize, 2 * cellSize); gameContext.restore();}}else{$9 $13}break;"); s = s.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(gameContext && agario){gameContext.globalAlpha = agario.globalApha;}$1 if(!(skipCell || (agario.autoHideCellsStats && agario.setAutoHideCellsStats && cellSize && !food && !virus && !playerCell && agario.setAutoHideCellsStats(cellSize)))){$2}'); s = s.replace(/(\w=0;\w=\w\[\w\+(\d+)>>2\]\|0;\w=\w\[(\d+)\]\|0;\w=\w\[\d+\]\|0;)(\w:do)/i, '$1 agario.idOffset = $2; agario.idMemOffset = $3; $4'); s = s.replace(/(\w=\w\+5\+\(\(\w\|0\)\/)2(\|0\)\|0)/i, '$1 1.5 $2'); s = s.replace(/((\w)=\+[\w$]+\(\+\(\+[\w$]+\(\d+\)\*10.0\)\)\/10.0;)/i, '$1 if($2 < 0.3){$2 = 0.3}'); s = s.replace(/((\w)=\(\w\|0\)<20\?20.0:\+\(\w\|0\);)/i, '$1 $2 *= 2;'); s = s.replace(/do\s+if\((\w)\|(\(\w\[\d+\]\|0\)\!=0)\){/i, 'do if(($2 && !($1 && agario.hideMyName)) || !agario.nameMemOffset){'); s = s.replace(/(\w=\w\+(\d+)\|0;\w=~~\(\+\w\[\w\+\d+>>2\]\*\.3\);)/i, '$1 agario.nameMemOffset = $2;'); s = s.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 && agario.hideMyMass || !$5 && agario.hideMass $3 $6'); eval(s); } }; xmlhttp.open('GET', 'http://agar.io/agario.core.js', true); xmlhttp.send(null); } function getSkin(){ var img = document.createElement('img'); img.src = document.getElementById('skin').value; img.onload = (function(){ document.getElementById('skinPreview').style.backgroundImage = 'url(' + img.src + ')'; skins[profile] = img.src; }); img.onerror = (function(){ document.getElementById('skinPreview').style.backgroundImage = "url('http://i.imgur.com/Xny8hRU.png')"; document.getElementById('skin').value = null; skins[profile] = null; }); } function changeProfile(i){ if(i == 'previous'){ if(profile > 0) profile--; else profile = 9; } else if(i == 'next'){ if(profile < 9) profile++; else profile = 0; } document.getElementById('skinPreview').style.backgroundImage = skins[profile]? 'url(' + skins[profile] + ')': "url('http://i.imgur.com/Xny8hRU.png')"; document.getElementById('skin').value = skins[profile]; } function toggleSetting(i){ if(settings[i] === false){ settings[i] = true; $('.settings')[i].children[0].className = 'switchOn'; } else if(settings[i] === true){ settings[i] = false; $('.settings')[i].children[0].className = 'switchOff'; } } function changeKey(i, e){ var j; for(j = 0; j < commands.length; j++) if(e == commands[j]) return; commands[i] = e; $('.key')[i].value = String.fromCharCode(e); } function stopMovement(){ $('canvas').trigger($.Event('mousemove', {clientX: window.innerWidth / 2, clientY: window.innerHeight / 2})); } function splitInto(n){ var i; for(i = 0; i < n; i++){ $('body').trigger($.Event('keydown', {keyCode: 32})); $('body').trigger($.Event('keyup', {keyCode: 32})); } } function ejectMass(){ var n = setInterval(function(){ window.onkeydown({keyCode: 87}); window.onkeyup({keyCode: 87}); }, null); $(document).on('keyup', function(){ clearInterval(n); }); } $(function(){ loadContent(); setGameProperties(); $(document).on('mousemove', function(e){ if($('#mainPanel').is(e.target) && e.pageX === 0) $('#sideBar').show(); else if($('.tab').is(e.target) || e.pageX > 92) $('#sideBar').hide(); }); $(document).on('keydown', function(e){ switch(e.keyCode){ case commands[0]: stopMovement(); break; case commands[1]: splitInto(2); break; case commands[2]: splitInto(4); break; case commands[3]: ejectMass(); break; case commands[4]: toggleSetting(0); break; case commands[5]: toggleSetting(1); break; case commands[6]: toggleSetting(2); break; case commands[7]: toggleSetting(3); break; case commands[8]: toggleSetting(11); break; case commands[9]: toggleSetting(12); break; case commands[10]: toggleSetting(13); break; case commands[11]: toggleSetting(14); break; case commands[12]: toggleSetting(15); break; } }); $('#skin').on('change', function(){ getSkin(); }); $('#skinPreview').on('click', function(){ $('#skin').select(); }); $('#previous').on('click', function(){ changeProfile('previous'); }); $('#next').on('click', function(){ changeProfile('next'); }); $('#region').on('change', function(){ MC.setRegion($('#region').val()); }); $('#play-btn').on('click', function(){ FB.getLoginStatus(function(e){ if(e.status !== 'connected') facebookLogin(); }); MC.setNick(document.getElementById('nick').value); }); $('.icon').on('click', function(){ var i = $(this).index(); $($('.tab')[i]).show(); }); $('.tab').on('click', function(e){ if(!$(this).has(e.target).length) $(this).hide(); }); $('.close').on('click', function(){ $(this).parents('.tab').hide(); }); $('.settings').on('click', function(){ var i = $(this).index(); toggleSetting(i); }); $('.commands').on('click', function(){ var i = $(this).index(); $($('.key')[i]).focus(); $(this).on('keydown', function(e){ changeKey(i, e.keyCode); $($('.key')[i]).blur(); }); }); });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址