-
-
Notifications
You must be signed in to change notification settings - Fork 486
Feat/mushtree and digsite transport #1671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Feat/mushtree and digsite transport #1671
Conversation
Add dialogue handling for multi-destination teleport items when used from inventory (not equipped). Previously, items like Slayer Ring would interact successfully but fail to handle the destination selection dialogue that appears afterward. Supported items: Slayer ring, Games necklace, Skills necklace, Ring of dueling, Ring of wealth, Amulet of glory, Combat bracelet, Digsite pendant, Necklace of passage, Giantsoul amulet. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Allow Crafting Guild bank location to be accessible when the crafting cape is in inventory, not just when equipped. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Magic Mushtree (Mycelium Transportation System) support for Fossil Island - Fix POH mounted digsite pendant to use widget clicks like MountedXerics - Add Brimhaven Dungeon transport entries with correct object IDs - Skip tile reachability check for mushtree transports Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
WalkthroughThe PR introduces Magic Mushtree transport support for Fossil Island navigation by adding a new enum with destination mappings and object ID constants. It extends Rs2Walker to handle Magic Mushtree transports with specialized logic, including reachability check skipping and dialogue-based teleport item detection. Additionally, it updates BankLocation's CRAFTING_GUILD requirements to accept crafting capes in inventory, and performs minor refactoring in MountedDigsite. Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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.40.5)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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In
`@runelite-client/src/main/java/net/runelite/client/plugins/microbot/shortestpath/MagicMushtree.java`:
- Around line 76-78: The code is ignoring sleepUntil's result so handleTransport
(in MagicMushtree.java) can return true even if the teleport timed out; capture
the boolean returned by sleepUntil(...) that uses
Rs2Player.getWorldLocation().distanceTo(dest) < OFFSET and return that boolean
instead of unconditionally returning true so callers get failure on timeout.
In
`@runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/bank/enums/BankLocation.java`:
- Around line 129-134: The equipment check in BankLocation (variable
isWearingCraftingGuild) only calls Rs2Equipment.isWearing("crafting cape") while
the inventory check handles both "crafting cape" and "crafting cape(t)"; update
the equipment condition to also check Rs2Equipment.isWearing("crafting cape(t)")
(or extract a helper like isWearingOrInInventoryCraftingCape) so both equipment
and inventory checks treat trimmed capes consistently; modify the expression in
isWearingCraftingGuild to include the additional
Rs2Equipment.isWearing("crafting cape(t)") check.
| // Wait until we arrive at destination | ||
| sleepUntil(() -> Rs2Player.getWorldLocation().distanceTo(dest) < OFFSET, 10000); | ||
| return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return failure if arrival wait times out.
sleepUntil is ignored, so handleTransport can return success even when the teleport fails or times out. Return the boolean result instead.
Proposed fix
- // Wait until we arrive at destination
- sleepUntil(() -> Rs2Player.getWorldLocation().distanceTo(dest) < OFFSET, 10000);
- return true;
+ // Wait until we arrive at destination
+ return sleepUntil(() -> Rs2Player.getWorldLocation().distanceTo(dest) < OFFSET, 10000);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // Wait until we arrive at destination | |
| sleepUntil(() -> Rs2Player.getWorldLocation().distanceTo(dest) < OFFSET, 10000); | |
| return true; | |
| // Wait until we arrive at destination | |
| return sleepUntil(() -> Rs2Player.getWorldLocation().distanceTo(dest) < OFFSET, 10000); |
🤖 Prompt for AI Agents
In
`@runelite-client/src/main/java/net/runelite/client/plugins/microbot/shortestpath/MagicMushtree.java`
around lines 76 - 78, The code is ignoring sleepUntil's result so
handleTransport (in MagicMushtree.java) can return true even if the teleport
timed out; capture the boolean returned by sleepUntil(...) that uses
Rs2Player.getWorldLocation().distanceTo(dest) < OFFSET and return that boolean
instead of unconditionally returning true so callers get failure on timeout.
| boolean isWearingCraftingGuild = (Rs2Equipment.isWearing("brown apron") || Rs2Equipment.isWearing("golden apron")) || | ||
| (Rs2Equipment.isWearing("max cape") || Rs2Equipment.isWearing("max hood")) || | ||
| (Rs2Equipment.isWearing("crafting cape") || Rs2Equipment.isWearing("crafting hood")); | ||
| return isWearingCraftingGuild && (hasMaxedCrafting || hasFaladorHardDiary); | ||
| // Also check if crafting cape is in inventory (can equip it to teleport and enter) | ||
| boolean hasCraftingCapeInInventory = Rs2Inventory.contains("crafting cape") || Rs2Inventory.contains("crafting cape(t)"); | ||
| return (isWearingCraftingGuild || hasCraftingCapeInInventory) && (hasMaxedCrafting || hasFaladorHardDiary); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent handling of trimmed crafting cape between equipment and inventory checks.
The new inventory check on line 133 correctly handles both "crafting cape" and "crafting cape(t)", but the equipment check on line 131 only checks for "crafting cape". This means a player wearing "crafting cape(t)" would fail the equipment check but pass if they put the same cape in their inventory.
🔧 Proposed fix for consistency
boolean isWearingCraftingGuild = (Rs2Equipment.isWearing("brown apron") || Rs2Equipment.isWearing("golden apron")) ||
(Rs2Equipment.isWearing("max cape") || Rs2Equipment.isWearing("max hood")) ||
- (Rs2Equipment.isWearing("crafting cape") || Rs2Equipment.isWearing("crafting hood"));
+ (Rs2Equipment.isWearing("crafting cape") || Rs2Equipment.isWearing("crafting cape(t)") || Rs2Equipment.isWearing("crafting hood"));🤖 Prompt for AI Agents
In
`@runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/bank/enums/BankLocation.java`
around lines 129 - 134, The equipment check in BankLocation (variable
isWearingCraftingGuild) only calls Rs2Equipment.isWearing("crafting cape") while
the inventory check handles both "crafting cape" and "crafting cape(t)"; update
the equipment condition to also check Rs2Equipment.isWearing("crafting cape(t)")
(or extract a helper like isWearingOrInInventoryCraftingCape) so both equipment
and inventory checks treat trimmed capes consistently; modify the expression in
isWearingCraftingGuild to include the additional
Rs2Equipment.isWearing("crafting cape(t)") check.
New file: MagicMushtree.java - Handles all 4 Fossil Island mushtree destinations