Ok ill post an NPC guide i got from a very good friend PeTeNinja which explaines a lot, so next time you can try before asking!
(Credits to PeTeNinja!!!!!!!)
Here it is:
The first part of the NPC
Code:
if (CurrentNPC == 1000076) // Our First NPC
{
SendPacket(General.MyPackets.NPCSay("You want your nooby crap?"));
SendPacket(General.MyPackets.NPCLink("Heck yeah!", 1));
SendPacket(General.MyPackets.NPCLink("whats in it?", 2));
SendPacket(General.MyPackets.NPCLink("NO ill do it myself.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
The Second:
Code:
if (CurrentNPC == 1000076) // Our First NPC Do ( now you want to have the same UID there you see? )
{
if (Control == 1 && MyChar.ItemsInInventory <= 33)
{
MyChar.AddItem("480339-9-7-255-13-13", 0, (uint)General.Rand.Next(36457836));
MyChar.AddItem("723700-0-0-0-0-0", 5, (uint)General.Rand.Next(36457836));
MyChar.AddItem("723017-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));
MyChar.LearnSkill(7020, 9);
}
if (Control == 2)
{
SendPacket(General.MyPackets.NPCSay("Well... you get a maxed out level 130 club and also 5 expballs and 1 exppot, oh and did i forget to mention, FIXED RAGE!!!"));
SendPacket(General.MyPackets.NPCLink("I changed my mind, i do want to get it", 3));
SendPacket(General.MyPackets.NPCLink("NO! THATS STUPID!!!!!", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
else if (MyChar.ItemsInInventory > 33)
{
SendPacket(General.MyPackets.NPCSay("Make sure you have 7 spots left in your inventory =]"));
SendPacket(General.MyPackets.NPCLink("Oh, My Bad", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
Accual Npc Info:
Code:
UID = 1000076
Type = 1170
Name = StarterPackNPC
Flags = 2
Direction = 0
X = 527
Y = 543
Map = 1002
Translations of the Npc Info:
Code:
UID = THIS IS The part that YOU CAN NOT MIX WITH OTHERS!!! this is where you get your coding thing, so if you want to code something with this npc
Type = the real name ofyour npc but it will be put in numbers, one sec
Name = the name that you want to search for , this too
Flags = Shop = 1 ( not sure i forget ) , Reg Npc = 2 ( regular )
Direction = the direction of the npc, basically looking everywhere :D
X = the x-cordinate that the npc will be on ,, will beweird to mix on these
Y = the y-cordinate that the npc will be on
Map = the map the npc is in