From 81631426e6ec991d36859ec517bd845dd497e6d5 Mon Sep 17 00:00:00 2001 From: Abhorrent_Anger Date: Fri, 13 Mar 2026 10:03:20 +0200 Subject: [PATCH] Increase initial timer --- RulkaProFortuneWheelSpinner.user.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/RulkaProFortuneWheelSpinner.user.js b/RulkaProFortuneWheelSpinner.user.js index 76c9090..537fcec 100644 --- a/RulkaProFortuneWheelSpinner.user.js +++ b/RulkaProFortuneWheelSpinner.user.js @@ -12,10 +12,10 @@ // @run-at document-end // ==/UserScript== -const INITIAL_TIMER = 4000; +const INITIAL_TIMER = 10 * 1000; const RECHECK_TIMER = 12 * 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 MAIN_WINDOW_SELECTOR = ".content"; 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'; 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...'); setTimeout(clickRollerRight, ROLLER_TIMEOUT); } @@ -56,12 +62,6 @@ function setupReload() { setTimeout(reload, RELOAD_TIMER); } -function getCooldown() { - let time = 0; - time += ($(MINUTE_SELECTOR).text() * 60 * 1000) + 60 * 1000; - return time; -} - function reload() { console.log('Reloading...'); location.reload(); @@ -69,5 +69,5 @@ function reload() { waitForKeyElements(MAIN_WINDOW_SELECTOR, () => { setTimeout(runRoutines, INITIAL_TIMER); - setTimeout(setupReload, RECHECK_TIMER); + setTimeout(setupReload, INITIAL_TIMER); }); \ No newline at end of file