Register for your free account! | Forgot your password?

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

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

Advertisement



Someone can help me with this?

Discussion on Someone can help me with this? within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Someone can help me with this?

Code:
#region Boxing
                                    if (Control == 4)
                                    {
                                        if (GC.MyChar.InventoryContains(1088000, 1))
                                        {
                                            GC.AddSend(Packets.NPCSay("Ok i will upgrade you Proficiency for you."));
                                            GC.AddSend(Packets.NPCLink("Thank you", 255));
                                            GC.MyChar.RemoveItem(GC.MyChar.NextItem(1088000));
                                            GC.MyChar.RWProf(new Game.Prof() { ID = 000, Lvl = 1, Exp = 0 });
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        else if (GC.MyChar.InventoryContains(1088000, 1))
                                        {
                                            GC.AddSend(Packets.NPCSay("Congratulations your weapon proficiency has improved."));
                                            GC.MyChar.RWProf(new Game.Prof() { ID = 000, Lvl = 1, });
                                            GC.MyChar.RWProf(new Game.Prof() { ID = 000, Lvl = 2, Exp = 0 });

                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You don't have the required items"));
                                            GC.AddSend(Packets.NPCLink("Sorry", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    #endregion
I am not very good with else and else if statments. i am trying to get it to work like.
If skill = 000, lvl = 1 then upgrade to skill = 000, lvl =2, exp = 0
anyone can help me with this would be awesome.
Thanks in advance.
.Beatz is offline  
Old 03/15/2010, 19:32   #2
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,764
Received Thanks: 5,291
Have you tried += 1?
Arcо is offline  
Old 03/15/2010, 20:09   #3
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Quote:
Originally Posted by .Arco View Post
Have you tried += 1?
yes i have tried that xD you suggested it to me. it brings up some errors.
i was wondering if it would work with an else/else if statement?
.Beatz is offline  
Old 03/15/2010, 20:14   #4
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,764
Received Thanks: 5,291
Quote:
Originally Posted by mattyc2580 View Post
yes i have tried that xD you suggested it to me. it brings up some errors.
i was wondering if it would work with an else/else if statement?
That'd be alot of else if statements lmao.
Arcо is offline  
Old 03/15/2010, 20:29   #5
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Quote:
Originally Posted by .Arco View Post
That'd be alot of else if statements lmao.
yer i know lol but that would only be until i could fix it to use += somehow could ya help me with an else if on this code that i have posted here? then i can just implement it into the rest of my code
.Beatz is offline  
Old 03/15/2010, 20:48   #6
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,764
Received Thanks: 5,291
I guess it would be,
if (GC.MyChar.RWProf(new Game.Prof() { ID = 000, Lvl = 1, Exp = 0 }))
{
GC.MyChar.RWProf(new Game.Prof() { ID = 000, Lvl = 2, Exp = 0 })
}
That repeatedly lol
Arcо is offline  
Old 03/15/2010, 20:58   #7
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Quote:
Originally Posted by .Arco View Post
I guess it would be,
if (GC.MyChar.RWProf(new Game.Prof() { ID = 000, Lvl = 1, Exp = 0 }))
{
GC.MyChar.RWProf(new Game.Prof() { ID = 000, Lvl = 2, Exp = 0 })
}
That repeatedly lol
cheers Arco will go try it now.
.Beatz is offline  
Old 03/15/2010, 21:12   #8
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Cannot implicitly convert type 'void' to 'bool'

nope that dont work :S comes up with this error ^^^

whoops sorry for the double post
.Beatz is offline  
Old 03/16/2010, 14:16   #9
 
elite*gold: 0
Join Date: Aug 2009
Posts: 930
Received Thanks: 448
bool is either true or false.. void is just running what's inside the { }.. you're calling a void as a true or false.. post the exact lines you're erroring at..
.Guru is offline  
Old 03/16/2010, 16:13   #10
 
elite*gold: 0
Join Date: Sep 2009
Posts: 321
Received Thanks: 60
why is it called boxing 0.0 thts the part im stuck on rotflol XD
LegalConquer is offline  
Old 03/16/2010, 18:43   #11
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,764
Received Thanks: 5,291
Quote:
Originally Posted by LegalConquer View Post
why is it called boxing 0.0 thts the part im stuck on rotflol XD
It's an npc raising the boxing prof.
Arcо is offline  
Old 03/17/2010, 09:26   #12
 
elite*gold: 0
Join Date: Sep 2009
Posts: 321
Received Thanks: 60
Oh now i get it why not just add it to the prof ***....
LegalConquer is offline  
Old 03/18/2010, 18:15   #13
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Quote:
Originally Posted by LegalConquer View Post
Oh now i get it why not just add it to the prof ***....
It is the prof ***, but only 1 part of it. I am making one like reg CO but using a DB for each lvl not expballs

I dont get errors as such, But if i use += 1 it will error whereas if i use = 1 it will work but only make the prof lvl 1 and wont lvl it up by a lvl.
I have tried many things and nothing is working.
If someone thinks they can fix this i can send the whole code so you can see what i mean
.Beatz is offline  
Reply




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


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.