Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
thebrumby authored Sep 14, 2024
1 parent 517bcb8 commit 57ddddb
Showing 1 changed file with 21 additions and 25 deletions.
46 changes: 21 additions & 25 deletions games/seed.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,23 @@ def next_steps(self):
except Exception as e:
self.output(f"Step {self.step} - An error occurred: {e}",1)

def get_daily_bonus(self):

xpath = "//img[@alt='Missions']"
self.move_and_click(xpath, 10, True, "click the 'Missions' tab", self.step, "clickable")

xpath = "//p[text()='Login Bonus']"
self.move_and_click(xpath, 10, True, "click the 'Login Bonus' tab (may not be present)", self.step, "clickable")

xpath = "//button[not(contains(@class, 'pointer-events-none')) and .//img[contains(@src, '/images/daily')]]"
self.move_and_click(xpath, 10, True, "click the active reward image", self.step, "clickable")

xpath = "//button[contains(text(), 'Got it')]"
self.move_and_click(xpath, 10, True, "click the 'Got it' button (may not be present)", self.step, "clickable")

xpath = "//button[contains(text(), 'Claim 1 ticket')]"
self.move_and_click(xpath, 10, True, "get Ticket (may not be present)", self.step, "clickable")

def full_claim(self):
self.step = "100"

Expand Down Expand Up @@ -101,30 +118,6 @@ def full_claim(self):
xpath = "//img[contains(@src, 'bird.png')]"
self.move_and_click(xpath, 10, True, "check for EGG (may not be present)", self.step, "clickable")

def get_daily_bonus():

xpath = "//p[contains(text(), 'Missions')]"
self.move_and_click(xpath, 20, True, "check for DAILY BONUS (may not be present)", self.step, "clickable")

xpath = "//p[contains(text(), 'Login Bonus')]"
self.move_and_click(xpath, 20, True, "check for DAILY BONUS (may not be present)", self.step, "clickable")

xpath = "//button[count(.//img) = 1 and .//img[contains(@src, 'daily/')]]"
self.move_and_click(xpath, 10, True, "get DAILY BONUS (may not be present)", self.step, "clickable")

xpath = "//button[contains(text(), 'Got it')]"
self.move_and_click(xpath, 10, True, "exit DAILY BONUS (may not be present)", self.step, "clickable")

xpath = "//button[contains(text(), 'Claim 1 ticket')]"
self.move_and_click(xpath, 10, True, "get Ticket (may not be present)", self.step, "clickable")

xpath = "//button[.//div[contains(@class, 'state-back')]]"

self.move_and_click(xpath, 20, True, "back to main page (may not be present)", self.step, "clickable")

self.get_balance(False)
self.get_profit_hour(False)

wait_time_text = self.get_wait_time(self.step, "pre-claim")

if wait_time_text != "Filled":
Expand Down Expand Up @@ -154,14 +147,17 @@ def get_daily_bonus():
self.output(f"Step {self.step} - Waiting 10 seconds for the totals and timer to update...", 3)
time.sleep(10)

xpath = "//button[.//p[contains(text(), 'Yep')]]"
self.move_and_click(xpath, 10, True, "click Yep button WORM (may not be present)", self.step, "clickable")

wait_time_text = self.get_wait_time(self.step, "post-claim")
matches = re.findall(r'(\d+)([hm])', wait_time_text)
total_wait_time = self.apply_random_offset(sum(int(value) * (60 if unit == 'h' else 1) for value, unit in matches))
self.increase_step()

self.get_balance(True)
self.get_profit_hour(True)
get_daily_bonus()
self.get_daily_bonus()

if wait_time_text == "Filled":
self.output(f"STATUS: The wait timer is still showing: Filled.", 1)
Expand Down

0 comments on commit 57ddddb

Please sign in to comment.