Skip to content

Fix combat zone detection loop and replace deprecated Rs2GroundItem#518

Open
VIPDO1 wants to merge 1 commit into
chsami:developmentfrom
VIPDO1:development
Open

Fix combat zone detection loop and replace deprecated Rs2GroundItem#518
VIPDO1 wants to merge 1 commit into
chsami:developmentfrom
VIPDO1:development

Conversation

@VIPDO1

@VIPDO1 VIPDO1 commented Jul 10, 2026

Copy link
Copy Markdown
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
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.

1 participant