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

Commit c501d15

Browse files
committed
Adding scrolling to find the Unlimited Summons button
1 parent 840f3ff commit c501d15

3 files changed

Lines changed: 14 additions & 10 deletions

File tree

AutoAFK.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
from activities import *
2-
import tools
32
import customtkinter
43
import threading
54
import sys
65
import configparser
76
import os
8-
from datetime import datetime,timezone
7+
from datetime import datetime, timezone
98
import argparse
109
import requests
1110

@@ -41,7 +40,7 @@
4140
latest_release = 'Cannot retrieve!'
4241

4342

44-
version = "0.13.6"
43+
version = "0.13.7"
4544

4645
#Main Window
4746
class App(customtkinter.CTk):

activities.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import math
2-
1+
from math import ceil
32
from tools import *
43
from AutoAFK import printGreen, printError, printWarning, printBlue, printPurple, settings
54
import datetime
65
import configparser
7-
import random
86

97
config = configparser.ConfigParser()
108
config.read(settings)
@@ -712,6 +710,9 @@ def infiniteSummons(woke, celehypo, x6mode=False):
712710
printBlue('Attempting to run Unlimited Summons')
713711
counter = 0 # Pull amount counter
714712
starttime = time.time() # Pull duration counter
713+
if not isVisible('buttons/summons/summons_sidebar'):
714+
printWarning('Can\'t see the summons event button, scrolling the side menu down..')
715+
swipe(50, 800, 50, 500, duration=500, seconds=1) # scroll down
715716
if isVisible('buttons/summons/summons_sidebar', retry=3, click=True):
716717
# List to match the dropdown name to the image file name
717718
wokes = {'Awakened Talene': 'aTalene', 'Gavus': 'Gavus', 'Maetria': 'Maetria', 'Awakened Ezizh': 'aEzizh',
@@ -768,8 +769,8 @@ def infiniteSummons(woke, celehypo, x6mode=False):
768769
printBlue('Rare found')
769770
# Funky math for duration calculation, ceiling is used to roundup else it returns with a decimal place
770771
duration = time.time() - starttime
771-
hours = str(math.ceil(duration // 3600))
772-
minutes = str((math.ceil(duration // 60)) - (int(hours) * 60))
772+
hours = str(ceil(duration // 3600))
773+
minutes = str((ceil(duration // 60)) - (int(hours) * 60))
773774
printGreen('Unlimited Summons finished!')
774775
printGreen('In just ' + str(counter) + ' pulls and ' + hours + ' hours ' + minutes + ' minutes. Hooray!')
775776
else:
@@ -1094,6 +1095,9 @@ def handleLabTile(elevation, side, tile):
10941095
if tile == '2': # Multi
10951096
clickXY(250, 1250, seconds=2) # Tile
10961097
clickXY(550, 1500, seconds=4) # Click Go
1098+
if isVisible('labels/notice', confidence=0.8, retry=3): # 'High Difficulty popup at first multi'
1099+
clickXY(450, 1150, seconds=2) # Don't show this again
1100+
clickXY(725, 1250, seconds=4) # Go
10971101
clickXY(750, 1500, seconds=4) # Click Begin Battle
10981102
if tile == '3': # Single
10991103
clickXY(400, 1050, seconds =2) # Tile
@@ -1115,6 +1119,9 @@ def handleLabTile(elevation, side, tile):
11151119
if tile == '2': # Multi
11161120
clickXY(800, 1225, seconds=2) # Tile
11171121
clickXY(550, 1500, seconds=4) # Click Go
1122+
if isVisible('labels/notice', confidence=0.8, retry=3): # 'High Difficulty popup at first multi'
1123+
clickXY(450, 1150, seconds=2) # Don't show this again
1124+
clickXY(725, 1250, seconds=4) # Go
11181125
clickXY(750, 1500, seconds=4) # Click Begin Battle
11191126
if tile == '3': # Single
11201127
clickXY(700, 1050, seconds=2) # Tile

tools.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Imports
22
import io
3-
43
from ppadb.client import Client
54
from AutoAFK import printGreen, printError, printWarning, printBlue, settings, args
65
from pyscreeze import locate, locateAll
@@ -10,7 +9,6 @@
109
from numpy import asarray
1110
from shutil import which
1211
from platform import system
13-
import pyscreenshot
1412

1513
# Configs/settings
1614
config = configparser.ConfigParser()

0 commit comments

Comments
 (0)