Skip to content

Comments

Add worldhopping and gem bag to Fortis Gem Stall#1482

Merged
chsami merged 7 commits intochsami:developmentfrom
heap-overfl0w:add-worldhopping-and-gem-bag
Sep 8, 2025
Merged

Add worldhopping and gem bag to Fortis Gem Stall#1482
chsami merged 7 commits intochsami:developmentfrom
heap-overfl0w:add-worldhopping-and-gem-bag

Conversation

@heap-overfl0w
Copy link
Contributor

  • 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.

chsami and others added 4 commits September 3, 2025 14:22
…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.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 6, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

  • README: removed Quest Helper Integration (including Not Enough Runes and Shortest Path), related images/instructions, and Help and discussion (including Buy Me a Coffee). No new content added.
  • FortisGemStallThievingSpot: added early return on nearby player detection; added world-hopping and login-wait when stall is missing or lacks Steal-from action; implemented gem bag handling (check full, open/fill with uncut sapphire/emerald/ruby/diamond); updated banking to deposit specific uncut gems, empty gem bag, deposit all except gem bag and its open state, then close bank; introduced helper methods for gem detection and bag fullness; updated imports. No exported/public signature changes.

Possibly related PRs

  • Stop on no runes #1473: Modifies FortisGemStallThievingSpot; this PR further refines its thieving, banking, and gem-bag logic.
  • Add fortis gem stall #1472: Adds Fortis gem stall spot and mappings; this PR builds on it with hopping, login, and gem-bag management.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9cdf8cc and 06d0851.

📒 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.

Comment on lines +52 to 57
if (!Rs2GameObject.hasAction(Rs2GameObject.convertToObjectComposition(stall), "Steal-from")) {
boolean started = Microbot.hopToWorld(Login.getRandomWorld(Rs2Player.isMember()));
if (started) {
Global.sleepUntil(Microbot::isLoggedIn, 15000);
}
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

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.

Suggested change
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.
Copy link
Contributor

@See1Duck See1Duck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems just fine to me


private boolean isUncutGem(Rs2ItemModel item) {
String n = item.getName().toLowerCase();
return n.equals("uncut sapphire") ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a suggestion, avoid using hardcoded names, you could instead check and match ItemID

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About to fix this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be updated to use ItemID or maybe an enum or constant in case the string name is important

Copy link
Contributor

@SteffenCarlsen SteffenCarlsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment, otherwise LGTM.

@chsami chsami merged commit 21be467 into chsami:development Sep 8, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants