Register for your free account! | Forgot your password?

You last visited: Today at 19:10

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

Advertisement



[Request]

Discussion on [Request] within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2007
Posts: 128
Received Thanks: 80
[Request]

Hello Elitepvpers. I really need some help. Can someone please revised or fixed this codes.. Thanks..


Steed: In this code it will auto add a steed in your equipment even though you didnt equip them.. All i just want is to make an else if in this code.. I want it not to auto add a steed and the npc will say that i have to equip first the steed before i can put a plus on it.. I just need some ideas on how to do it.. Anyways, after this I can do it on my own. Thanks.

Code:
#region Steed Plus Officer NPC
                            case 9881:
                                {
                                    if (option == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("I can put a plus on your steed for a saddle. Do you want it?"));
                                        GC.AddSend(Packets.NPCLink("Yes. Please.", 12));
                                        GC.AddSend(Packets.NPCLink("No. Thanks.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                        GC.Agreed = false;
                                    }

                                    else if (option == 12)
                                    {
                                        
                                        //  GC.MyChar.Equips.Necklace.Bless = 1;
                                        Game.Item I = GC.MyChar.Equips.Get((byte)(option));

                                        I.ID = 300000;


                                        if (I.Plus != 12)
                                        {
                                            byte SaddleNeed = 0;
                                            if (I.Plus == 0)
                                                SaddleNeed = 1;
                                            else if (I.Plus == 1)
                                                SaddleNeed = 1;
                                            else if (I.Plus == 2)
                                                SaddleNeed = 1;
                                            else if (I.Plus == 3)
                                                SaddleNeed = 1;
                                            else if (I.Plus == 4)
                                                SaddleNeed = 1;
                                            else if (I.Plus == 5)
                                                SaddleNeed = 1;
                                            else if (I.Plus == 6)
                                                SaddleNeed = 7;
                                            else if (I.Plus == 7)
                                                SaddleNeed = 8;
                                            else if (I.Plus == 8)
                                                SaddleNeed = 9;
                                            else if (I.Plus == 9)
                                                SaddleNeed = 10;
                                            else if (I.Plus == 10)
                                                SaddleNeed = 11;
                                            else if (I.Plus == 11)
                                                SaddleNeed = 12;


                                            if (!GC.Agreed)
                                            {
                                                GC.AddSend(Packets.NPCSay("You need " + SaddleNeed + " saddle to upgrade. Do you want it?"));
                                                GC.AddSend(Packets.NPCSay("Your steed current plus is " + I.Plus + "."));
                                                if (I.Plus != 0)
                                                    GC.AddSend(Packets.NPCSay("It will become " + (I.Plus + 1) + "."));
                                                GC.AddSend(Packets.NPCLink("Yes. Please.", option));
                                                GC.AddSend(Packets.NPCLink("Nevermind.", 255));
                                                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                GC.AddSend(Packets.NPCFinish());
                                                GC.Agreed = true;
                                            }
                                            else
                                            {
                                                GC.Agreed = false;
                                                if (GC.MyChar.InventoryContains(723903, SaddleNeed, GC))
                                                {
                                                    GC.MyChar.EquipStats((byte)(option), false);
                                                    for (byte i = 0; i < SaddleNeed; i++)
                                                        GC.MyChar.RemoveItem(723903, 1, GC);
                                                        //GC.MyChar.RemoveItem(GC.MyChar.NextItem(723903));
                                                    if (I.Plus == 0)
                                                        I.Plus = 1;
                                                    else
                                                        I.Plus += 1;
                                                    GC.MyChar.Equips.Replace((byte)(option), I, GC.MyChar);
                                                    GC.MyChar.EquipStats((byte)(option), true);

                                                    GC.AddSend(Packets.NPCSay("It's done."));
                                                    GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                                    GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                    GC.AddSend(Packets.NPCFinish());
                                                }
                                                else
                                                {
                                                    GC.AddSend(Packets.NPCSay("You don't have enough saddles."));
                                                    GC.AddSend(Packets.NPCLink("I see.", 255));
                                                    GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                    GC.AddSend(Packets.NPCFinish());
                                                }
                                            }
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You cannot upgrade steed which is already at the maximum."));
                                            GC.AddSend(Packets.NPCLink("I see.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    break;
                                }
                            #endregion



First Socket and Second Socket Maker:


In this code I want also an else if on it.. If i click on headgear, necklace, ring, boots, armor, etc... it will continue socketing the items even if i dont equip any of the items.. All I just want is when I click on the selection of items it will not continue on socketing if i dont equip those items and the NPC will also says that you have to equip or wear them before socketing on them... I really need some help... Thanks..


Code:
#region Item Socket NPC
                            case 550:
                                {
                                    if (option == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Hello. I can put a socket on any items you want."));
                                        GC.AddSend(Packets.NPCSay("It will cost you 12 DragonBalls to create the first socket."));
                                        GC.AddSend(Packets.NPCSay("The second one will cost you 5 Tough Drills."));
                                        GC.AddSend(Packets.NPCLink("First Socket.", 1));
                                        GC.AddSend(Packets.NPCLink("Second Socket.", 2));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (option == 1 || option == 2)
                                    {
                                        if (option == 1)
                                            GC.AddSend(Packets.NPCSay("Prepare 12 DragonBalls and 250,000 silvers for the socket and choose the equipment you want the socket to be created in."));
                                        else
                                            GC.AddSend(Packets.NPCSay("Prepare 5 Tough Drills and 500,000 silvers for the socket and choose the equipment you want the socket to be created in."));

                                        GC.AddSend(Packets.NPCLink("Headgear", (byte)(option * 100 + 1)));
                                        GC.AddSend(Packets.NPCLink("Necklace/Bag", (byte)(option * 100 + 2)));
                                        GC.AddSend(Packets.NPCLink("Armor", (byte)(option * 100 + 3)));
                                        GC.AddSend(Packets.NPCLink("Shield", (byte)(option * 100 + 5)));
                                        GC.AddSend(Packets.NPCLink("Ring", (byte)(option * 100 + 6)));
                                        GC.AddSend(Packets.NPCLink("Boots", (byte)(option * 100 + 8)));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (option > 100 && option <= 103 || option == 105 || option == 106 || option == 108)
                                    {
                                        byte Pos = (byte)(option - 100);
                                        Game.Item Eq = GC.MyChar.Equips.Get(Pos);
                                        if (Eq.Soc1 == ConquerSx.Game.Item.Gem.NoSocket)
                                        {
                                            if (GC.MyChar.Silvers >= 250000 && GC.MyChar.InventoryContains(1088000, 12,GC))
                                            {
                                                GC.MyChar.EquipStats(Pos, false);
                                                for (byte i = 0; i < 18; i++)
                                                    GC.MyChar.RemoveItem(1088000, 12, GC);
                                                    //GC.MyChar.RemoveItem(GC.MyChar.NextItem(1088000));
                                                GC.MyChar.Silvers -= 250000;
                                                Eq.Soc1 = ConquerSx.Game.Item.Gem.EmptySocket;
                                                GC.MyChar.Equips.Replace(Pos, Eq, GC.MyChar);
                                                GC.MyChar.EquipStats(Pos, true);

                                                GC.AddSend(Packets.NPCSay("Congratulations! You got a first socket on your equipment."));
                                                GC.AddSend(Packets.NPCLink("I see.", 255));
                                                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                GC.AddSend(Packets.NPCFinish());
                                            }
                                            else
                                            {
                                                GC.AddSend(Packets.NPCSay("You don't have the materials."));
                                                GC.AddSend(Packets.NPCLink("I see.", 255));
                                                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                GC.AddSend(Packets.NPCFinish());
                                            }
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("The item has already a first socket."));
                                            GC.AddSend(Packets.NPCLink("I see.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    else if (option > 200 && option <= 203 || option == 205 || option == 206 || option == 208)
                                    {
                                        byte Pos = (byte)(option - 200);
                                        Game.Item Eq = GC.MyChar.Equips.Get(Pos);
                                        if (Eq.Soc1 != ConquerSx.Game.Item.Gem.NoSocket)
                                        {
                                            if (Eq.Soc2 == ConquerSx.Game.Item.Gem.NoSocket)
                                            {
                                                if (GC.MyChar.Silvers >= 500000 && GC.MyChar.InventoryContains(1200005, 5, GC))
                                                {
                                                    GC.MyChar.EquipStats(Pos, false);
                                                    for (byte i = 0; i < 7; i++)
                                                        GC.MyChar.RemoveItem(1200005, 5, GC);
                                                        //GC.MyChar.RemoveItem(GC.MyChar.NextItem(1200005));
                                                    GC.MyChar.Silvers -= 500000;
                                                    Eq.Soc2 = ConquerSx.Game.Item.Gem.EmptySocket;
                                                    GC.MyChar.Equips.Replace(Pos, Eq, GC.MyChar);
                                                    GC.MyChar.EquipStats(Pos, true);

                                                    GC.AddSend(Packets.NPCSay("Congratulations! You got a second socket on your equipment."));
                                                    GC.AddSend(Packets.NPCLink("I see.", 255));
                                                    Game.World.SendMsgToAll("SYSTEM", GC.MyChar.Name + " got a second socket on his/her equipment.", 2011, 0);
                                                    GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                    GC.AddSend(Packets.NPCFinish());
                                                }
                                                else
                                                {
                                                    GC.AddSend(Packets.NPCSay("You don't have the materials."));
                                                    GC.AddSend(Packets.NPCLink("I see.", 255));
                                                    GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                    GC.AddSend(Packets.NPCFinish());
                                                }
                                            }
                                            else
                                            {
                                                GC.AddSend(Packets.NPCSay("The item has already a second socket."));
                                                GC.AddSend(Packets.NPCLink("I see.", 255));
                                                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                GC.AddSend(Packets.NPCFinish());
                                            }
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You must have a first socket first."));
                                            GC.AddSend(Packets.NPCLink("I see.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    break;
                                }
                            #endregion
nestreys is offline  
Old 07/02/2010, 14:02   #2
 
elite*gold: 0
Join Date: Nov 2007
Posts: 128
Received Thanks: 80
bump.. can someone help me please.. thanks..
nestreys is offline  
Reply


Similar Threads Similar Threads
[Request] Request all 5165 sources/npc dialog
02/28/2010 - CO2 Private Server - 0 Replies
so i want to do a good source like every1 right ? so i stay some time and i got a idea to take lot of 5165 and take what's not bugged and essentialy :mofo: i will release it :D
[Request]ZeroTolerance Dekaron Admin Request
02/21/2010 - Dekaron Private Server - 1 Replies
We need Staff Members ~EDITED~
[REQUEST] speak freakin english -_- florensi hack [REQUEST]
01/22/2010 - Florensia - 1 Replies
any florensia hacks?



All times are GMT +1. The time now is 19:10.


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.