Thursday, August 17, 2023

Cookie Clicker

Some useful JavaScript snippets to hack Cookie Clicker if you want to explore the game without sitting through the whole game experience.

https://orteil.dashnet.org/cookieclicker/test/

I. Get just under Infinty cookies.
Note: having Infinity cookies will bug the game.

Game.Earn(9e+302);

II. Buy 1000 of everything.
Note: all prices start to approach Infinity with counts nearing the upper 4000s.

Game.storeBulkButton(4);

for (let i = 0; i <= 14; i++)
for (let j = 0; j < 10; j++)
document.querySelector(`#product${i}`).click();

III. Buy all available upgrades:

document.querySelectorAll('#upgrades .upgrade.enabled').forEach(node => node.click());

No comments: