forked from Detergent13/tft-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 343d744
Showing
32 changed files
with
350 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
minified/ | ||
.idea/ | ||
test.py | ||
tft to obf.py | ||
auth.py | ||
*.zip | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Thanks for checking out my release! | ||
|
||
To install: | ||
|
||
1. Install Python 3.8.3 from https://www.python.org/downloads/ or the Windows Store | ||
2. Run the 'Install Requirements.bat' file, or just navigate to this directory and run 'pip install -r requirements.txt' in Command Prompt | ||
3. Run the 'Start Bot.bat' file, or just navigate to this directory and run 'py "detergent tft.py"' in Command Prompt | ||
4. Follow the instructions in your terminal window! (You can put anything as the auth key) Once you authenticate, get into a TFT lobby, have it visible on your screen, and press 'OK' to start the bot! | ||
|
||
Troubleshooting: | ||
|
||
If these steps don't work, try running the file with 'python "detergent tft.py"' instead (For Windows Store/MacOS/Linux users especially) Likewise, try pip3 instead of pip for installing requirements. | ||
If pip doesn't seem to exist, try installing it here: https://pip.pypa.io/en/stable/installing/. Essentially 'save as' from here: https://bootstrap.pypa.io/get-pip.py then run 'py get-pip.py' and try to use pip again | ||
The bot is configured to work with monitor resolution 1920x1080, and League Client resolution 1280x720. You can switch this up though, just re-capture the images in the captures folder! | ||
If you're having issues with Python not working properly, please make sure you have the correct version (3.8.3) installed, and all of the correct module versions installed, as listed in requirements.txt | ||
Make sure to run League and the bot on your main monitor, as it doesn't support additional monitors! | ||
If you need additional help, feel free to reach out to me via PM! | ||
|
||
Hope you enjoy! | ||
-Detergent <3 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[LocalizedFileNames] | ||
jarvan.png[email protected],0 | ||
1-1.png[email protected],0 | ||
fiora.png[email protected],0 | ||
surrender 2.png=@surrender 2.png,0 | ||
surrender 1.png=@surrender 1.png,0 | ||
3-1.png[email protected],0 | ||
yasuo.png[email protected],0 | ||
2-5.png[email protected],0 | ||
2-4.png[email protected],0 | ||
rakan.png[email protected],0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
opencv-python==4.2.0.34 | ||
PyAutoGUI==0.9.50 | ||
python-imageseach-drov0==1.0.6 | ||
requests==2.23.0 | ||
colorama==0.4.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,180 @@ | ||
# Detergent's TFT Bot @ Nulled.to | ||
|
||
import pkg_resources | ||
|
||
pkg_resources.require("PyAutoGUI==0.9.50") | ||
pkg_resources.require("opencv-python==4.2.0.34") | ||
pkg_resources.require("python-imageseach-drov0==1.0.6") | ||
|
||
import pyautogui as auto | ||
from python_imagesearch.imagesearch import imagesearch as search | ||
import time | ||
import auth | ||
from printy import printy | ||
from printy import inputy | ||
|
||
|
||
auto.FAILSAFE = False | ||
|
||
|
||
# Start utility methods | ||
def onscreen(path, precision=0.8): | ||
return search(path, precision)[0] != -1 | ||
|
||
|
||
def search_to(path): | ||
pos = search(path) | ||
if onscreen(path): | ||
auto.moveTo(pos) | ||
# print(path + " found") | ||
return pos | ||
# else: | ||
# print(path + " not found") | ||
|
||
|
||
def click_key(key, delay=.1): | ||
auto.keyDown(key) | ||
time.sleep(delay) | ||
auto.keyUp(key) | ||
|
||
|
||
def click_left(delay=.1): | ||
auto.mouseDown() | ||
time.sleep(delay) | ||
auto.mouseUp() | ||
|
||
|
||
def click_right(delay=.1): | ||
auto.mouseDown(button='right') | ||
time.sleep(delay) | ||
auto.mouseUp(button='right') | ||
|
||
|
||
def click_to(path, delay=.1): | ||
if onscreen(path): | ||
auto.moveTo(search(path)) | ||
click_left(delay) | ||
# print(path + " clicked") | ||
# End utility methods | ||
|
||
|
||
# Start main process | ||
def queue(): | ||
if onscreen("./captures/tft logo.png"): | ||
click_to("./captures/find match ready.png") | ||
while not onscreen("./captures/loading 1.png"): | ||
time.sleep(1) | ||
click_to("./captures/accept.png") | ||
|
||
print("Loading!") | ||
loading() | ||
|
||
|
||
def loading(): | ||
while not onscreen("./captures/1-1.png"): | ||
time.sleep(1) | ||
|
||
print("Match starting!") | ||
start() | ||
|
||
|
||
def start(): | ||
while onscreen("./captures/1-1.png"): | ||
auto.moveTo(888, 376) | ||
click_right() | ||
|
||
print("In the match now!") | ||
main() | ||
|
||
|
||
def buy(iterations): | ||
for i in range(iterations): | ||
click_to("./captures/fiora.png") | ||
click_to("./captures/jarvan.png") | ||
click_to("./captures/rakan.png") | ||
click_to("./captures/xayah.png") | ||
click_to("./captures/yasuo.png") | ||
|
||
|
||
def main(): | ||
while not onscreen("./captures/2-4.png"): | ||
buy(1) | ||
time.sleep(1) | ||
while onscreen("./captures/2-4.png"): | ||
auto.moveTo(928, 396) | ||
click_right() | ||
time.sleep(0.25) | ||
|
||
time.sleep(5) | ||
|
||
if onscreen("./captures/2-5.png"): | ||
while not onscreen("./captures/3-2.png"): | ||
buy(1) | ||
click_to("./captures/reroll.png") | ||
time.sleep(1) | ||
if onscreen("./captures/3-2.png"): | ||
print("Surrendering now!") | ||
surrender() | ||
|
||
|
||
def surrender(): | ||
click_to("./captures/settings.png") | ||
|
||
while not onscreen("./captures/surrender 1.png"): | ||
time.sleep(1) | ||
while not onscreen("./captures/surrender 2 new.png"): | ||
click_to("./captures/surrender 1.png") | ||
|
||
time.sleep(1) | ||
click_to("./captures/surrender 2 new.png") | ||
time.sleep(15) | ||
|
||
time.sleep(1) | ||
|
||
while onscreen("./captures/missions ok.png"): | ||
click_to("./captures/missions ok.png") | ||
time.sleep(5) | ||
while onscreen("./captures/skip waiting for stats.png"): | ||
click_to("./captures/skip waiting for stats.png") | ||
time.sleep(5) | ||
while onscreen("./captures/play again.png"): | ||
click_to("./captures/play again.png") | ||
|
||
time.sleep(10) | ||
print("Queuing up again!") | ||
queue() | ||
# End main process | ||
|
||
|
||
# Start auth + main script | ||
print("Developed by:") | ||
printy(r""" | ||
[c>] _____ _ _ @[<b] _ _ _ _ _ _ @ | ||
[c>]| __ \ | | | | @[<b] ____ | \ | | | | | | || | @ | ||
[c>]| | | | ___| |_ ___ _ __ __ _ ___ _ __ | |_ @[<b] / __ \ | \| |_ _| | | ___ __| || |_ ___ @ | ||
[c>]| | | |/ _ \ __/ _ \ '__/ _` |/ _ \ '_ \| __|@[<b] / / _` | | . ` | | | | | |/ _ \/ _` || __/ _ \ @ | ||
[c>]| |__| | __/ || __/ | | (_| | __/ | | | |_ @[<b] | | (_| | | |\ | |_| | | | __/ (_| || || (_) |@ | ||
[c>]|_____/ \___|\__\___|_| \__, |\___|_| |_|\__|@[<b] \ \__,_| |_| \_|\__,_|_|_|\___|\__,_(_)__\___/ @ | ||
[c>] __/ | @[<b] \____/ @ | ||
[c>] |___/ @[<b] @ | ||
""") | ||
nulled_auth = inputy(f'Please enter your Nulled auth key! ') | ||
|
||
program_id = "1196345" | ||
secret_id = "NG3Y2PQ8HH9KHK6C96YEGFW9L9PNM4AM" | ||
check_auth = auth.Auth(nulled_auth, program_id, secret_id) | ||
|
||
value = True # check_auth.check() | ||
|
||
if value: | ||
printy(f"Authorization successful!", "nB") | ||
auto.alert("Press OK when you're in a TFT lobby!\n") | ||
print("Bot started, queuing up!") | ||
queue() | ||
elif value is False: | ||
printy(f"You are not authorized, or this is an invalid key.", "rB") | ||
exit() | ||
else: | ||
print(f"Couldn't connect to the auth server! Please try again later.", "rB") | ||
exit() | ||
# End auth + main script |