fix(HouseThieving): repair thieving/banking broken by isInteracting; add shine-bonus handling#493
Open
runsonmypc wants to merge 1 commit into
Open
Conversation
…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.
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.
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 ofisInteracting.Changes
searchingPieceflag holds until the game reports the piece emptied ("...worth taking...", handled inonChatMessage), 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 — anyisAnimating(ms)window goes false and re-clicks.getHintArrowPoint()to claim the one-time bonus (+14 valuables, +630 xp), then leave it alone."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 2msopenBankwait (openBank(object)already waits internally).Version bumped
1.0.3 → 1.1.0.Testing
Verified live in a debug client:
"Bank"-action filter.Known follow-up
shutDown()offloadsscript.shutdown()to anew 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.