mirror of
https://github.com/Luzifer/automate-cookie-clicker.git
synced 2024-11-09 22:40:08 +00:00
Automagically manage Santa
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
23dc21bdfc
commit
17f923aadd
1 changed files with 9 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Automate CookieClicker
|
// @name Automate CookieClicker
|
||||||
// @namespace https://luzifer.io/
|
// @namespace https://luzifer.io/
|
||||||
// @version 0.19.2
|
// @version 0.20.0
|
||||||
// @description Automate everything!
|
// @description Automate everything!
|
||||||
// @author Knut Ahlers <knut@ahlers.me>
|
// @author Knut Ahlers <knut@ahlers.me>
|
||||||
// @source https://github.com/Luzifer/automate-cookie-clicker
|
// @source https://github.com/Luzifer/automate-cookie-clicker
|
||||||
|
@ -66,8 +66,6 @@ function executeAutoActions() {
|
||||||
|
|
||||||
availableProducts = Game.ObjectsById.filter(obj => obj.price < Game.cookies && obj.amount < getMaxBuy());
|
availableProducts = Game.ObjectsById.filter(obj => obj.price < Game.cookies && obj.amount < getMaxBuy());
|
||||||
}
|
}
|
||||||
|
|
||||||
manageDragon();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function controlAutoClicker() {
|
function controlAutoClicker() {
|
||||||
|
@ -107,6 +105,9 @@ function installHelper() {
|
||||||
blockingUpgrades = blockingUpgrades.concat(Game.UpgradesByPool['toggle'].map(obj => obj.id));
|
blockingUpgrades = blockingUpgrades.concat(Game.UpgradesByPool['toggle'].map(obj => obj.id));
|
||||||
|
|
||||||
Game.customChecks.push(controlAutoClicker);
|
Game.customChecks.push(controlAutoClicker);
|
||||||
|
Game.customChecks.push(manageDragon);
|
||||||
|
Game.customChecks.push(manageSanta);
|
||||||
|
|
||||||
Game.customLogic.push(executeAutoActions);
|
Game.customLogic.push(executeAutoActions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,6 +121,11 @@ function manageDragon() {
|
||||||
// This will just open a select dialogue...
|
// This will just open a select dialogue...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function manageSanta() {
|
||||||
|
let moni = Math.pow(Game.santaLevel + 1, Game.santaLevel + 1);
|
||||||
|
if (Game.cookies > moni && Game.santaLevel < 14) Game.UpgradeSanta();
|
||||||
|
}
|
||||||
|
|
||||||
function note(msg, quick = true) {
|
function note(msg, quick = true) {
|
||||||
// Icon: img/icons.png 0-based indices
|
// Icon: img/icons.png 0-based indices
|
||||||
Game.Notify('Auto-CookieClicker', msg, [12, 0], quick, true);
|
Game.Notify('Auto-CookieClicker', msg, [12, 0], quick, true);
|
||||||
|
|
Loading…
Reference in a new issue