Skip to content

mCodex/nExBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

321 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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.

About

πŸ€– High-performance Tibia bot for OTClientV8 and Opentibiabr's Otclient with smart targeting, cavebot, healing & multi-client support

Topics

Resources

Contributing

Stars

Watchers

Forks

Contributors

Languages