|
You last visited: Today at 02:32
Advertisement
Question about (case) in coding NPCDialog!
Discussion on Question about (case) in coding NPCDialog! within the CO2 Private Server forum part of the Conquer Online 2 category.
04/04/2011, 00:22
|
#1
|
elite*gold: 0
Join Date: Oct 2008
Posts: 65
Received Thanks: 1
|
Question about (case) in coding NPCDialog!
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
|
#2
|
elite*gold: 0
Join Date: Apr 2011
Posts: 10
Received Thanks: 0
|
The case mean the npc id you
can change it
|
|
|
04/04/2011, 00:38
|
#3
|
elite*gold: 0
Join Date: Mar 2011
Posts: 165
Received Thanks: 17
|
|
|
|
04/04/2011, 02:23
|
#4
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
|
And yes.. the switch id is the id of the npc ID in this case.
|
|
|
04/04/2011, 04:00
|
#5
|
elite*gold: 0
Join Date: Oct 2008
Posts: 65
Received Thanks: 1
|
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
|
#6
|
elite*gold: 0
Join Date: Nov 2010
Posts: 1,162
Received Thanks: 370
|
Did you build or debug in C#?
|
|
|
04/04/2011, 12:01
|
#7
|
elite*gold: 0
Join Date: Oct 2008
Posts: 65
Received Thanks: 1
|
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
|
#8
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
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
|
#9
|
elite*gold: 0
Join Date: Oct 2008
Posts: 65
Received Thanks: 1
|
OK, I changed it and opened it in Visual C# Express and then pressed F6 (Build Solution)
And in the server she still says her old message:-
Why it can't be changed in the game?!!
|
|
|
04/04/2011, 13:37
|
#10
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Because after building it your then running the wrong .exe
|
|
|
04/04/2011, 14:44
|
#11
|
elite*gold: 0
Join Date: Oct 2008
Posts: 65
Received Thanks: 1
|
ohh then what .exe should I run?
|
|
|
04/04/2011, 14:46
|
#12
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
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
|
#13
|
elite*gold: 0
Join Date: Oct 2008
Posts: 65
Received Thanks: 1
|
So, what .exe should I run?
|
|
|
04/04/2011, 15:32
|
#14
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
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
|
#15
|
elite*gold: 0
Join Date: Oct 2008
Posts: 65
Received Thanks: 1
|
Is there any video guide about adding NPCs to the server, so I can download to easily understand?
|
|
|
 |
|
Similar Threads
|
Hi I got little Problems here at 5165 source(NPCDialog.cs)
09/16/2010 - CO2 Private Server - 3 Replies
#region Gw Winner npc
case 8888:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Hello if you win guild war you can recive good prizes!"));
GC.AddSend(Packets.NPCSay("I Can Give You 100k Cps For Wining!!"));
GC.AddSend(Packets.NPCLink("My...
|
npcdialog (5018)
08/01/2010 - CO2 Private Server - 5 Replies
does this look right for npc dialog?
(arco's)
case 333333://test id
{
if (Client.Money >= 100)
{
dialog(Client, new string {
"AVATAR 30",
"TEXT You got 100Silvers",
|
Npcdialog
06/19/2010 - CO2 Private Server - 0 Replies
Helo all i am working on 5180 source i aded mobs spawn some more futures,now i wan add npc dialog not from cq_acion but normal like in coemu etc,but i stacket can any one help my?
|
NPCDialog.cs (LOTF v5017)
04/08/2010 - CO2 PServer Guides & Releases - 15 Replies
This is old...
Replace case 2031 and case 2032 (in client.cs) with these
case 2031:
{
MyChar.Ready = false;
int NPCID = (Data << 24) + (Data << 16) + (Data << 8) + Data;
|
All times are GMT +1. The time now is 02:32.
|
|