Cookie Clicker

Cookie Clicker

110 ratings
CookiWizord | Automatic spellcasting mod
By Gingerguy
A configurable mod automating the usage of Grimoire, avaliable in both mod and console script form.
2
   
Award
Favorite
Favorited
Unfavorite
What is this?
This is a mod that will automatically cast any chosen spell from the Grimoire when at full mana.



By default it casts Force the Hand of Fate and clicks the golden cookie it spawns, see "Meta" section for more strategy.

A must have for several achievements, most notably Bibbidi-bobbidi-boo, I'm the wiz and A wizard is you, that requires you to cast 999 spells, but it will also help you to get more golden cookies for Black Cat's Paw (7,777 cookies required)

If you find this guide outside of Steam - It has been copied without my permission. Click this link to see the most up-to-date original guide.
Installation
To run the script, subscribe to it, download the mod or run it from the console.

Option zero: Subscribe to the mod on Steam Workshop
- Workshop page -

Option one: Install the mod
- Download ze Cooki Wizord 1.4 - [drive.google.com]

To install the mod, extract the archive into your mod directory (...\Steam\steamapps\common\Cookie Clicker\resources\app\mods\local). Restart your game, go to Options -> Mods -> "Manage mods", and enable CookiWizord.
You should be greeted by the Wizord when you press "Restart with new changes".

Option two: Run the script from console
- Pastebin with the console script -[pastebin.com]

If you do not want to install a mod, open your console, copy the whole script and paste it there and press enter.

Instructions on how to open the console in the Steam version of the game can be found here
Is this a virus?
No.

Options
By default ze Wizord will cast Force the Hand of Fate, but you can change it to a different spell by opening the main.js file with any text editor and copying a different spell name from the list below and pasting it instead of the current spell name to line 8 (colored on the screenshot).



The name has to be in quotation marks. It is not foolproof, and if you break it - it is on you.

If persistent notifications annoy you, change the next option to "true"

Troubleshooting
Possible trouble with the mod №1:
I am not sure if I installed the mod right
Does it show up in the mod manager?
If it does not - you have not installed it right.
Check that you have unarchived the folder properly, the directory should look like /mods/local/CookiWizord/ with main.js & info.txt in it.

Possible trouble with the mod №2:
The Grimoire has enough mana but does not cast the spell
Do you have just enough mana in the pool to cast the spell at max?
Buy more wizard towers.
You do not actually have enough mana, because the Grimoire rounds the value to fit it in the interface. Mana pool value and spell costs are actually calculated with a precision up to the fifteenth digit after the decimal point, but it only shows the integer in the menu.
Meta
By default, Conjure Baked Goods will bring you the most with the least effort.
But if you are here you are probably scripting and using autoclickers already, so for you Force the Hand of Fate will be exponentially better since Click Frenzy and Dragonflight are not balanced for autoclickers, so it is the default option.

If you want to know what real poopsocks think about optimising the Grimoire - read this wiki article[cookieclicker.fandom.com]

The script will click all golden cookies after the Force the Hand of Fate is cast, but it is surely not a problem, right?
You can comment it out if it bothers you so much.
Feedback
Feel free to ask any questions you have about the mod in the comments, I will try my best to answer all of them.
Do not hesitate to show off your achievements and milestones as well.

Make sure to check out my other scripts:


- CookiStocker | Automatic Stock Market mod





- CookiAscender | Automatic ascention script
49 Comments
SyphonLife 6 Jul @ 7:48am 
This might be a dumb question but is there a way to modify the script so that it only activates FTHoF when a dragonflight is triggered?
Terry 4 Jun, 2024 @ 10:56pm 
Hi Gingerguy,

I keep getting this error in the console (and it doesn't cast)

Uncaught ReferenceError: wizordSpell is not defined
at <anonymous>:6:36

i didn't change the script, copy and pasted all of it:



var wizardSpell = 'hand of fate';
var grimoir = Game.ObjectsById[7].minigame;
var wizordLoop = setInterval(function() {
if (
(grimoir.magic == grimoir.magicM) && // if mana is full
(grimoir.magic > (grimoir.spells[wizordSpell].costMin
+ grimoir.magicM*grimoir.spells[wizordSpell].costPercent))) // and if there is enough in total,
{
grimoir.castSpell(grimoir.spells[wizordSpell])
Game.Notify(`ze spel iz cast`,'cooki wizord vil wait for mor mana now',[23,6]); // cast the spell

if (wizordSpell == 'hand of fate') { // if the spell was Force the Hand of Fate
Game.shimmers.forEach(function(shimmer) {
if ((shimmer.type == "golden") && (shimmer.wrath == 0)) { shimmer.pop() } // click the newly spawned golden cookie
});
}
}
}, 1000);
Nebtarine 30 Apr, 2023 @ 4:38am 
Hey, so, no clue if this thread is still checked, but, recently I decided to change the auto casting spell to conjure baked goods, yet, it'll still cast hand of fate and remove my worship.
I've followed everything in this guide, yet, well, it still happens even though its changed in the code
Gingerguy  [author] 25 Mar, 2022 @ 3:09am 
Well, yes, that is why i have always been casting it at full?...
Does it take all of your mana to cast a spell? Just get more towers loool
There is a detailed explanation for how many towers should you have to cast certain spell the fastest on the wiki, i thought you already read it and was going off of some maths presenting there.
MangoScreampies 24 Mar, 2022 @ 6:38pm 
So I would have to change the value once the level moves up? That's fine honestly. I see it as more effective to wait until the bar is full since the magic refills faster when there is more, so starting at 0 is super slow compared to starting at like 40
Gingerguy  [author] 24 Mar, 2022 @ 12:29pm 
Sure, you can, but it is such a miserable optimisation that i never bothered to do the maths.
If you open the main.js on the line 57:

(grimoir.magic == grimoir.magicM) &&

replace grimoir.magicM with any value you want the spell to trigger.
MangoScreampies 24 Mar, 2022 @ 8:27am 
Will it only use the spell when my bar is full? If not, can I set it up to be like that so it's technically faster?
[Huntai] Kevkas 7 Jan, 2022 @ 9:20am 
"forEach of an empty array does not throw out an error." <--- that's a good point.

Thanks for the quick reply. :cozybethesda:
Gingerguy  [author] 7 Jan, 2022 @ 9:10am 
It is fully compatable, you should not worry about tweaking anything - i myself have been using FortuneHelper along with this mod as well.

forEach of an empty array does not throw out an error.
[Huntai] Kevkas 7 Jan, 2022 @ 8:28am 
I have a question, I'm using FortuneHelper (https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2693901672) for autoclicks and golden cookie autoclicks, I was wondering if it's compatible with CookiWizord. Can I use CookiWizord to autocast Force the Hand of Fate but disable its autoclick on golden cookies (and just let FortuneHelper handle the golden cookies autoclicks)?