-
-
Notifications
You must be signed in to change notification settings - Fork 492
Feat/mushtree and digsite transport #1672
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
Merged
chsami
merged 15 commits into
chsami:development
from
Chillibloke:feat/mushtree-and-digsite-transport
Feb 3, 2026
+234
−33
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
f5ebf6f
Merge pull request #1650 from chsami/development
chsami 6946ce8
Merge pull request #1651 from chsami/development
chsami 3916e1a
Merge pull request #1652 from chsami/development
chsami e1d8d5d
Merge pull request #1653 from chsami/development
chsami b6c1391
Merge pull request #1654 from chsami/development
chsami c434365
Merge pull request #1656 from chsami/development
chsami e186f82
Merge pull request #1657 from chsami/development
chsami e31f10f
Update transports.tsv
Chillibloke 0487eb9
Update fairy_rings.tsv
Chillibloke ece17df
Merge pull request #1665 from Chillibloke/patch-3
chsami 1c83a9c
Merge pull request #1664 from Chillibloke/patch-4
chsami ba01d8e
Merge pull request #1667 from chsami/development
chsami 8ab69df
fix(walker): handle dialogue for inventory teleport items
Chillibloke 454baeb
fix(bank): check for crafting cape in inventory for guild access
Chillibloke 75b1f16
feat(walker): add Magic Mushtree transport and fix POH digsite pendant
Chillibloke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
99 changes: 99 additions & 0 deletions
99
...client/src/main/java/net/runelite/client/plugins/microbot/shortestpath/MagicMushtree.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| package net.runelite.client.plugins.microbot.shortestpath; | ||
|
|
||
| import lombok.Getter; | ||
| import lombok.RequiredArgsConstructor; | ||
| import net.runelite.api.TileObject; | ||
| import net.runelite.api.coords.WorldPoint; | ||
| import net.runelite.client.plugins.microbot.util.player.Rs2Player; | ||
| import net.runelite.client.plugins.microbot.util.widget.Rs2Widget; | ||
|
|
||
| import static net.runelite.client.plugins.microbot.util.Global.sleepUntil; | ||
|
|
||
| /** | ||
| * Handles the Magic Mushtree (Mycelium Transportation System) on Fossil Island. | ||
| * The mushtree network connects four locations: | ||
| * - House on the Hill | ||
| * - Verdant Valley | ||
| * - Sticky Swamp | ||
| * - Mushroom Meadow | ||
| */ | ||
| @Getter | ||
| @RequiredArgsConstructor | ||
| public enum MagicMushtree { | ||
| HOUSE_ON_THE_HILL("House on the Hill", new WorldPoint(3764, 3879, 1)), | ||
| VERDANT_VALLEY("Verdant Valley", new WorldPoint(3760, 3758, 0)), | ||
| STICKY_SWAMP("Sticky Swamp", new WorldPoint(3676, 3755, 0)), | ||
| MUSHROOM_MEADOW("Mushroom Meadow", new WorldPoint(3676, 3871, 0)); | ||
|
|
||
| private final String destinationName; | ||
| private final WorldPoint destination; | ||
|
|
||
| // Object IDs for the Magic Mushtrees | ||
| public static final int MUSHTREE_HOUSE_ON_HILL = 30920; | ||
| public static final int MUSHTREE_OTHER = 30924; | ||
|
|
||
| private static final int OFFSET = 10; | ||
|
|
||
| /** | ||
| * Checks if the given object ID is a Magic Mushtree. | ||
| */ | ||
| public static boolean isMagicMushtree(int objectId) { | ||
| return objectId == MUSHTREE_HOUSE_ON_HILL || objectId == MUSHTREE_OTHER; | ||
| } | ||
|
|
||
| /** | ||
| * Checks if the given TileObject is a Magic Mushtree. | ||
| */ | ||
| public static boolean isMagicMushtree(TileObject tileObject) { | ||
| return tileObject != null && isMagicMushtree(tileObject.getId()); | ||
| } | ||
|
|
||
| /** | ||
| * Handles the Magic Mushtree transport after the initial "Use" interaction. | ||
| * Waits for the menu to appear, then clicks the appropriate destination. | ||
| * | ||
| * @param transport The transport containing the destination | ||
| * @return true if the transport was handled successfully | ||
| */ | ||
| public static boolean handleTransport(Transport transport) { | ||
| WorldPoint dest = transport.getDestination(); | ||
| MagicMushtree destination = getByDestination(dest); | ||
|
|
||
| if (destination == null) { | ||
| return false; | ||
| } | ||
|
|
||
| // Wait for the mushtree menu widget to appear | ||
| if (!sleepUntil(() -> Rs2Widget.hasWidget("Mycelium"), 5000)) { | ||
| return false; | ||
| } | ||
|
|
||
| // Click the destination option | ||
| if (!Rs2Widget.clickWidget(destination.getDestinationName())) { | ||
| return false; | ||
| } | ||
|
|
||
| // Wait until we arrive at destination | ||
| sleepUntil(() -> Rs2Player.getWorldLocation().distanceTo(dest) < OFFSET, 10000); | ||
| return true; | ||
| } | ||
|
|
||
| /** | ||
| * Gets the MagicMushtree enum by destination WorldPoint. | ||
| */ | ||
| public static MagicMushtree getByDestination(WorldPoint destination) { | ||
| if (destination == null) return null; | ||
|
|
||
| for (MagicMushtree mushtree : values()) { | ||
| WorldPoint dest = mushtree.getDestination(); | ||
| if (dest.equals(destination)) { | ||
| return mushtree; | ||
| } | ||
| // Also match by X and Y only (ignore plane differences in destination matching) | ||
| if (dest.getX() == destination.getX() && dest.getY() == destination.getY()) { | ||
| return mushtree; | ||
| } | ||
| } | ||
| return null; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -107,3 +107,4 @@ | |
| 1651 3010 0 9650=1 5 AJP | ||
| 1359 2941 0 9650=1 5 CKQ | ||
| 1429 3324 0 9650=1 5 AIS | ||
| 2926 10455 0 5 DLP | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 value ignores whether arrival actually succeeded.
The
sleepUntilon line 77 returns a boolean indicating if the player arrived at the destination, but the method returnstrueunconditionally on line 78. If the 10-second timeout expires without arriving, the method still reports success—inconsistent with the documented contract.🔧 Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents