2kbarrows
October 9th, 2010, 13:05
Hello, on this tutorial i will show you how to spawn NPCs Edit NPCs and more...
Table of contents:
1.Spawning them
2.Editing them
1.Spawning them
Ok so why don't you go ahead and open up npcs.xml
<npc><id>520</id><location><x>2104</x><y>3919</y><z>0</z></location></npc>
There is one npc obviously...
Ok so <npc> is opening 1 npc, <id> is the npc id... In this case a ShopKeeper now <location> which is where he is aka X 2104 Y 3919 and he is at hight 0...
Remember you HAVE to close every tag you open...
2.Editing Them
<npcDefinition>
<id>5529</id>
<name>yak</name>
<combat>1000</combat>
<hitpoints>80</hitpoints>
<maxHit>5</maxHit>
<attackSpeed>7</attackSpeed>
<attackAnim>5782</attackAnim>
<defenceAnim>5783</defenceAnim>
<deathAnim>5784</deathAnim>
</npcDefinition>
Ok so this like the spawning them code is XML and you HAVE to close all tags you open...
Ok so starting a definition you make a
<npcDefinition> You are only going to close that tag when you finish the definition...
Then comes the npc id... Which in this case iss 5529..
Then the name which is yak you can make it whatever you like...
After that is the Combat Hitpoints and etc... You can chnage the animations of the attack defence and death sooo...yeeaaa...
Then finally you close the npc definition.. You can make and edit npcs with this...
Table of contents:
1.Spawning them
2.Editing them
1.Spawning them
Ok so why don't you go ahead and open up npcs.xml
<npc><id>520</id><location><x>2104</x><y>3919</y><z>0</z></location></npc>
There is one npc obviously...
Ok so <npc> is opening 1 npc, <id> is the npc id... In this case a ShopKeeper now <location> which is where he is aka X 2104 Y 3919 and he is at hight 0...
Remember you HAVE to close every tag you open...
2.Editing Them
<npcDefinition>
<id>5529</id>
<name>yak</name>
<combat>1000</combat>
<hitpoints>80</hitpoints>
<maxHit>5</maxHit>
<attackSpeed>7</attackSpeed>
<attackAnim>5782</attackAnim>
<defenceAnim>5783</defenceAnim>
<deathAnim>5784</deathAnim>
</npcDefinition>
Ok so this like the spawning them code is XML and you HAVE to close all tags you open...
Ok so starting a definition you make a
<npcDefinition> You are only going to close that tag when you finish the definition...
Then comes the npc id... Which in this case iss 5529..
Then the name which is yak you can make it whatever you like...
After that is the Combat Hitpoints and etc... You can chnage the animations of the attack defence and death sooo...yeeaaa...
Then finally you close the npc definition.. You can make and edit npcs with this...