Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pyautogui
- import time
- from datetime import datetime
- import keyboard
- from PIL import ImageGrab
- import numpy as np
- pyautogui.PAUSE = 0
- #time.sleep(3)
- #pyautogui.click(540,420)
- game_coords = (800,700,1400,701)
- time.sleep(2)
- pyautogui.click(540,420)
- counter = 0
- while True:
- '''
- time = datetime.now()
- time = time.strftime("%S")
- print(time)
- '''
- screen = list(np.array(ImageGrab.grab(bbox=game_coords)))[0]
- if screen[0][0] == 0:
- #print("Collum One")
- pyautogui.moveTo(400,410+counter)
- elif screen[200][0] == 0:
- #print("Collum Two")
- pyautogui.moveTo(500,410+counter)
- elif screen[340][0] == 0:
- #print("Collum Three")
- pyautogui.moveTo(570,410+counter)
- elif screen[480][0] == 0:
- #print("Collum Four")
- pyautogui.moveTo(640,410+counter)
- counter += 3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement