The teleport NPC lets you turn any NPC in the game into a "teleport station". The player clicks the NPC, a window appears to choose a destination; each destination can charge Zen and require a minimum level, reset count or VIP. The destination can be on the same sub-server or on a different sub-server.

Requirements

  • The PluginPlus feature has been purchased and Data\Plugin\Plugin.ini has PluginPlus = 1 (see PluginPlus).
  • Enable="1" in Data\Plugin\NPCMoveMap.xml. If any of the three conditions is missing, the system is completely disabled (the NPC still stands there but opens nothing).
  • The client needs the new Main.dll and two interface files: Data\Interface\GFx\NpcMoveMsg.ozg (message box style) and Data\Interface\GFx\NpcMoveList.ozg (list style).

How to set up a teleport NPC

  1. Choose an NPC in Data\Monster\MonsterList.xml (type Type = 4), for example ID 583.
  2. Make the NPC appear in Data\Monster\MonsterSpawn.xml with the attribute NpcFunction="npc_move_map":
    <Spawn Index="583" StartX="130" StartY="123" Dir="3" NpcFunction="npc_move_map" />
  3. Add an <Npc Index="583"> block in NPCMoveMap.xml. Every spawn point of that NPC ID that has NpcFunction="npc_move_map" shares this configuration.
  4. Click the Reload plugin button in the GameServer control panel.
An NPC that already has its own dialogue (an event NPC with a script) may not open this window. It is best to choose an NPC with no other function.

Configuration

File: Data\Plugin\NPCMoveMap.xml. Comments must not be written inside tags.

NPCMoveMap tag

KeyValueDefaultMeaning
Enable0 / 10 (when the attribute is missing)Disables / enables the whole system.

Npc tag

KeyValueDefaultMeaning
Indexnumber ≥ 0-1 (block is skipped)NPC ID in MonsterList.xml. A block with a negative Index is skipped.
Ui1 or 21Window style. 1 = message box (title + content + OK / Cancel buttons; OK teleports to the FIRST <Move>). 2 = list (a command window opens on the left of the screen, draggable; each <Move> is a button; the Text content is not shown). Any value other than 2 is treated as 1.
TitlestringemptyWindow title (up to 1000 bytes).
TextUTF-8 stringemptyWindow content; /n = line break (up to 1000 bytes).

Each <Npc> reads up to 11 <Move> tags (the number of buttons in the list window); extra tags are ignored. An <Npc> block with no valid <Move> is skipped and an error is written to the log.

Move tag

KeyValueDefaultMeaning
NamestringemptyText on the button (Ui="2" style); up to 60 bytes.
Serversub-server code, or -1-1Code of the sub-server to move to (ServerCode in GameServer.conf). -1 = the sub-server that holds that map (the current server itself if the map is located here).
Gategate ID, or -1-1Gate ID in Data\World\GateTemplate.xml; a gate already has its map and coordinates. -1 = do not use a gate. When using Gate, do NOT write Map / X1 / Y1 / X2 / Y2: if both are written, GameServer writes an error to the log and uses Gate. A gate that does not exist → this destination is skipped.
Mapmap number-1Used only when Gate = -1. If neither Gate nor Map is present → the destination is skipped.
X1, Y1coordinates0First corner of the destination area (only when Gate = -1).
X2, Y2coordinatesequal to X1 / Y1Last corner of the area. The character appears at a random walkable cell within the area.
Zennumber ≥ 00Zen fee; 0 = free. When moving to a different sub-server, the Zen is deducted once the login server accepts the move.
MinLevelnumber0Minimum level (normal level + master / majestic level); 0 = no requirement.
MinResetnumber0Minimum reset count; 0 = no requirement.
VIPVIP ID, or -1-1Minimum VIP (ID in Data\VIPSystem.xml); -1 = no VIP needed.

Conditions when the player selects a destination

In order: level, reset, VIP, enough Zen, then not being in self-defense state. In addition, the server rejects the request (silently, only writing a log) if the NPC is not near the player, or if the player is dead / respawning / teleporting.

Configuration example

<NPCMoveMap Enable="1">
	<Npc Index="583" Ui="2" Title="Travel" Text="Where do you want to go?">
		<Move Name="Lorencia" Server="-1" Gate="17" Zen="0" MinLevel="0" MinReset="0" VIP="-1" />
		<Move Name="Noria" Server="-1" Gate="27" Zen="1000" MinLevel="10" MinReset="0" VIP="-1" />
		<Move Name="Loren Market" Server="-1" Gate="-1" Map="79" X1="56" Y1="74" X2="58" Y2="77" Zen="0" MinLevel="0" MinReset="0" VIP="-1" />
	</Npc>
	<Npc Index="584" Ui="1" Title="Julia" Text="If you go to the market in Lorencia,/nyou'll find many items you need.../nWould you like to go to the market?">
		<Move Name="Loren Market" Server="-1" Gate="333" Zen="0" MinLevel="0" MinReset="0" VIP="-1" />
	</Npc>
</NPCMoveMap>

Error messages (Lang)

The red messages sent to the player are in the NPCMoveMap section of the Data\Lang\*.xml files:

IDContent (English)When
1You need level %d to move.Level too low (MinLevel)
2You need %d resets to move.Not enough resets (MinReset)
3You need VIP %d to move.VIP too low
4You need %d zen to move.Not enough Zen
5You can't move while self defense is active.In self-defense
6This destination is not available.Destination gate / map does not exist

Reloading the configuration

Click Reload plugin in the GameServer control panel. At startup, the file is loaded after GateTemplate.xml has been loaded (to validate Gate). The log writes a line [NPCMoveMap] NPCMoveMap.xml loaded ... showing the Enable state, PluginPlus and the number of NPCs.