How to code NPc

02/23/2010 20:20 folip5#1
If someone could post some tutorials how to code NPC's i don't mean only the NPC's DIALOG !!!Kai? I mean the whole npc coding how to and where to :P
thanks
02/23/2010 21:11 Huseby#2
Wrong section.

#Moved
02/23/2010 21:47 PeTe Ninja#3
what source..
02/23/2010 23:10 Decker_#4
#region Bandit Head <--NPC Name
case 047565: <--- case number
{
if (Control == 0) <--first is always 0
{
GC.AddSend(Packets.NPCSay("TEXT HERE")); //NPCSay is always what the NPC says
GC.AddSend(Packets.NPCLink("TEXT HERE", 1)); //NPCLink is what the character says
GC.AddSend(Packets.NPCLink("Just passing by", 255));
GC.AddSend(Packets.NPCSetFace(30));
GC.AddSend(Packets.NPCFinish());
{
if (Control == 1) <---2nd control is always 1 {
GC.AddSend(Packets.NPCSay(""));
GC.AddSend(Packets.NPCLink("Ok", 255)); //everytime u want to end the conversation u end it with the number 255
GC.AddSend(Packets.NPCLink("Just passing by", 255));
GC.AddSend(Packets.NPCSetFace(30));
GC.AddSend(Packets.NPCFinish());
}
}
}
break;
}
#endregion

I explained the best I could.
By the way, this is only for source 5165.