fix(geflipper): stop offer-screen misclicks, silent GE stalls, and add a hand-flip switch (v1.2.55) - #550
fix(geflipper): stop offer-screen misclicks, silent GE stalls, and add a hand-flip switch (v1.2.55)#550Joinkiee wants to merge 15 commits into
Conversation
…t stalls (v1.2.5) Add FlipperOverlay displaying version (v1.2.5), session run time, Copilot GP/hr, total profit, and pending flips directly on client. Fix global keypress leak: replace OS-level keyboard/mouse events with direct client thread chatbox manipulation for Copilot quantity/price entry, eliminating unwanted keypresses when defocused or in other applications. Fix abort offer stalls: resolve infinite abort loops and stuck offer screens when aborting stale offers by checking actual offer state, handling confirm dialogs, and safely resetting back to overview. Add highlighted NPC bank/exchange interaction and bank withdrawal support for sell suggestions. Bump FlipperPlugin version to 1.2.5.
…firmation, and chatbox input fallback (v1.2.6)
- Bump FlipperPlugin version to 1.2.6
- Add HighlightTarget to calculate exact clickBounds using Flipping Copilot's relativeBounds overlay offsets, ensuring clicks hit the intended button sub-region rather than the parent widget bounds
- Detect and automatically confirm in-game Grand Exchange price warning dialogs ('Your offer is much...' / 'Are you sure...') before actions and after clicking Confirm
- Add keyboard typing fallback via Rs2Keyboard when Copilot direct chatbox setting is delayed or empty
- Add prompt cancellation via ESC if chatbox input cannot be populated, preventing unwanted text leaking into public chat
- Safely verify offer screen closure post-confirmation
…creen abort (v1.2.7) - Bump FlipperPlugin version to 1.2.7 - Dynamically detect Flipping Copilot 'slotActionSwap' setting via reflection and ConfigManager - Add multi-tier getOfferScreenAbortButton to locate and click the abort button on offer details screen - Support dual abort paths: overview left-click swap when slotActionSwap is true, and offer screen abort when false - Display live Slot Swap status on the client overlay - Handle abort confirmation dialogs and eliminate infinite overview-offer screen loop
…p setting (v1.2.8)
Keeps every fix from the 1.2.6-1.2.8 line (dynamic slotActionSwap detection, offer-screen abort, sub-region highlight clicks, price-dialog confirmation, chatbox input fallback, profit/stats overlay) and only changes the reported version string to 1.2.5 for release.
…1.2.5) Adds a user-facing toggle so hand-flippers can stop the plugin forcing Flipping Copilot's slotActionSwap setting on. Default true, preserving existing behaviour. When disabled the plugin respects the user's Copilot setting and falls back to aborting from the offer details screen.
What this change doesThis change makes the geflipper plugin more stable. It also adds one new setting. Fixes
New settingAuto-Enable Copilot Slot Swap — Default: on
Tests
NoteThe new setting was not yet tested on a live account. Please check it during your review. |
… did not close' warnings
Two timing faults produced warnings that all self-recovered, costing a wasted
back-out and retry on every occurrence:
1. The offer-screen abort button was looked up once, instantly, right after the
slot click. The GE details screen renders a tick later, so the lookup missed
and the script backed out of a screen it could have used. It now polls for
the button (waitForOfferScreenAbortButton, 2s) before giving up.
2. When the abort suggestion was already satisfied (Copilot drops the abort as
soon as it registers), the missing button was logged as a warning. That case
is now recognised via isAbortSuggestionSettled() and logged as info.
3. The price warning dialog ('Your offer is much...') was only looked for in the
first 1200ms after Confirm. A dialog appearing later was never dismissed, so
the offer screen stayed open until the 4s timeout and the offer was abandoned.
The dialog is now re-checked for the whole wait (now 6s, exiting early once the
screen closes) and swept once more at the deadline.
…rm button isConfirmTarget() fell back to 'relativeBounds >= 120x30 means Confirm'. Copilot also highlights the chatbox item widget (interface 162) with a box that wide, so the script clicked the chatbox while believing it had clicked Confirm. The offer screen then stayed open until it timed out and the script backed out - the 'offer screen did not close after confirm' warning, at 3% of confirms. The size heuristic now requires the widget to belong to the GE offer screen interface (InterfaceID.GE_OFFERS = 465). Text/action 'Confirm' matches are unchanged and still take priority.
…ayer lookup Pacing, but only where it pays: - The Confirm click now waits 250-400ms for the interface to settle, re-verifies the highlighted widget is still visible, and re-reads the click area from the live widget bounds. Copilot rebuilds its highlight list every tick, so a target captured mid-tick could be clicked at stale coordinates. Cost is ~300ms per offer, on the Confirm step only. - Wrapped the GOING_TO_GE player lookup: Rs2Player.getWorldLocation() throws inside the helper when localPlayer is not populated yet (first ticks after login), producing a per-startup ERROR. It now retries on the next tick.
Version now increments by +0.01 per fix so the overlay identifies the build that is actually running.
…n (1.2.52) The try/catch stopped the exception reaching the script, but ClientThread logs 'Exception during task execution' before the caller's catch runs, so the ERROR line survived. Now the script returns early while localPlayer is null, so the call is never made. Version bumped to 1.2.52 (+0.01 per fix).
…o actions (1.2.53) Diagnosed from a 30s stall: the plugin opened the offer screen for a MODIFY, then processed no highlights at all for 30s. Copilot's own panel reported 'collect is suggested but there is nothing to collect' at the end of it. Copilot has no COLLECT suggestion type (BUY/SELL/ABORT/MODIFY_BUY/MODIFY_SELL/WAIT), so this is its uncollected-items state going out of sync: it wanted a collect, found nothing to collect, and produced no actionable highlight. Collect is a GE-overview action, so nothing on the offer screen could ever match it. Root cause is Copilot-side, but the plugin can stop holding the offer screen (and its slot) for 30s. When the action count on the open screen is zero, back out after 10s; keep the 30s allowance when actions are happening, since that path is making progress.
…ActionSwap (1.2.54) Found by testing the toggle with slot swap off: the setting came back true within minutes and aborts used the overview path anyway. slotActionSwap has two writers - FlipperPlugin.ensureCopilotSlotActionSwap() at startup and FlipperScript.ensureSlotActionSwapEnabled() - and only the second honoured the toggle. The startup hook ran first and silently re-enabled the setting, so turning the option off had no effect. Both now check autoEnableSlotSwap(), and the plugin reads the config from ConfigManager if the injected field is not populated yet.
…page (1.2.55) The script had no way back from a closed exchange while running - GOING_TO_GE was only set on shutdown - so a closed or hidden Grand Exchange stalled the bot with no log line. It now reopens the exchange after 4s, or walks to the GE when it cannot be opened from here. A mistimed click can open a GE info page (for example the Convenience Fees text). That page hides the offer list, nothing on it is actionable, and Copilot highlights nothing, so the bot idled forever. It now escapes back to the offer list after 8s. The slotActionSwap auto-enable check is now logged on every start: it used to fail silently, so a toggle that did not take effect left no evidence of why.
chsami
left a comment
There was a problem hiding this comment.
Reviewed head 6f97dba.
P1: FlipperPlugin.disableGameChatAppender() detaches and stops the ROOT logger's GameChatAppender and disables its global configuration on every startup. shutDown() never restores it. Starting and then stopping GE Flipper therefore disables in-game diagnostics for all other Microbot scripts. Remove this client-wide mutation; control this plugin's own log volume instead, and verify another script's chat logging survives a Flipper start/stop.
There is also a confirmed functional gap in the new slot-swap-off mode: FlipperScript.checkAndAbortOrModifyIfNeeded() handles MODIFY with clickWidget(abortWidget), which opens View offer rather than the modify setup, then the watchdog backs out and repeats. Use an explicit supported Modify action or reject/pause this mode with actionable feedback. Add automated coverage for MODIFY with slot swap both on and off. These changes span behavior outside a safe maintainer cleanup, so I am leaving remediation with the author.
What this changes
geflipper automates the Flipping Copilot plugin.
It had bugs that stopped the bot or made it click the wrong place.
This pull request fixes those bugs.
The version is now 1.2.55.
Offer screen fixes
Stall fixes
Hand flipping
Logging
Tests
Known issue