Skip to content
This repository was archived by the owner on Nov 11, 2024. It is now read-only.
DorskFR edited this page Aug 13, 2021 · 7 revisions

Welcome to the LeaguePyBot wiki!

This documentation is for v2 only.

Disclaimer

  • This is a fun project for me, I do not care and do not support you if you just want to bot for accounts (also there are more efficient alternatives for this).
  • This is a beta. Use at your own risk.
  • This script will patch your client and in-game settings (hotkeys, interface): so backup your settings.

Download

git clone https://github.com/DorskFR/LeaguePyBot.git

Set Python PATH (How to set Python PATH)

  • Might not even be necessary
export PYTHONPATH="$PWD:$PYTHONPATH"
cd LPBv2/

Install requirements

pip install -r requirements.txt

Start script

python main.py

Stop script

  • Use END key of your keyboard
  • or check controller/devices/listener.py and change the key in on_press

Log everything that appears in the console to files (logger/logger.py)

def get_logger(name="LPBv2", log_to_file=True):

Modify main() in main.py to customize the script

Log everything

  • (if you want to see everything the client outputs = spam)
await bot.client.log_everything()

Disable the autoplay feature of the bot

  • (if you just want to have the client automation, console printing but not the bot controlling the mouse and keyboard)
bot = LeaguePyBot(autoplay=False)

Set your lane selection (only works in ranked / draft)

cs = bot.client.champ_select
await cs.set_role_preference(first="TOP", second="BOTTOM")
  • The list of roles available is as follow: TOP, JUNGLE, MIDDLE, BOTTOM, UTILITY

Set your picks per lane (only works in ranked / draft)

cs = bot.client.champ_select
await cs.set_picks_per_role(picks=["Garen", "Darius"], role="TOP")

Set your bans per lane (only works in ranked / draft)

cs = bot.client.champ_select
await cs.set_bans_per_role(bans=["Thresh", "TahmKench"], role="BOTTOM")
  • The list of champion names is in common/champions.py. Capitalization does not matter.

Set up the build for your pick

await bot.build.set_starter_build(build=["1055", "2003", "3340"])
await bot.build.set_item_build(build=["3074", "3006", "3508", "6692", "3072"])

# Sample melee build
# await bot.build.set_starter_build(build=["1055", "2003", "3340"])
# await bot.build.set_item_build(build=["3074", "3006", "3508", "6692", "3072"])

# Sample mage build
# await bot.build.set_starter_build(build=["1082", "2003", "3340"])
# await bot.build.set_item_build(build=["6653", "3020", "4637", "3089"])

# Sample ADC build
# await bot.build.set_starter_build(build=["3070", "2003", "3340"])
# await bot.build.set_item_build(build=["6632", "3158", "3004", "3110", "6694", "3074"])

Create custom game

await cg.create_custom_game()
# fill one team with bots
await cg.fill_with_bots(team="ORDER")
# or one by one
await cg.add_bot(team="CHAOS", bot_difficulty="MEDIUM", champion_id=51)
await cg.start_champ_selection()
  • List of bots available is in common/bots.py

Create ranked game

await cg.create_ranked_game()
await cg.select_lane_position()
await cg.start_matchmaking()

Create normal game blind pick

await cg.create_normal_game()
await cg.start_matchmaking()

Create coop game (vs AI beginner)

await cg.create_coop_game()
await cg.start_matchmaking()

Random stuff

  • You should activate camera lock once in COOP games.
  • For other modes, it needs to be activated every game. Check line 150 of bot.py.

Feel free to open an issue for bugs / requests. Feel free to contribute through here or send me an email.