Register for your free account! | Forgot your password?

You last visited: Today at 20:15

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

Advertisement



npcdialog (5018)

Discussion on npcdialog (5018) within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
npcdialog (5018)

does this look right for npc dialog?
(arco's)
Code:
                case 333333://test id
                    {
                        if (Client.Money >= 100)
                        {
                            dialog(Client, new string[] {
                            "AVATAR 30",
                            "TEXT You got 100Silvers",
                            "OPTION-1 Do you want it?",
                            "OPTION-2 You dont need them"
                        });
                        }
                        else
                        {
                            dialog(Client, new string[] {
                            "AVATAR 30",
                            "TEXT You need 10silvers",
                            "OPTION-2 Okay"
                        });
                        }
                        if (OptionID == 1)
                        {
                            Client.Money -= 100;
                            dialog(Client, new string[] {
                            "AVATAR 30",
                            "TEXT Yes",
                            "OPTION-1 Here u are"
                        });
                        }
                        break;
                    }
Fish* is offline  
Old 07/31/2010, 23:11   #2
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Looks pretty correct, might as well test and find out.
Arcо is offline  
Thanks
1 User
Old 08/01/2010, 02:25   #3
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Quote:
Originally Posted by .Arco View Post
Looks pretty correct, might as well test and find out.
that's quite a unique style of Npc Dialogs .Arco
killersub is offline  
Old 08/01/2010, 02:33   #4
 
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
Quote:
Originally Posted by killersub View Post
that's quite a unique style of Npc Dialogs .Arco
It's Hybrids.


You're checking for the money everytime, when you only need to the first time.
Code:
                case 333333://test id
                    {
                        switch (OptionId)
                        {
                            case 0:
                                if (Client.Money >= 100)
                                {
                                    dialog(Client, new string[] {
                                        "AVATAR 30",
                                        "TEXT You got 100Silvers",
                                        "OPTION-1 Do you want it?",
                                        "OPTION-2 You dont need them"
                                    });
                                }
                                else
                                {
                                    dialog(Client, new string[] {
                                        "AVATAR 30",
                                        "TEXT You need 10silvers",
                                        "OPTION-2 Okay"
                                    });
                                }
                                break;
                            case 1:
                                Client.Money -= 100;
                                dialog(Client, new string[] {
                                    "AVATAR 30",
                                    "TEXT Yes",
                                    "OPTION-1 Here u are"
                                });
                                break;
                        }
                    }
kinshi88 is offline  
Thanks
2 Users
Old 08/01/2010, 02:52   #5
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Quote:
Originally Posted by kinshi88 View Post
It's Hybrids.


You're checking for the money everytime, when you only need to the first time.
Code:
                case 333333://test id
                    {
                        switch (OptionId)
                        {
                            case 0:
                                if (Client.Money >= 100)
                                {
                                    dialog(Client, new string[] {
                                        "AVATAR 30",
                                        "TEXT You got 100Silvers",
                                        "OPTION-1 Do you want it?",
                                        "OPTION-2 You dont need them"
                                    });
                                }
                                else
                                {
                                    dialog(Client, new string[] {
                                        "AVATAR 30",
                                        "TEXT You need 10silvers",
                                        "OPTION-2 Okay"
                                    });
                                }
                                break;
                            case 1:
                                Client.Money -= 100;
                                dialog(Client, new string[] {
                                    "AVATAR 30",
                                    "TEXT Yes",
                                    "OPTION-1 Here u are"
                                });
                                break;
                        }
                    }
oh! lol forgot about dat ...anyways I meant unique as in different from all da NpcDialogs lol :O
killersub is offline  
Old 08/01/2010, 03:05   #6
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
Quote:
Originally Posted by kinshi88 View Post
It's Hybrids.


You're checking for the money everytime, when you only need to the first time.
Code:
                case 333333://test id
                    {
                        switch (OptionId)
                        {
                            case 0:
                                if (Client.Money >= 100)
                                {
                                    dialog(Client, new string[] {
                                        "AVATAR 30",
                                        "TEXT You got 100Silvers",
                                        "OPTION-1 Do you want it?",
                                        "OPTION-2 You dont need them"
                                    });
                                }
                                else
                                {
                                    dialog(Client, new string[] {
                                        "AVATAR 30",
                                        "TEXT You need 10silvers",
                                        "OPTION-2 Okay"
                                    });
                                }
                                break;
                            case 1:
                                Client.Money -= 100;
                                dialog(Client, new string[] {
                                    "AVATAR 30",
                                    "TEXT Yes",
                                    "OPTION-1 Here u are"
                                });
                                break;
                        }
                    }
Thanks for helping me with it
Fish* is offline  
Reply


Similar Threads Similar Threads
5156 NPCDialog (Item and ClientSockets Problems)
06/20/2010 - CO2 Private Server - 3 Replies
Friends, I'm having trouble compiling sources NewestCOServer, specifically giving this error in the following source: NPCDialog.cs ClientSocket class does not exist, and structure "Struct.ItemInfo" the method AddItem is not localized. Could anyone help me or pass the sources corrected? Thanks
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;
5018
03/28/2010 - CO2 Private Server - 14 Replies
Does anyone remember if there was a publicly released source that was on patch 5018. I could have sworn that there was one some where. If there is one could someone possible give me the link? Please don't tell me to search because i have. Many times.
Need help with 5018+
04/18/2009 - CO2 Private Server - 11 Replies
Hello everyone, I need help about updating to 5018. I added everything in refèrences with ManagedOpenSsl. Added the code to decryp in AuthReceive() And when I try to log in 5065, my login screen freeze ... look at the image I attached I'm on it for 3days, and nothing more before I started ... :( If someone can tell me how to do that would be cool. Or that will be nice, Add me to msn "[email protected]"



All times are GMT +1. The time now is 20:15.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.