Skip to content

BankSeller 1.0.5: support F2P trade-restricted accounts - #528

Merged
chsami merged 5 commits into
chsami:developmentfrom
Joinkiee:bankseller-f2p-trade-restriction
Aug 28, 2026
Merged

BankSeller 1.0.5: support F2P trade-restricted accounts#528
chsami merged 5 commits into
chsami:developmentfrom
Joinkiee:bankseller-f2p-trade-restriction

Conversation

@Joinkiee

@Joinkiee Joinkiee commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Updates the Bank Seller plugin to 1.0.5, tested live on a new F2P trade-restricted account.

What changed

  • F2P trade restriction handling: the per-item "restricted for trading" notice is read straight from the sell offer setup. Restricted items are skipped by clicking the next inventory item inside the setup - the GE window is never closed between items, and refused items are put back in the bank.
  • Instant-sell pricing: every offer is listed at 50% of the actively traded price so it fills immediately.
  • Full stacks: each item's whole quantity goes into a single offer.
  • Leftover-offer liquidation: if an offer has not sold by the end (90s idle), it is aborted, collected and re-listed at 1gp so the run can finish. The plugin then collects and disables itself.
  • Clean finish: pending offers are watched client-side (no mouse churn), coins are collected, and a single chatbox verdict is shown when the bank is fully processed - an explicit error when the GE refused everything.
  • Coins and platinum tokens are never sold; bank/GE open failures retry instead of falsely concluding the bank is empty.

Only files under bankseller/ (plus its docs readme) are touched.

Testing steps

  1. Build with ./gradlew build -PpluginList=BankSellerPlugin (JDK 11, client 2.6.20).
  2. On a new F2P trade-restricted account with assorted bank items, start the plugin next to the GE bank booth.
  3. Restricted items (e.g. Shrimps) are detected from the offer setup in ~1s each and skipped without the GE window closing; sellable items are listed at -50% and fill immediately.
  4. At the end the plugin idles while offers sell, re-lists any unsold leftover at 1gp, collects, prints the final chatbox verdict and disables itself.
  5. Verified: 42 offers placed/sold and 9 restricted items skipped in one live session with no stuck state.

Review follow-up

  • Completed offers are collected slot-by-slot only when they belong to the current Bank Seller run; pre-existing buy and sell offers remain untouched.
  • All global collect/completion checks were removed, including the wait-for-slot path.
  • Unknown client reads fail closed, liquidation verifies abort/collect/re-list success, and full foreign slots are watched without bank/GE churn.
  • Synced with the latest development branch and built successfully against client 2.6.20 on JDK 11.

Collection pacing follow-up

  • Serializes normal collection to one owned SOLD slot per scheduled pass.
  • Closes and reopens the GE before touching the next sold slot, avoiding the collect-button widget race seen in live testing.
  • Waits for the overview and at least one game tick between targeted liquidation collections.

- Detect the per-item trade-restriction notice in the sell offer setup
  and skip to the next inventory item without leaving the GE screen
- List every offer at 50% of the actively traded price for instant fills
- Sell each item's full stack in a single offer
- Abort leftover unsold offers at the end, re-list them at 1gp, then
  collect and stop
- Wait for pending offers and collect coins before stopping; final
  chatbox verdict when the bank is fully processed
@Joinkiee
Joinkiee force-pushed the bankseller-f2p-trade-restriction branch from 5a29015 to d868d3d Compare August 14, 2026 04:03
@Joinkiee
Joinkiee changed the base branch from main to development August 14, 2026 04:03
@Joinkiee Joinkiee closed this Aug 14, 2026
@Joinkiee Joinkiee reopened this Aug 14, 2026

chsami commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Thanks — the build and live-session results look good, but I found one merge-blocking safety issue in the forced-liquidation path.

In BankSellerScript.liquidateLeftoverOffers(), Rs2GrandExchange.abortAllOffers(false) aborts every occupied GE offer, not just offers created by BankSeller. The subsequent sellInventory() call can then include contents collected from unrelated offers and re-list them at 1 gp. Please either track the slots/items owned by this run and abort only those, or refuse to start unless all GE slots are empty (the owned-offer approach is safer). Completed unrelated offers should likewise not be collected into the liquidation inventory.

There is also a smaller reliability issue in placeSellOffer(): when the offer setup never opens, !offerSetupSeen exits the retry loop and the caller permanently marks that item unsellable. A transient widget/UI timeout should be retried and should not populate unsellableItemIds; only the explicit trade-restriction message should do that.

Once those paths are isolated from pre-existing offers and transient failures, this should be in much safer shape to merge.

…failures

Address review on chsami#528:

- liquidateLeftoverOffers() no longer calls abortAllOffers(). Slots occupied
  when the plugin starts are snapshotted as foreign, and the liquidation now
  only aborts, collects and re-lists slots that hold an item this run
  actually listed. Aborts are slot-targeted (no collect-all), collection is
  per-slot to the inventory, and the 1gp re-list pass is filtered to owned
  items, so pre-existing or other plugins' offers can no longer be aborted
  or have their contents sold at 1gp. Completed unrelated offers are likewise
  never collected into the liquidation inventory.
- placeSellOffer() now distinguishes a genuine refusal from a transient UI
  failure. Only the explicit trade-restriction notice marks an item
  unsellable. A setup that never opens or a widget timeout is retried and,
  after repeated failures, the item is just parked for the session instead
  of populating unsellableItemIds.

@chsami chsami left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second commit fixes the slot-targeted abort path, but foreign completed offers are still collected globally. and both call . A pre-existing completed buy offer can therefore be collected into the bank, withdrawn by the normal bank scan, and sold by BankSeller; a foreign completed offer is also cleared despite the stated isolation. Please collect only completed slots owned by this run (or refuse startup unless every GE slot is empty) and keep foreign slots untouched throughout, not only during liquidation.

@chsami

chsami commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Clarification to the requested-changes review: the affected methods are collectSoldOffers and collectPendingOffers, and the global call is Rs2GrandExchange.collectAllToBank. The shell formatting stripped those names from the submitted review, but the safety finding is unchanged.

@chsami

chsami commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Requested changes summary: foreign Grand Exchange offers are still not fully isolated. collectSoldOffers and collectPendingOffers call Rs2GrandExchange.collectAllToBank, so a pre-existing completed buy offer can be collected, withdrawn during the bank scan, and sold. Please collect only completed slots owned by this run, or require all GE slots to be empty at startup.

@Joinkiee Joinkiee changed the title BankSeller 1.0.3: support F2P trade-restricted accounts BankSeller 1.0.4: support F2P trade-restricted accounts Aug 26, 2026
@Joinkiee Joinkiee changed the title BankSeller 1.0.4: support F2P trade-restricted accounts BankSeller 1.0.5: support F2P trade-restricted accounts Aug 27, 2026

@chsami chsami left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed current head 99e3f18. The previously blocking foreign-offer collection path is now isolated by startup slot ownership, canonical item identity, targeted per-slot collection, fail-closed client reads, and paced overview rebuilds. Expected CI is green; git diff --check and a clean targeted BankSellerPlugin build against Microbot 2.6.20 passed locally.

@chsami
chsami merged commit b537b25 into chsami:development Aug 28, 2026
1 check 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