[RELEASE]Artisan Wind Socketing

06/17/2010 14:23 ryuchetval#1
This is for 5165 flatfile:

(meteor upgrade)Go to PacketHandling--->ItemPacket--->MeteorUpgrade.cs and replace all with this:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NewestCOServer.PacketHandling.ItemPacket
{
    public class MeteorUpgrade
    {
        public static void Handle(Main.GameClient GC, byte[] Data)
        {
            uint EquipUID = BitConverter.ToUInt32(Data, 4);
            uint MeteorUID = BitConverter.ToUInt32(Data, 8);

            Game.Item Equip = GC.MyChar.FindInvItem(EquipUID);
            Game.Item Meteor = GC.MyChar.FindInvItem(MeteorUID);

            if (Meteor.ID == 1088001)
            {
                Game.ItemIDManipulation E = new Game.ItemIDManipulation(Equip.ID);

                sbyte Chance = (sbyte)(100 - (Equip.DBInfo.LevReq / 1.3));
                byte Quality = (byte)E.Quality;

                if (Quality < 6)
                    Chance += 10;

                E.IncreaseLevel();
                DatabaseItem Di = (DatabaseItem)Database.DatabaseItems[E.ToID()];

                byte NewLevel = Di.LevReq;
                if (NewLevel > Equip.DBInfo.LevReq)
                {
                    if (MyMath.ChanceSuccess(Chance))
                    {
                        if (Equip.Soc1 == Game.Item.Gem.NoSocket)
                        {
                            if (MyMath.ChanceSuccess(0.1))//change this to the rate for 1st sock
                            {
                                Equip.Soc1 = Game.Item.Gem.EmptySocket;
                                Game.World.SendMsgToAll("SYSTEM", GC.MyChar.Name + " has got 1 socket into his/her item", 2011, 0);
                            }
                        }
                        else if (Equip.Soc2 == Game.Item.Gem.NoSocket)
                            if (MyMath.ChanceSuccess(0.05))//change this for the 2nd sock rate
                            {
                                Equip.Soc2 = Game.Item.Gem.EmptySocket;
                                Game.World.SendMsgToAll("SYSTEM", GC.MyChar.Name + " has got second socket into his/her item", 2011, 0);
                            }
                        GC.MyChar.RemoveItem(Equip);
                        Equip.ID = E.ToID();
                        GC.MyChar.AddItem(Equip);
                        GC.LocalMessage(2005, "Item level improved.");
                    }
                    else
                        GC.LocalMessage(2005, "Item upgrade failed.");
                    if (!Chance.ToString().Contains('-'))
                    {
                        GC.MyChar.RemoveItem(Meteor);
                    }
                }
            }
            if (Meteor.ID == 1088002)
            {
                Game.ItemIDManipulation E = new Game.ItemIDManipulation(Equip.ID);

                sbyte Chance = (sbyte)(100 - (Equip.DBInfo.LevReq / 1.3));
                byte Quality = (byte)E.Quality;

                if (Quality < 6)
                    Chance += 10;
                if (Quality == 7)
                    Chance -= 5;
                if (Quality == 8)
                    Chance -= 20;
                if (Quality == 9)
                    Chance -= 30;

                E.IncreaseLevel();
                DatabaseItem Di = (DatabaseItem)Database.DatabaseItems[E.ToID()];
                byte NewLevel = Di.LevReq;
                if (NewLevel > Equip.DBInfo.LevReq)
                {
                    if (Equip.Soc1 == Game.Item.Gem.NoSocket)
                    {
                        if (MyMath.ChanceSuccess(0.1))//change this for 1st sock rate
                        {
                            Equip.Soc1 = Game.Item.Gem.EmptySocket;
                            Game.World.SendMsgToAll("SYSTEM", GC.MyChar.Name + " has got 1 socket into his/her item", 2011, 0);
                        }
                    }
                    else if (Equip.Soc2 == Game.Item.Gem.NoSocket)
                        if (MyMath.ChanceSuccess(0.05))//2nd sock rate
                        {
                            Equip.Soc2 = Game.Item.Gem.EmptySocket;
                            Game.World.SendMsgToAll("SYSTEM", GC.MyChar.Name + " has got second socket into his/her item", 2011, 0);
                        }
                    if (MyMath.ChanceSuccess(Chance))
                    {
                        GC.MyChar.RemoveItem(Equip);
                        Equip.ID = E.ToID();
                        GC.MyChar.AddItem(Equip);
                        GC.LocalMessage(2005, "Item level improved.");
                    }
                    else
                        GC.LocalMessage(2005, "Item upgrade failed.");
                    if (!Chance.ToString().Contains('-'))
                        GC.MyChar.RemoveItem(Meteor);
                }
            }
        }
    }
}
(db upgrade)PacketHandling--->Itempacket--->DBUpgrade.cs and replace all with this:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NewestCOServer.PacketHandling.ItemPacket
{
    public class DBUpgrade
    {
        public static void Handle(Main.GameClient GC, byte[] Data)
        {
            uint EquipUID = BitConverter.ToUInt32(Data, 4);
            uint MeteorUID = BitConverter.ToUInt32(Data, 8);

            Game.Item Equip = GC.MyChar.FindInvItem(EquipUID);
            Game.Item DragonBall = GC.MyChar.FindInvItem(MeteorUID);

            if (DragonBall.ID == 1088000)
            {
                Game.ItemIDManipulation E = new Game.ItemIDManipulation(Equip.ID);

                sbyte Chance = (sbyte)(100 - (Equip.DBInfo.LevReq / 3));
                byte Quality = (byte)E.Quality;

                if (Quality == 6)
                    Chance -= 25;
                else if (Quality == 7)
                    Chance -= 40;
                else if (Quality == 8)
                    Chance -= 70;

                if (Quality < 9)
                {
                    if (Quality < 5) Quality = 5;
                    E.QualityChange((Game.Item.ItemQuality)(Quality + 1));
                     Chance += 16;
                    if (MyMath.ChanceSuccess(Chance))
                    {
                        if (Equip.Soc1 == Game.Item.Gem.NoSocket)
                        {
                            if (MyMath.ChanceSuccess(1.2))//change this for 1st sock rate
                            {
                                Equip.Soc1 = Game.Item.Gem.EmptySocket;
                                Game.World.SendMsgToAll("SYSTEM", GC.MyChar.Name + " has got 1 socket into his/her item", 2011, 0);
                            }
                        }
                        else if (Equip.Soc2 == Game.Item.Gem.NoSocket)
                            if (MyMath.ChanceSuccess(0.3))//2nd sock rate
                            {
                                Equip.Soc2 = Game.Item.Gem.EmptySocket;
                                Game.World.SendMsgToAll("SYSTEM", GC.MyChar.Name + " has got second socket into his/her item", 2011, 0);
                            }
                        GC.MyChar.RemoveItem(Equip);
                        Equip.ID = E.ToID();
                        GC.MyChar.AddItem(Equip);
                        GC.LocalMessage(2005, "Item quality improved.");
                    }
                    else
                        GC.LocalMessage(2005, "Item upgrade failed.");
                    GC.MyChar.RemoveItem(DragonBall);
                }
            }
        }
    }
}
06/17/2010 14:31 sawickas#2
Arco source?
06/17/2010 14:32 ~Master#3
tanel's source
06/17/2010 15:51 ryuchetval#4
removed the arco's source thing...
06/17/2010 16:20 .Summer#5
arco haven't done anything.
the source is tanels 100%

no matter how much effort and edits you put in it, then is still tanels.
06/17/2010 18:29 _DreadNought_#6
lamo What if u changed the socket system, changes how the source works, change the name of it, restructure it ? 100% Tanels....naa like %15