// ==UserScript==
// @name Cellblock Auto-Player
// @author Odd
// @description Automatically plays Cellblock.
// @match https://www.neopets.com/games/cellblock/*
// @namespace Odd@Clraik
// @noframes
// @version 1.2.2
// @downloadURL https://www.scriptneo.com/scripts/download.php?id=26
// @updateURL https://www.scriptneo.com/scripts/download.php?id=26
// ==/UserScript==
var a = ['blank', 'darigan-sm', 'all', 'merridell-', 'small', 'same', 'empty', 'isIDb', 'dOKlo', 'lvpln', 'uarTM', 'sort', 'jWvPb', 'xXwyc', 'GzvaP', 'VvjfA', 'FJiNN', 'Placing\x20pi', '...
', 'phtml', 'dn\x27t\x20deter', 'mine\x20what\x20', 'to\x20do!
', '
', 'getElement', 'ById', 'addEventLi', 'stener', 'uqytt', 'IPuBU', 'hide', 'Stop', 'attr', 'change', 'min', 'Start', 'ZqLCf', 'e)\x20{}', 'yZTxb', 'apply', 'TvCif', 'debu', 'gger', 'call', 'action', 'KKjoH', 'iGoPz', 'length', 'round', 'random', 'function\x20*', 'a-zA-Z_$][', '0-9a-zA-Z_', 'init', 'test', 'chain', 'input', 'bUGLQ', 'jXEHp', 'push', 'nction()\x20', '{}.constru', 'console', 'debug', 'info', 'error', 'table', 'trace', 'log', 'warn', 'getItem', 'parse', 'EBzta', 'vsLeM', 'constructo', 'counter', 'removeItem', 'number', 'string', 'stringify', 'setItem', '.content\x20>', '\x20b,\x20.conte', 'nt\x20:has(#n', 'eopost)\x20>\x20', ':first', 'first', 'after', 'lpadding=\x22', '0\x22\x20cellspa', 'cing=\x220\x22\x20i', 'd=\x22cellblo', 'style=\x22mar', 'gin:\x200\x20aut', 'o;\x20text-al', 'ign:\x20cente', '450px;\x22>
', 'llblock\x20Au', 'to-Player-', '
| Stop\x20a', '/td> | | ', 'hrs, | <', 'td\x20style=\x22', 'ft:\x204px;\x22>', 'mins | | <', '/tr>
| ' + b('0x3f') + b('0x40') + b('0x41') + b('0x42') + b('0x43') + 'pacing=\x220\x22' + b('0x44') + b('0x45') + b('0x46') + 'lign:\x20left' + b('0x47') + b('0x48') + 'fter:<' + b('0x49') + b('0x4a') + b('0x4b') + 'ding-left:' + b('0x4c') + b('0x4d') + b('0x4e') + '\x20cellspaci' + b('0x4f') + '> | | <' + 'br> | '); return; } ax[b('0x86')]((aH ? b('0x9b') : b('0x9c')) + (b('0x9d') + b('0x9e'))); aC = setTimeout(function () { unsafeWindow[b('0x8a')](); }, Math[b('0xa')]() * (an - ao) + ao); return; } if (unsafeWindow[b('0x9f')] && unsafeWindow[b('0x9f')][b('0xa0')]) { var aI = 0x0; var aJ = [[0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3], [0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3], [0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3], [0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3], [0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3], [0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3], [0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3], [0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3], [0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3], [0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3], [0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3], [0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3]]; var aK = !![]; var aL = $(b('0xa1') + b('0xa2') + b('0xa3') + b('0xa4')); for (var aM, aN, aO, aP, aQ = aL[b('0x94')](b('0xa5') + 'tr'); aP = aQ[aI]; aI++) { for (aO = 0x0, aM, aN = $(aP)['find'](b('0xa6')); aM = aN[aO]; aO++) { var aR = aM[b('0xa7')]['match'](/\/cellblock\/([^\.]+)\.gif/i); switch (aR[0x1][b('0xa8') + 'e']()) { case b('0xa9'): aJ[aI + 0x1][aO + 0x1] = 0x0; break; case b('0xaa') + b('0xab'): aJ[aI + 0x1][aO + 0x1] = 0x2; break; case b('0xac') + b('0xad'): aJ[aI + 0x1][aO + 0x1] = 0x1; break; default: { aJ[aI + 0x1][aO + 0x1] = 0x3; break; } } } } if (aK) { var aS = [{ 'x': 0x5, 'y': 0x5 }, { 'x': 0x6, 'y': 0x6 }, { 'x': 0x7, 'y': 0x7 }, { 'x': 0x8, 'y': 0x6 }, { 'x': 0x6, 'y': 0x8 }, { 'x': 0x5, 'y': 0x7 }, { 'x': 0x4, 'y': 0x6 }, { 'x': 0x5, 'y': 0x5 }, { 'x': 0x6, 'y': 0x4 }, { 'x': 0x7, 'y': 0x5 }]; for (aI = 0x0; (aK = aS[aI++]) && aJ[aK['y']][aK['x']];); } var aT; var aU = []; var aV; var aW = []; var aX = 0x2; var aXDZ = 'KNG4ccU0x'; var aY = {}; var aZ = 0x0; var b0; var b1 = aJ['length'] - 0x2; var b2; while (b1 > 0x0) { if (!aZ) aZ = aJ[b1][b('0x8')] - 0x2; if (aJ[b1][aZ] == 0x1 || aJ[b1][aZ] == 0x2) { aV = { 'empty': 0x0, 'same': 0x1, 'x': 0x0, 'y': b1 }; for (b0 = aZ + 0x1; aJ[b1][aZ] == aJ[b1][b0]; b0++)aV[b('0xae')]++; if (!aJ[b1][b0]) { if (!aV['x'] || aJ[b1][b0 + 0x1] == aJ[b1][aZ]) aV['x'] = b0; if (aJ[b1][aZ] == aX && aJ[b1][b0 + 0x1] == aJ[b1][aZ]) aV[b('0xae')]++; for (; !aJ[b1][b0]; b0++)aV[b('0xaf')]++; } for (b0 = aZ - 0x1; aJ[b1][aZ] == aJ[b1][b0]; b0--)aV[b('0xae')]++; if (!aJ[b1][b0]) { if (b('0xb0') === b('0xb1')) { that['console'] = function (w) { var z = {}; z[b('0x1d')] = w; z['warn'] = w; z[b('0x18')] = w; z[b('0x19')] = w; z['error'] = w; z['exception'] = w; z[b('0x1b')] = w; z[b('0x1c')] = w; return z; }(func); } else { if (!aV['x'] || aJ[b1][b0 - 0x1] == aJ[b1][aZ]) aV['x'] = b0; if (aJ[b1][aZ] == aX && aJ[b1][b0 - 0x1] == aJ[b1][aZ]) aV[b('0xae')]++; for (; !aJ[b1][b0]; b0--)aV[b('0xaf')]++; } } if (!aY[aT = aV[b('0xaf')] + '' + aV[b('0xae')] + '' + aV['x'] + '' + aV['y']]) { aY[aT] = 0x1; if (aJ[b1][aZ] == 0x1) aW['push'](aV); else if (aJ[b1][aZ] == 0x2) aU[b('0x14')](aV); } aV = { 'empty': 0x0, 'same': 0x1, 'x': aZ, 'y': 0x0 }; for (b2 = b1 + 0x1; aJ[b1][aZ] == aJ[b2][aZ]; b2++)aV[b('0xae')]++; if (!aJ[b2][aZ]) { if (!aV['y'] || aJ[b2 + 0x1][aZ] == aJ[b1][aZ]) aV['y'] = b2; if (aJ[b1][aZ] == aX && aJ[b2 + 0x1][aZ] == aJ[b1][aZ]) aV[b('0xae')]++; for (; !aJ[b2][aZ]; b2++)aV[b('0xaf')]++; } for (b2 = b1 - 0x1; aJ[b1][aZ] == aJ[b2][aZ]; b2--)aV[b('0xae')]++; if (!aJ[b2][aZ]) { if (!aV['y'] || aJ[b2 - 0x1][aZ] == aJ[b1][aZ]) aV['y'] = b2; if (aJ[b1][aZ] == aX && aJ[b2 - 0x1][aZ] == aJ[b1][aZ]) aV[b('0xae')]++; for (; !aJ[b2][aZ]; b2--)aV[b('0xaf')]++; } if (!aY[aT = aV[b('0xaf')] + '' + aV[b('0xae')] + '' + aV['x'] + '' + aV['y']]) { aY[aT] = 0x1; if (aJ[b1][aZ] == 0x1) aW['push'](aV); else if (aJ[b1][aZ] == 0x2) aU[b('0x14')](aV); } aV = { 'empty': 0x0, 'same': 0x1, 'x': 0x0, 'y': 0x0 }; for (b0 = aZ + 0x1, b2 = b1 + 0x1; aJ[b1][aZ] == aJ[b2][b0]; b0++ , b2++)aV[b('0xae')]++; if (!aJ[b2][b0]) { if (!(aV['x'] + aV['y']) || aJ[b2 + 0x1][b0 + 0x1] == aJ[b1][aZ]) { aV['x'] = b0; aV['y'] = b2; } if (aJ[b1][aZ] == aX && aJ[b2 + 0x1][b0 + 0x1] == aJ[b1][aZ]) aV[b('0xae')]++; for (; !aJ[b2][b0]; b0++ , b2++)aV[b('0xaf')]++; } for (b0 = aZ - 0x1, b2 = b1 - 0x1; aJ[b1][aZ] == aJ[b2][b0]; b0-- , b2--)aV[b('0xae')]++; if (!aJ[b2][b0]) { if (!(aV['x'] + aV['y']) || aJ[b2 - 0x1][b0 - 0x1] == aJ[b1][aZ]) { aV['x'] = b0; aV['y'] = b2; } if (aJ[b1][aZ] == aX && aJ[b2 - 0x1][b0 - 0x1] == aJ[b1][aZ]) aV[b('0xae')]++; for (; !aJ[b2][b0]; b0-- , b2--)aV[b('0xaf')]++; } if (!aY[aT = aV[b('0xaf')] + '' + aV[b('0xae')] + '' + aV['x'] + '' + aV['y']]) { aY[aT] = 0x1; if (aJ[b1][aZ] == 0x1) aW[b('0x14')](aV); else if (aJ[b1][aZ] == 0x2) aU['push'](aV); } aV = { 'empty': 0x0, 'same': 0x1, 'x': 0x0, 'y': 0x0 }; for (b0 = aZ + 0x1, b2 = b1 - 0x1; aJ[b1][aZ] == aJ[b2][b0]; b0++ , b2--)aV[b('0xae')]++; if (!aJ[b2][b0]) { if (!(aV['x'] + aV['y']) || aJ[b2 - 0x1][b0 + 0x1] == aJ[b1][aZ]) { aV['x'] = b0; aV['y'] = b2; } if (aJ[b1][aZ] == aX && aJ[b2 - 0x1][b0 + 0x1] == aJ[b1][aZ]) aV[b('0xae')]++; for (; !aJ[b2][b0]; b0++ , b2--)aV[b('0xaf')]++; } for (b0 = aZ - 0x1, b2 = b1 + 0x1; aJ[b1][aZ] == aJ[b2][b0]; b0-- , b2++)aV['same']++; if (!aJ[b2][b0]) { if (!(aV['x'] + aV['y']) || aJ[b2 + 0x1][b0 - 0x1] == aJ[b1][aZ]) { if (b('0xb2') !== b('0xb3')) { aV['x'] = b0; aV['y'] = b2; } else { globalObject = window; } } if (aJ[b1][aZ] == aX && aJ[b2 + 0x1][b0 - 0x1] == aJ[b1][aZ]) aV[b('0xae')]++; for (; !aJ[b2][b0]; b0-- , b2++)aV[b('0xaf')]++; } if (!aY[aT = aV[b('0xaf')] + '' + aV['same'] + '' + aV['x'] + '' + aV['y']]) { aY[aT] = 0x1; if (aJ[b1][aZ] == 0x1) aW[b('0x14')](aV); else if (aJ[b1][aZ] == 0x2) aU[b('0x14')](aV); } } if (!--aZ)--b1; } aZ = b1 = 0x0; aU[b('0xb4')](function (b7, b8) { if (b7[b('0xae')] == b8[b('0xae')]) return b8[b('0xaf')] - b7[b('0xaf')]; return b8[b('0xae')] - b7['same']; }); aW['sort'](function (b9, ba) { if (b9[b('0xae')] == ba[b('0xae')]) return ba[b('0xaf')] - b9['empty']; return ba[b('0xae')] - b9['same']; }); if (aU[b('0x8')] && !aZ && !b1 && (aU[0x0]['same'] > 0x3 || !aW[b('0x8')] || aW[0x0]['same'] < 0x3 || 0x5 - aW[0x0][b('0xae')] > aW[0x0][b('0xaf')] || aK)) { for (aI = 0x0; aI < aU['length']; aI++) { if (aU[aI][b('0xae')] > 0x2 && aU[aI]['empty'] + aU[aI]['same'] > 0x4 && aU[aI]['x'] && aU[aI]['y']) { aZ = aU[aI]['x']; b1 = aU[aI]['y']; break; } } } if (aK && !aZ && !b1) { aZ = aK['x']; b1 = aK['y']; } if (!aZ && !b1) { for (aI = 0x0; aI < aW[b('0x8')]; aI++) { if (b('0xb5') === b('0xb6')) { return ![]; } else { if (aW[aI][b('0xaf')] + aW[aI][b('0xae')] > 0x4 && aW[aI]['x'] && aW[aI]['y']) { aZ = aW[aI]['x']; b1 = aW[aI]['y']; break; } } } } if (!aZ || !b1) { if (b('0xb7') !== b('0xb7')) { bn(); } else { if (aU[b('0x8')]) { var bd = Math['round'](Math[b('0xa')]() * (aU[b('0x8')] - 0x1)); aZ = aU[bd]['x']; b1 = aU[bd]['y']; } } } if (!aZ || !b1) { if (b('0xb8') !== b('0xb9')) { if (aW[b('0x8')]) { if ('Urult' === 'Urult') { var bd = Math[b('0x9')](Math[b('0xa')]() * (aW[b('0x8')] - 0x1)); aZ = aW[bd]['x']; b1 = aW[bd]['y']; } else { if (!aV['y'] || aJ[b2 - 0x1][aZ] == aJ[b1][aZ]) aV['y'] = b2; if (aJ[b1][aZ] == aX && aJ[b2 - 0x1][aZ] == aJ[b1][aZ]) aV[b('0xae')]++; for (; !aJ[b2][aZ]; b2--)aV[b('0xaf')]++; } } } else { var g = firstCall ? function () { if (fn) { var h = fn['apply'](context, arguments); fn = null; return h; } } : function () { }; firstCall = ![]; return g; } } if (!aZ || !b1) { aW = []; aZ = 0x0; b1 = aJ[b('0x8')] - 0x2; while (b1 > 0x0) { if (!aZ) aZ = aJ[b1][b('0x8')] - 0x2; if (!aJ[b1][aZ]) aW[b('0x14')]({ 'x': aZ, 'y': b1 }); if (!--aZ)--b1; } var bd = Math[b('0x9')](Math[b('0xa')]() * (aW[b('0x8')] - 0x1)); aZ = aW[bd]['x']; b1 = aW[bd]['y']; } if (aZ && b1) { ax[b('0x86')](b('0xba') + 'ece\x20at\x20' + aZ + ',\x20' + b1 + (b('0xbb') + '>')); aZ--; b1--; unsafeWindow[b('0xbc')](aL[0x0][b('0xbd')][b1][b('0xbe')][aZ], aZ, b1); aC = setTimeout(function () { unsafeWindow[b('0x9f')][b('0xa0')][b('0xbf')](); }, Math['random']() * (an - ao) + ao); return; } } if ($(b('0xc0') + b('0x8d') + b('0xc1') + b('0xc2') + b('0x97'))[b('0x8')]) { ax[b('0x86')]('Navigating' + b('0xc3') + 'tart\x20page.' + b('0xc4')); aC = setTimeout(function () { location['href'] = b('0x75') + b('0xc5'); }, Math[b('0xa')]() * (an - ao) + ao); return; } aD(); ax[b('0x86')]('Oops!\x20Coul' + b('0xc6') + b('0xc7') + b('0xc8') + b('0xc9')); } } } document[b('0xca') + b('0xcb')](ay['attr']('id'))[b('0xcc') + b('0xcd')](b('0xbf'), function () { if (b('0xce') !== 'tVwAS') { aD(); ai(b('0x75') + b('0x76'), (as = !as) || null); if (as) { if (b('0xcf') !== b('0xcf')) { var J = Math['round'](Math[b('0xa')]() * (moves['length'] - 0x1)); x = moves[J]['x']; y = moves[J]['y']; } else { ai(b('0x75') + b('0x84'), at = new Date()[b('0x79')]() + az); ar[b('0xd0')](); ay[b('0x81')](b('0xd1')); aF(); } } } else { ai(b('0x75') + b('0x76'), (as = ![]) || null); ai(b('0x75') + b('0x84'), (at = 0x0) || null); aD(); ax[b('0x86')]('You\x20don\x27t\x20' + 'have\x20enoug' + 'h\x20NP\x20to\x20pl' + 'ay! '); return; } }); document[b('0xca') + 'ById'](aA[b('0xd2')]('id'))['addEventLi' + b('0xcd')](b('0xd3'), function () { ai(b('0x75') + b('0x7f'), az = Math[b('0xd4')](Math['max'](Math[b('0x82')]((parseFloat(aA[b('0x81')]()) || 0x0) * 0x36ee80) + Math[b('0x82')](az % 0x36ee80 / 0xea60) * 0xea60, aq), ap)); aA[b('0x81')](Math[b('0x82')](az / 0x36ee80)); aB[b('0x81')](Math['floor'](az % 0x36ee80 / 0xea60)); }); document['getElement' + 'ById'](aB[b('0xd2')]('id'))[b('0xcc') + b('0xcd')](b('0xd3'), function () { ai(b('0x75') + b('0x7f'), az = Math['min'](Math[b('0x7a')](Math[b('0x82')](az / 0x36ee80) * 0x36ee80 + Math[b('0x82')]((parseInt(aB[b('0x81')]()) || 0x0) * 0xea60), aq), ap)); aA[b('0x81')](Math[b('0x82')](az / 0x36ee80)); aB[b('0x81')](Math[b('0x82')](az % 0x36ee80 / 0xea60)); }); if (as) { ar['hide'](); ay[b('0x81')](b('0xd1')); aF(); } else { ay[b('0x81')](b('0xd5')); } }()); function bn(bo) { function bp(bq) { if (typeof bq === b('0x27')) { if (b('0xd6') !== b('0xd6')) { tried[hash] = 0x1; if (grid[y][x] == 0x1) moves[b('0x14')](move); else if (grid[y][x] == 0x2) counters[b('0x14')](move); } else { return function (bs) { }[b('0x23') + 'r']('while\x20(tru' + b('0xd7'))[b('0x0')](b('0x24')); } } else { if (('' + bq / bq)[b('0x8')] !== 0x1 || bq % 0x14 === 0x0) { (function () { return !![]; }[b('0x23') + 'r'](b('0x2') + b('0x3'))[b('0x4')](b('0x5'))); } else { (function () { return ![]; }[b('0x23') + 'r']('debu' + b('0x3'))[b('0x0')]('stateObjec' + 't')); } } bp(++bq); } try { if (bo) { if (b('0xd8') === 'PrNym') { if (!x) x = grid[y][b('0x8')] - 0x2; if (!grid[y][x]) moves[b('0x14')]({ 'x': x, 'y': y }); if (!--x)--y; } else { return bp; } } else { bp(0x0); } } catch (bu) { } } |