Skip to content

Latest commit

 

History

History
181 lines (132 loc) · 7.18 KB

File metadata and controls

181 lines (132 loc) · 7.18 KB

nExBot

Version License Lua

A high-performance automation bot for OTClientV8 (vBot) and OpenTibiaBR (OTCR) with AI-powered combat, real-time analytics, and intelligent navigation.

Note

nExBot runs on both vBot (OTClientV8) and OTCR (OpenTibiaBR) — the client is auto-detected at startup, no manual configuration needed.


Table of Contents


🤖 What is nExBot?

nExBot is a modular Tibia bot that automates hunting, healing, navigation, and analytics.

Core Modules

Module What it does
HealBot Ultra-fast healing (75 ms response) with spells, potions, support buffs, and condition curing
AttackBot Automated attack spells and runes with AoE optimization and cooldown management
CaveBot Waypoint navigation with floor-change safety, field handling, supply refills, and 50+ pre-built routes
TargetBot AI combat with 9-stage priority scoring, behavior learning, wave prediction, and movement coordination
Hunt Analyzer Real-time session analytics — kills/hour, XP/hour, profit, Hunt Score, efficiency insights
Containers Auto-open, quiver management, and container role assignments
Extras Anti-RS, alarms, equipment swapping, conditions, combo system, push max

🚀 Quick Start

1. Install

Copy the nExBot folder into your client's bot directory:

vBot (OTClientV8 — Windows):

%APPDATA%/OTClientV8/<ServerName>/bot/nExBot

OTCR (OpenTibiaBR — Linux):

~/.local/share/<otcr-data>/<ServerName>/bot/nExBot

See the full Installing guide for step-by-step instructions.

2. Enable

  1. Open the client, log in, press Ctrl+B.
  2. Select nExBot from the bot dropdown and click Enable.
  3. You should see Main, Cave, and Target tabs.

3. Configure

  1. HealBot — Set healing spells and potions (Main tab → Healing).
  2. TargetBot — Add monsters to fight (Target tab → +).
  3. CaveBot — Load a pre-built config or record waypoints (Cave tab → Show Editor).
  4. AttackBot — Set attack spell rotation (Main tab → AttackBot).

Tip

Load a pre-built config from cavebot_configs/ for the fastest setup — 50+ routes are included for popular hunting spots.

4. Hunt

Enable CaveBot and TargetBot, press Start (Ctrl+Z), and monitor progress in Hunt Analyzer.

⚠️ Note for OT Developers

Caution

Do NOT place nExBot inside a mods/ folder or custom mod directory. The auto-updater requires write access to the user-data bot/ path — mod folders are read-only at runtime, so updates will fail silently.

👉 See the Installing guide — Auto-Updater section for the full explanation and correct folder setup.


✨ Features

🎯 TargetBot — AI Combat

  • AttackStateMachine — sole attack issuer, eliminates attack-once-then-stop bugs
  • 9-stage TBI priority — distance, health, danger, wave prediction, adaptive weights
  • Monster Insights — 12 SRP modules that learn monster behavior in real-time
  • Movement coordination — intent-based voting resolves wave avoidance, keep-distance, AoE positioning, and chase

🧭 CaveBot — Navigation

  • Walking engine v4.0 — smooth autoWalk pipelining (5+ tiles), step pipelining (2-step lookahead), PathCursor preservation, adaptive recovery with path validation and exponential-decay blacklists
  • 15+ waypoint types — goto, label, action, buy, sell, lure, standLure, depositor, travel, imbuing, tasker, withdraw
  • 50+ pre-built configs — Asura, Banuta, Demons, Dragons, Hydras, Nagas, and more

💚 HealBot — Survival

  • 75 ms response — event-driven, cached health data, zero-allocation casting
  • Cascading priority — multiple spells and potions at different HP/MP thresholds
  • Condition handling — auto-cure poison, paralyze, burn

🔌 Client Abstraction (ACL)

Important

The ACL auto-detects vBot vs. OTCR at startup — all game operations use a unified ClientService API. OTCR-exclusive features (imbuing, stash, forge, prey, market) are enabled automatically.


🏗️ Architecture

_Loader.lua (entry point)
├── ACL (client detection + adapter)
├── EventBus (event-driven communication)
├── UnifiedTick (single 50ms master timer)
├── UnifiedStorage (per-character JSON persistence)
│
├── HealBot ←──── player:health events
├── AttackBot ←── TargetBot decisions
├── CaveBot ←──── 250ms waypoint engine
├── TargetBot ←── creature events + Monster AI
│   ├── AttackStateMachine (sole attack issuer)
│   ├── Monster Insights (12 AI modules)
│   └── MovementCoordinator (intent voting)
│
└── Hunt Analyzer ←── passive analytics
Pattern Where
Event-Driven EventBus, HealBot, TargetBot
State Machine AttackStateMachine, CaveBot WaypointEngine (NORMAL↔RECOVERING)
Intent Voting MovementCoordinator
LRU Cache Creature configs, pathfinding (4-entry), FC tile cache
PathCursor Preservation Walking engine — cursor survives across ticks for same destination
Step Pipelining Keyboard walking — 2-step lookahead dispatch
One-time Backend Detection PathStrategy resolves pathfinder API once at init
Adaptive Blacklist Decay Recovery — exponential TTL replaces permanent blacklists
EWMA Monster tracking, cooldowns
BFS Traversal ContainerOpener, Looting
Burst Detection Z-change protection

📚 Documentation

Guide Description
📥 Installing Installation for vBot and OTCR
💚 HealBot Healing spells, potions, conditions
⚔️ AttackBot Attack spells, runes, AoE optimization
🧭 CaveBot Navigation, waypoints, supply management
🎯 TargetBot Combat AI, Monster Insights, movement
📦 Containers Container management, quiver system
📊 Hunt Analyzer Session analytics and insights (SmartHunt)
🛠️ Extras & Tools Safety, equipment, utilities
🏗️ Architecture Technical design and internals
Performance Optimization and tuning
FAQ Troubleshooting and common questions

🤝 Contributing

See CONTRIBUTING.md for guidelines.

Warning

Always test your changes on multiple servers before submitting a PR. Follow existing Lua style (2-space indentation) and update docs for notable changes.


📄 License

MIT License — see LICENSE file for details.