Register for your free account! | Forgot your password?

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

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

Advertisement



[Help]With An NPC Code

Discussion on [Help]With An NPC Code within the CO2 Private Server forum part of the Conquer Online 2 category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Jun 2009
Posts: 361
Received Thanks: 99
[Help]With An NPC Code

//edit: Nvm, I made it work perfect on my own =p

Code:
                            if (CurrentNPC == 1122)
                            {
                                if (Control == 1)
                                {
                                    if (MyChar.CPs >= 15000)
                                        MyChar.AddItem("150259-0-0-0-255-255", 0, (uint)General.Rand.Next(36457836));
                                        MyChar.CPs -= 15000;
                                        SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
                                }
                                if (Control == 2)
                                {
                                    if (MyChar.CPs >= 15000)
                                        MyChar.AddItem("160259-0-0-0-255-255", 0, (uint)General.Rand.Next(36457836));
                                        MyChar.CPs -= 15000;
                                        SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
                                }
                                if (Control == 3)
                                {
                                    if (MyChar.CPs >= 15000)
                                        MyChar.AddItem("120259-0-0-0-255-255", 0, (uint)General.Rand.Next(36457836));
                                        MyChar.CPs -= 15000;
                                        SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
                                }
                                else if (MyChar.CPs <= 15000)
                                {
                                    SendPacket(General.MyPackets.NPCSay("You do not have 15,000 CPs."));
                                    SendPacket(General.MyPackets.NPCLink("Sorry, I forgot.", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(22));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                            }
Code:
                            if (CurrentNPC == 1122)
                            {
                                if (Control == 1)
                                {
                                    if (MyChar.CPs >= 15000)
                                    {
                                        MyChar.AddItem("150259-0-0-0-255-255", 0, (uint)General.Rand.Next(36457836));
                                        MyChar.CPs -= 15000;
                                        SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
                                    }
                                    else if (MyChar.CPs <= 15000)
                                    {
                                        SendPacket(General.MyPackets.NPCSay("You do not have enough CPs."));
                                        SendPacket(General.MyPackets.NPCLink("Sorry, I forgot.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(22));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                }
                                if (Control == 2)
                                {
                                    if (MyChar.CPs >= 15000)
                                    {
                                        MyChar.AddItem("160259-0-0-0-255-255", 0, (uint)General.Rand.Next(36457836));
                                        MyChar.CPs -= 15000;
                                        SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
                                    }
                                    else if (MyChar.CPs <= 15000)
                                    {
                                        SendPacket(General.MyPackets.NPCSay("You do not have enough CPs."));
                                        SendPacket(General.MyPackets.NPCLink("Sorry, I forgot.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(22));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                }
                                if (Control == 3)
                                {
                                    if (MyChar.CPs >= 15000)
                                    {
                                        MyChar.AddItem("120259-0-0-0-255-255", 0, (uint)General.Rand.Next(36457836));
                                        MyChar.CPs -= 15000;
                                        SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
                                    }
                                    else if (MyChar.CPs <= 15000)
                                    {
                                        SendPacket(General.MyPackets.NPCSay("You do not have enough CPs."));
                                        SendPacket(General.MyPackets.NPCLink("Sorry, I forgot.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(22));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                }
                            }
Jay1029 is offline  
Old 08/14/2009, 21:48   #2
 
elite*gold: 0
Join Date: Aug 2006
Posts: 323
Received Thanks: 14
Becuase they all have the same else output & requirement. It would be neater to structure it as,

if CP < blah
{
control = blah1{}
control = blah2{}
}
esle
{
not enough cps blah
}
killermickle is offline  
Old 08/15/2009, 06:42   #3
 
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
#Closed
kinshi88 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
Gebe Vip Hack Suche Storm Code oder 5k Dinar Code
07/25/2010 - WarRock Trading - 4 Replies
blubb
WTB: Japanischer/Chinesicher Guild Wars Trial-Code und EoTn Code
02/08/2010 - Guild Wars Trading - 5 Replies
Hallo, Wie schon oben in der beschreibung steht suche ich Japanischer/Chinesicher Trial-Code + EoTn oder die einzelnen Codes! Ich würde in Platin/Ektos/ZkeYs zahlen (allerdings nur mit Treuhandhändler), man weiss ja nie was einem Verkauft wird :P. Bitte so schnell wie möglich melden, wen einer es haben sollte.



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


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.