Skip to content

fix(HouseThieving): repair thieving/banking broken by isInteracting; add shine-bonus handling#493

Open
runsonmypc wants to merge 1 commit into
chsami:developmentfrom
runsonmypc:fix/house-thieving-isinteracting
Open

fix(HouseThieving): repair thieving/banking broken by isInteracting; add shine-bonus handling#493
runsonmypc wants to merge 1 commit into
chsami:developmentfrom
runsonmypc:fix/house-thieving-isinteracting

Conversation

@runsonmypc

Copy link
Copy Markdown
Contributor

Summary

Rs2Player.isInteracting() stopped reporting interaction during actions, which broke the House Thieving plugin's pickpocket, house-thieving, and banking flows (the bot would stand idle or spam-click). This reworks each flow to derive state from observable game signals instead of isInteracting.

Changes

  • Pickpocket — click once per distraction event; the game auto-repeats pickpocketing until the citizen is no longer distracted. Re-click only after opening coin pouches (which interrupts the auto-loop). No more re-clicks while already pickpocketing a distracted citizen.
  • House thieving — click a piece once; it auto-loots for ~50–60s with no further input. A searchingPiece flag holds until the game reports the piece emptied ("...worth taking...", handled in onChatMessage), at which point it switches to a different, non-exhausted piece. Animation-timing gating was unworkable here because the auto-loot has long no-animation stretches mid-loot — any isAnimating(ms) window goes false and re-clicks.
  • Shine / hint-arrow bonus — when the game highlights a piece ("You notice something shine..."), switch to it via getHintArrowPoint() to claim the one-time bonus (+14 valuables, +630 xp), then leave it alone.
  • Banking — resolve the bank by an object that actually exposes a "Bank" menu action, instead of the previous unfiltered nearest tile-object lookup (which returned a floor decoration; click() then fell back to its first menu option and never opened the bank). Removed the buggy 2ms openBank wait (openBank(object) already waits internally).

Version bumped 1.0.3 → 1.1.0.

Testing

Verified live in a debug client:

  • House thieving: clicks a piece once, loots ~58s with zero re-clicks, then cleanly switches to a different piece on the depletion message.
  • Pickpocket: single click per distraction, auto-repeats as expected.
  • Banking fix verified to compile; resolves via the "Bank"-action filter.

Known follow-up

  • shutDown() offloads script.shutdown() to a new Thread(...) to avoid blocking the Swing EDT. The residual canvas freeze on stop was diagnosed as framework-level (pathfinder mutex contention) and is left as a separate follow-up.

…nd add shine-bonus handling

Rs2Player.isInteracting() no longer reports interaction during actions, which broke the
plugin's pickpocket, house-thieving and banking flows. Derive state from observable game
signals instead:

- Pickpocket: click once per distraction (the game auto-repeats until the citizen stops
  being distracted); re-click only after opening coin pouches.
- House thieving: click a piece once - it auto-loots for ~50-60s. Gate re-search behind a
  searchingPiece flag and only act again when the game reports the piece emptied
  ("...worth taking...") via onChatMessage, then switch to a different piece. Animation
  timing is unusable here (long no-animation stretches occur mid-loot).
- Shine/hint-arrow bonus: switch to the highlighted piece (getHintArrowPoint) to claim the
  one-time bonus, then leave it alone.
- Banking: resolve the bank via an object that actually exposes a "Bank" action instead of
  the nearest unfiltered tile object (which clicked a floor decoration and never banked);
  drop the 2ms openBank wait.

Bump version 1.0.3 -> 1.1.0.
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