|
You last visited: Today at 13:07
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.
02/20/2010, 04:02
|
#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
|
|
|
02/20/2010, 04:03
|
#2
|
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
|
|
|
02/20/2010, 04:03
|
#3
|
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.
|
|
|
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
|
|
|
02/20/2010, 04:13
|
#5
|
elite*gold: 20
Join Date: Dec 2006
Posts: 945
Received Thanks: 175
|
Quote:
Originally Posted by Decker_
I get 308 errors :S
with arcos code
|
Not sure why there is nothing wrong with it
|
|
|
02/20/2010, 04:14
|
#6
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
|
#updated it
Try now.
|
|
|
02/20/2010, 04:16
|
#7
|
elite*gold: 0
Join Date: Feb 2010
Posts: 480
Received Thanks: 207
|
Nope, still 308 errors
|
|
|
02/20/2010, 04:16
|
#8
|
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]));
|
|
|
02/20/2010, 04:17
|
#9
|
elite*gold: 0
Join Date: Feb 2010
Posts: 480
Received Thanks: 207
|
ya that works, thanks jose!
|
|
|
02/20/2010, 04:19
|
#10
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
|
Quote:
Originally Posted by -Shunsui-
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#.
|
|
|
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.
|
|
|
02/20/2010, 04:24
|
#12
|
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
|
|
|
02/20/2010, 05:37
|
#13
|
elite*gold: 20
Join Date: May 2007
Posts: 1,125
Received Thanks: 332
|
Quote:
Originally Posted by -Shunsui-
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
|
|
|
02/20/2010, 05:40
|
#14
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
|
Quote:
Originally Posted by LetterX
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.
|
|
|
02/20/2010, 09:59
|
#15
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Quote:
Originally Posted by LetterX
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.
|
|
|
 |
|
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.
|
|