A Python-based bot designed to automate playing "Lumberjack" game on Telegram. The bot uses image processing to detect branches and keyboard inputs to control the character's actions.
You can play the Lumberjack game on Telegram at https://t.me/gamebot.
The project requires the following Python packages:
- numpy
- Pillow
- opencv-python
- keyboard
- pynput
- screeninfo
You can install the required packages using the following command:
pip install -r requirements.txt-
Setup: Ensure you have all the required packages installed.
-
Run the Bot: Execute the
main.pyscript.python main.py
-
Mouse Clicks: The bot will prompt you to click on the positions of the branch above the man's head on the left and right sides of the screen. First, click on the branch above the man's head on the left side (magenta square
):
Then, click on the branch above the man's head on the right side (magenta square
):
These positions are used to detect branches.
-
Start the Game: Press and hold the
upkey to start the bot. The bot will begin cutting trees and toggling directions based on the branch positions. -
Stop the Bot: Press the
downkey to stop the bot.
- The bot captures the screen using
ImageGraband processes the image usingopencv-python. - It listens for mouse clicks to get the coordinates of the man's head on both sides.
- The bot uses keyboard inputs to control the character's actions.
- It continuously checks for branches above the character's head and toggles the direction if a branch is detected.
We welcome contributions from everyone! Whether it's fixing bugs, improving documentation, or suggesting new features, your input is invaluable.
This project is licensed under the MIT License. See the LICENSE file for details.
Ismayil Mammadov (7empestGit)
The project uses several open-source libraries. Thanks to the contributors of numpy, Pillow, opencv-python, keyboard, pynput, and screeninfo.


