Register for your free account! | Forgot your password?

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

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

Advertisement



Can someone Add this line to me? to the code.

Discussion on Can someone Add this line to me? to the code. within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
marcbacor6666's Avatar
 
elite*gold: 0
Join Date: Oct 2006
Posts: 557
Received Thanks: 76
Can someone Add this line to me? to the code.

Can someone Add this line to me? to the code. Adding Dialog to Upgrade Quality if u are not wearing item and u click upgrade quality


Are you joking, how will i upgrade a none existing item.
Please wear your item first
Oh,sorry forgot to wear it






Code:
 #region Market Upgrade
                            case 10062:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Hi. What i do is upgrade your equipment for meteors. How about it?"));
                                        GC.AddSend(Packets.NPCLink("Upgrade quality", 1));
                                        GC.AddSend(Packets.NPCLink("Upgrade level", 2));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                        GC.Agreed = false;
                                    }
                                    else if (Control == 1 || Control == 2)
                                    {
                                        GC.AddSend(Packets.NPCSay("Choose the equipment you want to upgrade."));
                                        GC.AddSend(Packets.NPCLink("Headgear", (byte)(Control * 100 + 1)));
                                        GC.AddSend(Packets.NPCLink("Necklace/Bag", (byte)(Control * 100 + 2)));
                                        GC.AddSend(Packets.NPCLink("Armor", (byte)(Control * 100 + 3)));
                                        GC.AddSend(Packets.NPCLink("Weapon", (byte)(Control * 100 + 4)));
                                        GC.AddSend(Packets.NPCLink("Shield", (byte)(Control * 100 + 5)));
                                        GC.AddSend(Packets.NPCLink("Ring", (byte)(Control * 100 + 6)));
                                        GC.AddSend(Packets.NPCLink("Boots", (byte)(Control * 100 + 8)));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control >= 101 && Control <= 108)
                                    {

                                        Game.Item I = GC.MyChar.Equips.Get((byte)(Control - 100));
                                        byte ItemLevel = I.DBInfo.LevReq;
                                        Game.ItemIDManipulation IMan = new ProjectX.Game.ItemIDManipulation(I.ID);
                                        if (IMan.Quality != ProjectX.Game.Item.ItemQuality.Super && IMan.Quality != ProjectX.Game.Item.ItemQuality.NoUpgrade)
                                        {
                                            byte DBReq = 2;
                                            Game.Item.ItemQuality Q = IMan.Quality;
                                            if ((byte)Q < 5) Q = Game.Item.ItemQuality.Normal;
                                            if (Q == ProjectX.Game.Item.ItemQuality.Refined) DBReq++;
                                            else if (Q == ProjectX.Game.Item.ItemQuality.Unique) DBReq += 2;
                                            else if (Q == ProjectX.Game.Item.ItemQuality.Elite) DBReq += 5;

                                            DBReq = (byte)(DBReq + (ItemLevel) / 30);
                                            if (!GC.Agreed)
                                            {
                                                GC.AddSend(Packets.NPCSay("You need " + DBReq + " Dragonballs to upgrade."));
                                                GC.AddSend(Packets.NPCLink("Upgrade it.", Control));
                                                GC.AddSend(Packets.NPCLink("Forget it.", 255));
                                                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                GC.AddSend(Packets.NPCFinish());
                                                GC.Agreed = true;
                                            }
                                            else
                                            {
                                                GC.Agreed = false;
                                                if (GC.MyChar.InventoryContains(1088000, DBReq))
                                                {
                                                    GC.MyChar.EquipStats((byte)(Control - 100), false);
                                                    for (byte i = 0; i < DBReq; i++)
                                                        GC.MyChar.RemoveItem(GC.MyChar.NextItem(1088000));
                                                    IMan.QualityChange((ProjectX.Game.Item.ItemQuality)(Q + 1));
                                                    I.ID = IMan.ToID();
                                                    GC.MyChar.Equips.Replace((byte)(Control - 100), I, GC.MyChar);
                                                    GC.MyChar.EquipStats((byte)(Control - 100), true);

                                                    GC.AddSend(Packets.NPCSay("Here you are. 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 Dragonballs."));
                                                    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 an item's quality which is already at maximum."));
                                            GC.AddSend(Packets.NPCLink("I see", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }

                                    else if (Control >= 201 && Control <= 208)
                                    {
                                        Game.Item I = GC.MyChar.Equips.Get((byte)(Control - 200));
                                        byte PrevLevel = I.DBInfo.LevReq;

                                        Game.ItemIDManipulation IMan = new ProjectX.Game.ItemIDManipulation(I.ID);
                                        IMan.IncreaseLevel();
                                        if (!Database.DatabaseItems.ContainsKey(IMan.ToID()))
                                            return;
                                        DatabaseItem Ii = (DatabaseItem)Database.DatabaseItems[IMan.ToID()];
                                        byte NewLevel = Ii.LevReq;

                                        if (GC.MyChar.Level >= NewLevel)
                                        {
                                            if (NewLevel != 0 && NewLevel <= 123 && PrevLevel < 120)
                                            {
                                                Game.Item.ItemQuality Q = IMan.Quality;

                                                double DMetsReq = (double)((double)PrevLevel / 130 * 3);

                                                if (Q == Game.Item.ItemQuality.Unique) DMetsReq *= 2;
                                                else if (Q == Game.Item.ItemQuality.Elite) DMetsReq *= 4;
                                                else if (Q == Game.Item.ItemQuality.Super) DMetsReq *= 10;
                                                DMetsReq++;

                                                byte MetsReq = (byte)DMetsReq;

                                                if (!GC.Agreed)
                                                {
                                                    GC.AddSend(Packets.NPCSay("You need " + MetsReq + " Meteors to upgrade."));
                                                    GC.AddSend(Packets.NPCLink("Upgrade it.", Control));
                                                    GC.AddSend(Packets.NPCLink("Forget it.", 255));
                                                    GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                    GC.AddSend(Packets.NPCFinish());
                                                    GC.Agreed = true;
                                                }
                                                else
                                                {
                                                    GC.Agreed = false;
                                                    if (GC.MyChar.InventoryContains(1088001, MetsReq))
                                                    {
                                                        GC.MyChar.EquipStats((byte)(Control - 200), false);
                                                        for (byte i = 0; i < MetsReq; i++)
                                                            GC.MyChar.RemoveItem(GC.MyChar.NextItem(1088001));
                                                        I.ID = IMan.ToID();
                                                        GC.MyChar.Equips.Replace((byte)(Control - 200), I, GC.MyChar);
                                                        GC.MyChar.EquipStats((byte)(Control - 200), true);

                                                        GC.AddSend(Packets.NPCSay("Here you are. 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 Meteors."));
                                                        GC.AddSend(Packets.NPCLink("No way! Are you really sure?", 255));
                                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                        GC.AddSend(Packets.NPCFinish());
                                                    }
                                                }
                                            }
                                            else
                                            {
                                                GC.AddSend(Packets.NPCSay("I'm afraid i can't help you with that. I am not experienced enough with equipment that high level."));
                                                GC.AddSend(Packets.NPCLink("You old geezer!", 255));
                                                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                GC.AddSend(Packets.NPCFinish());
                                            }
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You aren't high level enough to wear the item after upgrading."));
                                            GC.AddSend(Packets.NPCLink("Alright.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    break;
                                }
                            #endregion
bump. no one knows ? 0o

someone wanna help me please
marcbacor6666 is offline  
Reply


Similar Threads Similar Threads
[Guide]CoEmuV2 Line 30 and line 34 error FIX *Changed Name*
02/26/2021 - CO2 PServer Guides & Releases - 57 Replies
CoEmu V2 Common 2 Error fixes After you have followed one of these 3 guides *ORIGINAL AMAZING RELEASE* CoEmuv2.Nano(5095) Source Code GOOD VIDEO GUIDE Video+All Files+Source oF CoEmu v2 Setup Explained Guide (Pics) CoEmu v2 Source Setup NONE OF THE ABOVE GUIDES ARE CREATED BY ME
line out kaputt.. line in als lineout?
08/31/2011 - Technical Support - 4 Replies
Ja also wie gesagt mein line out hat einen krassen wackelkontakt und ich würd gern line out als line in nutzen. mit meim alten lappi gings. is ne realtek soundkarte und momentan n acer travelmate 5740g laptop miit 64 win 7
Line in als Line Out nutzen
10/10/2010 - Technical Support - 9 Replies
Hi Leutz Ich habe folgendes Problem ich möchte meinen Line in(blau) als Line out (grün) nutzen ist dies i-wie möglich? wiso? mein line out (grün) ist anscheinend kaputt da er keinen ton von sich gibt
Need help with line code for looting Rare Items with auto hotkey
08/04/2009 - 12Sky2 - 10 Replies
Hi currently i have a fully working aoeing , 2-4 buff using , loooting , potting macro , it only loots all loots atm including junk unis , ive tried mesing with it to just pick up rares but ive made no progreas , was wondering if anyone can help me with the line of code i owuld need for it to select Rares within the ts2 window with the mouse click rather than just spamming loot key , any hints or ideas would be appreciated thanks
Writing my first line of code in c# need some help
10/16/2008 - CO2 Private Server - 5 Replies
Hey guys, I am busy trying to write a little command that gives a player a starter pack, but it's a little confusing. I wanna make it to where if the players IP has already received a starter pack he will be unable to do it again. sigh, I wish this was php, would be so much easier >.< . Here is what I have so far. if (Splitter == "/starter") { MyChar.CPs += 54;...



All times are GMT +1. The time now is 04:41.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.