Fix combat zone detection loop and replace deprecated Rs2GroundItem#518
Open
VIPDO1 wants to merge 1 commit into
Open
Fix combat zone detection loop and replace deprecated Rs2GroundItem#518VIPDO1 wants to merge 1 commit into
VIPDO1 wants to merge 1 commit into
Conversation
VIPDO1
commented
Jul 10, 2026
Contributor
- Fix combat zone check: added isInCombatArea() helper that uses WorldArea.contains(), and use it consistently in determineState() so it matches the check in handleFighting().
- Replace Rs2GroundItem (deprecated since 2.1.0, forRemoval = true) with Rs2TileItemCache/Rs2TileItemQuery for all ground-item lookups (loot, potion pickup).
- Restore combat priority: attack the Nagua that is currently targeting the player before attacking any other Nagua in the zone.
- Cap potion target by inventory space: added getEffectiveTargetPotions() so the configured potion minimum is clamped to available inventory slots; used in both determineState() and handlePreparation().
- Preparation tweak: reserve half of free slots for vials instead of using all free slots, to avoid overfilling with vials.
- Restore antiban gating: re-added action-cooldown and micro-break checks in the main loop.
- Restored original West/East combat area bound
…ne check - Replace Rs2GroundItem (deprecated since 2.1.0, forRemoval=true) with Rs2TileItemCache/Rs2TileItemQuery for loot and potion pickup checks - Add isInCombatArea() helper using WorldArea.contains() and use it consistently in determineState() instead of the looser radius check, fixing the "Outside combat zone" walk loop - Restore priority attack on the Nagua currently targeting the player in handleFighting() - Extract getEffectiveTargetPotions() to cap target potions based on free inventory space, used in both determineState() and handlePreparation() - Reserve half of free slots for vials during preparation instead of using all free slots - Re-add antiban action-cooldown and micro-break gating in the main loop - Restore original West/East combat area bounds
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.