An automated bot for Dofus 2 treasure hunts using OCR (Optical Character Recognition) and image pattern recognition. This bot can automatically navigate through treasure hunts, fight treasure chests, and handle various game mechanics.
- Automatic treasure hunt navigation
- OCR-based position detection and map reading
- Image pattern recognition for game elements
- Automated combat with treasure chests
- Phorreur detection and handling
- Automatic zaap (teleport) usage
- Smart pathfinding based on in-game clues
- Handles special map cases (stairs, split maps)
- Python 3.x
- Tesseract OCR
- Windows OS (tested on Windows 10)
- Dofus 2.x client
opencv-python
numpy
mss
Pillow
pyautogui
pytesseract
pywin32
pyperclip
-
Install Tesseract OCR:
- Download and install from: https://github.com/UB-Mannheim/tesseract/wiki
- Default installation path should be:
C:\Program Files\Tesseract-OCR\
-
Install Python dependencies:
pip install opencv-python numpy mss Pillow pyautogui pytesseract pywin32 pyperclip
-
Configure your game:
- Set Dofus client to windowed mode
- Ensure the game window is visible and not minimized
- Position the window appropriately (the bot will handle window positioning)
- Start Dofus and log into your character
- Navigate to a location where you can start treasure hunts
- Run the main script:
python treasure_hunt.py
The bot will:
- Position the Dofus window
- Start the treasure hunt sequence
- Automatically navigate through maps
- Handle combat with treasure chests
- Repeat the process for new treasure hunts
treasure_hunt.py: Main bot logic and window managementocr.py: OCR-related functions for reading game textmove.py: Movement and navigation functionsclues.py: Treasure hunt clue interpretationpatternReck.py: Pattern recognition for map elementsmineralReck.py: Resource gathering functionalityproxy.py: Proxy handling for network operationswindowsData.py: Windows-specific window managementimages/: Directory containing reference images for pattern matching
- This bot is for educational purposes only
- Use at your own risk - botting may be against game terms of service
- The bot requires specific window positioning and game settings
- Some features may need adjustment based on your screen resolution
- Make sure to test in safe areas first
- If OCR fails, check Tesseract installation and path
- If image recognition fails, verify game resolution matches bot settings
- Window positioning issues can be adjusted in windowsData.py
- Combat issues may require adjusting timing parameters
Feel free to submit issues and enhancement requests. PRs are welcome.
This project is provided as-is for educational purposes.