Guest User

Untitled

a guest
Apr 2nd, 2017
338
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. #This script will start drawing red.
  2. #Download and install python 2.7.13
  3. #Put this script in a file anywhere. Name it "anything.py"
  4. #Rightclick the file and select Run IDLE
  5. #Hit 5
  6. #Enter your accountname:password
  7. #Enter done when all accounts entered
  8. void_color = 5 # 3 black 5 Red 6 Orange 8 Yellow
  9. center = [17, 426] # x,y of center of void
  10. while True:
  11. # Fill the void
  12. for session in sessions.keys():
  13. cookie = sessions[session]
  14. color = 5
  15. counter = 5
  16. while color == void_color:
  17. cx=[ x for x in range(center[0]-counter,center[0]+counter) ]
  18. cy=[ x for x in range(center[1]-counter,center[1]+counter) ]
  19. checklist = []
  20. for x in cx:
  21. for y in cy:
  22. checklist.append((x,y))
  23. random.shuffle(checklist)
  24. for check in checklist:
  25. # Find a non-black square
  26. xtest = check[0]
  27. ytest = check[1]
  28. resp = opener.open("https://www.reddit.com/api/place/pixel.json?x="+str(xtest)+"&y="+str(ytest)).read()
  29. try:
  30. color = int(json.loads(resp)["color"])
  31. except Exception, e:
  32. print "Exception"
  33. print resp
  34. color = 5
  35. if color != void_color:
  36. break
  37. counter += 10
  38. print "Found a non-void color at", xtest, ytest
  39. print 'https://www.reddit.com/r/place/#x=%s&y=%s' % (xtest, ytest)
  40. finalresp = paint_black(xtest,ytest)
  41. if finalresp:
  42. if session in finalresp:
  43. print "Added successfully"
  44. else:
  45. print finalresp
  46. time.sleep(305)
Add Comment
Please, Sign In to add comment