Guest User

rush.py

a guest
Jul 12th, 2019
1,426
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.60 KB | None | 0 0
  1. import pyautogui,time
  2. from PIL import ImageGrab
  3.  
  4. up = (197, 412)
  5. left = (123, 412)
  6. right = (260, 412)
  7. down = (197, 550)
  8. cent = (197, 90)
  9. time.sleep(1)
  10. a = [up, left, down, right]
  11. while True:
  12.     screen = ImageGrab.grab(bbox=(753,269,1147,899))
  13.    
  14.     cr, cg, cb = screen.getpixel((cent))
  15.     print(cr, cg, cb)
  16.     if cr == 255 and cg == 255 and cb == 255:
  17.         continue
  18.     for i in range(0, 4):
  19.         print(i)
  20.         r,g,b = screen.getpixel((a[i][0], a[i][1]))
  21.         if cr == r and cg == g and cb == b:
  22.             pyautogui.click(a[i][0] + 753, a[i][1] + 269, i)
  23.             break
Advertisement
Add Comment
Please, Sign In to add comment