mirror of
https://github.com/Luzifer/automate-cookie-clicker.git
synced 2024-11-09 22:40:08 +00:00
Instead of doing string magic use a number
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
1316478838
commit
2f3eeb5a61
1 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Automate CookieClicker
|
// @name Automate CookieClicker
|
||||||
// @namespace https://luzifer.io/
|
// @namespace https://luzifer.io/
|
||||||
// @version 0.8.1
|
// @version 0.8.2
|
||||||
// @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
|
||||||
|
@ -54,12 +54,12 @@ function executeAutoActions() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkCPS() {
|
function checkCPS() {
|
||||||
let cps = parseInt($('#cookies').children('div').text().split(': ')[1]);
|
let cps = Game.cookiesPs;
|
||||||
if (cps == 0) {
|
if (cps < 3000) {
|
||||||
if (window.autoClicker == undefined) {
|
if (window.autoClicker == undefined) {
|
||||||
window.autoClicker = window.setInterval(autoClick, 1);
|
window.autoClicker = window.setInterval(autoClick, 1);
|
||||||
}
|
}
|
||||||
} else if (cps > 3000) {
|
} else {
|
||||||
if (window.autoClicker != undefined) {
|
if (window.autoClicker != undefined) {
|
||||||
window.clearInterval(window.autoClicker);
|
window.clearInterval(window.autoClicker);
|
||||||
window.autoClicker = undefined;
|
window.autoClicker = undefined;
|
||||||
|
|
Loading…
Reference in a new issue