# 2. Using Bot

## 📋 Prerequisites

Before starting the bot, you need:

1. Recorded spot
2. Combat combo for your class
3. Proper game settings

## 🎯 Part 1: Spot Recording

### 🎥 Recording Interface

<figure><img src="https://382629921-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFcGRre1rkkV7HvNqEiFN%2Fuploads%2FlcrX4sfrtwhk2SqUpluh%2Fimage.png?alt=media&#x26;token=b5c12d28-674b-4a53-90ce-cdf384d1307c" alt=""><figcaption></figcaption></figure>

### Step-by-Step Recording

1. **Start Recording**
   * Click "Start Recording"
   * Initial minimap image is captured automatically
   * ⚠️ Make sure minimap is properly positioned
2. **Add Waypoints**
   * Move to desired location
   * Click "Add Waypoint"
   * Configure waypoint properties:

     | Property     | Description                     | Notes                             |
     | ------------ | ------------------------------- | --------------------------------- |
     | **Type**     | Movement, Kill, Repair, Storage | Select based on waypoint purpose  |
     | **Radius**   | Arrival detection radius        | Default: 0 - exact position match |
     | **Position** | X, Y coordinates                | Auto-captured, can be adjusted    |
3. **Waypoint Types & Configuration**
   * 🏃 **Movement**: Navigation waypoint
     * `WaitAfterArrivalMs`: Delay after reaching position (milliseconds)
   * ⚔️ **Kill**: Combat waypoint with two completion modes:

     | Mode          | Description                                            |
     | ------------- | ------------------------------------------------------ |
     | **NoTargets** | Fight until no HP bars detected after camera rotations |
     | **Duration**  | Fight for a specific duration in seconds               |

     Kill settings:

     * `CombatRadius`: Combat area radius in pixels
     * `StayInRadius`: Stay within combat radius during combat
     * `ReturnToCenter`: Return to waypoint center after combat
     * `CameraRotations`: Rotations before declaring clear (NoTargets mode)
     * `DurationSeconds`: Combat duration (Duration mode)
   * 🛠️ **Repair**: Tent/repair location
     * Must place tent exactly at this point
     * Bot will interact with tent automatically
   * 📦 **Storage**: Storage waypoint

     | Storage Type | Description                  |
     | ------------ | ---------------------------- |
     | **Maid**     | Use storage maid for deposit |
     | **Horse**    | Use horse for storage access |
4. **Save & Manage Spots**
   * Enter unique route name
   * Click "Save Spot"
   * Files stored in Spots folder
   * Can load/edit existing spots

### 💡 Recording Tips

* Design circular routes for efficiency
* Position tent at exact repair waypoint
* Place storage points in safe zones (preferably near tent)
* Always test route manually before botting
* Use minimal radius values when possible

### 📤 Community Spot Sharing

Share and download grinding spots with the community:

#### 🔐 Publishing a Spot:

1. Sign in with Discord (required)
2. Go to Community page → **SPOTS** tab
3. Click "UPLOAD SPOT"
4. Select a local spot file
5. Add metadata:
   * Name (required)
   * Tags (optional)
   * Description (optional)
6. Click "Upload"

#### 🌐 Features:

* 🗺️ Minimap preview for each spot
* ⭐ Rating system (1-5 stars + comments)
* 📊 Sort by: Recent, Rating, Downloads, Name
* 📥 Downloads saved to local `Spots/` folder

#### 📋 Metadata Tracked:

* Author (Discord profile)
* Download count
* Average rating
* Waypoint count
* Creation date

## 🎮 Part 2: Bot Configuration

### Main Interface

<figure><img src="https://382629921-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFcGRre1rkkV7HvNqEiFN%2Fuploads%2FkY2Q4DM4aCUEfYGss7xd%2Fmain.png?alt=media&#x26;token=86d7dc5f-70e0-442d-a43a-6e37e2b9ed35" alt=""><figcaption></figcaption></figure>

The Bot Control page features a streamlined interface for configuring and monitoring automation.

### 🎛️ Configuration Panel

Configure your bot with three simple dropdowns:

| Selector     | Description                          | Notes                              |
| ------------ | ------------------------------------ | ---------------------------------- |
| **SPOT**     | Select your recorded farming route   | Auto-sorted by most recent         |
| **CLASS**    | Select your character's combat class | Triggers rotation list reload      |
| **ROTATION** | Select combat skill rotation         | Loads rotations for selected class |

### ▶️ Bot Controls

| Control   | Description                         |
| --------- | ----------------------------------- |
| **START** | Begin bot automation (green button) |
| **STOP**  | Stop bot automation (red button)    |
| **F7**    | Global hotkey to toggle bot on/off  |

### 📊 Live Metrics Dashboard

The interface displays real-time information in organized cards:

#### 🧭 Navigation Card

| Metric       | Description                               |
| ------------ | ----------------------------------------- |
| **ANGLE**    | Current character facing direction (°)    |
| **TARGET**   | Bot's target facing direction (°)         |
| **POSITION** | X, Y coordinates with tracking confidence |

#### 🎯 Waypoint Card

| Metric            | Description                                 |
| ----------------- | ------------------------------------------- |
| **PROGRESS**      | Current waypoint / Total (e.g., "WP 5/10")  |
| **NEXT WAYPOINT** | Coordinates, type, and radius of next point |

