diff --git a/AutoAFK2.py b/AutoAFK2.py index 03e6efb..57380ac 100644 --- a/AutoAFK2.py +++ b/AutoAFK2.py @@ -147,7 +147,8 @@ def emit(self, record): "Run Quests", "Use Dream Realm attempts", "Farm Team-Up Chat", - "Farm Chain AFK Proxy Request", + "Farm Chain AFK Proxy Request (Normal AFK stages)", + "Farm Chain AFK Proxy Request (Talent stages)", ] selection = SelectionMenu.get_selection( options, @@ -269,13 +270,20 @@ def emit(self, record): bot.team_up() if selection == 9: - logger.info("Starting up Chain Proxy farming") + logger.info("Starting up Chain Proxy farming (Normal AFK stages)") logger.info( "For this function you need to open the request yourself and start this function at the stage setup screen\n" ) - bot.afk_stage_chain_proxy() + bot.afk_stage_chain_proxy("afk") + + if selection == 10: + logger.info("Starting up Chain Proxy farming (Talent stages)") + logger.info( + "For this function you need to open the request yourself and start this function at the stage setup screen\n" + ) + bot.afk_stage_chain_proxy("talent") if __name__ == "__main__": main() diff --git a/automation/afkj_automation.py b/automation/afkj_automation.py index ea9740d..4b20fdb 100644 --- a/automation/afkj_automation.py +++ b/automation/afkj_automation.py @@ -1653,7 +1653,7 @@ def open_afk_stages(self, afkstages: bool = True) -> None: self.click_xy(370, 1600, seconds=2) # AFK Stage button self.click("buttons/confirm", suppress=True) - def afk_stage_chain_proxy(self) -> None: + def afk_stage_chain_proxy(self, stage_type: str) -> None: """Starts an AFK Stage chain by attempting to start the stage and then automatically retrying upon defeat. The method changes formations after a specified number of defeats, as configured. @@ -1661,6 +1661,15 @@ def afk_stage_chain_proxy(self) -> None: This method is a proxy to the `blind_push` method with the "afkstages" argument set to True. It is intended to be used for convenience. """ + + if stage_type == "afk": + button = "buttons/battle" + elif stage_type == "talent": + button = "buttons/talent_trials" + else: + self.logger.info("Invalid stage type provided!") + return + self.formation_handler() self.click( "buttons/battle", @@ -1674,7 +1683,7 @@ def afk_stage_chain_proxy(self) -> None: # Victory Logic if self.is_visible("buttons/next", retry=1, click=True, seconds=3): self.click( - "buttons/battle", + button, retry=1, suppress=True, seconds=5,