[HELP] Upgradeing in tc Problem

05/29/2009 05:40 Pete1990#1
Ok the dude in tc wont upgrade Backswords on Braclets here are my codes i studyed them and didnt see anything wrong i even tryed chaning them around can someone give me a hand?

HTML Code:
case 20:
                                    {
                                        MyChar.Ready = false;
                                        uint UppedItemUID = (uint)((Data[7] << 24) + (Data[6] << 16) + (Data[5] << 8) + Data[4]);
                                        uint UppingItemUID = (uint)((Data[11] << 24) + (Data[10] << 16) + (Data[9] << 8) + Data[8]);

                                        string UppedItem = "";
                                        string UppingItem = "";
                                        int Counter = 0;

                                        foreach (uint uid in MyChar.Inventory_UIDs)
                                        {
                                            if (uid == UppedItemUID)
                                                UppedItem = MyChar.Inventory[Counter];

                                            Counter++;
                                        }

                                        Counter = 0;

                                        foreach (uint uid in MyChar.Inventory_UIDs)
                                        {
                                            if (uid == UppingItemUID)
                                                UppingItem = MyChar.Inventory[Counter];

                                            Counter++;
                                        }

                                        string[] Splitter = UppedItem.Split('-');
                                        uint UppedItem2 = uint.Parse(Splitter[0]);
                                        string[] Splitter2 = UppingItem.Split('-');
                                        uint UppingItem2 = uint.Parse(Splitter2[0]);

                                        if (UppingItem2 == 1088001)
                                            if (Other.Upgradable(UppedItem2))
                                                if (Other.ItemInfo(UppedItem2)[3] < 130)
                                                    if (Other.ItemType2(UppedItem2) == 11 && Other.WeaponType(UppedItem2) != 117 && Other.ItemInfo(UppedItem2)[3] < 120 || Other.WeaponType(UppedItem2) == 117 && Other.ItemInfo(UppedItem2)[3] < 112 || Other.ItemType2(UppedItem2) == 13 && Other.ItemInfo(UppedItem2)[3] < 120 || Other.ItemType2(UppedItem2) == 15 && Other.ItemInfo(UppedItem2)[3] < 127 || Other.ItemType2(UppedItem2) == 16 && Other.ItemInfo(UppedItem2)[3] < 129 || Other.ItemType(UppedItem2) == 4 || Other.ItemType(UppedItem2) == 5 || Other.ItemType2(UppedItem2) == 12 || Other.WeaponType(UppedItem2) == 132 && Other.ItemInfo(UppedItem2)[3] <= 12)
                                                    {
                                                        bool Success = false;
                                                        double RemoveChance = 0;

                                                        RemoveChance = Other.ItemInfo(UppedItem2)[3] / 3;

                                                        if (Other.ItemQuality(UppedItem2) == 3 || Other.ItemQuality(UppedItem2) == 4 || Other.ItemQuality(UppedItem2) == 5)
                                                            if (Other.ChanceSuccess(90 - RemoveChance))
                                                                Success = true;

                                                        if (Other.ItemQuality(UppedItem2) == 6)
                                                            if (Other.ChanceSuccess(75 - RemoveChance))
                                                                Success = true;

                                                        if (Other.ItemQuality(UppedItem2) == 7)
                                                            if (Other.ChanceSuccess(60 - RemoveChance))
                                                                Success = true;

                                                        if (Other.ItemQuality(UppedItem2) == 8)
                                                            if (Other.ChanceSuccess(50 - RemoveChance))
                                                                Success = true;

                                                        if (Other.ItemQuality(UppedItem2) == 9)
                                                            if (Other.ChanceSuccess(45 - RemoveChance))
                                                                Success = true;

                                                        if (Success)
                                                        {
                                                            MyChar.RemoveItem((ulong)UppedItemUID);

                                                            UppedItem2 = Other.EquipNextLevel(UppedItem2);

                                                            if (Splitter[4] == "0")
                                                                if (Other.ChanceSuccess(0.5))
                                                                    Splitter[4] = "255";

                                                            if (Splitter[5] == "0")
                                                                if (Splitter[4] != "0")
                                                                    if (Other.ChanceSuccess(0.25))
                                                                        Splitter[5] = "255";

                                                            MyChar.AddItem(Convert.ToString(UppedItem2) + "-" + Splitter[1] + "-" + Splitter[2] + "-" + Splitter[3] + "-" + Splitter[4] + "-" + Splitter[5], 0, UppedItemUID);
                                                        }

                                                        MyChar.RemoveItem((ulong)UppingItemUID);
                                                    }
                                        MyChar.Ready = true;
                                        break;
                                    }
                                case 19:
                                    {
                                        MyChar.Ready = false;
                                        uint UppedItemUID = (uint)((Data[7] << 24) + (Data[6] << 16) + (Data[5] << 8) + Data[4]);
                                        uint UppingItemUID = (uint)((Data[11] << 24) + (Data[10] << 16) + (Data[9] << 8) + Data[8]);

                                        string UppedItem = "";
                                        string UppingItem = "";
                                        int Counter = 0;

                                        foreach (uint uid in MyChar.Inventory_UIDs)
                                        {
                                            if (uid == UppedItemUID)
                                                UppedItem = MyChar.Inventory[Counter];

                                            Counter++;
                                        }

                                        Counter = 0;

                                        foreach (uint uid in MyChar.Inventory_UIDs)
                                        {
                                            if (uid == UppingItemUID)
                                                UppingItem = MyChar.Inventory[Counter];

                                            Counter++;
                                        }

                                        string[] Splitter = UppedItem.Split('-');
                                        uint UppedItem2 = uint.Parse(Splitter[0]);
                                        string[] Splitter2 = UppingItem.Split('-');
                                        uint UppingItem2 = uint.Parse(Splitter2[0]);

                                        if (UppingItem2 == 1088000)
                                            if (Other.Upgradable(UppedItem2))
                                                if (Other.ItemQuality(UppedItem2) != 9)
                                                {
                                                    bool Success = false;
                                                    double RemoveChance = 0;

                                                    RemoveChance = Other.ItemInfo(UppedItem2)[3] / 3;

                                                    if (Other.ItemQuality(UppedItem2) == 3 || Other.ItemQuality(UppedItem2) == 4 || Other.ItemQuality(UppedItem2) == 5)
                                                        if (Other.ChanceSuccess(64 - RemoveChance))
                                                            Success = true;

                                                    if (Other.ItemQuality(UppedItem2) == 6)
                                                        if (Other.ChanceSuccess(54 - RemoveChance))
                                                            Success = true;

                                                    if (Other.ItemQuality(UppedItem2) == 7)
                                                        if (Other.ChanceSuccess(48 - RemoveChance))
                                                            Success = true;

                                                    if (Other.ItemQuality(UppedItem2) == 8)
                                                        if (Other.ChanceSuccess(44 - RemoveChance))
                                                            Success = true;

                                                    if (Success)
                                                    {
                                                        if (Other.ItemQuality(UppedItem2) == 3 || Other.ItemQuality(UppedItem2) == 4)
                                                            UppedItem2 += 6 - (uint)Other.ItemQuality(UppedItem2);
                                                        else
                                                            UppedItem2 += 1;

                                                        MyChar.RemoveItem((ulong)UppedItemUID);

                                                        if (Splitter[4] == "0")
                                                            if (Other.ChanceSuccess(1))
                                                                Splitter[4] = "255";

                                                        if (Splitter[5] == "0")
                                                            if (Splitter[4] != "0")
                                                                if (Other.ChanceSuccess(0.5))
                                                                    Splitter[5] = "255";

                                                        MyChar.AddItem(Convert.ToString(UppedItem2) + "-" + Splitter[1] + "-" + Splitter[2] + "-" + Splitter[3] + "-" + Splitter[4] + "-" + Splitter[5], 0, UppedItemUID);
                                                    }

                                                    MyChar.RemoveItem((uint)UppingItemUID);
                                                }
                                        MyChar.Ready = true;
                                        break;
                                    }