/TFT-OCR-BOT

A bot that plays Teamfight Tactics using OCR. Keeps track of bench, board, items, and plays the user defined team comp.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

main

NOTES:

  • Make sure you dont have any overlays on.
  • To ensure best results, make sure you are running this on a computer that has decent specs.
  • League & client must be in English.
  • 1920x1080 borderless windowed is required in League, game must also be on main monitor.
  • If the program crashes, create an issue with the error.

INSTALLATION:

  1. Install Python 3.9.6 from https://www.python.org/downloads/windows/
    • Note that Python 3.9.6 cannot be used on Windows 7 or earlier.
  2. Run pip install -r requirements.txt in Command Prompt
  3. Install tesseract using windows installer available at: https://github.com/UB-Mannheim/tesseract/wiki
    • Note the tesseract path from the installation.
    • Set the tesseract path in the ocr.py file (it may already be correct)
  4. Configure settings.py so the league client path is correct & enable surrender functionality if you desere it.
  5. Disable all in game overlays
  6. Run the main.py file

FEATURES:

main

  • Read the board state (Round / Level / Gold / Shop / Items)
  • Keeps track of champions on the board and bench
  • Pick a random item/champ from the carousel
  • Pickup items from the board after PVE rounds
  • Place correct items onto champions
  • Plays the user defined team comp
  • Auto queue using the LCU api

TODO:

  • Implement tome of traits logic
  • Revamp the gold spending function
  • Revamp auto queue to have more safety checks / fail safes
  • Grab best compositions from TFT website
  • Intelligent carousel item selection
  • Change item pickup to be based of the coordinates of orbs