Pokemon TCG Live Code Redeem Bot

11/24/2024 19:44 emorrowdf#1
Hey everyone,

I was running into a bit of a hassle when trying to redeem bulk codes in Pokémon TCG Live—entering them one at a time was getting really annoying. To save time and make the process smoother, I quickly wrote a Python script that handles it for me.

How It Works:

Image Recognition: Utilizes simple image recognition with opencv-python to identify the necessary UI elements.

Automation: Uses pyautogui to automate the clicking and typing actions required to enter and submit each code.
Setup Instructions:

Install Python:

Ensure you have Python 3.6 or higher installed on your computer. You can download it from python.org.

Install Required Libraries:

Open your command prompt or terminal and run the following command to install the necessary Python libraries:


Code:
pip install opencv-python pyautogui pillow

Prepare Your Codes:

Enter one code per line in the text box. PoTown handles this automatically when you copy the codes, so it should be straightforward.


Run the Script:
Execute the Python script by double-clicking it or running the following command in your terminal:

Code:
python bot.py
Enter Your Codes:
In the GUI window that appears, input all your Pokémon TCG Live codes, one per line.

Start the Bot:
Click the "Start" button, and let the script handle the rest!

Always on Top:
The bot's window stays above all other windows, so you can monitor its progress without switching back and forth.

Start/Stop Control:
Easily start or stop the bot whenever you need to.

Tested Resolution:

I've tested this script extensively on a 2560x1440 resolution setup, and it's working great there. If you're using a different screen resolution, like 1920x1080, you might need to adjust the image assets accordingly to ensure accurate detection.
01/27/2025 23:36 suaqua#2
Hey there I'm trying to get this to work but every time I run it I get an error that assets.codebox.png cannot be located, are there any specific things that need to be open while this is running and is this supposed to run from the website redemption or the ptcgl app itself?