Increase initial timer
This commit is contained in:
parent
f637702d1a
commit
81631426e6
@ -12,10 +12,10 @@
|
|||||||
// @run-at document-end
|
// @run-at document-end
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
const INITIAL_TIMER = 4000;
|
const INITIAL_TIMER = 10 * 1000;
|
||||||
const RECHECK_TIMER = 12 * 60 * 60 * 1000;
|
const RECHECK_TIMER = 12 * 60 * 60 * 1000;
|
||||||
const RELOAD_TIMER = 24 * 60 * 60 * 1000;
|
const RELOAD_TIMER = 24 * 60 * 60 * 1000;
|
||||||
const ROLLER_TIMEOUT = 10 * 1000;
|
const ROLLER_TIMEOUT = 15 * 1000;
|
||||||
const COLLECT_TIMEOUT = 5 * 1000;
|
const COLLECT_TIMEOUT = 5 * 1000;
|
||||||
const MAIN_WINDOW_SELECTOR = ".content";
|
const MAIN_WINDOW_SELECTOR = ".content";
|
||||||
const FREE_SPIN_BUTTON = '.wheel .slot .load span.i-picon\:ammo';
|
const FREE_SPIN_BUTTON = '.wheel .slot .load span.i-picon\:ammo';
|
||||||
@ -23,7 +23,13 @@ const ROLLER_RIGHT = '.roller.right';
|
|||||||
const COLLECT_HAND = '.wheel-container .center span';
|
const COLLECT_HAND = '.wheel-container .center span';
|
||||||
|
|
||||||
function clickFreeSpin() {
|
function clickFreeSpin() {
|
||||||
$(FREE_SPIN_BUTTON).click();
|
let button = $(FREE_SPIN_BUTTON);
|
||||||
|
if(!button.length) {
|
||||||
|
console.log('Couldn\'t find the free spin button, aborting!');
|
||||||
|
setTimeout(runRoutines, INITIAL_TIMER);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
button.click();
|
||||||
console.log('Waiting for the roller button...');
|
console.log('Waiting for the roller button...');
|
||||||
setTimeout(clickRollerRight, ROLLER_TIMEOUT);
|
setTimeout(clickRollerRight, ROLLER_TIMEOUT);
|
||||||
}
|
}
|
||||||
@ -56,12 +62,6 @@ function setupReload() {
|
|||||||
setTimeout(reload, RELOAD_TIMER);
|
setTimeout(reload, RELOAD_TIMER);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCooldown() {
|
|
||||||
let time = 0;
|
|
||||||
time += ($(MINUTE_SELECTOR).text() * 60 * 1000) + 60 * 1000;
|
|
||||||
return time;
|
|
||||||
}
|
|
||||||
|
|
||||||
function reload() {
|
function reload() {
|
||||||
console.log('Reloading...');
|
console.log('Reloading...');
|
||||||
location.reload();
|
location.reload();
|
||||||
@ -69,5 +69,5 @@ function reload() {
|
|||||||
|
|
||||||
waitForKeyElements(MAIN_WINDOW_SELECTOR, () => {
|
waitForKeyElements(MAIN_WINDOW_SELECTOR, () => {
|
||||||
setTimeout(runRoutines, INITIAL_TIMER);
|
setTimeout(runRoutines, INITIAL_TIMER);
|
||||||
setTimeout(setupReload, RECHECK_TIMER);
|
setTimeout(setupReload, INITIAL_TIMER);
|
||||||
});
|
});
|
||||||
Loading…
x
Reference in New Issue
Block a user