ControlC
· Pastebin
Login
Register
ControlC
/
Create paste
Paste content
Up to 100 KB of text. BBCode formatting is supported.
Title
- optional
Content
B
I
U
S
</>
Colors ↓
Sizes ↓
Size 1
Size 2
Size 3
Size 4
Size 5
Size 6
Size 7
// ==UserScript==\r\n// @name CUnleash\r\n// @namespace http://tampermonkey.net/\r\n// @version 7.2\r\n// @description Unleash your cookie potential.\r\n// @author petar105\r\n// @match https://orteil.dashnet.org/cookieclicker/\r\n// @icon https://www.google.com/s2/favicons?domain=dashnet.org\r\n// @grant none\r\n// ==/UserScript==\r\n\r\n\r\n// If editing the script, ignore any \"Game is not defined\" warnings\r\n// Script is a mix of original code and other addons\r\n\r\nfunction tapNews() { if (Game.TickerEffect && Game.TickerEffect.type == 'fortune') { Game.tickerL.click(); } }\r\n\r\nsetInterval(function () { tapNews(); }, 3000);\r\n(function() {\r\n 'use strict';\r\n\r\n let state = true; // initial state is ON\r\n let intervalId;\r\n\r\n document.addEventListener('keydown', function(event) {\r\n if (event.code === 'KeyX') {\r\n state = !state; // toggle state\r\n if (state) {\r\n // code to run when state is ON\r\n console.log('State is ON');\r\n startAutoClicker();\r\n } else {\r\n // code to run when state is OFF\r\n console.log('State is OFF');\r\n stopAutoClicker();\r\n }\r\n }\r\n });\r\n\r\n function startAutoClicker() {\r\n console.log('Auto-clicker started');\r\n Game.Notify(`Auto clicker ON`,`Press X to toggle`,[0,35],false);\r\n intervalId = setInterval(function() { Game.ClickCookie(); }, 4);\r\n }\r\n\r\n function stopAutoClicker() {\r\n console.log('Auto-clicker stopped');\r\n Game.Notify(`Auto clicker OFF`,`Press X to toggle`,[0,35],false);\r\n clearInterval(intervalId);\r\n }\r\n\r\n // Wait for the Game object to be defined, then start the auto-clicker\r\n const waitIntervalId = setInterval(function() {\r\n if (typeof Game !== 'undefined') {\r\n clearInterval(waitIntervalId);\r\n startAutoClicker();\r\n }\r\n }, 1000);\r\n})();\r\n\r\n\r\nsetInterval(function() {\r\n Game.shimmers.forEach(function(shimmer)\r\n {\r\n if(shimmer.type == \"golden\" && shimmer.wrath == 0)\r\n {\r\n shimmer.pop()\r\n }\r\n })\r\n}, 500);\r\n\r\nvar autoReindeer = setInterval(function() { for (var h in Game.shimmers){if(Game.shimmers[h].type==\"reindeer\"){Game.shimmers[h].pop();}} }, 100);\r\n\r\n\r\n\r\nvar autoPopTwelveth = setInterval(function() {\r\n var wrinkCount = 0,\r\n wrinkEaten = 0,\r\n wrinkIndex = 10; // value for 10 shinies test\r\n\r\n for (var i in Game.wrinklers) {\r\n // count number of eating wrinks\r\n if (Game.wrinklers[i].sucked > 0) {\r\n wrinkCount += 1;\r\n }\r\n // find top wrink index, ignoring shiny wrinklers\r\n if (Game.wrinklers[i].sucked > wrinkEaten && Game.wrinklers[i].type == 0) {\r\n wrinkEaten = Game.wrinklers[i].sucked;\r\n wrinkIndex = i;\r\n }\r\n }\r\n // pop top wrinkler if 10 eating, unless all 12 are shiny\r\n if (wrinkCount == 10 && wrinkIndex != 10) {\r\n Game.wrinklers[wrinkIndex].hp = 0;\r\n }\r\n}, 60000);\r\n\r\nsetTimeout(function() {\r\n Game.LoadMod(\"https://cookiemonsterteam.github.io/CookieMonster/dist/CookieMonster.js\");\r\n}, 200); // Don't load Cookie Monster parallel with the game, CM loads but the game gets stuck\r\n\r\nsetTimeout(function() {\r\n Game.LoadMod(\"https://rawgit.com/yannprada/cookie-garden-helper/master/cookie-garden-helper.js\");\r\n}, 400); // Same goes for Cookie Garden Helper\r\n\r\n\r\nsetTimeout(function() {\r\n\r\n\r\n // Announce transactions in game notifications\r\n const stockerTransactionNotifications = true\r\n\r\n // Make regular profit reports\r\n const stockerActivityReport = true\r\n // How often to make regular reports in ms (one hour by default)\r\n const stockerActivityReportFrequency = 1000 * 60 * 60\r\n\r\n // Make game notifications fade away on their own\r\n const stockerFastNotifications = false\r\n\r\n // Use console.log for more detailed info on trends\r\n const stockerConsoleAnnouncements = true\r\n\r\n // Logic loop frequency; do not touch it unless you are cheating.\r\n const stockerLoopFrequency = 1000 * 30\r\n\r\n // The cheat itself. Rolls the cycle every time logic loop triggers\r\n const stockerForceLoopUpdates = false\r\n\r\n const stockerGreeting = 'click clack you are now in debt'\r\n\r\n// ===================================================================================\r\n\r\n\r\n\r\nif (!stockList) {\r\n var stockList = {\r\n check: 'dump eet',\r\n goods: [],\r\n sessionStart: new Date(),\r\n sessionProfits: 0,\r\n sessionPurchases: 0,\r\n sessionSales: 0,\r\n stocksRising: 0\r\n }\r\n}\r\n\r\nvar modeDecoder = ['stable','slowly rising','slowly falling','rapidly rising','rapidly falling','fluctuating'] // meanings of each market trend (good.mode)\r\nvar goodIcons = [[2,33],[3,33],[4,33],[15,33],[16,33],[17,33],[5,33],[6,33],[7,33],[8,33],[13,33],[14,33],[19,33],[20,33],[32,33],[33,33],[34,33]];\r\n\r\nfunction stockerTimeBeautifier(duration) {\r\n var milliseconds = Math.floor((duration % 1000) / 100),\r\n //seconds = Math.floor((duration / 1000) % 60),\r\n minutes = Math.floor((duration / (1000 * 60)) % 60),\r\n hours = Math.floor((duration / (1000 * 60 * 60))); //% 24),\r\n //days = Math.floor((duration / (1000 * 60 * 60 * 24)));\r\n\r\n if (hours > 0) {\r\n if (hours == 1) {\r\n hours = hours + ' hour'\r\n }\r\n else hours = hours + ' hours'\r\n }\r\n else hours = -1;\r\n\r\n if (minutes >= 1) {\r\n minutes = (minutes == 1) ? minutes + ' minute' : minutes + ' minutes';\r\n }\r\n else minutes = -1;\r\n\r\n if ((hours != -1) && (minutes != -1)) { return hours + ' and ' + minutes; }\r\n else if ((hours == -1) && (minutes != -1)) { return minutes; }\r\n else if ((hours != -1) && (minutes == -1)) { return hours; }\r\n else if ((hours == -1) && (minutes == -1)) { return 'not that long actually'; }\r\n}\r\n\r\n\r\nsetTimeout(function waitForGame() {\r\n if (typeof Game === 'object' && Game.ready) {\r\n\r\n\r\nGame.registerMod(\"gincookistocker\",{\r\n init:function(){\r\n\r\n this.startStocking();\r\n },\r\n startStocking:function(){\r\n if (!Game.ObjectsById[5].minigame) {\r\n console.log('=====$$$== Stock Market minigame has not initialised yet! Will try again in 500ms.');\r\n setTimeout(() => {\r\n this.startStocking();\r\n },500);\r\n return\r\n }\r\n else {\r\n console.log('=====$$$== CookiStocker logic loop initialised at ' + new Date());\r\n console.log('=====$$$== With main options as follows:')\r\n console.log('=====$$$== Logic loop frequency: ' + stockerTimeBeautifier(stockerLoopFrequency))\r\n console.log('=====$$$== Report frequency: ' + stockerTimeBeautifier(stockerActivityReportFrequency))\r\n console.log('=====$$$== Cheating: ' + stockerForceLoopUpdates)\r\n Game.Notify(`CookiStocker is ready`,stockerGreeting,[1,33],false);\r\n console.log(stockList.check);\r\n }\r\n\r\n var market = Game.ObjectsById[5].minigame.goodsById; // read market\r\n console.log('Reading the market:');\r\n stockList.startingProfits = Game.ObjectsById[5].minigame.profit;\r\n for (let i = 0; i < market.length; i++){\r\n stockList.goods.push({\r\n name: market[i].name,\r\n stock: market[i].stock,\r\n restingPrice: 10*(i+1) + Game.ObjectsById[i].level - 1,\r\n currentPrice: market[i].val,\r\n mode: market[i].mode,\r\n lastMode: market[i].mode,\r\n priceBought: -1,\r\n });\r\n console.log('Stock: ' + market[i].name + ' Status: ' + modeDecoder[market[i].mode]);\r\n }\r\n\r\n if (stockerActivityReport) {\r\n var stockerReportInterval = setInterval(function() {\r\n var stockerUptime = new Date() - stockList.sessionStart;\r\n if ((stockList.sessionPurchases + stockList.sessionSales) == 0) {\r\n Game.Notify(\r\n 'CookiStocker report',\r\n 'This session has been running for ' + stockerTimeBeautifier(stockerUptime) +\r\n ', but no good investment opportunities were detected! Luck is not on our side, yet.'\r\n ,[26,7],stockerFastNotifications\r\n );\r\n } else {\r\n Game.Notify(\r\n 'CookiStocker report',\r\n 'This session has been running for ' + stockerTimeBeautifier(stockerUptime) +\r\n ', and has made ' + stockList.sessionProfits.toFixed(0) +\r\n '$ in ' + stockList.sessionPurchases + ' purchases and ' + stockList.sessionSales + ' sales.'\r\n ,[26,7],stockerFastNotifications\r\n );\r\n }\r\n },stockerActivityReportFrequency);\r\n }\r\n\r\n var stockerLoop = setInterval(function() {\r\n\r\n if (stockerForceLoopUpdates) Game.ObjectsById[5].minigame.tick();\r\n // setting stockerForceLoopUpdates to true will make the logic loop force the market to tick every time it triggers,\r\n // making this an obvious cheat, and i will personally resent you.\r\n\r\n // but\r\n // if you backup your save and set stockerLoopFrequency to like 10 milliseconds it looks very fun and effective.\r\n // yes, this is how i made the gif on the steam guide page.\r\n\r\n\r\n stockList.stocksRising = 0;\r\n\r\n market = Game.ObjectsById[5].minigame.goodsById; // update market\r\n for (let i = 0; i < market.length; i++){\r\n //let i = 3;\r\n\r\n // update stockList\r\n stockList.goods[i].stock = market[i].stock;\r\n stockList.goods[i].currentPrice = market[i].val;\r\n stockList.goods[i].mode = market[i].mode;\r\n\r\n let md = stockList.goods[i].mode;\r\n let lmd = stockList.goods[i].lastMode;\r\n\r\n if (\r\n (md != lmd) && (Game.ObjectsById[i+2].amount > 0) // new trend detected in a stock that is active\r\n )\r\n {\r\n if (stockerConsoleAnnouncements) {\r\n console.log(stockList.goods[i].name + ' has changed the mode from [' + modeDecoder[lmd] + '] to [' + modeDecoder[md] + ']');\r\n }\r\n\r\n if (lmd != 5 && md == 5) { // ignore unstable stocks\r\n if (stockerTransactionNotifications) Game.Notify(stockList.goods[i].name + ' went unstable','Ignoring the stock for a time',[1,33],stockerFastNotifications);\r\n }\r\n\r\n if ( // buy conditions\r\n (\r\n (lmd == 2) && ((md !=4) && (md!=5)) || // slow fall stopped\r\n (lmd == 4) && ((md !=2) && (md!=5)) || // fast fall stopped\r\n (lmd == 5) && ((md !=2) && (md!=4)) // chaotic stopped\r\n )\r\n &&\r\n (stockList.goods[i].currentPrice < stockList.goods[i].restingPrice) // only if the price is lower than resting price\r\n )\r\n {\r\n // buying\r\n stockList.goods[i].priceBought = stockList.goods[i].currentPrice;\r\n Game.ObjectsById[5].minigame.buyGood(i,10000);\r\n stockList.sessionPurchases++;\r\n if (stockerTransactionNotifications) Game.Notify('Buying ' + stockList.goods[i].name,'The price has stopped ' + modeDecoder[stockList.goods[i].lastMode] + ' at ' + Math.floor(stockList.goods[i].priceBought) + '$ per unit, and is ' + modeDecoder[stockList.goods[i].mode] + ' now.',goodIcons[i],stockerFastNotifications);\r\n if (stockerConsoleAnnouncements) console.log('=====$$$== Buying '+ stockList.goods[i].name);\r\n }\r\n\r\n if ( // sell conditions\r\n (stockList.goods[i].stock > 0) // only if the stock is present\r\n &&\r\n (\r\n (lmd == 1) && ((md !=3) && (md!=5)) || // slow rise stopped\r\n (lmd == 3) && ((md !=1) && (md!=5)) || // fast rise stopped\r\n (lmd == 5) && ((md !=1) && (md!=3)) // chaotic stopped\r\n )\r\n && (stockList.goods[i].currentPrice > stockList.goods[i].priceBought) // only if the price is higher than the price it was bought at\r\n )\r\n {\r\n // selling\r\n stockList.goods[i].priceBought = -1;\r\n Game.ObjectsById[5].minigame.sellGood(i,10000);\r\n stockList.sessionSales++;\r\n if (stockerTransactionNotifications) Game.Notify('Selling ' + stockList.goods[i].name,'At a profit of ' + Math.floor(stockList.goods[i].currentPrice - stockList.goods[i].priceBought) + '$ per unit (total ' + Math.floor(stockList.goods[i].currentPrice - stockList.goods[i].priceBought)*stockList.goods[i].stock + '$ profit), and is ' + modeDecoder[stockList.goods[i].mode] + ' now.',goodIcons[i],stockerFastNotifications);\r\n if (stockerConsoleAnnouncements) ('=====$$$== Selling '+ stockList.goods[i].name +' at a profit of ' + (stockList.goods[i].currentPrice - stockList.goods[i].priceBought).toFixed(2));\r\n\r\n }\r\n\r\n stockList.sessionProfits = Game.ObjectsById[5].minigame.profit - stockList.startingProfits;\r\n stockList.goods[i].lastMode = stockList.goods[i].mode // update last mode\r\n }\r\n }\r\n },stockerLoopFrequency);\r\n },\r\n});\r\n\r\n}\r\nelse setTimeout(waitForGame,100)\r\n})\r\n}, 700); // CookiStocker is really fucking glitchy, I don't know why
Password
Anyone with the link will still need this password to view.
Expires
1 hour
3 hours
6 hours
12 hours
24 hours
48 hours
72 hours
Sign in to enable "Never expires".
Create paste
Please verify you are human
Cancel