Skip to content

Commit

Permalink
auto renew
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonLizier committed Mar 1, 2022
1 parent 3b74aa5 commit f24a153
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,16 @@
#
mouse_speed: 0.1

# [en_US]
# Auto space Renew
# Default value: True
#
# [pt_BR]
# Renovar naves sozinho
# Valor padrão: True
#
auto_renew: True

# ============================================================ #
# [en_US] End - Edit this area according to your account configuration
#
Expand Down
13 changes: 13 additions & 0 deletions index.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,16 @@ def removeSpaceships():
else:
break

def renewSpaces():
buttonsRenew = positions(images['spg-taxa-r'], threshold=ct['go_to_work_btn'])
for (x, y, w, h) in reversed(buttonsRenew):
if restrictArea(x=x,y=y) == False:
moveToWithRandomness(x+(w/2),y+(h/2),ct['mouse_speed'])
pyautogui.click()
time.sleep(1)
clickBtn(images['spg-yes'])
time.sleep(1)

def clickButtonsFight():

global count_reloadSpacheship
Expand All @@ -286,6 +296,9 @@ def clickButtonsFight():
buttons = positions(images['spg-go-fight'], threshold=ct['go_to_work_btn'])
ajustX = 0
ajustY = 0

if(ct['auto_renew'] == True):
renewSpaces()

qtd_send_spaceships = ct['qtd_send_spaceships']

Expand Down
Binary file added targets/spg-taxa-r.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added targets/spg-yes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f24a153

Please sign in to comment.