Skip to content

Fix/bank empty containers widget - #1866

Merged
chsami merged 1 commit into
chsami:developmentfrom
HazeyByte:fix/bank-empty-containers-widget-id
Sep 19, 2026
Merged

chsami merged 1 commit into
chsami:developmentfrom
HazeyByte:fix/bank-empty-containers-widget-id

Conversation

@HazeyByte

Copy link
Copy Markdown

Rs2Bank.emptyContainers() was clicking the wrong thing. The ID it used pointed at a decorative line in the bank window instead of the button, so nothing was ever emptied - and the method still reported success.

Tested in game: a coal bag holding 27 coal now empties into the bank.

@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 16eac46f-6a51-4ab6-8ec6-6255abc6336d

📥 Commits

Reviewing files that changed from the base of the PR and between fa1727d and 16fe594.

📒 Files selected for processing (1)
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/bank/Rs2Bank.java

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


Walkthrough

emptyContainers() now uses InterfaceID.Bankmain.DEPOSITCONTAINERS instead of the hardcoded widget ID 786471. The null check, click, return values, and sleep behavior remain unchanged.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 16fe5

The fix enables emptyContainers() to activate the correct bank action and is ready to merge.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the bank empty-containers widget fix. It is concise and related to the main change.
Description check ✅ Passed The description explains the incorrect widget ID, the resulting behavior, the replacement, and the test result. It is directly related to the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Rs2Bank.emptyContainers() clicked widget 786471, which decodes to (12,39) -
a non-interactable LINE decoration in the bank interface, not a button.

The call failed silently rather than loudly: getWidget() returned non-null so
the null guard passed, clickWidget() dispatched against a widget with no
actions, and the method still returned true. Callers saw success and no
containers were ever emptied.

Use InterfaceID.Bankmain.DEPOSITCONTAINERS = (12,45) instead. Verified against
a live client at the Grand Exchange: (12,45) is the GRAPHIC carrying the
"Empty containers" action with interactable: true, while (12,39) reports type
LINE with an empty action list.

emptyContainers() has no in-tree callers but is public API surface, so every
external script calling it has been a no-op.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@HazeyByte
HazeyByte force-pushed the fix/bank-empty-containers-widget-id branch from 8c95d43 to 16fe594 Compare September 18, 2026 06:51
@chsami
chsami merged commit 59e44f4 into chsami:development Sep 19, 2026
2 checks passed
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.

2 participants