diff --git a/config.yaml b/config.yaml index bbd8c17..2543e48 100644 --- a/config.yaml +++ b/config.yaml @@ -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 # diff --git a/index.py b/index.py index c783552..0b010fe 100644 --- a/index.py +++ b/index.py @@ -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 @@ -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'] diff --git a/targets/spg-taxa-r.png b/targets/spg-taxa-r.png new file mode 100644 index 0000000..ecdce1a Binary files /dev/null and b/targets/spg-taxa-r.png differ diff --git a/targets/spg-yes.png b/targets/spg-yes.png new file mode 100644 index 0000000..acdc9cf Binary files /dev/null and b/targets/spg-yes.png differ