Skip to content

fix(geflipper): stop offer-screen misclicks, silent GE stalls, and add a hand-flip switch (v1.2.55) - #550

Open
Joinkiee wants to merge 15 commits into
chsami:developmentfrom
Joinkiee:fix/geflipper-hotkey-overlay-abort
Open

Joinkiee wants to merge 15 commits into
chsami:developmentfrom
Joinkiee:fix/geflipper-hotkey-overlay-abort

Conversation

@Joinkiee

@Joinkiee Joinkiee commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

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

  • The Confirm button is found by interface now, not by size.
    • Old bug: a wide chat box looked like the Confirm button.
    • The script clicked the chat box, so the offer screen stayed open.
  • Wait 250-400 ms before the Confirm click.
    • The highlight is rebuilt every game tick. Old values caused bad clicks.
  • Check the price warning dialog during the whole wait, not only in the first second.
  • Poll for the Abort button. One quick look was not enough.

Stall fixes

  • Reopen the Grand Exchange if it closes while the bot runs.
    • Old bug: the script returned to the Grand Exchange only after a restart.
    • Now: it reopens the exchange after 4 seconds, or walks there if it cannot open it.
  • Close a page that is not the offer list.
    • A bad click can open a Grand Exchange information page, for example the fee page.
    • That page hides the offer list. No button on it helps the bot.
    • Copilot sends no highlight, so the bot did nothing and wrote no message.
    • Now: the bot goes back to the offer list after 8 seconds.
  • Leave the offer screen after 10 seconds with no action, not 30 seconds.

Hand flipping

  • New setting: Auto-Enable Copilot Slot Swap. It is on by default.
  • Turn it off to flip by hand. A left click on a slot then opens the offer screen.
  • Both places that write this setting now obey the switch.

Logging

  • The slot swap check writes one line at start.
    • Old bug: this check failed with no message, so a broken switch was invisible.

Tests

  • 78 minutes and 117 confirms: 117 offers placed (100 per cent), 0 back-outs, 1 warning (0.85 per cent).
  • Before the fix, 9.1 per cent of confirms made a warning.
  • Tested with hotkey selection and with mouse selection.
  • Tested with the overlay on and off.
  • Tested with slot swap off for aborts.

Known issue

  • Modify suggestions can loop when Swap slot left-click action is off.
    • In this mode a click on a slot opens the offer status screen, not the setup screen.
    • The bot then backs out and tries the same slot again.
    • A fix is planned.

…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
@Joinkiee Joinkiee changed the title fix(geflipper): add profit overlay, prevent OS key leak, and fix abort stalls (v1.2.5) fix(geflipper): add profit overlay, prevent OS key leak, and fix stalls/warnings (v1.2.6) Sep 7, 2026
…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
@Joinkiee Joinkiee changed the title fix(geflipper): add profit overlay, prevent OS key leak, and fix stalls/warnings (v1.2.6) fix(geflipper): dynamic slot swap detection, offer screen abort, profit overlay, and input fixes (v1.2.7) Sep 7, 2026
Joinkiee and others added 2 commits September 7, 2026 22:37
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.
@Joinkiee Joinkiee changed the title fix(geflipper): dynamic slot swap detection, offer screen abort, profit overlay, and input fixes (v1.2.7) fix(geflipper): dynamic slot swap detection, offer screen abort, profit overlay, and input fixes (v1.2.5) Sep 11, 2026
…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.
@Joinkiee

Copy link
Copy Markdown
Contributor Author

What this change does

This change makes the geflipper plugin more stable. It also adds one new setting.
The plugin now shows version 1.2.5.

Fixes

  • The plugin finds the Copilot "Swap slot" setting by itself.
  • The plugin can turn the "Swap slot" setting on. A new setting stops this.
  • The plugin stops an offer in two ways:
    • If swap is on, it stops the offer from the offer list.
    • If swap is off, it opens the offer and uses the Abort button.
  • The plugin confirms the abort message. Then it goes back to the offer list.
  • The plugin shows an overlay. The overlay shows profit, GP per hour, time, and the swap mode.
  • You can use the hotkey (E) or the mouse to pick a Copilot suggestion.
  • The hotkey does not send keys to other programs.
  • The plugin types in the chat box if the price field is slow. It presses ESC if the value does not go in.
  • The plugin clicks the exact part that Copilot marks. It does not click the middle of the box.
  • The plugin confirms price warning messages.
  • The plugin only talks to Grand Exchange clerks.

New setting

Auto-Enable Copilot Slot Swap — Default: on

  • On: the plugin turns on the Copilot "Swap slot" setting. Offers stop quickly.
  • Off: the plugin does not change Copilot settings. Use this if you also flip by hand.

Tests

  • Tested with swap on. The plugin stops offers from the offer list.
  • Tested with swap off. The plugin uses the offer screen and the Abort button.
  • Tested with the hotkey and with the mouse. No keys go to other programs.
  • Tested on a live account for a long time. No stops.

Note

The new setting was not yet tested on a live account. Please check it during your review.

Joinkiee and others added 8 commits September 12, 2026 12:00
… 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.
@Joinkiee Joinkiee changed the title fix(geflipper): dynamic slot swap detection, offer screen abort, profit overlay, and input fixes (v1.2.5) fix(geflipper): stop offer-screen misclicks, silent GE stalls, and add a hand-flip switch (v1.2.55) Sep 12, 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.

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.

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