- Joined
- Aug 5, 2008
- Messages
- 1,581
- Reaction score
- 80
1. When you open a NPC.xml file it will look like this [in most cases]
This is boring, because when a NPC looks like this, it will only greet the player and will say goodbye to the player. So it have no use actually.
-----------------
2. Too make the NPC more fun to interact with you need to edit it.
How about changing the greet & farewell messages and also adding some keywords
Let me explain the keywords functionality
This is very important, you need it to activate the keyword function
This is how the keyword works, you can make 1-100 keywords if you like but remember to change the number 1-2-3-4-5-6 etc.
---------------------------------------------
3. If you want to add a function like a hint on what to ask next you do this
When you put {around} the word it will be highlighted.
Example:
--------------
That should do the trick, these are the basics needed to create NPC's.
Good luck!
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Avar Tar" script="default.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="73" head="20" body="30" legs="40" feet="50" addons="0"/>
</npc>
<parameters>
<parameter key="message_greet" value="Hello |PLAYERNAME|."/>
<parameter key="message_farewell" value="Goodbye."/>
<parameter key="message_walkaway" value="Goodbye." />
</parameters>
-----------------
2. Too make the NPC more fun to interact with you need to edit it.
How about changing the greet & farewell messages and also adding some keywords
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Avar Tar" script="default.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="73" head="20" body="30" legs="40" feet="50" addons="0"/>
</npc>
<parameters>
<parameter key="message_greet" value="Hello |PLAYERNAME|. Why are you here?"/>
<parameter key="message_farewell" value="Farewell |PLAYERNAME|..."/>
<parameter key="message_walkaway" value="Hmph, you keep walking..." />
[COLOR="Red"]
<parameter key="module_keywords" value="1" />[/COLOR]
<parameter key="keywords" value="[COLOR="Blue"]job[/COLOR];[COLOR="Blue"]name[/COLOR];[COLOR="Blue"]quest[/COLOR];" />
<parameter key="[COLOR="Blue"]keyword_reply1[/COLOR]" value="Im an Avar Tar, you know.. a picture on a forum." />
<parameter key="[COLOR="Blue"]keyword_reply2[/COLOR]" value="I'd got the name from my master. Nobody understands it." />
<parameter key="[COLOR="Blue"]keyword_reply3[/COLOR]" value="I know some quests but.. i don't think you will finish them, you low level noob.." />
</parameters>
This is very important, you need it to activate the keyword function
Code:
[COLOR="Red"]<parameter key="module_keywords" value="1" />[/COLOR]
This is how the keyword works, you can make 1-100 keywords if you like but remember to change the number 1-2-3-4-5-6 etc.
Code:
<parameter key="keywords" value="job[COLOR="Blue"](keyword1)[/COLOR];name[COLOR="Blue"](keyword2)[/COLOR];quest[COLOR="Blue"](keyword3)[/COLOR];" />
3. If you want to add a function like a hint on what to ask next you do this
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Avar Tar" script="default.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="73" head="20" body="30" legs="40" feet="50" addons="0"/>
</npc>
<parameters>
<parameter key="message_greet" value="Hello |PLAYERNAME|."/>
<parameter key="message_farewell" value="Farewell |PLAYERNAME|..."/>
<parameter key="message_walkaway" value="Hmph, you keep walking..." />
<parameter key="module_keywords" value="1" />
<parameter key="keywords" value="job;name;quest;" />
<parameter key="keyword_reply1" value="Im an Avar Tar, you know.. a picture on a forum." />
<parameter key="keyword_reply2" value="When I was young I did a [COLOR="Red"]{quest}[/COLOR] and i had to find a forum and then I got the name from the administrator. " />
<parameter key="keyword_reply3" value="I know some quests but.. i don't think you will finish them, you low level noob.." />
</parameters>
Example:
--------------
That should do the trick, these are the basics needed to create NPC's.
Good luck!
Last edited: