2.6.1#1780
Conversation
…irst available action
Three related improvements to the quest helper auto-runner so it stops
clicking through closed doors, picking the wrong menu option, and
crashing other plugins via null MenuOptionClicked events.
Reachability:
- applyNpcStep direct-click now also requires npc.hasLineOfSight().
Rs2Walker.canReach() pathfinds through closed doors (the walker
opens them en route), so canReach==true alone doesn't guarantee a
direct interaction will succeed.
- applyObjectStep walk gate now also fires when LoS to the target is
blocked, so the walker can route the player past the blocking
geometry instead of us bouncing on "I can't reach that!".
Menu option selection:
- chooseCorrect{Object,NPC,Item}Option fall back to the entity's
first non-empty action when no step-text keyword matches, instead
of returning "" / "use" / "Talk-to" blindly.
Null safety on MenuOptionClicked subscribers:
- Rs2Gembag, PouchScript, QuestBankTabInterface and IncantationStep
now early-return on null event.getMenuOption(); these previously
threw NPEs whenever a programmatic menu invoke fired with a null
option, spamming the chat box with stack traces.
- Removed a stray System.out.println in PouchScript.
…ker-fallback fix(questhelper): require LoS before direct interaction; default to first available action
Player.isInteracting() stays true for many seconds after benign actions (closing a shop, talking to an NPC, getting aggro'd) because the engine keeps the interaction pointer set until the player moves or combat resets. OSRS does not block hops in that state, but this guard did, causing plugins to spin on "Local player is interacting, cannot hop worlds" forever after Rs2Shop.closeShop() and similar flows. Replace the isInteracting() check with the conditions that actually block a hop: active combat (Rs2Combat.inCombat) and blocking widgets (Rs2Bank/Rs2Shop/Rs2Dialogue). Wilderness PvP timer remains server-enforced via client.hopToWorld(). Closes #1772
Need programmatic quest selection from the ironman-guide skill; Quest Helper's plugin panel was the only way to start a quest. Adds a handler that wraps QuestHelperPlugin.getQuestManager().startUpQuest so the skill can pick a quest over HTTP, plus fixes the crashes and wrong-click behavior that surfaced while driving QH auto-play during the BRUHsailer run. agent-server: - QuestHelperHandler: /questhelper/start, /stop, /active, /list. Resolves quest by enum name or display name via QuestHelperQuest.valueOf / getByName. QuestScript (reachability + action selection): - Require line-of-sight in addition to canReach() before clicking an NPC or object — canReach pathfinds through closed doors, so a true return doesn't mean a direct click will land. - When LOS fails, walk to the target (lets the walker open the door en route) instead of firing a click that will miss. - Fallback to the object/NPC/inventory item's first non-empty action when no step text matches an action name, so QH doesn't emit an empty menu op. Null-guards on MenuOptionClicked.getMenuOption() in: - PouchScript, Rs2Gembag, QuestBankTabInterface, IncantationStep (all previously NPE'd on synthetic/agent-driven menu events where menuOption is null)
POST /logout calls Rs2Player.logout() on the script thread and polls client.getGameState() == LOGIN_SCREEN; GET returns current login state. Symmetric to LoginHandler. Used by ironguide to gate Microbot ↔ DreamBot handoffs (logout via Microbot before launching DreamBot, log back in after).
Iterates QuestHelperQuest.values() on the client thread and returns
{enum, displayName, state} per quest where state ∈ {NOT_STARTED,
IN_PROGRESS, FINISHED} via QuestHelperQuest.getState(Client). Lets
external tooling bulk-audit per-quest completion without the side
effects of /quest-helper/start+stop (which set TurnOn=true).
Body values are parsed by Gson into native JSON types, so a client sending
{"timeout": "30"}, {"timeout": true}, or {"timeout": null} would crash the
handler on the (Number) cast. Accept Number or numeric String, fall back to
the default for anything else.
Global.sleep / sleepUntil early-return when invoked on the client thread, so the post-hop wait inside the runOnClientThreadOptional lambda was a no-op: the success check fired microseconds after issuing the request, before the server had processed it. The function returned false on every call, callers retried via sleepUntil polling, and Microbot.java logged "Failed to hop to world N" 3-4 times per actually-successful hop. Move the wait off the client thread. The lambda now only validates and issues the hop request. The script thread then sleeps and sleepUntils for HOPPING / world-change / confirm widget, handles the confirm-dialog fallback, and waits for the hop to fully land (GameState.LOGGED_IN on the target world) before returning. Success is reported as getWorld() == worldNumber, the definitive signal, so callers can trust the return value. Also: the "already on target world" guard now returns true (idempotent success) instead of false, killing the retry loop that triggered the spam on the second and subsequent calls. Closes #1550
…r-logout feat(agent-server): add quest-helper and /logout endpoints
fix: hopToWorld guard rejects valid hops after interactions
Catalog-backed path edges and transport objects now bypass door probes and blacklist paths so handleTransports owns them. Adjacent-origin short hops and segment-end distance checks align lookahead with the multimap. Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid null localpoint stalls by falling back to minimap-toward clicks. Drop noisy minimap log spam and add transport fallback chain.
- TSV rows can span planes; plane equality hid catalog match - Refresh client-thread guardrail baseline
Walker fixes
|
Caution Review failedPull request was closed or merged during review WalkthroughThis PR bumps Microbot from 2.6.0 to 2.6.1 and consolidates project documentation into a user/developer/runtime routing structure. The Agent Server gains Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (1 warning, 2 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.42.2)runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/walker/Rs2Walker.javaThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
No description provided.