Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- profit = 0
- events = 0
- while True:
- print("Current profit: "+str(profit)+" in "+str(events)+" events ###################################################")
- site = requests.get(baselink+startID)
- jsontext = site.text
- data = json.loads(jsontext)
- nextID = data["next_change_id"]
- if nextID==startID:
- print("##################################### ZzZzZzZzZzZzZz #################################################")
- time.sleep(1)
- continue
- startID = nextID
- #print(nextID + " " + str(len(data["stashes"])))
- for i in range(len(data["stashes"])):
- currstash = data["stashes"][i]
- for j in range(len(currstash["items"])):
- curritem = currstash["items"][j]
- if "note" in curritem.keys():
- parts = curritem["note"].split()
- if len(parts)==3 and curritem["typeLine"] == "Stacked Deck"and "chaos" in curritem["note"]:
- if len(parts)==3 and "/" not in parts[1] and float(parts[1]) < 4.7:
- print(curritem["note"]+" "+currstash["accountName"]+ " "+"SD")
- profit += 4.7-float(parts[1])
- events+=1
- if len(parts)==3 and curritem["typeLine"] == "Ancient Orb" and "chaos" in curritem["note"]:
- parts = curritem["note"].split()
- if "/" not in parts[1] and float(parts[1]) < 57:
- print(curritem["note"]+" "+currstash["accountName"]+ " "+"AO")
- profit += 57-float(parts[1])
- events+=1
- if len(parts)==3 and curritem["typeLine"] == "Exalted Orb" and "chaos" in curritem["note"]:
- parts = curritem["note"].split()
- if "/" not in parts[1] and float(parts[1]) < 205:
- print(curritem["note"]+" "+currstash["accountName"]+ " "+"EX")
- profit += 206-float(parts[1])
- events+=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement