jfd02 / tft-ocr-bot Goto Github PK
View Code? Open in Web Editor NEWA bot that plays Teamfight Tactics using OCR. Keeps track of bench, board, items, and plays the user defined team comp.
License: GNU General Public License v3.0
A bot that plays Teamfight Tactics using OCR. Keeps track of bench, board, items, and plays the user defined team comp.
License: GNU General Public License v3.0
Sometimes it buys two or more but most of the time it just buys one or none of the champs needed
Currently if i have to reconnect or if i have some issue and i need to re-open the console and im already in game the program won't recognize my instance and it will try to queue me up into a game without checking if im already in game.
Picking up a Tome of Traits will mess up board/bench tracking for the rest of the game.
Hello
i reached a point where auto queue works but when the game starts nothing happens .. i do not know how to make a change to other files other than settings.py can someone teach me how to make changes to these files or give me files that are already configured?
amazing script btw thx
Didn't know they added augments but that's going to break the bot. Will add when I have time or if someone makes a PR I will merge
I've been looking for something to just have an autobuy feature for those speedy moments where youre just trying to skip past shops really fast and buy units to 3star.
"Think fast" Augment would be stupid good with this.
The fire animation from being on a hot streak interferes with the OCR's ability to read current health about 15% of the time.
Hey, I checked the settings.py, and I noticed the forfeit time is static, which can lead to problems if you always ff in the same time, so I came up with this:
`#import random
forfeit = True
forfeit_time = random.randint(600, 660) # time in seconds`
Would this work?
When I have the game open, the bot does not click or press keys.
Does the bot clicks for example in the champion cards (from shop) in a random coordinate? Or does it always click for example in the name? The same with walking/ idle mouse movement
I ask this since this is a good method for detecting botting
Either way thanks for doing this, and good job for being sucessfull to this point
when i finish the game , can't queue next game
i play in garena ,how can i fix it ?
When a victory is achieved, work will be suspended. When do you rewrite the whole project? I have the API for the bench / board / shop / round / gold etc...
If monitor is 4k, 1920x1080 borderless doesn't work.
Hi !
I changed the comp in the file, and after idk round 3-2 / 3-3 the bot start buying and instant sell as unknow character even if it's the good champ in the slot 2 and 3 sometimes 4.
Sometimes it even try to sell in theses slot even if it is empty.
Do you have an idea ?
One time it even buyed a Varus and a Nami and both of them where named Nami Varus was in slot 3
C:\TFT-OCR-BOT-main>py main.py
Traceback (most recent call last):
File "C:\TFT-OCR-BOT-main\main.py", line 6, in
import auto_queue
File "C:\TFT-OCR-BOT-main\auto_queue.py", line 7, in
from requests.auth import HTTPBasicAuth
ModuleNotFoundError: No module named 'requests'
I did the same things I did on the computer, but the notebook is showing this
The champion "Nunu & Willump" is not detected.
The shop just contains an empty string.
Because of this the bot will never buy a Nunu.
I'll try to add an screenshot.
Unsure of the cause but I have noticed after updating to the latest version, the bot seems to equip items perfectly at first. After several consecutive games, it for some reason does not equip items despite successfully scanning them on the bench. I am not sure how to provide logs but I was wondering if anyone else had this issue.
I try to run the bot with the guide https://hextechdocs.dev/getting-started-with-the-lcu-api/#the-process-list-method
The bot can change arena skin, create lobby and accept the game. But it keep queuing after join the game.
TFT OCR | https://github.com/jfd02/TFT-OCR-BOT
If text is not visible on the top left of the screen, the program is not functioning correctly.
Close this window to terminate the overlay window & program
Did not find window, trying again...
Did not find window, trying again...
Did not find window, trying again...
Did not find window, trying again...
Window League of Legends (TM) Client found
Location: (0, 0)
Size: (1536, 864)
1920*1080 borderless English
Tried clicking on main.py: it created a pycache folder, with 3 archives.
Tried opening with CMD:
C:\Users\Vitt\Documents\BOT\TFT-OCR-BOT-main>python main.py
Traceback (most recent call last):
File "C:\Users\Vitt\Documents\BOT\TFT-OCR-BOT-main\main.py", line 4, in <module>
from ui import Ui
File "C:\Users\Vitt\Documents\BOT\TFT-OCR-BOT-main\ui.py", line 2, in <module>
from win32gui import SetWindowLong, GetWindowLong, SetLayeredWindowAttributes
ModuleNotFoundError: No module named 'win32gui'
What am I doing wrong?
Title?
Using a laptop as well, currently trying solutions on changing the resolution and connecting an second monitor.
Am I missing something that I need to download?
i don't know why i'm getting an error here....
Can you add my dc? Apple#8888
When I execute the command (correct path), everything works, but after "using cached pytesseract-0.3.8.tar.gz (14kb)
there is like 25 red lines saying I don't know why and at the end there is this message
ERROR: Could not find a version that satisfies the requirement pytesseract~=0.3.8 (from versions: 0.1, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.2, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.2.8, 0.2.9, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.3.8) ERROR: No matching distribution found for pytesseract~=0.3.8
I have a basic idea of how to make comps, but I'm not sure of how the "board_position" numbers translate to what hexes in-game.
Busy with work so I can't update it for a few more days, if anyone makes a PR ill merge it
Very much, please do not stop working on the bot! I’m waiting for all your TODO's
Hello!
I love using this bot and its a great job youve done! Im wondering if youre planning on adding some more nonbot looking movements when purchasing and picking orbs.
Also, are you planning on adding a function to ff at a certain time like 16m? So if u choose 16 it will always ofset with a few seconds so its not exactly on 16 everytime since it makes it look more like a bot.
Im looking forward to keep using this bot!
basically everything in the title, i did everything that was said to do.
Auto queue works, but when the game starts and i'm already in game. It gets stuck on "Loading screen found! Waiting for round 1-1" and nothing happens. What should I do? I'm using a resolution of 1366x768.
Client not open! Trying again in 10 seconds.
[Auto Queue]
Client not open! Trying again in 10 seconds.
Client not open! Trying again in 10 seconds.
Client not open! Trying again in 10 seconds.
after updating to the newest version in cmd, it is showing this, not sure if it is missing something?
C:\Users\wayne\Downloads\TFT-OCR-BOT-main\TFT-OCR-BOT-main>py main.py
Traceback (most recent call last):
File "C:\Users\wayne\Downloads\TFT-OCR-BOT-main\TFT-OCR-BOT-main\main.py", line 5, in
from ui import Ui
File "C:\Users\wayne\Downloads\TFT-OCR-BOT-main\TFT-OCR-BOT-main\ui.py", line 3, in
import screeninfo
ModuleNotFoundError: No module named 'screeninfo'
Updating the bot at the moment, do I keep the overlay? I feel like most people probably just leave the computer on while it runs but I felt it was useful while I was observing it to make sure all the data was correct.
Keeping getting this but this library is exact version listed in the requirements.txt
Traceback (most recent call last):
File "C:\Users\Shawn\Downloads\TFT-OCR-BOT-main\main.py", line 6, in
from ui import UI
File "C:\Users\Shawn\Downloads\TFT-OCR-BOT-main\ui.py", line 5, in
from win32gui import SetWindowLong, GetWindowLong, SetLayeredWindowAttributes
ModuleNotFoundError: No module named 'win32gui'
v3.10.6 python ide
Whenever I put Sy'fen in my comp (I haven't tested the other dragons), the bot treats Sy'fen as if it only occupied one team slot instead of two.
In this example, the bot leveled to 6, bought Sy'fen, and attempted to put it on the board (notice that Skarner isn't in my comp, it could've sold Skarner and then put Sy'fen on the board):
Got this error running the bot, first few rounds in.
Process Process-1:
Traceback (most recent call last):
File "C:\Users\LIEM MACH\AppData\Local\Programs\Python\Python39\lib\multiprocessing\process.py", line 315, in _bootstrap
self.run()
File "C:\Users\LIEM MACH\AppData\Local\Programs\Python\Python39\lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\LIEM MACH\Desktop\TFT-OCR-BOT-main\TFT-OCR-BOT-main\main.py", line 10, in game_loop
game = Game(message_queue)
File "C:\Users\LIEM MACH\Desktop\TFT-OCR-BOT-main\TFT-OCR-BOT-main\game.py", line 13, in init
self.loading_screen()
File "C:\Users\LIEM MACH\Desktop\TFT-OCR-BOT-main\TFT-OCR-BOT-main\game.py", line 19, in loading_screen
self.game_loop()
File "C:\Users\LIEM MACH\Desktop\TFT-OCR-BOT-main\TFT-OCR-BOT-main\game.py", line 30, in game_loop
self.pve_round()
File "C:\Users\LIEM MACH\Desktop\TFT-OCR-BOT-main\TFT-OCR-BOT-main\game.py", line 57, in pve_round
self.arena.tacticians_check()
File "C:\Users\LIEM MACH\Desktop\TFT-OCR-BOT-main\TFT-OCR-BOT-main\arena.py", line 223, in tacticians_check
if "TacticiansCrown" in item:
TypeError: argument of type 'NoneType' is not iterable
.
How to do Step 2.Run pip install -r requirements.txt in Command Prompt
can you explain it since iam a NOOB in this :)
https://i.imgur.com/K323h26.png
I get that error when the game is starting, it works in client, it accept the match and when the game is open it tell me permission denied.
I already ran the cmd as admin, UAC is off, and ran pip install pydirectory
When i try run Main.py this error show up
D:\TFT-OCR-BOT-main\TFT-OCR-BOT-main>py "main.py"
TFT OCR | Ver. 2.2.0 | https://github.com/jfd02/TFT-OCR-BOT
If text is not visible on the top left of the screen, the program is not functioning correctly.
Close this window to terminate the overlay window & program
Process Process-1:
Traceback (most recent call last):
File "C:\Users\Allvo\AppData\Local\Programs\Python\Python310\lib\multiprocessing\process.py", line 315, in _bootstrap
self.run()
File "C:\Users\Allvo\AppData\Local\Programs\Python\Python310\lib\multiprocessing\process.py", line 108, in run
self._target(self._args, **self._kwargs)
File "D:\TFT-OCR-BOT-main\TFT-OCR-BOT-main\main.py", line 9, in game_loop
auto_queue.queue(message_queue)
File "D:\TFT-OCR-BOT-main\TFT-OCR-BOT-main\auto_queue.py", line 68, in queue
app_port = re.search("--app-port=([0-9])", results)[1]
TypeError: 'NoneType' object is not subscriptable
I ve done everything correctly and script can't find my league window
Hello man,
First, I'd like to thank you for this tremendous work, gg wp!!
After using it for some time, I notice that sometimes, the bot buys Illaoi or Tristana for example, then they don't get a name in the overlay, and right after the buying phase, he sells them, and the log says: Selling unknown champion.
Is there any way this can be fixed? because it makes the comp aways on a 1-star champs.
Oh, one more question, is there any way to make it work with 1366x768 monitors? I tried it on a laptop, and it is stuck at "Loading screen found! Waiting for round 1-1"
Thanks again!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.