How kingshotauto/kingshot-bot works
KingshotAuto is a Windows desktop bot that automates Kingshot in LDPlayer. Users configure accounts and tasks in the GUI; cycle management schedules account runs, TaskManager executes task modules, and emulator control plus screen analysis support in-game actions. The graph preserves the documented task families and the separate multi-instance, recovery, and configuration capabilities. Source excerpts show only selected call paths, so documented workflow links use the README where needed; unsampled implementation details are not asserted.
Main entry points: TaskManager.cs Task manager · MainViewModel.cs Main view model · Modules Task modules · InstanceManager.cs Instance manager
Components 21
Desktop interface
- WPF interface
Bot.GUI/Views/MainWindow.xaml.cs - Main view model
Bot.GUI/ViewModels/MainViewModel.cs - Configuration editor
Bot.GUI/ViewModels/ConfigViewModel.cs
Run orchestration
- Cycle manager
Bot.Core/Services/CycleManagementService.cs - Task manager
Bot.Core/Tasks/TaskManager.cs
Game automation
- Task modules
Bot.Core/Tasks/Modules - Account switching
Bot.Core/Tasks/Modules/ChangeAccountTask.cs - Farming
Bot.Core/Tasks/Modules/FarmingTask.cs - Auto hunt
Bot.Core/Tasks/Modules/AutoHuntTask.cs - Other task families
Bot.Core/Tasks/Modules
Emulator and vision
- Screen locator
Bot.Core/Utils/LocatorService.cs - Template matching
Bot.Core/ImageDetection/UnifiedTemplateMatchingService.cs - Screen OCR
Bot.Core/Utils/OCRService.cs - ADB connections
Bot.Core/LDPlayer/ADBConnectionManager.cs - Instance manager
Bot.Core/LDPlayer/InstanceManager.cs - LDPlayer helper
Bot.Core/Utils/LDPlayerHelper.cs
Configuration and state
- Configuration service
Bot.Core/Config/ConfigurationManager.cs - Account settings
Bot.Core/Models/AccountSettings.cs - Shield timer
Bot.Core/Services/ShieldTimeManager.cs
Other components
- Bot operator
- LDPlayer emulator
Connections 24
- Bot operator → WPF interface: operates
README.md - WPF interface → Main view model: presents
Bot.GUI/Views/MainWindow.xaml.cs - Main view model → Cycle manager: controls
Bot.GUI/ViewModels/MainViewModel.cs - Main view model → Task manager: accesses
Bot.GUI/ViewModels/MainViewModel.cs - Main view model → Configuration editor: uses
Bot.GUI/ViewModels/MainViewModel.cs - Configuration editor → Configuration service: edits
- Configuration service → Account settings: loads and saves
Bot.Core/Config/ConfigurationManager.cs - Cycle manager → Task manager: runs accounts
Bot.Core/Services/CycleManagementService.cs - Task manager → Task modules: dispatches
Bot.Core/Tasks/TaskManager.cs - Task manager → Account switching: executes
Bot.Core/Tasks/TaskManager.cs - Task manager → Farming: executes
Bot.Core/Tasks/TaskManager.cs - Task manager → Auto hunt: executes
Bot.Core/Tasks/TaskManager.cs - Task modules → Other task families: includes
- Task modules → Screen locator: uses screen analysis
README.md - Task modules → ADB connections: controls emulator
README.md - Screen locator → ADB connections: captures screen
Bot.Core/Utils/LocatorService.cs - Screen locator → Template matching: matches templates
Bot.Core/Utils/LocatorService.cs - Task modules → Screen OCR: reads screen text
README.md - ADB connections → LDPlayer emulator: sends device commands
README.md - Instance manager → LDPlayer helper: locates console
Bot.Core/LDPlayer/InstanceManager.cs - Instance manager → ADB connections: uses connections
Bot.Core/LDPlayer/InstanceManager.cs - Instance manager → LDPlayer emulator: starts instances
README.md - Main view model → Instance manager: manages instances
Bot.GUI/ViewModels/MainViewModel.cs - Shield timer → Account settings: tracks shield settings
Bot.Core/Services/ShieldTimeManager.cs