Question about (case) in coding NPCDialog!

04/04/2011 00:22 BlackCitadel#1
Hello,
What case means?? and how do I know the exact number of case I should type?
For example, for Barber NPC, it's:
#region Barber
case 10002:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Would you like to change your hairstyle? I can offer you a change for 500 silvers. You can choose from the styles below."));

Why case here is (10002)??!! I thought the case number should be the NPC ID, please any help, so I can write the case for the NPC I add.
04/04/2011 00:31 Just2Me#2
The case mean the npc id you
can change it
04/04/2011 00:38 iStefan#3
[Only registered and activated users can see links. Click Here To Register...]
04/04/2011 02:23 pro4never#4
And yes.. the switch id is the id of the npc ID in this case.
04/04/2011 04:00 BlackCitadel#5
I have added a new NPC and made a code for him by editing it in NPCDialog in
rikardo updated>PacketHandling>NPCDialog but the NPC still tells me I am a blank npc I still don't talk anything useful my ID is 1270, I also edited an already existed NPC Dialog which is (Barber) in TwinCity, I edited it and then saved the changes and logged in my server but she still say the old message although I changed it, here is the example:-

#region Barber
case 10002:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Would you like to change your hairstyle? I can offer you a change for 500 silvers. You can choose from the styles below."));
GC.AddSend(Packets.NPCLink("New Styles", 1));
GC.AddSend(Packets.NPCLink("Nostalgic Styles", 2));
GC.AddSend(Packets.NPCLink("Special Styles", 3));
GC.AddSend(Packets.NPCLink("No thanks.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
GC.Paid = false;

And I changed the message which is in:
GC.AddSend(Packets.NPCSay("Would you like to change your hairstyle? I can offer you a change for 500 silvers. You can choose from the styles below."));

I made it:
GC.AddSend(Packets.NPCSay("What do you want?"));
and saved the changes and when I logged into the server she still says:-

Would you like to change your hairstyle? I can offer you a change for 500 silvers. You can choose from the styles below.

Anyone can say, why the hell the changes can't be modified into the server?
Am I doing something wrong or I missed anything?? Should I modify any file else than the NPCDialog.c3
04/04/2011 08:33 Syst3m_W1z4rd#6
Did you build or debug in C#?
04/04/2011 12:01 BlackCitadel#7
No, I only modified the NPCDialog.c3 file by opening it as a Notepad..
Should I build or debug the NPCDialog file in the C# after editing it in the Notepad??
04/04/2011 12:17 Korvacs#8
You should do all of your modifications through Visual Studio/C# Express, never in notepad. And then you should build your project using F6 if you just wish to build, F5 if you wish to perform some debugging.
04/04/2011 13:00 BlackCitadel#9
OK, I changed it and opened it in Visual C# Express and then pressed F6 (Build Solution)
[Only registered and activated users can see links. Click Here To Register...]

And in the server she still says her old message:-
[Only registered and activated users can see links. Click Here To Register...]

Why it can't be changed in the game?!!
04/04/2011 13:37 Korvacs#10
Because after building it your then running the wrong .exe :facepalm:
04/04/2011 14:44 BlackCitadel#11
ohh then what .exe should I run?
04/04/2011 14:46 Korvacs#12
If you hit F6 your building the release version, which is the version you should be using to run the server.

If you hit F5 your building the debug version, which is not the version you should be using to run the server as its built specifically for debugging.

So the release version.
04/04/2011 15:27 BlackCitadel#13
So, what .exe should I run?
04/04/2011 15:32 Korvacs#14
So...use your brain, goto the folder where your source is, then goto the bin folder, and then see if you can figure it out from there.
04/04/2011 15:43 BlackCitadel#15
Is there any video guide about adding NPCs to the server, so I can download to easily understand?