SilkroadBot - Automation Framework
βοΈ A free, open-source Silkroad Online automation framework built in C# for Windows. Inspired by modular architectures like RSBot, with an integrated AI decision engine powered by Google Gemini.
ποΈ Architecture
SilkroadBot/
βββ src/
β βββ SilkroadBot.Core # Bot engine, networking, crypto, events, plugin hosting
β βββ SilkroadBot.Domain # Game models, enums, protocol adapters
β βββ SilkroadBot.Plugins.SDK # Plugin development SDK
β βββ SilkroadBot.Navigation # Pathfinding (A*, NavMesh-ready)
β βββ SilkroadBot.AI # AI integration (Gemini) + Guardrails
β βββ SilkroadBot.Profiles # Multi-profile management
β βββ SilkroadBot.UI # WPF Desktop Application
βββ plugins/
β βββ SilkroadBot.Plugin.Chat # Chat monitoring & auto-reply
β βββ SilkroadBot.Plugin.CommandCenter # Command-based bot control
β βββ SilkroadBot.Plugin.Logger # Event logging to file
β βββ SilkroadBot.Plugin.Protection # Auto-heal, flee, death recovery
βββ docs/
β βββ BUILD.md
β βββ PLUGIN_DEVELOPMENT.md
βββ Build/ # Compiled output directory
β¨ Features
Core Framework
- Packet-driven architecture - Full protocol handling for Silkroad Online
- Dual execution modes - Clientless or attach-to-running-client
- Multi-region support - iSRO, TRSRO, vSRO, and custom private servers
- Async/await throughout - Non-blocking operations for responsiveness
- Dependency Injection - Clean, testable, extensible design
Plugin System
- Dynamic DLL loading - Drop plugins into the
plugins/folder - Rich event hooks - Connection, packets, chat, inventory, movement, party, skills
- Complete isolation - Plugins can't modify core logic
- Plugin SDK - Full SDK with base classes, attributes, and interfaces
AI Engine (Gemini)
- IAIProvider interface - Pluggable AI backends
- GeminiProvider - Google Generative AI integration
- Command Validation Layer - Every AI decision passes through safety guardrails
- Per-profile AI config - Different settings for each character
- Confidence thresholds - Reject uncertain AI decisions automatically
Safety Guardrails
- Death prevention
- Health threshold enforcement
- Position safety validation
- Combat overload prevention
- Confidence scoring
- Action whitelist validation
Navigation
- A* pathfinding - Grid-based navigation with diagonal support
- Path smoothing - Line-of-sight optimization
- Map data provider - Pluggable map data loading
- NavMesh-ready - Abstract interface for future algorithms
UI
- Modern WPF - Dark-themed Windows desktop application
- Dashboard - Live status overview
- Profile Manager - Create, edit, duplicate profiles
- Packet Monitor - Real-time packet inspection
- Plugin Manager - Enable/disable plugins
- AI Settings - Configure AI per profile
- Live Logs - Filtered real-time logging
π Quick Start
Prerequisites
- Windows 10/11
- Visual Studio 2022 (with .NET desktop workload)
- .NET 8.0 SDK
Build
# Using the build script
.\build.ps1
# Or via dotnet CLI
dotnet build SilkroadBot.sln -c Release -o Build/
Run
# Run the UI application
dotnet run --project src/SilkroadBot.UI/
Develop Plugins
See PLUGIN_DEVELOPMENT.md for the complete plugin development guide.
π Supported Regions
| Region | Status | Protocol |
|---|---|---|
| iSRO (International) | β Adapter Ready | iSRO_v1.0 |
| TRSRO (Turkish) | β Adapter Ready | TRSRO_v1.0 |
| vSRO (Private Server) | β Adapter Ready | vSRO_188 |
| Custom Servers | β Configurable | User-defined |
π€ AI Integration
The AI layer is optional and requires a Gemini API key. Configure via the UI or profile JSON:
{
"ai": {
"enabled": true,
"providerName": "Gemini",
"apiKey": "YOUR_API_KEY",
"model": "gemini-pro",
"temperature": 0.3,
"decisionIntervalMs": 2000
}
}
Every AI decision passes through the Command Validation Layer:
- Action existence check
- Confidence threshold
- Death prevention
- Health safety
- Combat safety
- Position validity
π Project Status
- Core architecture & networking
- Protocol adapters (iSRO, TRSRO, vSRO)
- Plugin system with SDK
- Event dispatch system
- AI integration with guardrails
- Pathfinding (A*)
- Profile management
- WPF UI
- Sample plugins (4)
- Documentation
β οΈ Disclaimer
This project is intended for educational purposes and private server use. It does not include anti-cheat evasion techniques. Use responsibly and in accordance with the terms of service of any game server you connect to.
π License
MIT License - See LICENSE for details.
Generated by ML Intern
This model repository was generated by ML Intern, an agent for machine learning research and development on the Hugging Face Hub.
- Try ML Intern: https://smolagents-ml-intern.hf.space
- Source code: https://github.com/huggingface/ml-intern
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = 'Ahmedramadan24/SilkroadBot'
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
For non-causal architectures, replace AutoModelForCausalLM with the appropriate AutoModel class.