Shop (HONOR)

07/13/2011 18:25 S/W#1
I need some help

Firs take a lock here

Quote:
public void Parse(string Line)
{
string[] data = Line.Split(new string[] { "@@", " " }, StringSplitOptions.RemoveEmptyEntries);
ID = Convert.ToUInt32(data[0]);
Name = data[1].Trim();
Class = Convert.ToByte(data[2]);
Proficiency = Convert.ToByte(data[3]);
Level = Convert.ToByte(data[4]);
Gender = Convert.ToByte(data[5]);
Strength = Convert.ToUInt16(data[6]);
Agility = Convert.ToUInt16(data[7]);
Type = Convert.ToUInt32(data[10]) == 0 ? ItemType.Dropable : ItemType.Others;
GoldWorth = Convert.ToUInt32(data[12]);
MaxAttack = Convert.ToUInt16(data[14]);
MinAttack = Convert.ToUInt16(data[15]);
PhysicalDefence = Convert.ToUInt16(data[16]);
Frequency = Convert.ToByte(data[17]);
Dodge = Convert.ToByte(data[18]);
ItemHP = Convert.ToUInt16(data[19]);
ItemMP = Convert.ToUInt16(data[20]);
Durability = Convert.ToUInt16(data[22]);
MagicAttack = Convert.ToUInt16(data[30]);
MagicDefence = Convert.ToUInt16(data[31]);
AttackRange = Convert.ToUInt16(data[32]);
ConquerPointsWorth = Convert.ToUInt32(data[37]);
StackSize = Convert.ToUInt16(data[55]);
Description = data[53].Replace("`s", "");

Quote:
1088000 DragonBall 0 0 0 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Price = 215 cps

Now I am add honor point shop

Quote:
720842 SwordSoul 0 0 0 0 0 0 0 0 0 0 0 6015700 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 800 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Price = 800 Honor points

My question wat I need write

Quote:
public void Parse(string Line)
{
string[] data = Line.Split(new string[] { "@@", " " }, StringSplitOptions.RemoveEmptyEntries);
ID = Convert.ToUInt32(data[0]);
Name = data[1].Trim();
Class = Convert.ToByte(data[2]);
Proficiency = Convert.ToByte(data[3]);
Level = Convert.ToByte(data[4]);
Gender = Convert.ToByte(data[5]);
Strength = Convert.ToUInt16(data[6]);
Agility = Convert.ToUInt16(data[7]);
Type = Convert.ToUInt32(data[10]) == 0 ? ItemType.Dropable : ItemType.Others;
GoldWorth = Convert.ToUInt32(data[12]);
MaxAttack = Convert.ToUInt16(data[14]);
MinAttack = Convert.ToUInt16(data[15]);
PhysicalDefence = Convert.ToUInt16(data[16]);
Frequency = Convert.ToByte(data[17]);
Dodge = Convert.ToByte(data[18]);
ItemHP = Convert.ToUInt16(data[19]);
ItemMP = Convert.ToUInt16(data[20]);
Durability = Convert.ToUInt16(data[22]);
MagicAttack = Convert.ToUInt16(data[30]);
MagicDefence = Convert.ToUInt16(data[31]);
AttackRange = Convert.ToUInt16(data[32]);
ConquerPointsWorth = Convert.ToUInt32(data[37]);
HonorPointsWorth = ??????????????);
StackSize = Convert.ToUInt16(data[55]);
Description = data[53].Replace("`s", "");
Don't flame me I am new In Co sources,And Thanks for help.
07/14/2011 04:01 zTek#2
I as well was wondering sorta the same thing.

Code:
 public static void LoadItems()
        {
            MySqlDataAdapter DataAdapter = null;
            DataSet DSet = new DataSet();

            try
            {
                DataAdapter = new MySqlDataAdapter("SELECT * FROM `Items`", Connection);
                DataAdapter.Fill(DSet, "Itemz");

                if (DSet.Tables["Itemz"].Rows.Count > 0)
                {
                    int ItemsC = DSet.Tables["Itemz"].Rows.Count;

                    Items = new uint[ItemsC][];

                    for (int i = 0; i < ItemsC; i++)
                    {
                        DataRow DR = DSet.Tables["Itemz"].Rows[i];

                        Items[i] = new uint[16] { (uint)DR["ItemID"], (uint)DR["ClassReq"], (uint)DR["ProfReq"], (uint)DR["LvlReq"], (uint)DR["SexReq"], (uint)DR["StrReq"], (uint)DR["AgiReq"], (uint)DR["Worth"], (uint)DR["MinAtk"], (uint)DR["MaxAtk"], (uint)DR["Defense"], (uint)DR["MDef"], (uint)DR["MAttack"], (uint)DR["Dodge"], (uint)DR["AgiGive"], (uint)DR["CPsWorth"] };
                    }
                    General.WriteLine("Loaded " + ItemsC + " items.");
                }
            }
            catch (Exception Exc) { General.WriteLine(Convert.ToString(Exc)); }
        }
If I added: , (uint)DR["HPoints"]

I don't see how it would actually read ''HPoints''.