Problem when make an NPC

06/17/2010 16:52 xConquerianOx#1
hello everyone,
I have a problem when i make NPCs
I use this code :
#region npcname
case 987787:
{
if (Control == 0 && GC.MyChar.Inventory.Count <= 39)
{
GC.AddSend(Packets.NPCSay("Would you like a free item"));
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.AddItem(721010);
GC.AddSend(Packets.NPCSay("Here you go."));
GC.AddSend(Packets.NPCLink("Thank you.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
break;
}
#endregion

i build it and add it to npc.txt , but when i try to speak with him it say :
"Don't talk with my ID is : 313121"

Can someone help me?
06/17/2010 17:04 .Summer#2
you haven't change the id from 313121 to 987787.
case = id
please in future use the code tag :)
06/17/2010 17:07 Adziunia#3
u have added it wrong... lol do u know how to make npc's?? look at the case and at this "ID is : 313121" maybe u forget or dont know that case in NPCDialog.cs is ID of that NPc in npc.txt
06/17/2010 17:10 .Summer#4
dats what i just said.
You just said it more confusing for him.
LOL

you could have wrote like me:
Quote:
case = id
06/17/2010 17:26 xConquerianOx#5
i change it but still dont working too...
06/17/2010 18:04 .Summer#6
whats your npc.txt, what did u put in there?
06/17/2010 18:10 xConquerianOx#7
313121 1600 2 54 1002 422 378
06/17/2010 18:22 .Summer#8
u still didnt change the id as i just said.
you see you case is the id:
Quote:
case 987787:
in your npc.txt you got this as id:
Quote:
313121
now what do you think you should change?
oh right.
you have to change 313121 to 987787

simply fix.
nothing knowledge needed for this.
just a general iq over 50.
06/19/2010 22:02 xConquerianOx#9
Ehm, man i have the same in source and in npc.txt now its 313121 (I error to copy the first part of code i take it from another NPCm in the code the case in 313121) it dont work alwayz say same things
06/19/2010 22:44 Adziunia#10
frankly it is difficult to understand you u can just show the error or pics of how u added that npc to txt and cs files