Register for your free account! | Forgot your password?

You last visited: Today at 06:34

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

Advertisement



Forging interface

Discussion on Forging interface within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
Forging interface

I reborned my noob just to see if it retained the riding skill and it did, I was also hoping to see a mana backsword and I also gained that. Things were looking not bad and then I went to add a socket on the mana backsword and it failed which p*ssed me off completely, seems the source is using a chance based thing on it so where would I look to change it? It should be 100% success rate, thankfully I don't lose the DB when it fails though.

So I tried on a refined backsword and it worked, perhaps I should have left the mana backsword as unique before trying to socket it smdfh


Code:
static void SocketItem(ItemUsage usage, Client.GameClient client)
        {
            ConquerItem item = null;
            ConquerItem[] Minors = null;
            if (client.Inventory.TryGetItem(usage.UID, out item))
            {
                ushort pos = ItemPosition(item.ID);
                if (pos == ConquerItem.Bottle || pos == ConquerItem.Fan || pos == ConquerItem.Garment || pos == ConquerItem.LeftWeaponAccessory || pos == ConquerItem.RightWeaponAccessory || pos == ConquerItem.Steed || pos == ConquerItem.SteedArmor || pos == ConquerItem.SteedCrop || pos == ConquerItem.Tower || pos == ConquerItem.Wings)
                {
                    client.Send(new Message("Sorry can't make socket in this item !", System.Drawing.Color.Red, Message.Talk));
                    return;
                }

                Minors = new ConquerItem[usage.Batch.Length];
                for (int i = 0; i < usage.Batch.Length; i++)
                {
                    if (!client.Inventory.TryGetItem(usage.Batch[i], out Minors[i]))
                        return;
                    else
                        if (Minors[i].UID == item.UID)
                            return;
                }
                if (Minors.Length == 0)
                    return;
                if (item.SocketOne == LordsRoad.Game.Enums.Gem.NoSocket)
                {
                    ushort cost = 1;
                    if (pos != ConquerItem.RightWeapon && pos != ConquerItem.LeftWeapon)
                        cost = 12;

                    if (client.Inventory.Contains(1088000, cost))
                    {
                        item.SocketOne = LordsRoad.Game.Enums.Gem.EmptySocket;
                        item.Mode = LordsRoad.Game.Enums.ItemMode.Update;
                        item.Send(client);
                        usage.dwParam = 1;
                        client.LoadItemStats();
                        Database.ConquerItemTable.UpdateSockets(item);
                        foreach (var xitem in Minors)
                        {
                            client.Inventory.Remove(xitem.UID, LordsRoad.Game.Enums.ItemUse.Remove, true);
                        }
                    }
                }
                else if (item.SocketTwo == LordsRoad.Game.Enums.Gem.NoSocket)
                {
                    ushort cost = 5;
                    if (pos != ConquerItem.RightWeapon && pos != ConquerItem.LeftWeapon)
                    {
                        cost = 1;
                        var minor = Minors.FirstOrDefault();
                        if (minor.ID == 1200005)
                        {
                            if (client.Inventory.Contains(1200005, cost))
                            {
                                if (Kernel.Rate((double)30))
                                {
                                    item.SocketTwo = LordsRoad.Game.Enums.Gem.EmptySocket;
                                    item.Mode = LordsRoad.Game.Enums.ItemMode.Update;
                                    item.Send(client);
                                    usage.dwParam = 1;
                                    client.LoadItemStats();
                                    Database.ConquerItemTable.UpdateSockets(item);
                                }
                                else
                                {
                                    usage.dwParam = 0;
                                    client.Inventory.Add(1200006, 0, 1);
                                }
                                foreach (var xitem in Minors)
                                {
                                    client.Inventory.Remove(xitem.UID, LordsRoad.Game.Enums.ItemUse.Remove, true);
                                }
                            }
                        }
                        else if (minor.ID == 1200006)
                        {
                            cost = 7;
                            if (client.Inventory.Contains(1200006, cost))
                            {
                                item.SocketTwo = LordsRoad.Game.Enums.Gem.EmptySocket;
                                item.Mode = LordsRoad.Game.Enums.ItemMode.Update;
                                item.Send(client);
                                usage.dwParam = 1;
                                client.LoadItemStats();
                                Database.ConquerItemTable.UpdateSockets(item);
                                foreach (var xitem in Minors)
                                {
                                    client.Inventory.Remove(xitem.UID, LordsRoad.Game.Enums.ItemUse.Remove, true);
                                }
                            }
                        }
                    }
                    else
                    {
                        if (client.Inventory.Contains(1088000, cost))
                        {
                            item.SocketTwo = LordsRoad.Game.Enums.Gem.EmptySocket;
                            item.Mode = LordsRoad.Game.Enums.ItemMode.Update;
                            item.Send(client);
                            usage.dwParam = 1;
                            client.LoadItemStats();
                            Database.ConquerItemTable.UpdateSockets(item);
                            foreach (var xitem in Minors)
                            {
                                client.Inventory.Remove(xitem.UID, LordsRoad.Game.Enums.ItemUse.Remove, true);
                            }
                        }
                    }
                }
            }
        }
I'm going to assume it's in here somewhere, I downgraded the level and socketed it. Would still like to know how I go about changing the success rate though
denominator is offline  
Old 08/26/2019, 22:37   #2
 
pintinho12's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 943
Received Thanks: 408
Are you using a Classic based source? Tho, there are two places where you can forge your equipment level. I don't know when it changed to the new one, so I can't say if you should change the code, but maybe that code is the one from the TwinCity NPC. Sooo, you'll need to rewrite it.
pintinho12 is offline  
Old 08/26/2019, 22:52   #3
 
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
I've found if I use normal gears then it's 100% socket success so I can actually get around it, it could be TC code but I am unsure tbh
denominator is offline  
Old 08/27/2019, 08:21   #4
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,283
Received Thanks: 4,192
I don't see any rate stuff for the first socket, but the second socket has some type of call to a rate check of maybe 30%? Not sure, I've never looked deeply into these sources, but it sounds suspicious.
Spirited is offline  
Thanks
1 User
Old 08/27/2019, 10:55   #5
 
pintinho12's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 943
Received Thanks: 408
Quote:
Originally Posted by denominator View Post
I've found if I use normal gears then it's 100% socket success so I can actually get around it, it could be TC code but I am unsure tbh
I'm sorry, I misunderstood the question. Tho, looks like there's nothing wrong in your code...

But there's the probability thing...

Code:
if (minor.ID == 1200005)
                        {
                            if (client.Inventory.Contains(1200005, cost))
                            {
                                if (Kernel.Rate((double)30))
Second socket does have it, but I think the rate is lower. It's 12,5% probably.
pintinho12 is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Selling] Webdesign, Login-Interface, Char-Interface, Creation-Interface, Loading Screens etc.
01/16/2017 - Metin2 Trading - 9 Replies
http://www.fotos-hochladen.net/uploads/ageofzonahe ajpku96bimv.gif Liebe Community, diese Designs haben wir für unseren Server erstellt, jedoch verkaufen wir diese Designs nun. WICHTIG: Alles wird nur einmalig als Paket verkauft! Das Logo oder eher der Name des Servers ist nicht mit im Verkaufspreis enthalten. Wir werden euch ein neues Logo mit eurem Servernamen im gleichen Stil, wie dem alten erstellen.



All times are GMT +1. The time now is 06:34.


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.