Ok well I though I would release the basic NPCDialog and how to make an npc with the entry in NPC.txt so here
we go
Ok so every npc will start of with a
and were it says
you
can change to what ever you want it to be so, next you will have this
you can change
the
with a random number 1-6 digits but we will come back to that so we have this
Code:
#Region npcname //The name of NPC
case 123456: // case number
{
if (Control == 0);
{
and next we add an
the { is opening the case so we have this
Code:
#Region npcname // The name of NPC
case 123456: // case number
{
if (Control == 0);
{ // Opening the case
Oh and I forgot at the begging of EVERY NPC it has
ok so next we add the dialog witch looks like this
Code:
GC.MyChar.AddSend(Packets.NPCSay("Hello this is my first npc"));
ok so were is says
Code:
Hello this is my first npc
you can change that with whatever you want

ok so now it looks like
this
Code:
#Region npcname // The name of NPC
case 123456: // case number
{
if (Control == 0);
{ // Opening the case
GC.MyChar.AddSend(Packets.NPCSay("Hello this is my first npc")); // What the NPC says
ok so now we want a link also known as when you can click Yes or No or whatever so this is how its done
Code:
GC.MyChar.AddSend(Packets.NPCLink("Yes", 2));
GC.MyChar.AddSend(Packets.NPCLink("No", 255));
ok so just change the Yes and the No to whatever you want now your gonna want to know what the
Code:
", 2)); and the ", 255));
well the ", 255)); is on the No and 255 is to end the npc so
when you click the no it will end the npc ok so on to the
well thats goes to the
second part of the npc so far we have this
Code:
#Region npcname // The name of NPC
case 123456: // case number
{
if (Control == 0);
{ // Opening the case
GC.MyChar.AddSend(Packets.NPCSay("Hello this is my first npc")); // What the NPC says
GC.MyChar.AddSend(Packets.NPCLink("Yes", 2)); // Second part of npc
GC.MyChar.AddSend(Packets.NPCLink("No", 255)); // To end the npc
Ok and to finish a peace of dialog we ALWAYS add this
Code:
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
ok so this is the npc so far
Code:
#region npcname
case 987787:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("This is my first npc"));
GC.AddSend(Packets.NPCLink("Yes.", 2));
GC.AddSend(Packets.NPCLink("No.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
right I want to hurry this up so... after that on the second part of the npc will look the same nearly
it will look like this, this will give the player 200CPs
Code:
if (Control == 2)
{
GC.MyChar.CPs += 200;
GC.MyChar.AddSend(Packets.NPCSay("This is my second-part npc"));
GC.AddSend(Packets.NPCLink("Thank you.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
and to end an npc after we done it all after the } we add this
Code:
break;
}
#endregion
so this is our finished npc
Code:
#region npcname
case 987787:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("This is my first npc"));
GC.AddSend(Packets.NPCLink("Yes.", 2));
GC.AddSend(Packets.NPCLink("No.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 2)
{
GC.MyChar.CPs += 200;
GC.MyChar.AddSend(Packets.NPCSay("This is my second-part npc"));
GC.AddSend(Packets.NPCLink("Thank you.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
break;
}
#endregion
and that an npc
Ok so next im going to teach you is how to make a comment on a line of code a comment looks like this
Code:
// This is a comment
so lets use our npc for an example
Code:
#region mynpc
if (Control == 0)
{
GC.MyChar.CPs += 200;
GC.MyChar.AddSend(Packets.NPCSay("This is my second-part npc")); //This is a comment and the program wont read this comment :)
GC.AddSend(Packets.NPCLink("Thank you.", 255)); //This is a comment to
GC.AddSend(Packets.NPCSetFace(N.Avatar)); //So is this a comment
GC.AddSend(Packets.NPCFinish()); // AND THIS IS ANOTHER COMMENY jeez lol
} // This is 1 more damn commend haha
and thats an comment
anyway for an npc after a
do give the character some cps you can do
Code:
GC.MyChar.CPs += 200;
and to take away cps do this
Code:
GC.MyChar.CPs -= 200;
and for silvers do this
Code:
GC.MyChar.Silvers += 200;
And to remove the silvers do this
Code:
GC.MyChar.Silvers -= 200;
and for both you can do something like this
Code:
GC.MyChar.CPs -= 200;
GC.MyChar.Silvers += 29929292;
that will remove 200 cps and add 29929292 Silvers ok,
so for the teleport a character again after the
you can do something like
Code:
GC.MyChar.Teleport(1004, 068, 123);
Ok so the (1004 is the map ID and the 068, is the X-cord and the 123 is the Y-Cord and that code will teleport you to
the promotion center and near a corner
ok the
[code]
case 123456:
[/CODE}
right you can change that to a UNIQUE number so first go into
Code:
OldCODB/ and open up NPC.txt
and do a CTRL + F and search a unique number and if it says
you can use it so at the end of the file add this
[code]
123456 8099 2 28 1002 456 378
[CODE]
ok so change the 123456 to your number that you chose ok and the
is the map id, X-Cord, Y-Cord so the mapid ycord xcord and thats all there is to it click File-Save and there you are
you have added an npc
this took me A LONG TIME to write out like 1 hour writing this out mainly because I wanted to test out my new
Notepad++ and it is very nice So far I have type 190 lines lol
Please hit +Thanks THIS IS ALL MY WORK NOT LEECHED ONE LITTLE BIT!