From d1bf016196d84aa984bee4e99970be8166122120 Mon Sep 17 00:00:00 2001 From: David Duran Rosich Date: Thu, 28 May 2026 16:40:19 +0200 Subject: [PATCH] Add mods --- .gitmodules | 3 ++ CUnleash.js | 100 +++++++++++++++++++++++++++++++++++++++++ CookieMonster | 1 + GoldenCookieClicker.js | 48 ++++++++++++++++++++ 4 files changed, 152 insertions(+) create mode 100644 .gitmodules create mode 100644 CUnleash.js create mode 160000 CookieMonster create mode 100644 GoldenCookieClicker.js diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..bae5f4d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "CookieMonster"] + path = CookieMonster + url = https://github.com/CookieMonsterTeam/CookieMonster.git diff --git a/CUnleash.js b/CUnleash.js new file mode 100644 index 0000000..3dc2e05 --- /dev/null +++ b/CUnleash.js @@ -0,0 +1,100 @@ +// ==UserScript== +// @name CUnleash +// @namespace http://tampermonkey.net/ +// @version 7.2 +// @description Unleash your cookie potential. +// @author petar105 +// @match https://orteil.dashnet.org/cookieclicker/ +// @icon https://www.google.com/s2/favicons?domain=dashnet.org +// @grant none +// ==/UserScript== + +// If editing the script, ignore any "Game is not defined" warnings +// Script is a mix of original code and other addons + +function tapNews() { + if (Game.TickerEffect && Game.TickerEffect.type == "fortune") { + Game.tickerL.click(); + } +} + +setInterval(function () { + tapNews(); +}, 3000); +(function () { + "use strict"; + + let state = true; // initial state is ON + let intervalId; + + document.addEventListener("keydown", function (event) { + if (event.code === "KeyX") { + state = !state; // toggle state + if (state) { + // code to run when state is ON + console.log("State is ON"); + startAutoClicker(); + } else { + // code to run when state is OFF + console.log("State is OFF"); + stopAutoClicker(); + } + } + }); + + function startAutoClicker() { + console.log("Auto-clicker started"); + Game.Notify(`Auto clicker ON`, `Press X to toggle`, [0, 35], false); + intervalId = setInterval(function () { + Game.ClickCookie(); + }, 4); + } + + function stopAutoClicker() { + console.log("Auto-clicker stopped"); + Game.Notify(`Auto clicker OFF`, `Press X to toggle`, [0, 35], false); + clearInterval(intervalId); + } + + // Wait for the Game object to be defined, then start the auto-clicker + const waitIntervalId = setInterval(function () { + if (typeof Game !== "undefined") { + clearInterval(waitIntervalId); + startAutoClicker(); + } + }, 1000); +})(); + +// setInterval(function() { +// Game.shimmers.forEach(function(shimmer) +// { +// if(shimmer.type == "golden" && shimmer.wrath == 0) +// { +// shimmer.pop() +// } +// }) +// }, 500); + +// var autoReindeer = setInterval(function() { for (var h in Game.shimmers){if(Game.shimmers[h].type=="reindeer"){Game.shimmers[h].pop();}} }, 100); + +// var autoPopTwelveth = setInterval(function() { +// var wrinkCount = 0, +// wrinkEaten = 0, +// wrinkIndex = 10; // value for 10 shinies test + +// for (var i in Game.wrinklers) { +// // count number of eating wrinks +// if (Game.wrinklers[i].sucked > 0) { +// wrinkCount += 1; +// } +// // find top wrink index, ignoring shiny wrinklers +// if (Game.wrinklers[i].sucked > wrinkEaten && Game.wrinklers[i].type == 0) { +// wrinkEaten = Game.wrinklers[i].sucked; +// wrinkIndex = i; +// } +// } +// // pop top wrinkler if 10 eating, unless all 12 are shiny +// if (wrinkCount == 10 && wrinkIndex != 10) { +// Game.wrinklers[wrinkIndex].hp = 0; +// } +// }, 60000); diff --git a/CookieMonster b/CookieMonster new file mode 160000 index 0000000..7f06fd3 --- /dev/null +++ b/CookieMonster @@ -0,0 +1 @@ +Subproject commit 7f06fd383a280747200aff8e76280abc5d505ddc diff --git a/GoldenCookieClicker.js b/GoldenCookieClicker.js new file mode 100644 index 0000000..96c6f35 --- /dev/null +++ b/GoldenCookieClicker.js @@ -0,0 +1,48 @@ +// Golden Cookie Clicker +// By RainSlide +// Automatically click golden cookies and reindeers, won't click wrath cookies. +// Version 1.0 +// Updated 2022-04-19 + +// Cookie Clicker: https://orteil.dashnet.org/cookieclicker/ + +"use strict"; + +if (typeof Game !== "object" || Game === null || !Array.isArray(Game.shimmers)) { + + console.error( + "Golden Cookie Clicker: Cookie Clicker API is not ready or invalid.\n" + + "Please make sure you are running this script on a Cookie Clicker webpage, " + + "and the page is fully loaded." + ); + +} else if (typeof Proxy !== "function") { + + console.error( + "Golden Cookie Clicker: JavaScript Proxy API is not available, " + + "either update your browser, or use the ES3 compatible version:\n"+ + "https://rainslide.neocities.org/cookieclicker/GoldenCookieClicker.es3.js" + ); + +} else { + + const apply = (target, _this, args) => { + var shimmer = args[0]; + if ((shimmer.type === "golden" && !shimmer.wrath) || shimmer.type === "reindeer") { + setTimeout(() => shimmer.pop(), 500); + } + return Reflect.apply(target, _this, args); + }; + + Object.defineProperty(Game.shimmers, "push", { + value: new Proxy(Game.shimmers.push, { apply }), + writable: true, + enumerable: false, + configurable: true + }); + + typeof Game.Win === "function" && + Game.Win("Third-party"); + + +}