my my, didnt expect this :P
if anyone was having difficulty with the npcs, this is taken from my private dev forum which i used to keep track of what i added to the server as i worked on it:
Quote:
Ok im currently in the process of creating my npc system,
This system will be one of the simplist npc systems out there....thats my aim anyway.
Here are the current list of available commands and their uses:
Replace <value> with whatever you want it to be so <value> becomes 50
Replace <string> with some text, for example <string> becomes: Hi there this is an example
Set Npcface to any avatar that the game supports just like the clients faces,
Set Dialog to whichever dialog your working on, for example the first Dialog which the client sees is Dialog=0, the client will always request Dialog 0 when you click on the npc.
This is what the npc will say for the dialog, for example, if i want the npc to say "Hi there im an example npc" i would write: Text=Hi there im an example npc
Code:
Option=<string>=<value>
For this command you need to add to things, what the option will say, and where the client will be taken once they click that option, fairly simple example: Option=Goto Dialog 1=1
you can have multiple options upto a total of 8, any more will cause the client to crash (ive yet to limit this)
[random]im considering adding in functionality where by the server will create a second page, on the first page will be options 1 - 6 and a next option, when clicking next it will take you to the next page with the remaining options and a back button, however this may not happen[/random]
Completes the Dialog, this is only require when your atualy going to display a dialog, for example if i were to just have a dialog with no text and no options the client would not be sent any information so theres no need to finsh the dialog,
this requires no finsh command:
Code:
Dialog=1
Teleport=1002 422 366
this requires a finsh command:
Code:
Dialog=1
Text=This is a test for dialog 1
Option=Example1=2
Option=Back=0
Finsh
Code:
Teleport=<value1> <value2> <value3>
This teleports the user to a target map and cordinates, value1 is the map id, value2 is the x cord and value3 is the y cord, please ensure that you do correctly set the x and y cordinates otherwise people could get into all sorts of trouble xD
Code:
Item=<value1> <value2> <value3> <value4> <value5> <value6> <value7> <value8> <value9>
The item command allows you to create items within someones inventory, i know theres alot of values x_X
value1 is the itemid, value2 is the plus, value 3 is the minus, value 4 is the enchant, value 5 is soc1, value6 is soc2, value7 is currentdura, value8 is maxdura, value9 is the amount.
yeah i know its alot to remember but i dont want to have to make changes further down the line and make modifications to loads of npcs, this system is being built to last.
Code:
FindItem=<value1>=<value2>
ok, the find item command (Added while writing this)
it will return the total amount of items it found in your inventory, value1 is the number of the variable your assigning and value2 is the itemid you want to find,
you can then access the item by using <value1>
heres an example because it can be difficult to grasp
Code:
FindItem=0=1088000
Text=You have <0> Dragonballs in your inventory
Code:
Variable=<value1>=<value2>
this allows you to assign values and use them like the find items variables,
value1 is the variable your assigning, value2 is the value,
Code:
Variable=1=1088000
Text=You have <0> <1>s in your inventory
please note that the variables you assign only exist within the dialog you assign them in.
something you assign within dialog1 will not exist within dialog2
And heres a random example npc which has abit of everything in it
Code:
NpcFace=50
Dialog=0
Text=This is a test for dialog 0
Option=Dialog1=1
Option=Find Items=4
Option=Teleport=3
Option=Create Item=2
Finsh
Dialog=1
Text=This is a test for dialog 1
Option=Dialog4=4
Option=Start=0
Finsh
Dialog=2
Item=1088000 0 0 0 0 0 1 1 1
Dialog=3
Teleport=1002 422 366
Dialog=4
FindItem=0=1088000
Variable=1=1088000
Text=You have <0> <1>s in your inventory
Option=Start=0
Option=Dialog1=1
Finsh
|
Also, the server was coded in the 2005 edition of visual studio, ive no idea why it doesnt build in the 2008 edition, perhaps theres an import function you could use or something, if not then just download the 2005 c# express edition >_>