Skip to content
This repository was archived by the owner on Mar 11, 2022. It is now read-only.

Commit dcbab55

Browse files
authored
Update motivates.py
1 parent 4bf80a7 commit dcbab55

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Fight/motivates.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ def send_motivates(server, Type="all", session=""):
6262
tree = fromstring(profile.content)
6363
current_food = int(tree.xpath('//*[@id="foodLimit2"]')[0].text)
6464
if current_food - start_food == 5:
65-
break # sent 5 motivates
65+
print("You have sent too many motivates today!")
66+
break
6667
today = int(tree.xpath('//*[@id="userMenu"]/div/div[1]/div/b[3]/text()')[0].split()[1])
6768
try:
6869
birthday = int(
@@ -73,12 +74,13 @@ def send_motivates(server, Type="all", session=""):
7374
if today - birthday > 3:
7475
print("Checked all new players")
7576
break
77+
print("Checking", profile.url)
7678
if tree.xpath('//*[@id="motivateCitizenButton"]'):
7779
for num in storage:
7880
payload = {'type': num, "submit": "Motivate", "id": citizenId}
7981
send = session.post(f"{URL}motivateCitizen.html?id={citizenId}", data=payload)
80-
print(send.url)
8182
if "&actionStatus=SUCCESFULLY_MOTIVATED" in str(send.url):
83+
print(send.url)
8284
break
8385
citizenId -= 1
8486
except Exception as error:

0 commit comments

Comments
 (0)