Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pyautogui
- import time
- def fish(x,y,r,g,b):
- error = 0
- while True:
- button7location = pyautogui.pixelMatchesColor(x, y, (r, g, b), tolerance=50)
- if button7location == True:
- print "bierze"
- time.sleep( 2 )
- pyautogui.moveTo(575, 739)
- pyautogui.click(button='right')
- time.sleep( 2 )
- pyautogui.moveTo(603, 734)
- pyautogui.click(button='right')
- time.sleep( 2 )
- pyautogui.moveTo(575, 739)
- pyautogui.click(button='right')
- else:
- print "nic nie bierze"
- error += 1
- if error == 5000:
- error = 0
- pyautogui.moveTo(575, 739)
- pyautogui.click(button='right')
- time.sleep( 2 )
- pyautogui.moveTo(603, 734)
- pyautogui.click(button='right')
- time.sleep( 2 )
- pyautogui.moveTo(575, 739)
- pyautogui.click(button='right')
- x, y = pyautogui.position()
- r, g, b = pyautogui.pixel(x,y)
- fish(x,y,r,g,b)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement