Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. profit = 0
  2. events = 0
  3.  
  4. while True:
  5. print("Current profit: "+str(profit)+" in "+str(events)+" events ###################################################")
  6. site = requests.get(baselink+startID)
  7. jsontext = site.text
  8. data = json.loads(jsontext)
  9. nextID = data["next_change_id"]
  10.  
  11. if nextID==startID:
  12. print("##################################### ZzZzZzZzZzZzZz #################################################")
  13. time.sleep(1)
  14. continue
  15. startID = nextID
  16. #print(nextID + " " + str(len(data["stashes"])))
  17. for i in range(len(data["stashes"])):
  18. currstash = data["stashes"][i]
  19. for j in range(len(currstash["items"])):
  20. curritem = currstash["items"][j]
  21. if "note" in curritem.keys():
  22. parts = curritem["note"].split()
  23. if len(parts)==3 and curritem["typeLine"] == "Stacked Deck"and "chaos" in curritem["note"]:
  24. if len(parts)==3 and "/" not in parts[1] and float(parts[1]) < 4.7:
  25. print(curritem["note"]+" "+currstash["accountName"]+ " "+"SD")
  26. profit += 4.7-float(parts[1])
  27. events+=1
  28. if len(parts)==3 and curritem["typeLine"] == "Ancient Orb" and "chaos" in curritem["note"]:
  29. parts = curritem["note"].split()
  30. if "/" not in parts[1] and float(parts[1]) < 57:
  31. print(curritem["note"]+" "+currstash["accountName"]+ " "+"AO")
  32. profit += 57-float(parts[1])
  33. events+=1
  34. if len(parts)==3 and curritem["typeLine"] == "Exalted Orb" and "chaos" in curritem["note"]:
  35. parts = curritem["note"].split()
  36. if "/" not in parts[1] and float(parts[1]) < 205:
  37. print(curritem["note"]+" "+currstash["accountName"]+ " "+"EX")
  38. profit += 206-float(parts[1])
  39. events+=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement