From 364e8b9d1d5e7b7983df253b29182575fcaf8da5 Mon Sep 17 00:00:00 2001 From: Riley <87399106+rileyscool@users.noreply.github.com> Date: Sun, 19 Jul 2026 20:40:50 +1200 Subject: [PATCH] add minimum motes for sungecko it tweaks out if motes is less than 5k, so stop macro if motes arent enough to enter --- modules/other/SunGeckoMacro.js | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/modules/other/SunGeckoMacro.js b/modules/other/SunGeckoMacro.js index 673a43a5..dd650839 100644 --- a/modules/other/SunGeckoMacro.js +++ b/modules/other/SunGeckoMacro.js @@ -91,6 +91,7 @@ const SUN_GECKO_COMBAT_ORIGIN = { }; const WARP_WIZARD_DELAY_TICKS = 40; +const MINIMUM_MOTES = 5000; class SunGecko extends ModuleBase { constructor() { @@ -135,6 +136,7 @@ class SunGecko extends ModuleBase { this.on('tick', () => { if (!Player.getPlayer()) return; + switch (this.state) { case States.WAITING: break; @@ -167,6 +169,26 @@ class SunGecko extends ModuleBase { OverlayManager.incrementTrackedValue(this.oid, 'essence', essenceAmount); } + getMotesFromScoreboard() { + try { + const lines = Scoreboard.getLines(); + if (!lines) return null; + + for (const line of lines) { + const lineText = ChatLib.removeFormatting(String(line)); + const match = lineText.match(/Motes\s*[:\-]?\s*([\d,]+)/i); + if (!match) continue; + + const motes = Number(match[1].replace(/,/g, '')); + return Number.isFinite(motes) ? motes : null; + } + } catch (e) { + console.error('V5 Caught error' + e + e.stack); + } + + return null; + } + countNearbyBlocks() { const player = Player.getPlayer(); if (!player) return 0; @@ -308,6 +330,11 @@ class SunGecko extends ModuleBase { this.scheduleState(States.DETERMIN, 40); return; } + var motes = this.getMotesFromScoreboard(); + if (motes !== null && motes < MINIMUM_MOTES) { + this.toggle(false); + return; + } if (Guis.guiName() !== null) { this.clickMenuItem(ORUO.menuItem); @@ -315,8 +342,7 @@ class SunGecko extends ModuleBase { } this.rotateAndInteract(ORUO, 'right'); - } else if (closestPoint == 'Boss Combat') { - this.setState(States.COMBAT); + } else if (closestPoint == 'Boss Combat') { this.setState(States.COMBAT); Keybind.setKey('w', true); } else if (closestPoint == 'Hub Tower') { this.startPathfind(this.buildPathGoals(HUB_TOWER_WAYPOINT.x, HUB_TOWER_WAYPOINT.y, HUB_TOWER_WAYPOINT.z));