Hold lotto spin button QoL for faster rolls
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.
I've actually did some work on this already. But I'm still doing some adjustments
https://github.com/Fate-Grand-Automata/FGA/actions/runs/12443287887/artifacts/2351435676
Not exactly the best implementation, but hey it kinda works
It seems that if the long press stops as the box runs out, it gets stuck on this box reset notification screen.
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.
Also may I ask here to increase max gold ember count from 600, since JP inventory size is 900 now :)
I'm going to add button clicks after every long press just in case.
And I did a 100 boxes for testing already and just encountered this once iirc, during the initial 1 ~ 10 boxes.
https://github.com/Fate-Grand-Automata/FGA/actions/runs/12445088485/artifacts/2351729946
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
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.
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()
okay, I'll try it then. Just wait for the build
https://github.com/Fate-Grand-Automata/FGA/actions/runs/12445317491/artifacts/2351763896
Thanks, works nicely now
if anyone will check this. This is the working build btw
https://github.com/Fate-Grand-Automata/FGA/actions/runs/12445555911/artifacts/2351800801
Stopping fga doesn't stop the long press until the time set runs out
it is on Android and Accessibility Service.