feat(aiofighter): add wilderness improvements - looting bag support, blighted foods, ferox pool restoration, combat potion optimization#1476
Conversation
…blighted foods, ferox pool restoration, combat potion optimization
Walkthrough
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/aiofighter/bank/BankerScript.java (1)
108-121: Banking can be skipped if no inventory setup is configured (regression risk).Early-return on missing inventory setup happens before the “inventory full/low slots” checks, so players without setups won’t bank even with a full inventory.
- public boolean needBanking() { - if(config.currentInventorySetup() == null){ - if(config.defaultInventorySetup() != null) { - AIOFighterPlugin.setCurrentSlayerInventorySetup(config.defaultInventorySetup()); - } else { - Microbot.log("No inventory setup configured, skipping banking."); - return false; - } - } - if(!config.bank()){ - return false; - } + public boolean needBanking() { + if (!config.bank()) { + return false; + } // Don't bank if we can eat food for space instead ... if(bankingTriggered) { return true; } // (1) If inventory is full, we need to bank if (Rs2Inventory.isFull()) { ... return true; } // (2) If there are too few empty slots, missing slayer items, or the inventory setup changed if ((Rs2Inventory.getEmptySlots() <= config.minFreeSlots() && config.bank()) || needSlayerItems() || inventorySetupChanged) { ... return true; } + + // Setup-based checks only when using setups or slayer mode + boolean usingSetups = config.useInventorySetup() || config.slayerMode(); + if (!usingSetups) { + return false; + } + if (config.currentInventorySetup() == null) { + if (config.defaultInventorySetup() != null) { + AIOFighterPlugin.setCurrentSlayerInventorySetup(config.defaultInventorySetup()); + } else { + Microbot.log("No inventory setup configured; skipping setup-based checks."); + return false; + } + }Also applies to: 133-146
🧹 Nitpick comments (1)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/aiofighter/combat/PotionManagerScript.java (1)
39-61: Gating combat pots strictly behind inCombat() may block intended pre-potting.Rs2Combat.inCombat() requires an active interaction/animation; players won’t pre-pot on first engage or while about to attack. Consider allowing a lightweight “pre-engage” window (e.g., target selected or recent combat within N ms) controlled by a config flag to avoid DPS loss on the opener.
Apply a minimal tweak like:
-// Only drink combat potions when in combat -if (Rs2Combat.inCombat()) { +// Prefer in-combat, but allow brief pre-engage window +if (Rs2Combat.inCombat() || Rs2Player.isInteracting() /* or a recent-combat flag */) {
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (4)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/aiofighter/AIOFighterConfig.java(1 hunks)runelite-client/src/main/java/net/runelite/client/plugins/microbot/aiofighter/bank/BankerScript.java(4 hunks)runelite-client/src/main/java/net/runelite/client/plugins/microbot/aiofighter/combat/PotionManagerScript.java(2 hunks)runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/misc/Rs2Food.java(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-25T15:51:52.157Z
Learnt from: runsonmypc
PR: chsami/Microbot#1417
File: runelite-client/src/main/java/net/runelite/client/plugins/microbot/agility/AgilityScript.java:284-291
Timestamp: 2025-08-25T15:51:52.157Z
Learning: In RuneLite's ItemID class, both PIEDISH and PIE_DISH constants exist and are valid, both referring to item ID 2313. The gameval package uses PIEDISH while the regular api package uses PIE_DISH, so either naming convention can be used.
Applied to files:
runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/misc/Rs2Food.java
🧬 Code graph analysis (2)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/aiofighter/combat/PotionManagerScript.java (1)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/combat/Rs2Combat.java (1)
Rs2Combat(27-244)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/aiofighter/bank/BankerScript.java (2)
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/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 (3)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/misc/Rs2Food.java (1)
67-70: Blighted food entries added — verify heal/tick values.Looks good. Please confirm the heal amounts and tick delays for blighted manta/angler/karambwan match OSRS behavior in PvP zones to avoid over/under-eating logic.
runelite-client/src/main/java/net/runelite/client/plugins/microbot/aiofighter/bank/BankerScript.java (2)
366-371: Good move: empty bags/containers at banking time.Unconditionally emptying Looting Bag, Gem Bag, Herb Sack, and Seed Box at the start of banking aligns with the PR goal and reduces inventory churn. Nice.
483-485: Ferox pool hook placement LGTM.Triggering restoration right after withdrawUpkeepItems() and only at FEROX_ENCLAVE with the config flag is correct and minimally invasive.
...e-client/src/main/java/net/runelite/client/plugins/microbot/aiofighter/AIOFighterConfig.java
Show resolved
Hide resolved
...-client/src/main/java/net/runelite/client/plugins/microbot/aiofighter/bank/BankerScript.java
Show resolved
Hide resolved
|
@See1Duck Can you take a look at the changes and see if they align with yours. |
| withdrawUpkeepItems(config); | ||
|
|
||
| // Use Pool of Restoration at Ferox if configured | ||
| if (config.usePoolAtFerox() && Rs2Bank.getNearestBank() == BankLocation.FEROX_ENCLAVE) { |
There was a problem hiding this comment.
Was it intended that it should only use the pool if the nearest bank is ferox? Wouldn't it make more sense to force it to select ferox if this option is on?
There was a problem hiding this comment.
This could potentially force a player through the wilderness so I did not consider it. An option could be added to force Ferox if we have a dueling ring, but I think a forced bank location feature should be its own PR.
There was a problem hiding this comment.
Yeah i see your point, im just thinking that the setting could be somewhat misleading for some users expecting it will teleport to ferox and just ends up going somewhere else
There was a problem hiding this comment.
In my opinion if the bank location is Ferox, it should use the pool by default and not as an option (who banks at Ferox if not because of the pool? Castle Wars chest is closer if chosen by distance), and maybe in the place of that option, replace with "Use Ferox Bank" , which would set Ferox as bank location (consequentially using the pool), just an suggestion tho 💯
There was a problem hiding this comment.
Actually you don't always want to use the pool because you will lose any boosted stats, that's why I made it an option. It's also why I changed combat pots to only be used in combat, to avoid pot -> pool -> pot.
Description
Adds several wilderness-focused improvements to the AIO Fighter plugin to enhance the combat experience in wilderness areas.
Changes
Testing