1
0
Fork 0
mirror of https://github.com/Luzifer/automate-cookie-clicker.git synced 2024-12-23 02:31:18 +00:00

Migrate last interface clicks to game object

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-04-21 13:14:31 +02:00
parent c6720f9489
commit e61932e480
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -1,18 +1,17 @@
// ==UserScript== // ==UserScript==
// @name Automate CookieClicker // @name Automate CookieClicker
// @namespace https://luzifer.io/ // @namespace https://luzifer.io/
// @version 0.18.4 // @version 0.19.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
// @match http://orteil.dashnet.org/cookieclicker/ // @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 // @updateURL https://raw.githubusercontent.com/Luzifer/automate-cookie-clicker/master/autocookieclicker.user.js
// @icon http://orteil.dashnet.org/cookieclicker/img/favicon.ico // @icon http://orteil.dashnet.org/cookieclicker/img/favicon.ico
// @grant GM_info // @grant GM_info
// ==/UserScript== // ==/UserScript==
/* global Game:galse, GM_info:false, $:false */ /* global Game:false, GM_info:false */
let blockingUpgrades = [ let blockingUpgrades = [
69, // Destructive upgrade: "One mind" 69, // Destructive upgrade: "One mind"
@ -20,7 +19,7 @@ let blockingUpgrades = [
let purchaseSteps = 50; let purchaseSteps = 50;
function autoClick() { function autoClick() {
$('#bigCookie').click(); Game.ClickCookie();
} }
function executeAutoActions() { function executeAutoActions() {
@ -30,7 +29,7 @@ function executeAutoActions() {
} }
// Click all golden cookies // Click all golden cookies
$('.shimmer').click(); Game.shimmers.forEach(obj => obj.pop());
// Get rid of wrinklers // Get rid of wrinklers
while (Game.wrinklers.filter(obj => obj.hp > 0 && obj.phase > 0).length > 0) { while (Game.wrinklers.filter(obj => obj.hp > 0 && obj.phase > 0).length > 0) {