Skip to content

Commit

Permalink
better safety for collect_1_battlepass_reward() deadspace clicks
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmiglio committed Sep 21, 2024
1 parent 857472f commit f59f15f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pyclashbot/bot/battlepass.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,13 @@ def collect_1_battlepass_reward(vm_index, logger):
click(vm_index, claim_rewards_coord[0], claim_rewards_coord[1])
time.sleep(3)

# click deadspace until back to battlepass page
# click deadspace until back to battlepass page + a little extra ;)
logger.log("Skipping thru this battlepass reward")
while not check_if_on_battlepass_page(vm_index):
if random.randint(1, 5):
logger.log("Skipping thru this battlepass reward")
logger.log("Skipping thru this battlepass reward")
click(vm_index, 404, 33)
click(vm_index, 404, 33,clicks = 5,interval = 0.5)


logger.log("Collected 1 battlepass reward")
logger.increment_battlepass_collects()
Expand Down

0 comments on commit f59f15f

Please sign in to comment.