#### 👁️ Detection Card

| Metric           | Indicator | Description                  |
| ---------------- | --------- | ---------------------------- |
| **HP BARS**      | 🔴 Count  | Detected monster HP bars     |
| **MINIMAP MOBS** | 🟠 Count  | Monsters detected on minimap |
| **REPAIR**       | 🟢/🔴 Dot | Equipment durability status  |
| **STORAGE**      | 🟢/🔴 Dot | Inventory fullness status    |

### 🔬 Debug CV Lab

Access the **Debug CV Lab** from the sidebar (debug mode) to test and verify detection systems:

| Tab            | Purpose                                       |
| -------------- | --------------------------------------------- |
| 📍 Position    | Test position tracking and minimap reading    |
| 🧭 Angle       | Test character direction detection            |
| 👾 Monsters    | Test minimap monster detection                |
| 📊 Stats       | Test HP/MP bar detection                      |
| 💛 HP Bars     | Test monster HP bar detection (golden pixels) |
| 🔧 Maintenance | Test repair/storage detection                 |
| ⚡ Skills       | Test skill cooldown detection                 |

> 💡 Use Debug CV Lab to verify all detection systems are working correctly before starting the bot.

### 🔄 Bot States

| State       | Description                | Indicator |
| ----------- | -------------------------- | --------- |
| ⚫ Idle      | Bot loaded but not running | Gray      |
| 🟡 Starting | Initialization in progress | Yellow    |
| 🟢 Running  | Active automation          | Green     |
| 🔴 Error    | Failure occurred           | Red       |
| 🟡 Stopping | Shutdown in progress       | Yellow    |

### ⚙️ Settings (Sidebar → Settings)

Configure bot behavior in the Settings page:

#### 🖥️ Virtual Machine Tab

* Connect to Hyper-V virtual machines
* Select streaming client (Parsec, Custom)
* Configure window class for input routing

#### ⌨️ Hotkeys Tab

* Configure bot Start/Stop hotkey (default: F7)
* Enable/disable global hotkeys

#### 🎮 Skill Keys Tab

* Map combat skills to keyboard keys
* Class-specific skill bindings

#### 🧪 Consumables Tab

* Configure auto-use for potions/buffs
* Set usage triggers and intervals

#### 📱 Telegram Tab

* Connect Telegram bot for remote control
* Configure event notifications (death, stuck, repair, storage)
* See [Telegram Integration](https://pixelbot-docs.gitbook.io/pixelbot/products/broken-reference) for setup guide

## 🧪 Part 3: Consumables Management

Configure automatic buff and pet management:

| Consumable  | Default Interval | Description                |
| ----------- | ---------------- | -------------------------- |
| 🐾 Pet Feed | 5 minutes        | Keeps pets fed and looting |
| 🍖 Food     | 30 minutes       | Maintains food buffs       |
| 🧪 Draught  | 15 minutes       | Refreshes draught buffs    |
| 💊 Elixir   | 5 minutes        | Maintains elixir buffs     |

### Configuration

1. Enable/disable each consumable type
2. Set custom intervals based on buff duration
3. Assign correct hotkeys matching your hotbar

> ⚠️ Make sure consumables are in your hotbar with correct keybinds

***

## 🔄 Stuck Recovery System

The bot uses skills marked as **Stuck** type for recovery:

* **Detection**: Uses `MovementStallThresholdMs` parameter (default: 1+ seconds)
* **Recovery**: Executes skills assigned to the **Stuck** category in your rotation
* **Resume**: Returns to normal navigation after successful escape

> 💡 Configure stuck recovery skills in **Combo Creation** by assigning movement skills to the **Stuck** category.

***

## 🔍 Troubleshooting Guide

| Issue          | Solution                               | Prevention                      |
| -------------- | -------------------------------------- | ------------------------------- |
| Not Moving     | Test Position in Debug CV Lab          | Verify minimap settings         |
| Skip Attacks   | Check MinimumCastTimeMs & key bindings | Test combo separately           |
| No Monsters    | Test HP Bars/Monsters in Debug CV Lab  | Verify BW\_light photo filter   |
| Getting Stuck  | Add Stuck skills to rotation           | Configure Stuck category skills |
| Buffs Dropping | Reduce consumable intervals            | Match to buff duration          |
| Wrong Angle    | Test Angle in Debug CV Lab             | Check camera settings           |
| Repair Issues  | Test Maintenance in Debug CV Lab       | Verify tent placement           |

> 💡 Always use **Debug CV Lab** to test detection systems before starting the bot!

## ⚠️ Important Notes

### 1. Pre-Start Checklist

* ✅ Clear inventory space
* ✅ Check equipment durability
* ✅ Verify game settings (see [Black Desert](https://pixelbot-docs.gitbook.io/pixelbot/configuration/bdo) page)
* ✅ Position tent at Repair waypoint
* ✅ Test all detection in **Debug CV Lab**:
  * Position tracking working
  * Angle detection accurate
  * HP Bars detecting monsters
  * Minimap monsters visible

### 2. Performance Requirements

* Use War Mode settings
* Remove unnecessary UI elements
* Maintain consistent FPS and Internet connection (100mbs required)
* Keep area clear of obstructions
