mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-18 17:13:34 +08:00
Fix: Clicking rewards too fast, game cannot respond that fast (#689)
This commit is contained in:
@@ -31,20 +31,25 @@ class Reward(UI):
|
|||||||
logger.hr('Reward receive')
|
logger.hr('Reward receive')
|
||||||
logger.info(f'oil={oil}, coin={coin}')
|
logger.info(f'oil={oil}, coin={coin}')
|
||||||
confirm_timer = Timer(1, count=3).start()
|
confirm_timer = Timer(1, count=3).start()
|
||||||
|
# Set click interval to 0.3, because game can't respond that fast.
|
||||||
|
click_timer = Timer(0.3)
|
||||||
while 1:
|
while 1:
|
||||||
if skip_first_screenshot:
|
if skip_first_screenshot:
|
||||||
skip_first_screenshot = False
|
skip_first_screenshot = False
|
||||||
else:
|
else:
|
||||||
self.device.screenshot()
|
self.device.screenshot()
|
||||||
|
|
||||||
if oil and self.appear_then_click(OIL, interval=60):
|
if oil and click_timer.reached() and self.appear_then_click(OIL, interval=60):
|
||||||
confirm_timer.reset()
|
confirm_timer.reset()
|
||||||
|
click_timer.reset()
|
||||||
continue
|
continue
|
||||||
if coin and self.appear_then_click(COIN, interval=60):
|
if coin and click_timer.reached() and self.appear_then_click(COIN, interval=60):
|
||||||
confirm_timer.reset()
|
confirm_timer.reset()
|
||||||
|
click_timer.reset()
|
||||||
continue
|
continue
|
||||||
if exp and self.appear_then_click(EXP, interval=60):
|
if exp and click_timer.reached() and self.appear_then_click(EXP, interval=60):
|
||||||
confirm_timer.reset()
|
confirm_timer.reset()
|
||||||
|
click_timer.reset()
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# End
|
# End
|
||||||
|
|||||||
Reference in New Issue
Block a user