from pyautogui import * import pyautogui import time import keyboard import random import win32api, win32con while keyboard.is_pressed('q') == False: if pyautogui.locateOnScreen('item.png', region=(740,200,430,800),grayscale=False, confidence=0.95) !=None: click(1131,483) if pyautogui.locateOnScreen('relicmiddle.png', region=(740,200,430,800),grayscale=False, confidence=0.96) !=None: an=pyautogui.locateCenterOnScreen('relicmiddle.png',grayscale=False, confidence=0.96) pyautogui.moveTo(an) pyautogui.move (-60,-40) pyautogui.leftClick() print('found relic middle') time.sleep(0.05) if pyautogui.locateOnScreen('relicmiddle.png', region=(740,200,430,800),grayscale=False, confidence=0.96) !=None: an=pyautogui.locateCenterOnScreen('relicmiddle.png',grayscale=False, confidence=0.96) pyautogui.moveTo(an) pyautogui.move (40,-40) pyautogui.leftClick() print('found relic middle') time.sleep(0.05) if pyautogui.locateOnScreen('relicguy.png', region=(740,200,430,800),grayscale=False, confidence=0.96) !=None: an=pyautogui.locateCenterOnScreen('relicguy.png',grayscale=False, confidence=0.96) pyautogui.moveTo(an) pyautogui.move (-60,-40) pyautogui.leftClick() print('found relicguy') time.sleep(0.05) if pyautogui.locateOnScreen('relicguy.png', region=(740,200,430,800),grayscale=False, confidence=0.96) !=None: an=pyautogui.locateCenterOnScreen('relicguy.png',grayscale=False, confidence=0.96) pyautogui.moveTo(an) pyautogui.move (40,-40) pyautogui.leftClick() print('found relicguy') time.sleep(0.05) if pyautogui.locateOnScreen('relicguy2.png', region=(740,200,430,800),grayscale=False, confidence=0.96) !=None: an=pyautogui.locateCenterOnScreen('relicguy2.png',grayscale=False, confidence=0.96) pyautogui.moveTo(an) pyautogui.move (-60,-40) pyautogui.leftClick() print('found relicguy2') time.sleep(0.05) if pyautogui.locateOnScreen('relicguy2.png', region=(740,200,430,800),grayscale=False, confidence=0.96) !=None: an=pyautogui.locateCenterOnScreen('relicguy2.png',grayscale=False, confidence=0.96) pyautogui.moveTo(an) pyautogui.move (40,-40) pyautogui.leftClick() print('found relicguy2') time.sleep(0.05) if pyautogui.locateOnScreen('relicauto.png', region=(740,200,430,800),grayscale=False, confidence=0.96) !=None: an=pyautogui.locateCenterOnScreen('relicauto.png',grayscale=False, confidence=0.96) pyautogui.moveTo(an) pyautogui.leftClick() print('found relicauto') time.sleep(0.05) if pyautogui.locateOnScreen('chooseahero.png', region=(740,200,430,800),grayscale=False, confidence=0.95) !=None: an=pyautogui.locateCenterOnScreen('chooseahero.png',grayscale=False, confidence=0.95) click(964,537) click(964,737) print('found choose a hero') time.sleep(0.05) if pyautogui.locateOnScreen('fullhp.png', region=(740,200,430,800),grayscale=False, confidence=0.95) !=None: click(1056,712) print('found full hp') time.sleep(0.05) if pyautogui.locateOnScreen('results.png', region=(740,200,430,800),grayscale=False, confidence=0.9) !=None: an=pyautogui.locateCenterOnScreen('results.png',grayscale=False, confidence=0.9) pyautogui.moveTo(an) pyautogui.leftClick() print('found results') time.sleep(0.05) if pyautogui.locateOnScreen('atkspd.png', region=(740,200,430,800),grayscale=False, confidence=0.9) !=None: an=pyautogui.locateCenterOnScreen('atkspd.png',grayscale=False, confidence=0.9) pyautogui.moveTo(an) pyautogui.leftClick() print('found atkspd') time.sleep(0.05) if pyautogui.locateOnScreen('attack.png', region=(740,200,430,800),grayscale=False, confidence=0.96) !=None: an=pyautogui.locateCenterOnScreen('attack.png',grayscale=False, confidence=0.96) pyautogui.moveTo(an) pyautogui.leftClick() print('found attack') time.sleep(0.05) if pyautogui.locateOnScreen('epicatk.png', region=(740,200,430,800),grayscale=False, confidence=0.96) !=None: an=pyautogui.locateCenterOnScreen('epicatk.png',grayscale=False, confidence=0.96) pyautogui.moveTo(an) pyautogui.leftClick() print('found epicatk') time.sleep(0.05) if pyautogui.locateOnScreen('crit.png', region=(740,200,430,800),grayscale=False, confidence=0.96) !=None: an=pyautogui.locateCenterOnScreen('crit.png',grayscale=False, confidence=0.96) pyautogui.moveTo(an) pyautogui.leftClick() print('found crit') time.sleep(0.05) if pyautogui.locateOnScreen('boom.png', region=(740,200,430,800),grayscale=False, confidence=0.90) !=None: an=pyautogui.locateCenterOnScreen('boom.png',grayscale=False, confidence=0.90) pyautogui.moveTo(an) pyautogui.leftClick() print('found boom') time.sleep(0.05) if pyautogui.locateOnScreen('lessdef.png', region=(740,200,430,800),grayscale=False, confidence=0.9) !=None: an=pyautogui.locateCenterOnScreen('lessdef.png',grayscale=False, confidence=0.9) pyautogui.moveTo(an) pyautogui.leftClick() print('found lessdef') time.sleep(0.05) if pyautogui.locateOnScreen('lesshp.png', region=(740,200,430,800),grayscale=False, confidence=0.9) !=None: an=pyautogui.locateCenterOnScreen('lesshp.png',grayscale=False, confidence=0.9) pyautogui.moveTo(an) pyautogui.leftClick() print('found lesshp') time.sleep(0.05) if pyautogui.locateOnScreen('rage2.png', region=(740,200,430,800),grayscale=False, confidence=0.96) !=None: an=pyautogui.locateCenterOnScreen('rage2.png',grayscale=False, confidence=0.96) pyautogui.moveTo(an) pyautogui.leftClick() print('found rage2') time.sleep(0.05) if pyautogui.locateOnScreen('rage.png', region=(740,200,430,800),grayscale=False, confidence=0.96) !=None: an=pyautogui.locateCenterOnScreen('rage.png',grayscale=False, confidence=0.96) pyautogui.moveTo(an) pyautogui.leftClick() print('found rage') time.sleep(0.05) if pyautogui.locateOnScreen('slowdown.png', region=(740,200,430,800),grayscale=False, confidence=0.90) !=None: an=pyautogui.locateCenterOnScreen('slowdown.png',grayscale=False, confidence=0.90) pyautogui.moveTo(an) pyautogui.leftClick() print('found slowdown') time.sleep(0.05) if pyautogui.locateOnScreen('movespeed.png', region=(740,200,430,800),grayscale=False, confidence=0.96) !=None: an=pyautogui.locateCenterOnScreen('movespeed.png',grayscale=False, confidence=0.96) pyautogui.moveTo(an) pyautogui.leftClick() print('found movespeed') time.sleep(0.05) if pyautogui.locateOnScreen('accuracy.png', region=(740,200,430,800),grayscale=False, confidence=0.96) !=None: an=pyautogui.locateCenterOnScreen('accuracy.png',grayscale=False, confidence=0.96) pyautogui.moveTo(an) pyautogui.leftClick() print('found accuracy') time.sleep(0.05) if pyautogui.locateOnScreen('range.png', region=(740,200,430,800),grayscale=False, confidence=0.96) !=None: an=pyautogui.locateCenterOnScreen('range.png',grayscale=False, confidence=0.96) pyautogui.moveTo(an) pyautogui.leftClick() print('found range') time.sleep(0.05) if pyautogui.locateOnScreen('genhp.png', region=(740,200,430,800),grayscale=False, confidence=0.96) !=None: an=pyautogui.locateCenterOnScreen('genhp.png',grayscale=False, confidence=0.96) pyautogui.moveTo(an) pyautogui.leftClick() print('found genhp') time.sleep(0.05) if pyautogui.locateOnScreen('gendef.png', region=(740,200,430,800),grayscale=False, confidence=0.96) !=None: an=pyautogui.locateCenterOnScreen('gendef.png',grayscale=False, confidence=0.96) pyautogui.moveTo(an) pyautogui.leftClick() print('found gendef') time.sleep(0.05) if pyautogui.locateOnScreen('YES.png', region=(740,200,430,800),grayscale=False, confidence=0.96) !=None: an=pyautogui.locateCenterOnScreen('YES.png',grayscale=False, confidence=0.96) pyautogui.moveTo(an) pyautogui.leftClick() print('found YES') time.sleep(0.05) else: print("I am unable to see it")