Detergent13 / tft-bot

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

Change to different stage for surrender #116

Closed smasherlol closed 1 year ago

smasherlol commented 1 year ago

I tried to change the stage to surrender from 3-1 to 3-3. Traceback (most recent call last): File "C:\Users\User1\PycharmProjects\tft-bot\tft.py", line 218, in queue() File "C:\Users\User1\PycharmProjects\tft-bot\tft.py", line 66, in queue loading() File "C:\Users\User1\PycharmProjects\tft-bot\tft.py", line 74, in loading start() File "C:\Users\User1\PycharmProjects\tft-bot\tft.py", line 83, in start main() File "C:\Users\User1\PycharmProjects\tft-bot\tft.py", line 117, in main while not onscreen("./captures/3-3.png"): # change this if you want to surrender at a different stage, also the image recognition struggles with 5 being it sees it as 3 so i had to do 6 as that's seen as a 5 File "C:\Users\User1\PycharmProjects\tft-bot\tft.py", line 21, in onscreen return search(path, precision)[0] != -1 File "C:\Users\User1\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\python_imagesearch\imagesearch.py", line 122, in imagesearch template.shape[::-1] AttributeError: 'NoneType' object has no attribute 'shape'

I changed the stage alone since it was mentioned in the comments. Let me know if you need any details

Detergent13 commented 1 year ago

Did you take a screenshot of 3-3? Of course it will crash if the screenshot you're referring to doesn't exist

smasherlol commented 1 year ago

Thanks. 3-3.PNG was not there. I changed to 3-4 and it worked.