mirror of
https://github.com/zebrajr/cookieclicker.git
synced 2025-12-06 00:20:22 +01:00
add reindeer bonus auto clicker
This commit is contained in:
parent
0090b992e8
commit
1a1272d99a
|
|
@ -27,7 +27,7 @@ const CLICK_BONUSCOOKIE_INTERVAL_SECS = 5;
|
||||||
const ENABLE_AUTO_SHOP_UPDATER = true;
|
const ENABLE_AUTO_SHOP_UPDATER = true;
|
||||||
const AUTO_UPDATE_INTERVAL_MINUTES = 1;
|
const AUTO_UPDATE_INTERVAL_MINUTES = 1;
|
||||||
const FIRST_AUTO_UPDATE_LEVEL = 20;
|
const FIRST_AUTO_UPDATE_LEVEL = 20;
|
||||||
const MAX_AUTO_UPDATE_LEVEL = 50;
|
const MAX_AUTO_UPDATE_LEVEL = 100;
|
||||||
|
|
||||||
// Auto Upgrade Options
|
// Auto Upgrade Options
|
||||||
const STORE_UPGRADE_INTERVAL_MINUTES = 1;
|
const STORE_UPGRADE_INTERVAL_MINUTES = 1;
|
||||||
|
|
@ -67,7 +67,9 @@ async function clickBigCookie() {
|
||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
async function clickBonusCookie() {
|
async function clickBonusCookie() {
|
||||||
|
const BONUS_ALT_VALUES = ['Golden cookie', 'Reindeer'];
|
||||||
const GOLDEN_COOKIE_ALT_VALUE ='Golden cookie';
|
const GOLDEN_COOKIE_ALT_VALUE ='Golden cookie';
|
||||||
|
const REINDEER_ALT_VALUE = 'Reindeer';
|
||||||
const shimmersDiv = document.getElementById('shimmers');
|
const shimmersDiv = document.getElementById('shimmers');
|
||||||
if(!shimmersDiv){
|
if(!shimmersDiv){
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -76,13 +78,13 @@ async function clickBonusCookie() {
|
||||||
const childElements = shimmersDiv.querySelectorAll('*');
|
const childElements = shimmersDiv.querySelectorAll('*');
|
||||||
|
|
||||||
for (const element of childElements){
|
for (const element of childElements){
|
||||||
if(element.attributes.alt.value === GOLDEN_COOKIE_ALT_VALUE){
|
if (BONUS_ALT_VALUES.includes(element.attributes.alt.value)){
|
||||||
element.click();
|
element.click();
|
||||||
//console.info(`${displayCurrentDateTime()} - Clicked a Bonus Cookie!`);
|
//console.info(`${displayCurrentDateTime()} - Clicked a ${element.attributes.alt.value}!`);
|
||||||
} else {
|
continue;
|
||||||
console.info(element);
|
|
||||||
console.info(element.attributes.alt.value);
|
|
||||||
}
|
}
|
||||||
|
console.info(element);
|
||||||
|
console.info(element.attributes.alt.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user