|
You last visited: Today at 08:47
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.
03/15/2010, 19:27
|
#1
|
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.
|
|
|
03/15/2010, 19:32
|
#2
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,764
Received Thanks: 5,291
|
Have you tried += 1?
|
|
|
03/15/2010, 20:09
|
#3
|
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
|
Quote:
Originally Posted by .Arco
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?
|
|
|
03/15/2010, 20:14
|
#4
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,764
Received Thanks: 5,291
|
Quote:
Originally Posted by mattyc2580
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.
|
|
|
03/15/2010, 20:29
|
#5
|
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
|
Quote:
Originally Posted by .Arco
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
|
|
|
03/15/2010, 20:48
|
#6
|
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
|
|
|
03/15/2010, 20:58
|
#7
|
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
|
Quote:
Originally Posted by .Arco
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.
|
|
|
03/15/2010, 21:12
|
#8
|
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
|
|
|
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..
|
|
|
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
|
|
|
03/16/2010, 18:43
|
#11
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,764
Received Thanks: 5,291
|
Quote:
Originally Posted by LegalConquer
why is it called boxing 0.0 thts the part im stuck on rotflol XD
|
It's an npc raising the boxing prof.
|
|
|
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 ***....
|
|
|
03/18/2010, 18:15
|
#13
|
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
|
Quote:
Originally Posted by LegalConquer
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
|
|
|
All times are GMT +1. The time now is 08:47.
|
|