FGA icon indicating copy to clipboard operation
FGA copied to clipboard

Hold lotto spin button QoL for faster rolls

Open sby1ce opened this issue 1 year ago • 15 comments

Preparation

  • [X] No one has asked for this feature before in other issues (even the closed ones)

Describe the feature

It's now faster to spin lotto boxes using the new QoL feature on JP that by holding the button instead of tapping it.

I can submit a PR for this feature.

sby1ce avatar Dec 20 '24 22:12 sby1ce

I've actually did some work on this already. But I'm still doing some adjustments

ArthurKun21 avatar Dec 21 '24 05:12 ArthurKun21

https://github.com/Fate-Grand-Automata/FGA/actions/runs/12443287887/artifacts/2351435676

Not exactly the best implementation, but hey it kinda works

ArthurKun21 avatar Dec 21 '24 07:12 ArthurKun21

It seems that if the long press stops as the box runs out, it gets stuck on this box reset notification screen. HD-Player_qsHzf37lvI

It eventually clicks and continues but at the same time the clicks will most likely press the roll button and the script will have to wait for the box to slowly open until the button reappears to long press it again.

The long press can also stop just as a box starts to open and it seems that the game doesn't recognize a long press if it happens with too little delay from the previous long press.

Adding more delay between long presses looks like the way to fix both issues.

sby1ce avatar Dec 21 '24 12:12 sby1ce

Also may I ask here to increase max gold ember count from 600, since JP inventory size is 900 now :)

sby1ce avatar Dec 21 '24 12:12 sby1ce

I'm going to add button clicks after every long press just in case.

397925200-62e62d6b-cdaa-4edf-a9d0-2e9d88a4d2c9

And I did a 100 boxes for testing already and just encountered this once iirc, during the initial 1 ~ 10 boxes.

ArthurKun21 avatar Dec 21 '24 12:12 ArthurKun21

https://github.com/Fate-Grand-Automata/FGA/actions/runs/12445088485/artifacts/2351729946

ArthurKun21 avatar Dec 21 '24 12:12 ArthurKun21

It seems that if the long press ends and the roll button is available to press, these button clicks start opening the box but not skip the slowly appearing prizes. It happens pretty consistently too.

The game also sometimes just ignores the long press so everything gets stuck until it ends

sby1ce avatar Dec 21 '24 12:12 sby1ce

hmm yea this is kinda a problem with the current long press for lottery. Sorry I don't have answer right now, might get back to this after lotto ends.

In the mean time, you can try adjusting the long press(secs) duration.

ArthurKun21 avatar Dec 21 '24 12:12 ArthurKun21

When I hacked together a solution on my own, simply adding a delay after the long press seemed to solve this.

private fun spin() {
    locations.lottery.spinClick.longPress(20)
    3.seconds.wait()

sby1ce avatar Dec 21 '24 12:12 sby1ce

okay, I'll try it then. Just wait for the build

ArthurKun21 avatar Dec 21 '24 12:12 ArthurKun21

https://github.com/Fate-Grand-Automata/FGA/actions/runs/12445317491/artifacts/2351763896

ArthurKun21 avatar Dec 21 '24 12:12 ArthurKun21

Thanks, works nicely now

sby1ce avatar Dec 21 '24 13:12 sby1ce

if anyone will check this. This is the working build btw

https://github.com/Fate-Grand-Automata/FGA/actions/runs/12445555911/artifacts/2351800801

ArthurKun21 avatar Dec 21 '24 18:12 ArthurKun21

Stopping fga doesn't stop the long press until the time set runs out

vybze avatar Dec 24 '24 01:12 vybze

it is on Android and Accessibility Service.

ArthurKun21 avatar Dec 24 '24 02:12 ArthurKun21