Add worldhopping and gem bag to Fortis Gem Stall#1482
Add worldhopping and gem bag to Fortis Gem Stall#1482chsami merged 7 commits intochsami:developmentfrom
Conversation
heap-overfl0w
commented
Sep 6, 2025
- Added world hopping logic to Fortis Gem Stall due to long stall respawn times.
- Added fuzzy gem bag support because I don't have an account to test this with. My implementation passes the eye test but will need actual testing.
…pawn times. - Added fuzzy gem bag support because I don't have an account to test this with. My implementation passes the eye test but will need actual testing.
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Walkthrough
Possibly related PRs
Thanks 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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/thieving/stalls/model/FortisGemStallThievingSpot.java (1)
112-116: Gem bag “full” check is inconsistent with handled gem types.You deposit/fill only 4 uncut types, but the check requires 5 entries, so the bag may never be considered “completely full,” causing unnecessary Fill attempts.
- return Rs2Gembag.getGemBagContents().size() == 5 && - Rs2Gembag.getGemBagContents().stream().allMatch(g -> g.getQuantity() >= 60); + var contents = Rs2Gembag.getGemBagContents(); + return contents.size() >= 4 && contents.stream().allMatch(g -> g.getQuantity() >= 60);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
README.md(0 hunks)runelite-client/src/main/java/net/runelite/client/plugins/microbot/thieving/stalls/model/FortisGemStallThievingSpot.java(2 hunks)
💤 Files with no reviewable changes (1)
- README.md
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-25T15:51:39.272Z
Learnt from: runsonmypc
PR: chsami/Microbot#1417
File: runelite-client/src/main/java/net/runelite/client/plugins/microbot/agility/AgilityScript.java:13-13
Timestamp: 2025-08-25T15:51:39.272Z
Learning: Both net.runelite.api.ItemID and net.runelite.api.gameval.ItemID are valid import paths in the RuneLite codebase. The microbot plugins consistently use net.runelite.api.ItemID as their established pattern.
Applied to files:
runelite-client/src/main/java/net/runelite/client/plugins/microbot/thieving/stalls/model/FortisGemStallThievingSpot.java
🧬 Code graph analysis (1)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/thieving/stalls/model/FortisGemStallThievingSpot.java (3)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/gameobject/Rs2GameObject.java (1)
Rs2GameObject(36-2002)runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/inventory/Rs2Inventory.java (1)
Rs2Inventory(60-2244)runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/player/Rs2Player.java (1)
Rs2Player(67-2070)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build
🔇 Additional comments (1)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/thieving/stalls/model/FortisGemStallThievingSpot.java (1)
39-41: Verify hopIfPlayerDetected doesn’t include the local player.If getPlayers includes self, amountOfPlayers=1 and time=0 will trigger perpetual hopping.
Would you confirm getPlayers excludes the local player? If not, filter the local player or increase amountOfPlayers to 2 for safety.
| if (!Rs2GameObject.hasAction(Rs2GameObject.convertToObjectComposition(stall), "Steal-from")) { | ||
| boolean started = Microbot.hopToWorld(Login.getRandomWorld(Rs2Player.isMember())); | ||
| if (started) { | ||
| Global.sleepUntil(Microbot::isLoggedIn, 15000); | ||
| } | ||
| return; |
There was a problem hiding this comment.
Fix wrong method arity for convertToObjectComposition (likely compile error).
convertToObjectComposition requires the ignoreImpostor boolean. Without it, this won’t compile.
- if (!Rs2GameObject.hasAction(Rs2GameObject.convertToObjectComposition(stall), "Steal-from")) {
+ if (!Rs2GameObject.hasAction(Rs2GameObject.convertToObjectComposition(stall, false), "Steal-from")) {📝 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.
| if (!Rs2GameObject.hasAction(Rs2GameObject.convertToObjectComposition(stall), "Steal-from")) { | |
| boolean started = Microbot.hopToWorld(Login.getRandomWorld(Rs2Player.isMember())); | |
| if (started) { | |
| Global.sleepUntil(Microbot::isLoggedIn, 15000); | |
| } | |
| return; | |
| if (!Rs2GameObject.hasAction( | |
| Rs2GameObject.convertToObjectComposition(stall, false), "Steal-from")) | |
| { | |
| boolean started = Microbot.hopToWorld(Login.getRandomWorld(Rs2Player.isMember())); | |
| if (started) { | |
| Global.sleepUntil(Microbot::isLoggedIn, 15000); | |
| } | |
| return; | |
| } |
🤖 Prompt for AI Agents
In
runelite-client/src/main/java/net/runelite/client/plugins/microbot/thieving/stalls/model/FortisGemStallThievingSpot.java
around lines 52 to 57, the call to
Rs2GameObject.convertToObjectComposition(stall) uses the wrong arity; update the
call to include the required ignoreImpostor boolean parameter (e.g.,
convertToObjectComposition(stall, true)) so the method signature matches the API
and the code compiles, keeping the rest of the logic unchanged.
…ragonstones, our gem bag will never be "completely full" (consisting of >= 60 gems of all 5 types) and could cause unnecessary fill attempts. Let's check the 4 types individually.
…to add-worldhopping-and-gem-bag
|
|
||
| private boolean isUncutGem(Rs2ItemModel item) { | ||
| String n = item.getName().toLowerCase(); | ||
| return n.equals("uncut sapphire") || |
There was a problem hiding this comment.
Just a suggestion, avoid using hardcoded names, you could instead check and match ItemID
There was a problem hiding this comment.
About to fix this.
There was a problem hiding this comment.
The actual Rs2GemBag suggests using lowercase naming is the way to go. Maybe we need to update it where possible to use ItemID. instead of "uncut ..."? I've fixed it anyway in the script.
There was a problem hiding this comment.
should be updated to use ItemID or maybe an enum or constant in case the string name is important
...a/net/runelite/client/plugins/microbot/thieving/stalls/model/FortisGemStallThievingSpot.java
Outdated
Show resolved
Hide resolved
SteffenCarlsen
left a comment
There was a problem hiding this comment.
One comment, otherwise LGTM.