Skip to content

An executable python script used to press the "Accept" button on a League of Legends, or any other game, such as Dota2, CS2, Valorant (and all games that require an Accept button to be pressed to be able to join a game room), while you're away doing something as you're waiting to queue up.

License

Notifications You must be signed in to change notification settings

ArliT1-F/LoL-AutoAccept

Repository files navigation

👋 Hi, my name is Arli

Profile views

    👋 Hi, my name is Arli

Connect with me:

🚀 Passionate part-time software and script developer that are often useless but just haven't been found by the right people.

Rapid Fire

  • 💼 I'm currently working on: 💻 Developing a new overlay app for TeamFightTactics(TFT)
  • 💬 Ask me about: 💡 Python/Java/HTML/CSS
  • ⚡ Fun fact: 🎢One random day I accidentally debugged Mindustry's main run file.

Skills

JavaScript Python Selenium Visual Studio Code Django

GitHub Stats

GitHub stats Card GitHub streak Card

GitHub top-langs Card

Support Me

Auto Accept for League of Legends

This Python application automatically finds and clicks the "Accept" button in League of Legends, helping you quickly enter matches. It can be configured to run automatically on system startup across different operating systems.

Features

  • Automatically detects and clicks the "Accept" button in League of Legends.
  • Configurable to run on startup for Windows, macOS, and Linux.
  • Logs activity for troubleshooting and monitoring.

Troubleshooting

  • 1. Ensure that the accept_button.png is located in the same directory as auto-accept.py.
  • 2. Be sure to launch "League of Legends" and not move the window around. Take a screenshot of the "Accept" button and crop it. Cut everything else except the button itself.
  • 3. Do NOT change the resolution of your screen too much. The script will detect the button only from the screenshot taken. If you want this to work in another resolution, make sure to take another screenshot, and replace the accept_button.png with the new screenshot.
  • 4. Python should be installed in your system for the script to run in the first place.

How to run

Open your prefered terminal and run auto-accept.py.

  1. Windows python auto-accept.py
  2. MacOS python3 auto-accept.py
  3. Linux python3 auto-accept.py

Python Installation Guide

A simple guide to install Python on Windows, macOS, and Linux (Ubuntu/Mint).


Windows

1. Download Python Installer

2. Run the Installer

  • Open the downloaded .exe file.
  • Important: Check the box "Add Python to PATH".
  • Click "Install Now" (or choose "Customize installation" for advanced options).

3. Verify Installation

Open Command Prompt and run:

python --version

Expected output:

Python 3.12.x

macOS

1. Install Homebrew (if not already installed)

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

2. Install Python via Homebrew

brew install python

3. Verify Installation

python3 --version

Expected output:

Python 3.12.x

4. (Optional) Set Python 3 as Default

echo 'alias python=python3' >> ~/.zshrc
source ~/.zshrc

Linux (Ubuntu / Linux Mint)

1. Update Package Lists

sudo apt update && sudo apt upgrade

2. Install Python

sudo apt install python3 python3-pip -y

3. Verify Installation

python3 --version

Expected output:

Python 3.12.x

4. (Optional) Set Python 3 as Default

echo "alias python=python3" >> ~/.bashrc
echo "alias pip=pip3" >> ~/.bashrc
source ~/.bashrc

Final Tips

  • Install packages using pip:
pip install <package-name>
  • Check pip version:
pip --version
  • Use Virtual Environments (Recommended):
python -m venv myenv
source myenv/bin/activate  # macOS/Linux
myenv\\Scripts\\activate     # Windows

Pro Tip: Use a virtual environment for every project to avoid dependency conflicts.


Resources


App Installation(Optional)

1. Windows

Convert Python Script to Executable

To convert the Python script into an executable:

pip install pyinstaller
pyinstaller --onefile accept-button.py

This will generate an executable in the dist directory. Set Up on Startup

Press Win + R, type shell:startup, and press Enter to open the Startup folder. Copy the executable file from the dist directory into the Startup folder.

2. macOS

Convert Python Script to Executable

To create a macOS application:

pip install py2app
python accept-button py2app

This creates an .app package. Add to Login Items

Open System Preferences -> Users & Groups. Select your user account and click on the Login Items tab. Drag the .app file into the Login Items list.

3. Linux (Systemd)

Create a Systemd Service

Create a .service file:
sudo nano /etc/systemd/system/auto_accept.service

Add the following content:

ini

    [Unit]
    Description=Auto Accept League of Legends

    [Service]
    ExecStart=/usr/bin/python3 /path/to/accept-button.py
    WorkingDirectory=/path/to/your/script/
    Restart=always
    User=your_username

    [Install]
    WantedBy=multi-user.target
    Replace /path/to/accept-button.py with the actual path to your script, and your_username with your Linux username

Enable and Start the Service Enable the service to run on boot:

sudo systemctl enable auto_accept.service

Start the service immediately:

sudo systemctl start auto_accept.service

Usage

Once set up, the application will automatically run in the background. It will monitor your screen for the "Accept" button in League of Legends and click it when found.

Logging

The application generates logs to help troubleshoot any issues. Check the app.log file in the application directory to see the log entries.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Notes

Ensure the accept_button.png image is correctly placed in the same directory as the executable. Adjust the template matching threshold and screen resolution if the button is not being detected correctly.

Support Me

About

An executable python script used to press the "Accept" button on a League of Legends, or any other game, such as Dota2, CS2, Valorant (and all games that require an Accept button to be pressed to be able to join a game room), while you're away doing something as you're waiting to queue up.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages