The "2-condition-triggerbot" project is an educational tool designed to demonstrate the principles of screen capture and image processing in a gaming context. This bot is specifically tailored for the popular FPS game, Valorant. It automates the process of detecting targets and shooting by using color recognition techniques.
-
Configurable Settings: Easily customize the bot’s behavior through the config.json file, including network settings, color tolerance, and delay parameters.
-
Real-time Screen Capture: Utilizes mss for efficient screen capture of a small zone around the crosshair to minimize performance impact.
-
Color Detection: Detects the presence of specific target and scope colors within the capture zone to determine when to shoot.
-
Adjustable Trigger Delay: Fine-tune the bot’s shooting speed with adjustable delay settings to match different game requirements.
-
Keyboard Controls: Control the bot with simple hotkeys:
-
Initialization: The bot initializes by loading the configuration, setting up network communication with kmBox, and defining the screen capture zone.
-
Screen Capture and Processing: Continuously captures a small portion of the screen around the crosshair, checking for specific colors that indicate a target or scoped-in state.
-
Trigger Mechanism: When both conditions (target detected and scoped-in) are met, the bot simulates a mouse click to shoot, with a customizable delay to mimic human reaction times.
-
Keyboard Listener: Runs in a separate thread to allow the user to pause, reload the configuration, or exit the program using predefined hotkeys.
This tool is intended for educational purposes only to showcase how screen capture and color detection can be implemented in a programming project. Using such tools in online games like Valorant is against the terms of service and can result in penalties, including permanent bans. Use this bot at your own risk, and always consider the ethical implications and potential consequences of using cheats in online games.
- KmBox library (available as KmNet.pyd in the source)
- Python 3.11
- Kmbox Net version. Set up kmboxNet
http://www.kmbox.top/wiki_doc/kmboxNet/site/#_1
The firmware for kmbox must be at least from May 18th 2024 or above!!!
- 2 PCs setup (optional)
- You can use Capture card or Moonlight streaming
Clone the repository from GitHub:
git clone https://github.com/ozymotv/2CT.git
Install required Python packages:
pip install -r requirements.txt
- Navigate to the project directory:
cd 2CT
- Edit the config.json file:
{
"ip": "192.168.2.188",
"port": "16896",
"uid": "46405C53",
"trigger_delay": 0,
"base_delay": 0,
"color_tolerance": 40,
"target_color": [250, 100, 250],
"scope_color": [0, 255, 0],
"scope_color_tolerance": 40,
"scope_color_alt": [0, 255, 255],
"scope_color_tolerance_alt": 40
}
- Adjust crosshair colors:
- Primary crosshair: Cyan
- Aimdownsight and Sniper: Green
Turn on "Movement error", "Firing error", multiplier to 3 times
4.Run the program:
python run.py
- Keyboard Shortcuts:
- F2: Exit
- F3: Pause/unpause
- F4: Reload config
Xmousebutton2 for alternate trigger mode
Feel free to submit any improvement, I will credit you.
Ozymo
This project is licensed under the GPL 3.0 License - see the LICENSE file for details