Register for your free account! | Forgot your password?

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

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

Advertisement



What is wrong with this code?

Discussion on What is wrong with this code? within the CO2 Private Server forum part of the Conquer Online 2 category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2010
Posts: 480
Received Thanks: 207
What is wrong with this code?

Hey
I'm making a custom quest but when it comes to the part to get the reward, it don't show and it don't give me the reward.
Please tell me how to fix this code or what's wrong with it.

Code:
#region Killer
                            case 67436:
                                {
                                    if (Control == 0)
                                    {

                                        if (GC.MyChar.InventoryContains(710854, 1))
                                        {
                                            GC.AddSend(Packets.NPCSay("Hello.  A letter huh.  Well, I accidently killed ghost a while back.  Tell him his apology is accepted."));
                                            GC.AddSend(Packets.NPCLink("Sure Thing", 1));
                                            GC.AddSend(Packets.NPCLink("No", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        if (Control == 1)
                                        {
                                            GC.MyChar.CPs += 10000000;
                                            GC.AddSend(Packets.NPCSay("Here is your reward.!"));
                                            GC.AddSend(Packets.NPCLink("Thank you", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                }
                                break;
                            #endregion
Decker_ is offline  
Old 02/20/2010, 04:03   #2
 
hunterman01's Avatar
 
elite*gold: 20
Join Date: Dec 2006
Posts: 945
Received Thanks: 175
Your break is in the wrong part needs to be before that last bracket
hunterman01 is offline  
Old 02/20/2010, 04:03   #3
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Code:
#region Killer
                            case 67436:
                                {
                                    if (Control == 0)
                                    {

                                        if (GC.MyChar.InventoryContains(710854, 1))
                                        {
                                            GC.AddSend(Packets.NPCSay("Hello.  A letter huh.  Well, I accidently killed ghost a while back.  Tell him his apology is accepted."));
                                            GC.AddSend(Packets.NPCLink("Sure Thing", 1));
                                            GC.AddSend(Packets.NPCLink("No", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You don't have the required item.));
                                            GC.AddSend(Packets.NPCLink("Sorry", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
}
                                        if (Control == 1)
                                        {
                                            GC.MyChar.CPs += 10000000;
                                            GC.AddSend(Packets.NPCSay("Here is your reward.!"));
                                            GC.AddSend(Packets.NPCLink("Thank you", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
}
break;
                                    }
                                
                                
                            #endregion
You need to learn where breaks go and how to use brackets.
Arcо is offline  
Old 02/20/2010, 04:11   #4
 
elite*gold: 0
Join Date: Feb 2010
Posts: 480
Received Thanks: 207
I get 308 errors :S
with arcos code
Decker_ is offline  
Old 02/20/2010, 04:13   #5
 
hunterman01's Avatar
 
elite*gold: 20
Join Date: Dec 2006
Posts: 945
Received Thanks: 175
Quote:
Originally Posted by Decker_ View Post
I get 308 errors :S
with arcos code
Not sure why there is nothing wrong with it
hunterman01 is offline  
Old 02/20/2010, 04:14   #6
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
#updated it
Try now.
Arcо is offline  
Old 02/20/2010, 04:16   #7
 
elite*gold: 0
Join Date: Feb 2010
Posts: 480
Received Thanks: 207
Nope, still 308 errors
Decker_ is offline  
Old 02/20/2010, 04:16   #8
 
-Shunsui-'s Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
This Should Work,

Code:
                            #region Killer
                            case 67436:
                                {
                                    if (Control == 0)
                                    {

                                        if (GC.MyChar.InventoryContains(710854, 1))
                                        {
                                            GC.AddSend(Packets.NPCSay("Hello.  A letter huh.  Well, I accidently killed ghost a while back.  Tell him his apology is accepted."));
                                            GC.AddSend(Packets.NPCLink("Sure Thing", 1));
                                            GC.AddSend(Packets.NPCLink("No", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You don't have the required item"));
                                            GC.AddSend(Packets.NPCLink("Sorry", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        if (Control == 1)
                                        {
                                            GC.MyChar.CPs += 10000000;
                                            GC.AddSend(Packets.NPCSay("Here is your reward.!"));
                                            GC.AddSend(Packets.NPCLink("Thank you", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    break;
                                }
                            #endregion
@ Arco Your MIssing the " at the End of the Text, In

Code:
GC.AddSend(Packets.NPCSay("You don't have the required item.[COLOR="Red"]"[/COLOR]));
-Shunsui- is offline  
Thanks
1 User
Old 02/20/2010, 04:17   #9
 
elite*gold: 0
Join Date: Feb 2010
Posts: 480
Received Thanks: 207
ya that works, thanks jose!
Decker_ is offline  
Old 02/20/2010, 04:19   #10
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Quote:
Originally Posted by -Shunsui- View Post
This Should Work,

Code:
                            #region Killer
                            case 67436:
                                {
                                    if (Control == 0)
                                    {

                                        if (GC.MyChar.InventoryContains(710854, 1))
                                        {
                                            GC.AddSend(Packets.NPCSay("Hello.  A letter huh.  Well, I accidently killed ghost a while back.  Tell him his apology is accepted."));
                                            GC.AddSend(Packets.NPCLink("Sure Thing", 1));
                                            GC.AddSend(Packets.NPCLink("No", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You don't have the required item"));
                                            GC.AddSend(Packets.NPCLink("Sorry", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        if (Control == 1)
                                        {
                                            GC.MyChar.CPs += 10000000;
                                            GC.AddSend(Packets.NPCSay("Here is your reward.!"));
                                            GC.AddSend(Packets.NPCLink("Thank you", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    break;
                                }
                            #endregion
@ Arco Your MIssing the " at the End of the Text, In

Code:
GC.AddSend(Packets.NPCSay("You don't have the required item.[COLOR="Red"]"[/COLOR]));
Not only that, but I h ad the brackets misplaced.
Oh well, lol that's what happens when you try to do a code without using C#.
Arcо is offline  
Old 02/20/2010, 04:21   #11
 
elite*gold: 0
Join Date: Feb 2010
Posts: 480
Received Thanks: 207
Well the code works, but the same problem occurs.
It don't give me the cp's and it don't tell me I have the reward, as soon as he asks me to tell ghost his apology is accepted and i say sure thing, it goes off.
Decker_ is offline  
Old 02/20/2010, 04:24   #12
 
-Shunsui-'s Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
Then try

Code:
 
                            #region Killer
                            case 67436:
                                {
                                    if (Control == 0)
                                    {

                                        if (GC.MyChar.InventoryContains(710854, 1))
                                        {
                                            GC.AddSend(Packets.NPCSay("Hello.  A letter huh.  Well, I accidently killed ghost a while back.  Tell him his apology is accepted."));
                                            GC.AddSend(Packets.NPCLink("Sure Thing", 1));
                                            GC.AddSend(Packets.NPCLink("No", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You don't have the required item"));
                                            GC.AddSend(Packets.NPCLink("Sorry", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.CPs += 10000000;
                                        GC.AddSend(Packets.NPCSay("Here is your reward.!"));
                                        GC.AddSend(Packets.NPCLink("Thank you", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    break;
                                }
                            #endregion
-Shunsui- is offline  
Old 02/20/2010, 05:37   #13
 
LetterX's Avatar
 
elite*gold: 20
Join Date: May 2007
Posts: 1,125
Received Thanks: 332
Quote:
Originally Posted by -Shunsui- View Post
Then try

Code:
 
                            #region Killer
                            case 67436:
                                {
                                    if (Control == 0)
                                    {

                                        if (GC.MyChar.InventoryContains(710854, 1))
                                        {
                                            GC.AddSend(Packets.NPCSay("Hello.  A letter huh.  Well, I accidently killed ghost a while back.  Tell him his apology is accepted."));
                                            GC.AddSend(Packets.NPCLink("Sure Thing", 1));
                                            GC.AddSend(Packets.NPCLink("No", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You don't have the required item"));
                                            GC.AddSend(Packets.NPCLink("Sorry", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.CPs += 10000000;
                                        GC.AddSend(Packets.NPCSay("Here is your reward.!"));
                                        GC.AddSend(Packets.NPCLink("Thank you", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    break;
                                }
                            #endregion
Wouldn't you need to send the client a string packet to update the CPs amount the client shows? o.o
LetterX is offline  
Old 02/20/2010, 05:40   #14
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Quote:
Originally Posted by LetterX View Post
Wouldn't you need to send the client a string packet to update the CPs amount the client shows? o.o
Not with the 5165.
Arcо is offline  
Old 02/20/2010, 09:59   #15


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Quote:
Originally Posted by LetterX View Post
Wouldn't you need to send the client a string packet to update the CPs amount the client shows? o.o
As i descovered in a previous thread, the source does this durring the set{} method of the variable.
Korvacs is offline  
Closed Thread


Similar Threads Similar Threads
B> DriftCity CBS Code | S> War Rock Code / Bounty Bay Code etc.
10/05/2010 - Trading - 1 Replies
Hi, wie schon im Titel beschrieben. In der CBS vom November gab es Bonusodes für mehrere Spiele. Ich benötige DriftCity Codes. Kann sonst für alle anderen Spiele die Codes biten, einige auch doppelt. Hier eine Liste der Spiele und Bonusaktionen: - (2x) War Rock - (2x) War of Titans - (2x) World of Warcraft - (1x) Warhammer Online - (1x) Bounty Bay online
what is the wrong with this code help me
10/21/2009 - CO2 Private Server - 4 Replies
6001 27 ToxicFog 1 0 1 4 0 0 30010 0 0 3 4 10 8796093022208 0 5400 70 2 0 20 300 0 0 0 0 50 0 0 0 0 3 905 Upgrade~after~lvl~70 Continually~reduce~10%~of~target`s~current ~HP~each~time.~20~times~in~1~minute.~I neffective~when~the~target`s~HP~reaches~ 1.~Stamina~Cost:~50.~The~lower~battle~po wer~than~the~target`s,~the~less~accuracy . NULL NULL poisoncast sound\Ninjamagic-04A.wav 800 poisonattack NULL poisonblast.tme poisonfog01 0 0 i need to know what is the wrong with this code to run...
Whats wrong with this code?
07/02/2009 - CO2 Private Server - 9 Replies
someone help me please i put this code in everything works except /drop bigscroll any1 see anything wrong? EDIT: bigscroll is for dbscrolls



All times are GMT +1. The time now is 13:08.


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.