An autonomous game-playing decision engine for Tibia (Open Tibia / OTServ) powered by TypeSafe AI's Jev System One model.
Unlike conversational LLMs that take 2-3 seconds to generate text, Jev returns typed probabilistic judgments in ~250ms, making it fast enough to keep pace with Tibia's 200ms global cooldowns, monster combos, and kiting mechanics.
┌────────────────────────────────────────────────────────┐
│ OTClient (Tibia Client) │
│ │
│ lua/jev_bot/jev_bot.lua │
│ - Polls g_game and g_map every 250ms │
│ - Packages HP, Mana, Position, Monsters into JSON │
│ - Sends POST http://localhost:3000/tick │
└───────────────────────────┬────────────────────────────┘
│ HTTP POST (Game Snapshot)
▼
┌────────────────────────────────────────────────────────┐
│ Node.js Bot Server (src/server.ts) │
│ │
│ src/engine/jevTibiaBrain.ts │
│ - Parallel Jev System One questions: │
│ 1. Survival & Healing (choice) │
│ 2. Critical Lethal Danger (noul) │
│ 3. Target Prioritization (choice among visible mobs)│
│ 4. Offensive Spell/Rune (choice) │
│ 5. Kiting & Tactical Movement (choice) │
│ - Translates decisions into executable actions │
└───────────────────────────┬────────────────────────────┘
│ HTTP Response (Actions JSON)
▼
┌────────────────────────────────────────────────────────┐
│ OTClient Execution │
│ - g_game.talk("exura vita") │
│ - g_game.attack(creature) │
│ - g_game.useInventoryItemWith(3155, target) │
│ - g_game.walk(direction) │
└────────────────────────────────────────────────────────┘
You can immediately watch Jev fight in an Ankrahmun Dragon Lair simulation directly in your terminal:
npm run simulateVerifies critical HP emergency healing, wounded target prioritization, and mana recovery:
npm testStart the server listening for ticks from OTClient on port 3000:
npm start- Locate your OTClient directory (e.g.
otclient-v8or standardotclient). - Copy the module:
cp -r lua/jev_bot <your_otclient_path>/modules/
- Launch OTClient and log in to your OTServ.
- Click the "Jev AI Bot" button on the top menu (or open the module) and click "Start Jev Bot".
- The bot will begin streaming ticks to
http://localhost:3000/tickand executing Jev's decisions!
In every 250ms cycle, Jev evaluates:
survival_action(choice): Selectscast_exura_vita,cast_exura_gran,cast_exura,use_health_potion,use_mana_potion,cast_utamo_vita, ornone.is_critical_danger(noul): Probabilistic judgment of whether incoming burst damage is lethal.target_selection(choice): Analyzes all visible monsters in the battle list and targets the optimal mob (e.g. wounded dragons to quickly reduce incoming damage).offensive_action(choice): Decides whether to cast single-target strike spells (exori frigo), Sudden Death runes (SD), area runes (GFB / Avalanche), or auto-attack.tactical_movement(choice): Decides whether to kite backwards, diagonal-step to dodge monster breath/waves, or hold ground.