Register for your free account! | Forgot your password?

You last visited: Today at 19:13

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

Advertisement



Warehouse Load ><

Discussion on Warehouse Load >< within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2010
Posts: 1,162
Received Thanks: 370
Warehouse Load ><

Okay well I was trying do warehouse laod like this:
Code:
      [code]
//Code after korvacs >.<
public static void LoadTCWH(GameClient C)
        {
            C.MyChar.Warehouses.TCWarehouse.Clear();

            MyIni wr = new MyIni(@"C:\Database\TCWH\" + C.MyChar.Name + ".ini");
            byte i = wr.ReadByte("TC", "Count", 0);

            if (i >= 1)
            {
                Item ii = new Item();
                ii.ID = wr.ReadUInt32(i.ToString(), "ID", 0);
                ii.Plus = wr.ReadByte(i.ToString(), "Plus", 0);
                ii.Bless = wr.ReadByte(i.ToString(), "Bless", 0);
                ii.Enchant = wr.ReadByte(i.ToString(), "Enchant", 0);
                ii.Soc1 = (Item.Gem)wr.ReadByte(i.ToString(), "Soc1", 0);
                ii.Soc2 = (Item.Gem)wr.ReadByte(i.ToString(), "Soc2", 0);
                ii.UID = (uint)C.MyChar.Rnd.Next(10000000);
                ii.MaxDur = ii.DBInfo.Durability;
                ii.CurDur = ii.MaxDur;

                C.MyChar.Warehouses.TCWarehouse.Add(ii);

                i--;
            }
            C.MyChar.MyClient.LocalMessage(2000, "TwinCity Warehouse loaded!");
        }
[/CODE]

It is just creating empty items >< I tried with UID, without UID, with MaxDur, without MaxDur, with CurDur, without CurDur. Nothing seems to work.
It saves fine and it counts how many items u have saved correctly, while trying to load.
But it just makes all the items empty.

This is how it saves: (Example on 130blade)
Code:
[TC]
[0]ID=410339
[0]Plus=12
[0]Bless=7
[0]Enchant=255
[0]Soc1=13
[0]Soc2=13
[0]UID=1337
[0]MaxDur=500
[0]CurDur=500
Count=1
Any solutions or I just keep tryin?
Thanks
Syst3m_W1z4rd is offline  
Old 11/23/2010, 15:32   #2


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
....What on earth is that o.O

Ok you appear to be trying to use an .ini style system to save items in which case you should be saving like:

Code:
[TC]
Count=1

[0]
ID=410339
Plus=12
Bless=7
Enchant=255
Soc1=13
Soc2=13
UID=1337
MaxDur=500
CurDur=500
Or Similar.
Korvacs is offline  
Thanks
2 Users
Old 11/23/2010, 16:04   #3
 
elite*gold: 0
Join Date: Nov 2010
Posts: 1,162
Received Thanks: 370
I will try

I did it like this:
Code:
public static void LoadTCWH(GameClient C)
        {
            C.MyChar.Warehouses.TCWarehouse.Clear();

            MyIni wr = new MyIni(@"C:\Database\TCWH\" + C.MyChar.Name + ".ini");
            byte i = wr.ReadByte("TC", "Count", 0);

            if (i >= 1)
            {
                Item ii = new Item();
                ii.ID = wr.ReadUInt32(i.ToString(), "ID", 0);
                ii.Plus = wr.ReadByte(i.ToString(), "Plus", 0);
                ii.Bless = wr.ReadByte(i.ToString(), "Bless", 0);
                ii.Enchant = wr.ReadByte(i.ToString(), "Enchant", 0);
                ii.Soc1 = (Item.Gem)wr.ReadByte(i.ToString(), "Soc1", 0);
                ii.Soc2 = (Item.Gem)wr.ReadByte(i.ToString(), "Soc2", 0);
                ii.UID = (uint)C.MyChar.Rnd.Next(10000000);
                ii.MaxDur = ii.DBInfo.Durability;
                ii.CurDur = ii.MaxDur;

                C.MyChar.Warehouses.TCWarehouse.Add(ii);

                i--;
            }
            C.MyChar.MyClient.LocalMessage(2000, "TwinCity Warehouse loaded!");
        }
Result: (For some random ring in shop)
Code:
[TC]
Count=1
[0]
ID=150015
Plus=0
Bless=0
Enchant=0
Soc1=0
Soc2=0
UID=58
MDur=1599
CDur=1599
Still no work ><
Syst3m_W1z4rd is offline  
Old 11/23/2010, 16:19   #4
 
elite*gold: 0
Join Date: Oct 2008
Posts: 25
Received Thanks: 9
Code:
        public static void SaveWarehouse(GameClient Hero)
        {
            IniFile wrtr = new IniFile(DatabasePath + @"\Warehouse\" + Hero.Username + ".ini");
            Dictionary<sbyte, IConquerItem> ItemDic = new Dictionary<sbyte, IConquerItem>();
            ushort RWhId = 0;
            for (ushort WhId = 0; WhId < 5; WhId++)
            {
                ushort Count = 0;
                switch (WhId)
                {
                    case 0:
                        RWhId = 8;
                        break;
                    default:
                        return;
                }
                if (Hero.Warehouse.TryGetValue(RWhId, out ItemDic))
                {
                    if (ItemDic.Count > 0 && ItemDic != null)
                        foreach (IConquerItem item in ItemDic.Values)
                        {
                            wrtr.Write(RWhId.ToString(), "Slot[" + Count.ToString() + "]", item.ToString());
                            Count++;
                        }
                    wrtr.Write(RWhId.ToString(), "Count", Count);
                }
            }
        }
        public static void LoadWarehouse(GameClient Hero)
        {
            Hero.Warehouse = new Dictionary<ushort, Dictionary<sbyte, IConquerItem>>();
            IniFile rdr = new IniFile(DatabasePath + @"\Warehouse\" + Hero.Username + ".ini");
            ushort RWhId = 0;
            for (ushort WhId = 0; WhId < 5; WhId++)
            {
                switch (WhId)
                {
                    case 0:
                        RWhId = 8;
                        break;
                    default:
                        return;
                }
                Dictionary<sbyte, IConquerItem> ItemDic = new Dictionary<sbyte, IConquerItem>();
                sbyte count = rdr.ReadSByte(RWhId.ToString(), "Count", 0);
                for (sbyte i = 0; i < count; i++)
                {
                    string[] Item = (rdr.ReadString(RWhId.ToString(), "Slot[" + i.ToString() + "]", String.Empty)).Split(' ');
                    ItemDataPacket LoadedItem = new ItemDataPacket(true);

                    LoadedItem.ID = uint.Parse(Item[0]);
                    LoadedItem.Plus = byte.Parse(Item[1]);
                    LoadedItem.Enchant = byte.Parse(Item[2]);
                    LoadedItem.SocketOne = byte.Parse(Item[3]);
                    LoadedItem.SocketTwo = byte.Parse(Item[4]);
                    LoadedItem.Durability = ushort.Parse(Item[5]);
                    LoadedItem.MaxDurability = ushort.Parse(Item[6]);
                    LoadedItem.Progress = uint.Parse(Item[7]);
                    LoadedItem.UID = ItemDataPacket.NextItemUID;

                    ItemDic.Add(i, LoadedItem);
                }

                Hero.Warehouse.Add(RWhId, ItemDic);
            }
        }
Its Arco is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Warehouse.
01/11/2010 - Conquer Online 2 - 3 Replies
I was wondering if they still have a warehouse crack so we could open the warehouse without the password. I forgot my warehouse password and obviously i dont have a valid email for the wh..So can someone help me out here?
Warehouse pw
08/16/2009 - Conquer Online 2 - 20 Replies
Is there an way the bypass orsomething warehouse pw there whas tread but i cant find it anymore .. plz help me!
Help with warehouse
04/17/2008 - Conquer Online 2 - 3 Replies
Need a program to unlock the warehouse please.
i want to trade my 100m SRO gold to your levelup load or RF load
04/15/2008 - Silkroad Online Trading - 1 Replies
hi..........anyone want SRO gold i have 100m i want to trade this to your levelup load or RF load anyone have just pm me or contact me this email add. [email protected] or +639202300892
Warehouse Pw
09/01/2006 - Conquer Online 2 - 1 Replies
is there anyway to hack a warehouse password. is there any program



All times are GMT +2. The time now is 19:13.


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