Skip to content

Instantly share code, notes, and snippets.

@nealey
Last active September 8, 2024 02:08
Show Gist options
  • Save nealey/fad1c3916cc080a1467c9aac4b5a7b52 to your computer and use it in GitHub Desktop.
Save nealey/fad1c3916cc080a1467c9aac4b5a7b52 to your computer and use it in GitHub Desktop.
A Cookie Clicker mod to automatically click the golden cookie
let Millisecond = 1
let Second = 1000 * Millisecond
let Minute = 60 * Second
let Hour = 60 * Minute
class GoldenClicker {
heartbeat() {
for (let s of Game.shimmers) {
if (s.type == "golden") {
s.pop()
}
}
let buff = Game.buffs["Click frenzy"]
if (buff) {
let frenzyClicker = setInterval(Game.ClickCookie, Second / 8)
setTimeout(clearInterval(frenzyClicker), buff.time)
Game.Popup("Clicking like crazy for you!")
console.log("Clicker interval:", frenzyClicker)
}
}
// Save state
save() {
return ""
}
// Load state
load(s) {
}
init() {
Game.registerHook("check", () => this.heartbeat)
}
}
Game.registerMod("Golden Clicker", new GoldenClicker())
console.log("I thought I registered the mod... no?", GoldenClicker)
@6slx
Copy link

6slx commented Aug 25, 2024

where is the fkn copy btn ????

@nealey
Copy link
Author

nealey commented Sep 8, 2024

where is the fkn copy btn ????

I'm sorry, I don't understand what you're asking. Could you try phrasing it a different way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment