[Script + Sprites] Leifan Otome - Interactive Prontera Patrol, Companion & Dijkstra Guide NPC (ES/EN)
============================================================================= 🌍 [🇬🇧 English speakers: Scroll down to the bottom for the English version!] 🌍 [🇪🇸 Para español, continúa leyendo…
by Mackuber · listed Nov 21, 2026
===================================================================================
[ English speakers: Scroll down to the bottom for the English version!]
[ For Spanish, continue reading below:]
===============================================================================
Hello rAthena community!
I'm sharing with you an interactive and dynamic NPC for Prontera: Leifan Otome, a guide and guardian of the Rune-Midgarts capital designed to bring much more life, immersion, and utility to the main city.
Unlike traditional static guides who only mark a point on the minimap, Leifan walks the real streets of Prontera, can accompany you by your side commenting on each place you pass and guides you on foot along the shortest real route to any building, exit, Kafra or shop.
This NPC was created using the Character Forge tool shared here on the forum by @Bokiebok, and I'm making it available along with its sprites and script as a practical example so you can see all the possibilities it offers for support NPCs, guides, patrols, or companions.
-----------------------------------------------------------------------------
MAIN FEATURES
-----------------------------------------------------------------------------
1. Real Autonomous Patrol (60 Waypoints):
- Travels a complete ring of 60 real-world coordinates through all the streets, squares, gates, and markets of Prontera.
- Uses 10-cell sub-steps to avoid MAX_WALKPATH limits and features an automatic anti-jam detector.
- At 22 key stops, it focuses its gaze on the building or point of interest and makes natural, voiced guard comments.
2. Companion Mode + Automatic Tourist Radar:
- Walks beside you, maintaining a comfortable distance of 3 cells.
- When passing near any of Prontera's 22 landmarks (blacksmith, inn, church, castle, guilds, southern market, shops, or Kafras), it automatically explains what services each location offers using fixed spatial references on the map.
- Includes an "Information about this place" option at any time to check the nearest point of interest.
3. Intelligent Guide Mode ("Take me to...") with Dijkstra's Algorithm:
- Integrates a bidirectional navigation graph connecting the 60 tourist attractions with 14 nodes on Prontera's main avenues.
- Mathematically calculates the shortest path in real cells from your current location to any of the 22 available destinations, skipping unnecessary dead ends.
- If you fall behind (> 9 cells), Leifan stops, assumes a guard position (10703), and waits for you, calling your name so you don't get lost.
4. Dynamic Animations by State (Sprites 10700 - 10703):
- 10700: Still / waiting.
- 10701: Walking.
- 10702: Crouching / talking posture when speaking to the player.
- 10703: Guarding / waiting for the lagging player.
5. Protections and Stability:
- Anti-theft protection: Prevents another player from kidnapping the NPC while it is already accompanying someone, displaying a polite warning.
- Session control: If the player changes maps, disconnects, or lets a menu expire, the NPC clears its state and returns to its initial point (153,183) with a visual effect.
- Clean close (close2;): Prevents window or character movement locks when closing dialogues.
-----------------------------------------------------------------------------
REQUIREMENTS AND INSTALLATION
-----------------------------------------------------------------------------
1. Custom Sprites (.spr and .act):
- Download the attached file "Leifan Otome act and spr.rar" or, if you prefer, download the 8 individual .spr and .act files also attached to this post for your convenience and security, without needing to extract them.
- Place the 8 files in the data/sprite/npc/ folder of your client (or package them in your GRF).
- Register the IDs 10700, 10701, 10702, and 10703 in your client's .lub files:
jobname.lub:
[jobtbl.JT_LEIFAN_OTOME] = "Leifan_Otome",
[jobtbl.JT_LEIFAN_OTOME_WALK] = "Leifan_Otome_walk",
[jobtbl.JT_LEIFAN_OTOME_SIT] = "Leifan_Otome_sit",
[jobtbl.JT_LEIFAN_OTOME_READY] = "Leifan_Otome_ready"npcidentity.lub:
JT_LEIFAN_OTOME = 10700,
JT_LEIFAN_OTOME_WALK = 10701,
JT_LEIFAN_OTOME_SIT = 10702,
JT_LEIFAN_OTOME_READY = 107032. Script Installation:
- Download the attached file leifan_otome_npc.txt (Spanish version) or leifan_otome_npc_en.txt (English version).
- Place it in your npc/custom/ folder.
- Register it in your npc/scripts_custom.conf file:
npc: npc/custom/leifan_otome_npc.txt
- Run @reloadscript in-game or restart the map server.
-----------------------------------------------------------------------------
TEST NOTES AND BUG REPORTS
-----------------------------------------------------------------------------
- The Spanish version has been tested locally and works stably, although in environments with many simultaneous players interacting, some minor issues may arise.
- The English version has been translated maintaining the exact same logic, but has not yet been directly tested within the game.
- If you find any errors, bugs, or unexpected behavior in either file, please report them in this thread so we can review and fix them as soon as possible.
Greetings to the entire community and special thanks to our colleague @Bokiebok for his Character Forge tool!
=======================================================================
TRANSLATED TO ENGLISH VERSION
===================================================================
Hello rAthena community!
I would like to share an interactive and dynamic NPC for Prontera: Leifan Otome, a city guard and tour guide for the capital of Rune-Midgarts designed to bring life, immersion, and real utility to the main town.
Unlike traditional static guides that only place a mark on your minimap, Leifan actively patrols the real streets of Prontera, can walk beside you while describing nearby landmarks, and physically guides you along the shortest path to any building, city gate, Kafra, or shop.
This NPC was created using the Character Forge tool shared here on the forum by fellow member @Bokiebok. I am releasing both the script and the sprite pack as a practical example so you can see all the possibilities this tool offers for support NPCs, tour guides, patrols, or interactive companions.
-----------------------------------------------------------------------------
KEY FEATURES
-----------------------------------------------------------------------------
1. Autonomous Street Patrol (60 Real Waypoints):
- Follows a full 60-coordinate loop covering Prontera's main avenues, squares, gates, and markets.
- Moves in 10-cell sub-steps to stay safely within MAX_WALKPATH limits and includes automatic anti-stuck detection.
- At 22 key landmarks, she turns toward the building and speaks immersive patrol lines aloud.
2. Companion Mode + Automatic Tourist Radar:
- Follows smoothly at a 3-cell distance while you explore the city.
- Whenever you pass near any of the 22 Prontera landmarks (Forge, Inn, Sanctuary, Castle, Chivalry, Grade Enhancement, South Market, Shops, or Kafras), she automatically explains what services are available using fixed map references.
- Includes an "Information about this place" option at any time to ask about your current surroundings.
3. Smart Guide Mode ("Take me to...") with Dijkstra Shortest-Path Routing:
- Uses a bidirectional navigation graph connecting all 60 patrol waypoints with 14 main avenue nodes across Prontera.
- Computes the exact shortest path in cells from your current position to any of the 22 destinations, bypassing unnecessary dead-end alleys.
- If you fall behind (> 9 cells), Leifan stops, switches to her guard stance (10703), and waits for you so you never lose sight of her.
4. Dynamic State Sprites (10700 - 10703):
- 10700: Idle / standing.
- 10701: Walking.
- 10702: Crouching / talking stance when interacting with a player.
- 10703: Guard stance / waiting for a lagging player.
5. Safety & Anti-Lock Controls:
- Anti-hijack protection: Prevents other players from taking over the NPC while she is actively escorting someone, displaying a polite notice instead.
- Session watcher: Automatically resets her state and returns her to 153,183 with a visual effect if the escorted player leaves Prontera, logs out, or lets a prompt time out.
- Clean dialog closing (close2;): Prevents client window freezes or movement locks when closing menus.
-----------------------------------------------------------------------------
REQUIREMENTS & INSTALLATION
-----------------------------------------------------------------------------
1. Custom Sprites (.spr and .act):
- Download the attached "Leifan Otome act y spr.rar" archive, or if you prefer, download the 8 individual .spr and .act files also attached directly to this post so you don't need to extract any archive.
- Place all 8 files inside your client's data/sprite/npc/ folder (or pack them into your GRF).
- Register sprite IDs 10700, 10701, 10702, and 10703 in your client's .lub files:
jobname.lub:
[jobtbl.JT_LEIFAN_OTOME] = "Leifan_Otome",
[jobtbl.JT_LEIFAN_OTOME_WALK] = "Leifan_Otome_walk",
[jobtbl.JT_LEIFAN_OTOME_SIT] = "Leifan_Otome_sit",
[jobtbl.JT_LEIFAN_OTOME_READY] = "Leifan_Otome_ready"npcidentity.lub:
JT_LEIFAN_OTOME = 10700,
JT_LEIFAN_OTOME_WALK = 10701,
JT_LEIFAN_OTOME_SIT = 10702,
JT_LEIFAN_OTOME_READY = 107032. Script Setup:
- Download the attached leifan_otome_npc_en.txt (English version) or leifan_otome_npc.txt (Spanish version).
- Place the file inside your npc/custom/ folder.
- Add the entry to your npc/scripts_custom.conf:
npc: npc/custom/leifan_otome_npc_en.txt
- Run @reloadscript in-game or restart your map-server.
-----------------------------------------------------------------------------
TESTING NOTES & BUG REPORTS
-----------------------------------------------------------------------------
- The Spanish version has been tested locally and runs smoothly, though edge cases…
Known issues
No known issues yet.