From e61932e4806b708c704e8c793baea8a16079bcc7 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sat, 21 Apr 2018 13:14:31 +0200 Subject: [PATCH] Migrate last interface clicks to game object Signed-off-by: Knut Ahlers --- autocookieclicker.user.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/autocookieclicker.user.js b/autocookieclicker.user.js index ad92456..7c21692 100644 --- a/autocookieclicker.user.js +++ b/autocookieclicker.user.js @@ -1,18 +1,17 @@ // ==UserScript== // @name Automate CookieClicker // @namespace https://luzifer.io/ -// @version 0.18.4 +// @version 0.19.0 // @description Automate everything! // @author Knut Ahlers // @source https://github.com/Luzifer/automate-cookie-clicker // @match http://orteil.dashnet.org/cookieclicker/ -// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js // @updateURL https://raw.githubusercontent.com/Luzifer/automate-cookie-clicker/master/autocookieclicker.user.js // @icon http://orteil.dashnet.org/cookieclicker/img/favicon.ico // @grant GM_info // ==/UserScript== -/* global Game:galse, GM_info:false, $:false */ +/* global Game:false, GM_info:false */ let blockingUpgrades = [ 69, // Destructive upgrade: "One mind" @@ -20,7 +19,7 @@ let blockingUpgrades = [ let purchaseSteps = 50; function autoClick() { - $('#bigCookie').click(); + Game.ClickCookie(); } function executeAutoActions() { @@ -30,7 +29,7 @@ function executeAutoActions() { } // Click all golden cookies - $('.shimmer').click(); + Game.shimmers.forEach(obj => obj.pop()); // Get rid of wrinklers while (Game.wrinklers.filter(obj => obj.hp > 0 && obj.phase > 0).length > 0) {