Skip to content

Commit f24a153

Browse files
committed
auto renew
1 parent 3b74aa5 commit f24a153

File tree

4 files changed

+23
-0
lines changed

4 files changed

+23
-0
lines changed

config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,16 @@
160160
#
161161
mouse_speed: 0.1
162162

163+
# [en_US]
164+
# Auto space Renew
165+
# Default value: True
166+
#
167+
# [pt_BR]
168+
# Renovar naves sozinho
169+
# Valor padrão: True
170+
#
171+
auto_renew: True
172+
163173
# ============================================================ #
164174
# [en_US] End - Edit this area according to your account configuration
165175
#

index.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,16 @@ def removeSpaceships():
273273
else:
274274
break
275275

276+
def renewSpaces():
277+
buttonsRenew = positions(images['spg-taxa-r'], threshold=ct['go_to_work_btn'])
278+
for (x, y, w, h) in reversed(buttonsRenew):
279+
if restrictArea(x=x,y=y) == False:
280+
moveToWithRandomness(x+(w/2),y+(h/2),ct['mouse_speed'])
281+
pyautogui.click()
282+
time.sleep(1)
283+
clickBtn(images['spg-yes'])
284+
time.sleep(1)
285+
276286
def clickButtonsFight():
277287

278288
global count_reloadSpacheship
@@ -286,6 +296,9 @@ def clickButtonsFight():
286296
buttons = positions(images['spg-go-fight'], threshold=ct['go_to_work_btn'])
287297
ajustX = 0
288298
ajustY = 0
299+
300+
if(ct['auto_renew'] == True):
301+
renewSpaces()
289302

290303
qtd_send_spaceships = ct['qtd_send_spaceships']
291304

targets/spg-taxa-r.png

2.46 KB
Loading

targets/spg-yes.png

1.15 KB
Loading

0 commit comments

Comments
 (0)