You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.
I found that sometimes the bot gets stucked and keeps swiping the screen in the formation screen if the previous target is unreachable.
After checking the code, I think the bot did so because, after clicking on the reachable target, the "Unable to reach the target" dialog from a precious attempt clicking on an unreachable target has not yet disappeared and is captured by the bot, making the bot believe the present reachable target is unreachable. See the figure below:
A: clicking on an unreachable target and detect unreachable dialog.
B: found a new target(reachable) and click on it.
C: capturing the screen to read the result for the click in B, but the unreachable dialog from A has not yet disappeared. Therefore the bot thinks the reachable target in B is unreachable.
Note that it takes only 2 second from A to C so it's very likely the "unable to reach..." dialog still remains on the screen.
After C the fleet reaches the target and enter the formation screen. But the bot tries to find the position of the fleet due to the call self.get_closest_target(self.blacklist), and stucked, swiping the screen endlessly.
I think this could be avoided by requiring the bot to wait for like 1~2 second before clicking the new found target to ensure the "Unable to reach..." dialog disappear. In unable_handler within combat.py I add Utils.script_sleep(1) before each Utils.touch and now it seems to work fine.
The text was updated successfully, but these errors were encountered:
I found that sometimes the bot gets stucked and keeps swiping the screen in the formation screen if the previous target is unreachable.
After checking the code, I think the bot did so because, after clicking on the reachable target, the "Unable to reach the target" dialog from a precious attempt clicking on an unreachable target has not yet disappeared and is captured by the bot, making the bot believe the present reachable target is unreachable. See the figure below:
A: clicking on an unreachable target and detect unreachable dialog.
B: found a new target(reachable) and click on it.
C: capturing the screen to read the result for the click in B, but the unreachable dialog from A has not yet disappeared. Therefore the bot thinks the reachable target in B is unreachable.
Note that it takes only 2 second from A to C so it's very likely the "unable to reach..." dialog still remains on the screen.
After C the fleet reaches the target and enter the formation screen. But the bot tries to find the position of the fleet due to the call
self.get_closest_target(self.blacklist)
, and stucked, swiping the screen endlessly.I think this could be avoided by requiring the bot to wait for like 1~2 second before clicking the new found target to ensure the "Unable to reach..." dialog disappear. In
unable_handler
withincombat.py
I addUtils.script_sleep(1)
before eachUtils.touch
and now it seems to work fine.The text was updated successfully, but these errors were encountered: