40 |
41 | ## ⚠️ Disclaimer
42 |
43 | This tool is for educational purposes only. Using automation tools may violate the Terms of Service of World of Warcraft and could result in account suspension or ban. The authors are not responsible for any consequences of using this software.
44 |
45 | ## 📖 Table of Contents
46 |
47 | - [Features](#features)
48 | - [How It Works](#how-it-works)
49 | - [Requirements](#requirements)
50 | - [Getting Started](#getting-started)
51 | - [Installation](#installation)
52 | - [Building from Source](#building-from-source)
53 | - [Configuration](#configuration)
54 | - [Usage](#usage)
55 | - [Troubleshooting](#troubleshooting)
56 | - [Architecture](#architecture)
57 | - [Contributing](#contributing)
58 | - [License](#license)
59 |
60 | ## ✨ Features
61 |
62 | - **Out-of-process operation** - Uses Windows API hooks without injecting into the game
63 | - **Universal compatibility** - Works with any WoW version (Classic, TBC, WotLK, Retail)
64 | - **Audio-based detection** - Detects fish by monitoring Windows master volume
65 | - **Cursor change detection** - Identifies bobber location via cursor icon changes
66 | - **Automatic lure application** - Supports up to two different lures with configurable timers
67 | - **Wintergrasp support** - Automatically logs out during Wintergrasp battles (WotLK)
68 | - **State machine architecture** - Predictable and debuggable behavior
69 | - **Configuration validation** - Clear error messages for misconfigured settings
70 | - **Resource efficient** - Minimal CPU usage with optimized polling
71 |
72 | ## 🔧 How It Works
73 |
74 | Phishy uses a clever combination of Windows APIs to automate fishing without reading or modifying game memory:
75 |
76 | 1. **The Eyes** 👁️ - Monitors cursor icon changes (`EVENT_OBJECT_NAMECHANGE`) to detect when hovering over the fishing bobber
77 | 2. **The Ears** 👂 - Listens for volume spikes in Windows master audio to detect fish splashing
78 | 3. **The Brain** 🧠 - State machine that coordinates the fishing process
79 | 4. **The Hands** ✋ - Simulates mouse clicks and keyboard inputs to catch fish
80 |
81 | ### State Machine Flow
82 |
83 | ```
84 | Start → Apply Lure (optional) → Cast Line → Find Bobber → Wait for Fish → Catch Fish → Repeat
85 | ↓
86 | Logout (Wintergrasp) → Wait → Login
87 | ```
88 |
89 | ## 💻 Requirements
90 |
91 | - **Operating System**: Windows 10/11 (Windows-specific APIs)
92 | - **.NET Runtime**: .NET 9.0 Desktop Runtime
93 | - **Development** (if building from source):
94 | - Visual Studio 2022 with .NET Desktop workload
95 | - .NET 9.0 SDK
96 |
97 | ## 🚀 Getting Started
98 |
99 | ### Installation
100 |
101 | 1. **Download the appropriate version for your system:**
102 | - **For most users:** Download the latest Windows 64-bit version from the [Releases page](https://github.com/stdNullPtr/Phishy/releases/latest)
103 | - **For 32-bit systems:** Download the Windows x86 version from the [Releases page](https://github.com/stdNullPtr/Phishy/releases/latest)
104 |
105 | > Not sure which version to choose? If you're running Windows 10/11, choose the 64-bit version.
106 |
107 | 2. Extract the ZIP file to a folder of your choice
108 | 3. Run `guess.exe` (intentionally generic name)
109 | 4. On first run, a `configuration.yaml` file will be created and opened in Notepad
110 | 5. Configure the settings according to your WoW setup (see [Configuration](#configuration))
111 | 6. Run `guess.exe` again to start fishing
112 |
113 | ### Building from Source
114 |
115 | 1. Clone the repository:
116 | ```bash
117 | git clone https://github.com/stdNullPtr/Phishy.git
118 | cd Phishy
119 | ```
120 |
121 | 2. Open `Phishy.sln` in Visual Studio 2022
122 |
123 | 3. Build the solution (Ctrl+Shift+B) in Release mode
124 |
125 | 4. Find the executable at: `Phishy\bin\Release\net9.0-windows\guess.exe`
126 |
127 | Alternatively, using the command line:
128 | ```bash
129 | dotnet build -c Release
130 | ```
131 |
132 | ## ⚙️ Configuration
133 |
134 | The bot uses a YAML configuration file (`configuration.yaml`) with the following options:
135 |
136 | ```yaml
137 | # Window Configuration
138 | game-window-name: World of Warcraft # Must match your WoW window title exactly
139 |
140 | # Keybinds (use lowercase letters)
141 | keyboard-key-start-fishing: 1 # Key bound to fishing ability
142 | keyboard-key-apply-lure: 2 # Key bound to first lure (optional)
143 | keyboard-key-apply-second-lure: 3 # Key bound to second lure (optional)
144 | keyboard-key-logout: l # Key bound to /logout macro (for Wintergrasp)
145 |
146 | # Lure Settings
147 | lure-buff-duration-minutes: 10 # Duration of first lure buff
148 | second-lure-buff-duration-minutes: 5 # Duration of second lure buff (optional)
149 |
150 | # Fishing Settings
151 | fishing-channel-duration-seconds: 21 # How long to wait for a fish (default: 21)
152 |
153 | # Audio Settings
154 | setup-sound: true # Auto-configure Windows volume settings
155 |
156 | # Wintergrasp Settings (WotLK only)
157 | wait-for-wintergrasp: false # Enable Wintergrasp logout/login cycle
158 | ```
159 |
160 | ### Configuration Tips
161 |
162 | - **Window Name**: Must match exactly (case-sensitive). Common values:
163 | - `World of Warcraft` (Retail/Classic)
164 | - `World of Warcraft Classic`
165 | - Custom names if you've renamed your window
166 |
167 | - **Keybinds**: Use single lowercase letters or numbers that match your in-game keybinds
168 |
169 | - **Lure Duration**: Set slightly lower than actual buff duration to ensure reapplication
170 |
171 | - **Channel Duration**: Default is 21 seconds, increase if you have fishing skill bonuses
172 |
173 | ## 📋 Usage
174 |
175 | ### Initial Setup
176 |
177 | 1. **In-game preparation**:
178 | - Bind your fishing ability to key `1` (or configure differently)
179 | - Bind your lure(s) to keys `2` and `3` (optional)
180 | - Create a `/logout` macro and bind it (for Wintergrasp feature)
181 | - Position yourself at a fishing spot
182 | - Zoom in completely (first-person view works best)
183 | - Set game sound to ~80%, disable ambient sounds
184 |
185 | 2. **Windows preparation**:
186 | - The bot will automatically set Windows volume to maximum and mute it
187 | - Ensure no other applications are making sounds
188 |
189 | 3. **Running the bot**:
190 | - Start `guess.exe`
191 | - Focus the WoW window
192 | - The bot will begin fishing automatically
193 | - Press `DELETE` key to stop
194 |
195 | ### Best Practices
196 |
197 | - Test manual fishing first to ensure bobber lands near screen center
198 | - Fish in quiet areas to avoid sound interference
199 | - Keep the WoW window in focus and don't minimize it
200 | - Don't move the mouse while the bot is running
201 |
202 | ## 🔍 Troubleshooting
203 |
204 | ### Common Issues
205 |
206 | **"Failed retrieving window handle"**
207 | - Ensure the window name in config matches exactly
208 | - WoW must be running before starting the bot
209 |
210 | **Bot doesn't detect bobber**
211 | - Zoom in completely
212 | - Ensure bobber lands near screen center
213 | - Try adjusting camera angle
214 | - Check that cursor changes to "interact" icon over bobber
215 |
216 | **Bot doesn't catch fish**
217 | - Increase game sound volume
218 | - Disable all ambient sounds
219 | - Ensure Windows volume is not muted by other apps
220 | - Fish in quieter areas
221 |
222 | **Configuration validation errors**
223 | - Check the error message for specific issues
224 | - Ensure all required fields are filled
225 | - Verify keybinds are single characters
226 |
227 | ### Debug Mode
228 |
229 | Run from Visual Studio in Debug mode to see detailed logging output.
230 |
231 | ## 🏗️ Architecture
232 |
233 | The project follows SOLID principles with recent architectural improvements:
234 |
235 | ### Core Components
236 |
237 | - **State Machine** (`FishingStateMachine.cs`) - Manages fishing states and transitions
238 | - **Hooks** - Windows API hooks for input/output:
239 | - `WinEventHook` - Cursor change detection
240 | - `MouseHook` - Mouse input monitoring
241 | - `KeyboardHook` - Keyboard input monitoring
242 | - **Services** - Business logic implementations:
243 | - `AudioDetector` - Sound detection
244 | - `WindowManager` - Window operations
245 | - `InputSimulator` - Input simulation
246 | - `ConsoleLogger` - Logging
247 | - **Utils** - Low-level Windows API wrappers
248 | - **Interfaces** - Contracts for dependency injection
249 |
250 | ### Recent Improvements
251 |
252 | - Thread-safe operations with proper locking
253 | - Comprehensive error handling with Win32 error codes
254 | - Resource disposal for COM objects
255 | - Configuration validation
256 | - Reduced CPU usage by 80%
257 | - Clean architecture with interfaces
258 |
259 | ## 🤝 Contributing
260 |
261 | Contributions are welcome! Please follow these steps:
262 |
263 | 1. Fork the repository
264 | 2. Create a feature branch (`git checkout -b feature/AmazingFeature`)
265 | 3. Commit your changes (`git commit -m 'feat: add amazing feature'`)
266 | 4. Push to the branch (`git push origin feature/AmazingFeature`)
267 | 5. Open a Pull Request
268 |
269 | Please ensure your code follows the existing patterns and includes appropriate error handling.
270 |
271 | ## 📜 License
272 |
273 | This project is licensed under the **GNU Affero General Public License v3.0 (AGPL-3.0)** - see the [LICENSE](LICENSE) file for details.
274 |
275 | ### What this means:
276 | - ✅ **Free to use, modify, and distribute**
277 | - ✅ **Commercial use is allowed**
278 | - ✅ **All derivatives MUST be open source**
279 | - ✅ **Network use requires source disclosure**
280 | - ⚠️ **Strong copyleft - changes must use AGPL-3.0**
281 |
282 | The AGPL ensures that all modifications and derivatives remain open source, even when used as a network service. If you modify this code and provide it as a service, you must share your source code.
283 |
284 | ## 🙏 Acknowledgments
285 |
286 | - Original C++ proof-of-concept: [wow-fishbot](https://github.com/stdNullPtr/wow-fishbot)
287 | - Windows API documentation and community
288 | - NAudio library for audio processing
289 |
290 | ---
291 |
292 |