Skip to content
This repository was archived by the owner on Mar 17, 2024. It is now read-only.

Commit 1b5ad65

Browse files
committed
Timing/Stability tweaks
1 parent e156978 commit 1b5ad65

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

AutoAFK.pyw

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ else:
4040
latest_release = 'Cannot retrieve!'
4141

4242

43-
version = "0.14.2d"
43+
version = "0.14.5"
4444

4545
#Main Window
4646
class App(customtkinter.CTk):

activities.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def attemptCampaign():
143143
click('buttons/beginbattle', retry=3, seconds=3, region=boundries['battle'])
144144
click('buttons/pause', retry=3, region=boundries['pauseBattle']) # 3 retries as ulting heroes can cover the button
145145
click('buttons/exitbattle', retry=3, region=boundries['exitBattle'])
146-
click('buttons/back', retry=3, seconds=4, region=boundries['backMenu'])
146+
click('buttons/back', retry=3, seconds=4, suppress=True, region=boundries['backMenu'])
147147
else: # Single Battle
148148
click('buttons/battle', 0.8, retry=3, seconds=3, region=boundries['battle'])
149149
click('buttons/pause', 0.8, retry=3, region=boundries['pauseBattle']) # 3 retries as ulting heroes can cover the button
@@ -387,7 +387,7 @@ def handleKingsTower():
387387
# For reasons sometimes this button is 'beginbattle' and sometimes it is 'begin', so we use clickXY
388388
clickXY(700, 1850, seconds=2)
389389
# click('buttons/beginbattle', 0.8, seconds=3, retry=5)
390-
click('buttons/pause', 0.8, retry=5)
390+
click('buttons/pause', 0.8, retry=5, suppress=True)
391391
click('buttons/exitbattle')
392392
click('buttons/back', retry=3, region=boundries['backMenu'])
393393
click('buttons/back', retry=3, region=boundries['backMenu'])
@@ -446,6 +446,7 @@ def handleShopPurchasing(counter):
446446
click(button, 0.95, suppress=True)
447447
click('buttons/shop/purchase', suppress=True)
448448
clickXY(550, 1220)
449+
wait(3) # Else we can't find TR after
449450

450451
def shopPurchases(shoprefreshes):
451452
printBlue('Attempting store purchases (Refreshes: ' + str(shoprefreshes) + ')')
@@ -600,20 +601,20 @@ def clearMerchant():
600601
printPurple(' Collecting Daily Deal')
601602
swipe(550, 1400, 550, 1200, 500, seconds=3)
602603
click('buttons/dailydeals')
603-
clickXY(400, 1675)
604+
clickXY(400, 1675, seconds=2)
604605
# Biweeklies
605606
if d.isoweekday() == 3: # Wednesday
606607
if isVisible('buttons/merchant_biweekly', confidence=0.8, click=True):
607608
printPurple(' Collecting Biweekly Deal')
608609
swipe(300, 1400, 200, 1200, 500, seconds=3)
609610
clickXY(200, 1200)
610-
clickXY(550, 1625)
611+
clickXY(550, 1625, seconds=2)
611612
# Yuexi
612613
if d.isoweekday() == 1: # Monday
613614
print(' Collecting Yuexi')
614615
clickXY(200, 1825)
615616
clickXY(240, 880)
616-
clickXY(150, 1625)
617+
clickXY(150, 1625, seconds=2)
617618
# Clear Rhapsody bundles
618619
printPurple(' Clearing Rhapsody notification')
619620
clickXY(200, 1825)
@@ -635,7 +636,7 @@ def handleTwistedRealm():
635636
clickXY(550, 600, seconds=3)
636637
if isVisible('buttons/nextboss'):
637638
printGreen(' Twisted Realm found, battling')
638-
if isVisible('buttons/challenge_tr'):
639+
if isVisible('buttons/challenge_tr', retry=3, confidence=0.8):
639640
clickXY(550, 1850, seconds=2)
640641
click('buttons/autobattle')
641642
if not (isVisible('labels/skipbattle_Active')):

0 commit comments

Comments
 (0)