we go
Ok so every npc will start of with a
Code:
#Region npcname
Code:
npcname
can change to what ever you want it to be so, next you will have this
Code:
case 123456:
the
Code:
123456
Code:
#Region npcname //The name of NPC
case 123456: // case number
{
if (Control == 0);
{
Code:
{
Code:
#Region npcname // The name of NPC
case 123456: // case number
{
if (Control == 0);
{ // Opening the case
Code:
if (Control == 0);
Code:
GC.MyChar.AddSend(Packets.NPCSay("Hello this is my first npc"));
Code:
Hello this is my first npc
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
Code:
GC.MyChar.AddSend(Packets.NPCLink("Yes", 2));
GC.MyChar.AddSend(Packets.NPCLink("No", 255));
Code:
", 2)); and the ", 255));
when you click the no it will end the npc ok so on to the
Code:
", 2));
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
Code:
GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); }
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());
}
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());
}
Code:
break; } #endregion
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
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
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
anyway for an npc after a
Code:
{
Code:
GC.MyChar.CPs += 200;
Code:
GC.MyChar.CPs -= 200;
Code:
GC.MyChar.Silvers += 200;
Code:
GC.MyChar.Silvers -= 200;
Code:
GC.MyChar.CPs -= 200; GC.MyChar.Silvers += 29929292;
so for the teleport a character again after the
Code:
{
Code:
GC.MyChar.Teleport(1004, 068, 123);
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
Code:
Cannot be find
[code]
123456 8099 2 28 1002 456 378
[CODE]
ok so change the 123456 to your number that you chose ok and the
Code:
1002 456 378
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!






