How to make Spawn NPC or Mobs

The specificity of our server is that we have all the data on the location of the NPC are in XML format.

1. Location data: gameserver\data\spawn
2. You need to create a file for example 96_96.xml with the following contents. In fact, we created an empty file with no spawn.

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE list SYSTEM "spawn.dtd">
<list>
</list>


3. Now go to generate the location of the NPC (spawn).
For Administrator available commands like:
3.1. //spawn_pos npc_id - generates a single spawn. Designed to NOT spawn mobs.Better use for teleporters, Shops etc.
Then our server logs generated the following results

Code:
<spawn name="[custom_spawn]">
<npc id="40010" count="1" respawn="60" pos="82520 149192 -3472 57343" />
</spawn>


3.2. //spawn_loc 300 40010 .Spawn locations (mainly used in what would quickly colonize location) - i.e., we construct a square due to the long edges.
Also in 1 the square, we can add a lot of NPC
We get the following results
Code:
<spawn name="[custom_spawn]">
<mesh>
<vertex x="82306" y="149106" minz="-3472" maxz="-3344" />
<vertex x="82606" y="149106" minz="-3472" maxz="-3344" />
<vertex x="82606" y="149406" minz="-3472" maxz="-3344" />
<vertex x="82306" y="149406" minz="-3472" maxz="-3344" />
</mesh>
<npc id="40010" count="1" respawn="60" />
<npc id="40011" count="1" respawn="60" />
<npc id="40012" count="1" respawn="60" />
</spawn>

We insert the data in our file 96_96.xml and there we have the fact.

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE list SYSTEM "spawn.dtd">
<list>
<spawn name="[custom_spawn]">
<npc id="40010" count="1" respawn="60" pos="82520 149192 -3472 57343" />
</spawn>
<spawn name="[custom_spawn]">
<mesh>
<vertex x="82306" y="149106" minz="-3472" maxz="-3344" />
<vertex x="82606" y="149106" minz="-3472" maxz="-3344" />
<vertex x="82606" y="149406" minz="-3472" maxz="-3344" />
<vertex x="82306" y="149406" minz="-3472" maxz="-3344" />
</mesh>
<npc id="40010" count="1" respawn="60" />
</spawn>
</list>

Now we turn to the meaning of the lines:
npc id="40010" - the ID of the NPC we want adaudit
count="1" - the Number of Mobs or NPC which we need to Caspionet in this square.
Very convenient if we need to quickly populate the entire location. Specify the desired number of SPC
respawn="60" - the Time period after which NPC to appear after death.
name="" - in General anyway, can you specify any convenient. Can just use [custom_spawn]
 
Last edited:
I m doing exactly what this guide is telling me to do and it's spawn 2 mobs even when the count is 1, can you explain me why?

```
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE list SYSTEM "spawn.dtd">
<list>
<spawn name="[custom_spawn]">
<mesh>
<vertex x="-51316" y="145170" minz="-2832" maxz="-2704" />
<vertex x="-51016" y="145170" minz="-2832" maxz="-2704" />
<vertex x="-51016" y="145470" minz="-2832" maxz="-2704" />
<vertex x="-51316" y="145470" minz="-2832" maxz="-2704" />
</mesh>
<npc id="21572" count="1" respawn="60" />
</spawn>
</list>
```
 
I m doing exactly what this guide is telling me to do and it's spawn 2 mobs even when the count is 1, can you explain me why?

```
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE list SYSTEM "spawn.dtd">
<list>
<spawn name="[custom_spawn]">
<mesh>
<vertex x="-51316" y="145170" minz="-2832" maxz="-2704" />
<vertex x="-51016" y="145170" minz="-2832" maxz="-2704" />
<vertex x="-51016" y="145470" minz="-2832" maxz="-2704" />
<vertex x="-51316" y="145470" minz="-2832" maxz="-2704" />
</mesh>
<npc id="21572" count="1" respawn="60" />
</spawn>
</list>
```
probably because you have your mobspawnrate 2x on configs
 
gameserver\data\spawn > open all files with notepad

ctrl+F >find the ID of the mob you want to delete and delete all spawns
 
I need an explanation of how " respawn_rand " works ,

<npc id="20587" count="1" respawn="30" respawn_rand="10" />

Using this you should have a respawn of 30 + 10 random, resulting in 30 - 31 - 32 - 33 - 34 - 35 ... seconds of respawn, correct ?
respawn result is always 30. I can't make it work.
 
I need an explanation of how " respawn_rand " works ,

<npc id="20587" count="1" respawn="30" respawn_rand="10" />

Using this you should have a respawn of 30 + 10 random, resulting in 30 - 31 - 32 - 33 - 34 - 35 ... seconds of respawn, correct ?
respawn result is always 30. I can't make it work.
.
 
Back
Top