Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 16:51

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Using Dialog Options outside of the Npc code

Discussion on Using Dialog Options outside of the Npc code within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2006
Posts: 41
Received Thanks: 2
Using Dialog Options outside of the Npc code

Was just wondering if its possible to use the npc dialog options code outside of the Npc file, and how you would go about it? For instance if i had a quest running where at a certain point a dialog box would show giving you multiple options to choose from but not by clicking an npc, I was trying something like this:

Code:
client.ActiveNpc = 123456;
switch (client.ActiveNpc)
                       {
                        case 123456:
                             {
                            switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Dialog goes here.");
                                                dialog.Option("Option1.", 1); 
                                                dialog.Option("Option2.", 2);
                                                dialog.Option("Option3.", 3);
                                                dialog.Option("Exit.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                dialog.Text("More speech.");
                                                dialog.Option("Option4.", 4); 
                                                dialog.Option("Option5.", 5);
                                                dialog.Option("Option6.", 6);
                                                dialog.Option("Exit.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                    } break;
                             }
                       }
I was trying something like the above code to make it think ur using an activenpc but it dosent seem to work.
hacksaw is offline  
Old 09/29/2013, 14:56   #2
 
elite*gold: 0
Join Date: Jun 2007
Posts: 96
Received Thanks: 12
client.ActiveNpc stands for NpcID
change
client.ActiveNpc = 123456;
switch (client.ActiveNpc)
to
int acitvenpc = 123456;
switch (acitvenpc)
atef201080 is offline  
Old 09/29/2013, 15:14   #3
 
Smallxmac's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 105
Received Thanks: 13
Yes, it is very possible. But try to understand how it handles opening dialogs, first the client clicks on a npc and it send the ID of that npc to the server along with the option of 0. The server then picks up the request and then uses a switch to find out which npc is being called. Then you switch the option that is being called and then fill the npc with dialog, option, and other jank. After that you send the npc dialog pack back to the client.
Smallxmac is offline  
Reply


Similar Threads Similar Threads
Cant Add NPC.Dialog
06/21/2010 - CO2 Private Server - 12 Replies
Alright everytime im adding a npc dialog i always get the do not talk anything useful yet. Well looking at guides they tell them to put npc.txt file or w.e, add the npc code there. I have the npc and the dialog goes to that npc. So far 5 codes havnt worked ,dunno what im doing wrong, This is a example of how the npc dialog starts off
NPC Dialog
06/14/2010 - Flyff Private Server - 3 Replies
Hallo ElitePvPers, Ich wuerde gerne wissen wie ich den Dialog von NPC's aendern kann. Z.b weiss ich das wenn ich den Dialog von Isruel aendern will, muss ich eine Datei oeffnen die "MaFl_Isruel.txt". Ich finde dieses .txt leider nirgendwo und frage euch nun, koennt ihr mir helfen mit dem problem? Bitee bitee bitee!! XD
[HELP] Where is the NPC Dialog?
09/15/2009 - CO2 Private Server - 3 Replies
I'm copying and pasting codes and it says to go to NPC Dialog but I don't know where that is, can you help me find it?
Help me please i need Dialog.ini
08/18/2008 - Conquer Online 2 - 0 Replies
Hi all, i have a private server CO 2 and i want the file: Dialog.ini of NPCsStuff Because some npc. Ej: ArcherGod, he change your class, and all the npc that changes the class to you, nobody of those can speak. Please say me some download of Dialog.ini or say me the information of they. -edit- I want the npc to learn skills please



All times are GMT +2. The time now is 16:51.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.