29988122 / Fate-Grand-Order_Lua

Fate Grand Order auto battle script - no root needed, for Android use only
MIT License
290 stars 95 forks source link

Increase delay after using skills #336

Open glassofmilk1 opened 4 years ago

glassofmilk1 commented 4 years ago

Basically, the game doesn't register the input after particular skills, like using the plugsuit switch or a skill that changes star gather. As a result, I'd like to slightly increase the delay after I use skills and plugsuit. How would I got about doing that?

jihoonkim2 commented 4 years ago

Not the developer, but I've had the same problem myself and have been tinkering around the code. I've added the line "wait(x)" in the autoskill.lua file, in the functions "CastSkill" and "SelectSubMember", which seems to make the code wait x seconds before continuing to execute the commands in those functions. This seems to work for me, but I'm not sure if this will break things further down the line. If someone with more experience and technical know how could chime in as well, that would be great!

TryBane commented 4 years ago

That would normally work fine. One thing you can also do is just adjust the wait time provided already. Right now on line 39 (of the most recent version just updated today, previous versions might have it on a separate line) there is a wait(.3) line. Just increase this to up to wait(1) for normal skills. This should fix most of the normal skills, but won't work in regards to the master skills and order change. For those, you can go to line 77 for master skill and add a new wait(.5) before the line, then increase the wait(.3) time that comes after to wait(.5) as well. This should fix both Master Skills and Plugsuit. However, if you're having issues with it not waiting long enough between clicking the front team member and the sub team member, you'll have to make a change in a different location.

This is all within the Autoskill.lua file. Also, the changes Kelpie2 mentioned won't break anything down the line, but it doesn't encompass all possible instances. Though he might not have run into those problems yet (and may never). If I haven't addressed what the problem you're having is though, feel free to reply and fix any misinformation I've gathered from your message and I'll try to provide a better answer.