MBR-NG: MyBotRun Next Generation
Modern, resolution-independent, background-mode Clash of Clans bot built in Python. Inspired by MyBotRun and designed to match premium features of ClashFarmer.
Why MBR-NG Stands Out
| Feature | MBR (AutoIt) | ClashFarmer | MBR-NG |
|---|---|---|---|
| Price | FREE (GPL v3) | ~$10-20/mo | FREE |
| Source Code | Open (AutoIt) | Closed (PyArmor) | Open (Python) |
| Resolution | Fixed 860x720 | Any | Any (0.0-1.0 relative) |
| Background Mode | Aero only, screen ON | Minimized, screen OFF | True ADB background |
| VPS Support | No | Yes | Yes + Headless |
| Auto-Launch Emulator | No | No | Yes (BS/LD/Nox/MEmu) |
| GUI | AutoIt native | PyQt6 | Modern PyQt6 Dark + Web Dashboard |
| AI/ML | No | OpenCV | ONNX YOLO + EasyOCR |
| Notifications | No | No | Telegram + Discord |
| Multi-Account | Manual | No | Supercell ID Switching |
| Stats Database | No | No | SQLite Persistent |
| Builder Base | No | No | Yes |
| Clan Games | No | No | Yes |
| Auto-Updater | No | Yes | GitHub Releases |
| Windows 11 | No | Yes | Yes |
| DPI Scaling | Must be 100% | Auto | Auto-detect |
Key Features
True Background Mode
Uses ADB (Android Debug Bridge) for screen capture and input. BlueStacks/LDPlayer can be minimized and your screen can be turned OFF. Perfect for VPS / dedicated servers.
Resolution Independence
All coordinates stored as relative values (0.0-1.0). Auto-scales to any emulator resolution. Supports DPI scaling natively. Works on 720p, 1080p, 1440p, 4K.
Auto-Launch Everything
Auto-detect installed emulators (BlueStacks, LDPlayer, Nox, MEmu). Auto-launch emulator if not running. Auto-launch Clash of Clans via ADB. Auto-optimize emulator settings.
Modern PyQt6 GUI + Web Dashboard
Dark theme out of the box with real-time screen preview via ADB. Live statistics dashboard. System tray integration. Web dashboard accessible from any device on your network.
Advanced Computer Vision
Multi-scale template matching, EasyOCR for reading resources/troop counts/timers, ONNX Runtime with YOLO object detection (optional), and hybrid matching: Template + Feature (ORB).
Smart Gameplay
Dead base detection with OCR + HSV collector analysis. Auto-login & obstacle handler (15+ popup types). Ban detection with immediate stop. Smart search filtering (dead/live/trophy/smart modes).
Village Management
Auto-collect resources, auto-donate troops, clear obstacles, auto-upgrade walls, Builder Base attacks, and Clan Games automation.
Multi-Account Support
Supercell ID switching. Cycle through multiple accounts. Per-account profiles with JSON presets.
Notifications
Telegram Bot real-time alerts. Discord Webhook notifications. Attack completion alerts, error notifications, and daily summary reports.
Anti-Ban Features
Humanized input (random delays, position jitter). Configurable farming schedule (3 time windows). Random break intervals. Session time limits. Attack rate limiting. Screenshot on error.
Architecture
State Machine
↓ BREAK (anti-ban)
Detection Pipeline
↓ EasyOCR (resources)
↓ HSV Analysis (collectors)
Project Structure
Quick Start
Installation
git clone https://github.com/subkhanibnuaji/MBR-NG.git cd MBR-NG python -m venv venv venv\Scripts\activate # Windows pip install -r requirements.txt
Usage
# GUI Mode python main.py # Headless (VPS/Server) python main.py --headless --profile default # With web dashboard python main.py --headless --web-dashboard --dashboard-port 8080 # Build .exe python build.py
Changelog
- •Critical bug fixes: init order, duplicate attack records, star detection, QImage buffer crash
- •Thread safety with RLock, orphaned thread fixes, double-start guard
- •Unbounded log growth capped, bare except clauses replaced
- •Added tests/test_detector.py and tests/test_config.py — 11/11 passing
- •Emulator auto-launcher (BlueStacks 5, LDPlayer, Nox, MEmu)
- •Auto-login handler for Supercell ID
- •Army trainer with configurable compositions
- •Village manager, dead base detector, Builder Base support
- •Clan Games automation, SQLite stats database
- •Telegram & Discord notifications, web dashboard, auto-updater, multi-account manager
- •Initial MVP release
- •Core framework: orchestrator, ADB wrapper, CV detector, actor
- •Relative coordinate system (0.0–1.0) for resolution independence
- •PyQt6 dark-themed GUI with live preview
- •CSV attack strategy engine (MBR v8.x compatible)
- •State machine: 13 states from IDLE to PAUSED
Disclaimer
Using bots in Clash of Clans violates Supercell's Terms of Service. This software is for educational purposes only. Use at your own risk. Features to reduce ban risk are provided, but there is no guarantee of account safety.
MBR-NG is open source under GPL v3. It is a spiritual successor to MyBotRun and is written from scratch in Python.