Detergent13 / tft-bot

Automate Teamfight Tactics (TFT) for token/mission farming. Updated for Set 11!
GNU Affero General Public License v3.0
81 stars 45 forks source link

Pyautogui remove unused champion #50

Closed kizxlove closed 2 years ago

kizxlove commented 2 years ago

Hi Detergent13 Recently I have tried to customize your code with some new functions like below:

def onscreen2(path):
    image = auto.locateOnScreen(path, confidence=0.6, grayscale=True, region=REGION)
    if image is None:
        return False
        print("pass")
    elif image is not None:
        return True
    else:pass

def drag_to(path, delay=.5): if onscreen2(path): auto.moveTo(search(path)) auto.dragTo(411,711,0.5) time.sleep(0.5) Unfortunately, this function is not working because the pyautogui can't recognize moving objects like champion characters. I have search some alternative function can work on this case but most of them need to hook into the App, which can be lead to banned on the game. Please give me some advice on this. Thank you so much.

Detergent13 commented 2 years ago

I think there's a chance this could work with the proper confidence value, but honestly I haven't really tried interacting with champions on the board at all!

Sorry that I can't be much help, but best of luck in getting it working if you do continue :)