Sunday, September 1, 2019

Cookie Clicker Cheats Userscript Essay

// ==UserScript== // @name Cookie Clicker Cheats // @namespace http://userscripts.org/users/zackton // @description Enable/Disable different cheats/hacks for Cookie Clicker // @include http://orteil.dashnet.org/cookieclicker/ // @include orteil.dashnet.org/cookieclicker/ // @updateURL http://userscripts.org/scripts/source/176985.meta.js // @require http://userscripts.org/scripts/source/187400.user.js // @require http://userscripts.org/scripts/source/276064.user.js // @icon http://images2.wikia.nocookie.net/__cb20130827014914/cookieclicker/images/5/5a/PerfectCookie.png // @grant none // @run-at document-end // @version 1.7 // ==/UserScript== // Main wait loop setTimeout(doSomething, 1000); function doSomething() { var element = document.getElementById(‘particle0’); if (typeof (element) != ‘undefined’ && element != null) { //Game particles have loaded, FIRE AWAY! (function () { var options = { panelId: ‘cookie-cheater’, intervalDelay: 1, longDelay: 250, buttons: { ‘bigCookie’: { label: ‘Autoclick Big Cookie’, action: function () { toggleAutoAction(‘bigCookie’, function () { Game.ClickCookie(); }) } }, ‘spawnGoldenCookie’: { label: ‘Spawn a Golden Cookie’, action: function () { Game.goldenCookie.life = 0; Game.goldenCookie.time = Game.goldenCookie.minTime; Game.goldenCookie.spawn(); } }, ‘autoGoldenCookie’: { label: ‘Autospawnclick GCs’, action: function () { toggleAutoAction(‘autoGoldenCookie’, function () { if (Game.frenzy 0) { Game.goldenCookie.last = â€Å"blood frenzy† } else { Game.goldenCookie.last = â€Å"frenzy† } Game.frenzy = 1 } if (Game.frenzy > 0) { Game.goldenCookie.toDie = 1 } if (Game.goldenCookie.life >= 0 && (Game.frenzy 0)) { Game.goldenCookie.click(); } }) } }, ‘autoBuyUpgrades’: { label: ‘Autobuy Upgrades’, action: function () { toggleAutoAction(‘autoBuyUpgrades’, function () { buyUpgrades(); }) } }, ‘fuckThemWrinklers’: { label: ‘Slaughter Wrinklers’, action: function () { toggleAutoAction(‘fuckThemWrinklers’, function () { setTimeout(function() { for (var i in Game.wrinklers) { var me=Game.wrinklers[i]; if (me.phase==2) { me.hurt=1; me.hp–; var x=me.x+(Math.sin(me.r*Math.PI/180)*100); var y=me.y+(Math.cos(me.r*Math.PI/180)*100); for (var ii=0;ii 0) {Game.seasonPopup.click()}},Math.floor(((Math.random()*7)+3)*2500)); }) } }, } }; addStyleSheet(); addPanel(); for (var name in options.buttons) { if (!options.buttons[name]) { return; } addButton(name, options.buttons[name].label, options.buttons[name].action); } function buyUpgrades() { for (var i = 0; i < Game.UpgradesById.length; i++) { if ((i > 63 && i < 75) || i === 79 || (i > 82 && i < 86) || i === 91 || i === 124 || (i > 140 && i < 143) || i === 167 || (i > 181 && i < 186)) { continue; } else { if (Game.UpgradesById[i].unlocked === 1) { if(Game.cookies >= Game.UpgradesById[i].basePrice) { Game.UpgradesById[i].buy(); } } } } } //Lets bind some keys!!! //Buys one of specified building Mousetrap.bind(‘shift+1’, function() { Game.ObjectsById[Game.ObjectsById.length – 11].buy(); }); //Cursor Mousetrap.bind(‘shift+2’, function() { Game.ObjectsById[Game.ObjectsById.length – 10].buy(); }); //Grandma Mousetrap.bind(‘shift+3’, function() { Game.ObjectsById[Game.ObjectsById.length – 9].buy(); }); //Farm Mousetrap.bind(‘shift+4’, function() { Game.ObjectsById[Game.ObjectsById.length – 8].buy(); }); //Factory Mousetrap.bind(‘shift+5’, function() { Game.ObjectsById[Game.ObjectsById.length – 7].buy(); }); //Mine Mousetrap.bind(‘shift+6’, function() { Game.ObjectsById[Game.ObjectsById.length – 6].buy(); }); //Shipment Mousetrap.bind(‘shift+7’, function() { Game.ObjectsById[Game.ObjectsById.length – 5].buy(); }); //Alchemy Lab Mousetrap.bind(‘shift+8’, function() { Game.ObjectsById[Game.ObjectsById.length – 4].buy(); }); //Portal Mousetrap.bind(‘shift+9’, function() { Game.ObjectsById[Game.ObjectsById.length – 3].buy(); }); //Time Machine Mousetrap.bind(‘shift+0’, function() { Game.ObjectsById[Game.ObjectsById.length – 2].buy(); }); //Antimatter Condenser Mousetrap.bind(‘shift+-‘, function() { Game.ObjectsById[Game.ObjectsById.length – 1].buy(); }); //Prism //Sells one of specified building Mousetrap.bind(‘option+1’, function() { Game.ObjectsById[Game.ObjectsById.length – 11].sell(); }); //Cursor Mousetrap.bind(‘option+2’, function() { Game.ObjectsById[Game.ObjectsById.length – 10].sell(); }); //Grandma Mousetrap.bind(‘option+3’, function() { Game.ObjectsById[Game.ObjectsById.length – 9].sell(); }); //Farm Mousetrap.bind(‘option+4’, function() { Game.ObjectsById[Game.ObjectsById.length – 8].sell(); }); //Factory Mousetrap.bind(‘option+5’, function() { Game.ObjectsById[Game.ObjectsById.length – 7].sell(); }); //Mine Mousetrap.bind(‘option+6’, function() { Game.ObjectsById[Game.ObjectsById.length – 6].sell(); }); //Shipment Mousetrap.bind(‘option+7’, function() { Game.ObjectsById[Game.ObjectsById.length – 5].sell(); }); //Alchemy Lab Mousetrap.bind(‘option+8’, function() { Game.ObjectsById[Game.ObjectsById.length – 4].sell(); }); //Portal Mousetrap.bind(‘option+9’, function() { Game.ObjectsById[Game.ObjectsById.length – 3].sell(); }); //Time Machine Mousetrap.bind(‘option+0’, function() { Game.ObjectsById[Game.ObjectsById.length – 2].sell(); }); //Antimatter Condenser Mousetrap.bind(‘option+-‘, function() { Game.ObjectsById[Game.ObjectsById.length – 1].sell(); }); //Prism // Awesome textParticle mod, mostly for execution of â€Å"Cookie Clicker Cheats v.X.X launched!† message. Game.textParticlesAdd = function (text, el) { //pick the first free (or the oldest) particle to replace it var highest = 0; var highestI = 0; for (var i in Game.textParticles) { if (Game.textParticles[i].life == -1) { highestI = i; break; } if (Game.textParticles[i].life > highest) { highest = Game.textParticles[i].life; highestI = i; } } var i = highestI; var x = (Math.random() – 0.5) * 40; var y = 0; //+(Math.random()-0.5)*40; if (!el) { var rect = l(‘game’).getBoundingClientRect(); var x = Math.floor((rect.left + rect.right) / 2); var y = Math.floor(((rect.bottom)) – 60); x += (Math.random() – 0.5) * 40; y += 0; //(Math.random()-0.5)*40; } var me = Game.textParticles[i]; if (!me.l) me.l = l(‘particle’ + i); me.life = 0; me.x = x; me.y = y – Game.textParticlesY; if (me.y < 60) { for (var j = 0; j

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.