public static void EventMonsters(string path) { //Split information lines TxtFile.ReadFromFile(path, '\t'); //Set string info string Stringinformation = null; //Repeat for each line in the file for (int CurrentItem = 0; CurrentItem <= TxtFile.amountLine - 1; CurrentItem++) { //Create full string Stringinformation = TxtFile.lines[CurrentItem].ToString(); //Split string TxtFile.commands = Stringinformation.Split('\t'); //Read id from first row int id = Convert.ToInt32(TxtFile.commands[0]); //Add item to database Data.EventDataBase.ID.Add(id); } //Set definition for console name drop string monsters = "Monster"; //If there are more then 1 event drops if (TxtFile.amountLine > 1) { //Set string to DROPS monsters = "Monsters"; } //Write information to the console Console.WriteLine("[INFO] Loaded " + TxtFile.amountLine + " Event " + monsters + ""); }
public static void SetTimerItems(string listfile) { //Split information lines TxtFile.ReadFromFile(listfile, '\t'); //Set string info string Stringinformation = null; //Repeat for each line in the file for (int l = 0; l <= TxtFile.amountLine - 1; l++) { Stringinformation = TxtFile.lines[l].ToString(); TxtFile.commands = Stringinformation.Split('\t'); } Console.WriteLine("[INFO] Loaded " + TxtFile.amountLine + " Timer items"); }
public static void LoadSkillData(string path) { TxtFile.ReadFromFile(path, '\t'); string s = null; for (int l = 0; l <= TxtFile.amountLine - 1; l++) { s = TxtFile.lines[l].ToString(); TxtFile.commands = s.Split('\t'); int ID = Convert.ToInt32(TxtFile.commands[1]); s_data sd = new s_data(); sd.ID = ID; sd.Name = TxtFile.commands[3]; sd.Series = TxtFile.commands[5]; sd.SkillType = (s_data.SkillTypes)Convert.ToByte(TxtFile.commands[8]); sd.NextSkill = Convert.ToInt32(TxtFile.commands[9]); sd.CastingTimePhase1 = Convert.ToInt32(TxtFile.commands[11]); sd.CastingTimePhase2 = Convert.ToInt32(TxtFile.commands[12]); sd.CastingTimePhase3 = Convert.ToInt32(TxtFile.commands[13]); sd.CastingTime = sd.CastingTimePhase1 + sd.CastingTimePhase2 + sd.CastingTimePhase3; sd.reUseTime = Convert.ToInt32(TxtFile.commands[14]); sd.AttackTime = Convert.ToInt32(TxtFile.commands[15]); sd.Mastery = Convert.ToInt16(TxtFile.commands[34]); sd.SkillPoint = Convert.ToInt32(TxtFile.commands[46]); sd.Weapon1 = Convert.ToByte(TxtFile.commands[50]); sd.Weapon2 = Convert.ToByte(TxtFile.commands[51]); sd.Mana = Convert.ToInt32(TxtFile.commands[53]); sd.tmpProp = Convert.ToInt32(TxtFile.commands[75]); sd.AmountEffect = 0; sd.AttackCount = Convert.ToInt32(TxtFile.commands[77]); sd.RadiusType = s_data.RadiusTypes.ONETARGET; sd.isAttackSkill = false; int propIndex = 69; bool effectEnd = false; int skillInfo; //Imbue if (sd.Name.Contains("_GIGONGTA_")) { sd.Definedname = s_data.Definedtype.Imbue; } try { while ((skillInfo = Convert.ToInt32(TxtFile.commands[propIndex])) != 0 && !effectEnd) { propIndex++; string nameString = ASCIIIntToString(skillInfo); switch (nameString) { // get value - only to client case "getv": case "MAAT": // warrior case "E2AH": case "E2AA": case "E1SA": case "E2SA": // rogue case "CBAT": case "CBRA": case "DGAT": case "DGHR": case "DGAA": case "STDU": case "STSP": case "RPDU": case "RPTU": case "RPBU": // wizard case "WIMD": case "WIRU": case "EAAT": case "COAT": case "FIAT": case "LIAT": // warlock case "DTAT": case "DTDR": case "BLAT": case "TRAA": case "BSHP": case "SAAA": // bard case "MUAT": case "BDMD": case "MUER": case "MUCR": case "DSER": case "DSCR": // cleric case "HLAT": case "HLRU": case "HLMD": case "HLFS": case "HLMI": case "HLBP": case "HLSM": // attribute only - no effect case "nmh": // Healing stone (socket stone) case "nmf": // Movement stone (socket stone) case "eshp": case "reqn": case "fitp": case "ao": // fortress ?? case "rpkt": // fortress repair kit case "hitm": // Taunt the enemy into attacking only you case "efta": // bard tambour case "lks2": // warlock damage buff case "hntp": // tag point case "trap": // csapda?? case "cbuf": //itembuff case "nbuf": // ??(ticketnél volt) nem látszika buff másnak? case "bbuf": //debuff case null: break; case "setv": //set value string setvType = ASCIIIntToString(Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; switch (setvType) { // warrior case "E1SA": // phy attack % //done case "E2SA": // phy attack % //done case "E2AA": case "E2AH": // hit rate inc //done // rogue case "CBAT": case "CBRA": case "DGAT": case "DGHR": case "DGAA": case "STSP": // speed % case "STDU": // set stealth duration case "RPDU": // phy attack % case "RPBU": // poison duration // wizard case "WIMD": // wizard mana decrease % case "WIRU": // Increase the range of magic attacks case "EAAT": // Magical Attack Power %Increase earth case "COAT": // Magical Attack Power %Increase cold case "FIAT": // Magical Attack Power %Increase fire case "LIAT": // Magical Attack Power %Increase fire // warlock case "DTAT": // Magical Attack Power %Increase case "DTDR": // Increase the abnormal status duration inflicted by Dark magic case "BLAT": // Magical Attack Power %Increase Blood Line row case "TRAA": // Increases a Warlocks trap damage case "BSHP": // HP draining skill attack power increase // bard case "MUAT": // Magical Attack Power % Increase case "MUER": // Increase the range of harp magic case "BDMD": // Lowers the MP consumption of skills case "MUCR": // Resistance Ratio % Increase. case "DSER": // Increase the range for dance skill. case "DSCR": // Increase resistance ratio. You don't stop dancing even under attack // cleric case "HLAT": // Increase the damage of cleric magic. % case "HLRU": // HP recovery % Inrease sd.Properties1.Add(setvType, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; break; // cleric case "HLFS": // charity case "HLMI": // charity case "HLBP": // charity case "HLSM": // charity sd.Properties1.Add(setvType, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; sd.Properties2.Add(setvType, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; break; } break; // 1 properties case "tant": case "rcur": // randomly cure number of bad statuses case "ck": case "ovl2": case "mwhs": case "scls": case "mwmh": case "mwhh": case "rmut": case "abnb": case "mscc": case "bcnt": // cos bag count [slot] case "chpi": // cos hp increase [%] case "chst": // cos speed increase [%] case "csum": // cos summon [coslevel] case "jobs": // job skill [charlevel] case "hwit": // ITEM_ETC_SOCKET_STONE_HWAN ?? duno what is it case "spi": // Gives additional skill points when hunting monsters. [%inc] case "dura": // skill duration case "msid": // mod def ignore prob% case "hwir": // honor buff new zerk % case "hst3": // honor buff speed %inc case "hst2": // rogue haste speed %inc case "lkdd": // Share % damage taken from a selected person. (link damage) case "gdr": // gold drop rate %inc case "chcr": // target loses % HP case "cmcr": // target loses % MP case "dcmp": // MP Cost % Decrease case "mwdt": // Weapon Magical Attack Power %Reflect case "pdmg": // Absolute Damage case "lfst": // life steal Absorb HP case "puls": // pulsing skill frequenzy case "pwtt": // Weapon Physical Attack Power reflect. case "pdm2": // ghost killer case "luck": // lucky %inc case "alcu": // alchemy lucky %inc case "terd": // parry reduce case "thrd": // Attack ratio reduce case "ru": // range incrase case "hste": // speed %inc case "da": // downattack %inc case "reqc": // required status? case "dgmp": // damage mana absorb case "dcri": // critical parry inc sd.Properties1.Add(nameString, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; break; // 2 properties case "mc": case "atca": case "reat": case "defr": case "msr": // Triggered at a certain chance, the next spell cast does not cost MP. [%chance to trigger|%mana reduce] case "kb": // knockback case "ko": // knockdown case "zb": // zombie case "fz": // frozen case "fb": // frostbite case "spda": // Shield physical defence % reduce. Physical attack power increase. case "expi": // sp|exp %inc PET? case "stri": // str increase case "inti": // int increase case "rhru": // Increase the amount of HP healed. % case "dmgt": // Absorption %? case "dtnt": // Aggro Reduce case "mcap": // monster mask lvl cap case "apau": // attack power inc [phy|mag] case "lkag": // Share aggro case "dttp": // detect stealth [|maxstealvl] case "tnt2": // taunt inc | aggro %increase case "expu": // exp|sp %inc case "msch": // monster transform case "dtt": // detect invis [ | maxinvilvl] case "hpi": // hp incrase [inc|%inc] case "mpi": // mp incrase [inc|%inc] case "odar": // damage absorbation case "resu": // resurrection [lvl|expback%] case "er": // evasion | parry %inc case "hr": // hit rating inc | attack rating inc case "tele": // light teleport [sec|meter*10] case "tel2": // wizard teleport [sec|meter*10] case "tel3": // warrior sprint teleport [sec|m] case "onff": // mana consume per second case "br": // blocking ratio [|%inc] case "cr": // critical inc case "dru": // damage %inc [phy|mag] case "irgc": // reincarnation [hp|mp] case "pola": // Preemptive attack prevention [hp|mp] case "curt": // negative status effect reduce target player sd.Properties1.Add(nameString, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; sd.Properties2.Add(nameString, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; break; // 3 properties case "curl": //anti effect: cure [|effect cure amount|effect level] case "real": case "skc": case "bldr": // Reflects damage upon successful block. case "ca": // confusion case "rt": // restraint (wizard) << restraint i guess it should restrain the target or put to ground as in same spot like chains on feet :) case "fe": // fear case "sl": // dull case "st": // stun case "se": // sleep case "es": // lightening case "bu": // burn case "ps": // poison case "lkdh": // link Damage % MP Absorption (Mana Switch) case "stns": // Petrified status case "hide": // stealth hide case "lkdr": // Share damage case "defp": // defensepower inc [phy|mag] case "bgra": // negative status effect reduce case "cnsm": // consume item sd.Properties1.Add(nameString, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; sd.Properties2.Add(nameString, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; sd.Properties3.Add(nameString, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; break; // 4 properties case "csit": // division case "tb": // hidden case "my": // short sight case "ds": // disease case "csmd": // weaken case "cspd": // decay case "cssr": // impotent case "dn": // darkness case "mom": // duration | Berserk mode Attack damage/Defence/Hit rate/Parry rate will increase % | on every X mins case "pmdp": // maximum physical defence strength decrease % case "pmhp": // hp reduce case "dmgr": // damage return [prob%|return%||] case "lnks": // Connection between players case "pmdg": // damage reduce [dura|phy%|mag%|?] case "qest": // some quest related skill? case "heal": // heal [hp|hp%|mp|mp%] case "pw": // player wall case "summ": // summon bird sd.Properties1.Add(nameString, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; sd.Properties2.Add(nameString, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; sd.Properties3.Add(nameString, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; sd.Properties4.Add(nameString, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; break; // 5 properties case "bl": // bleed sd.Properties1.Add(nameString, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; sd.Properties2.Add(nameString, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; sd.Properties3.Add(nameString, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; sd.Properties4.Add(nameString, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; sd.Properties5.Add(nameString, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; break; // 6 properties case "cshp": // panic case "csmp": // combustion sd.Properties1.Add(nameString, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; sd.Properties2.Add(nameString, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; sd.Properties3.Add(nameString, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; sd.Properties4.Add(nameString, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; sd.Properties5.Add(nameString, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; sd.Properties6.Add(nameString, Convert.ToInt32(TxtFile.commands[propIndex])); propIndex++; break; case "reqi": // required item int weapType1 = Convert.ToInt32(TxtFile.commands[propIndex]); propIndex++; int weapType2 = Convert.ToInt32(TxtFile.commands[propIndex]); propIndex++; if (weapType1 == 4 && weapType2 == 1) { sd.ReqItems.Add(s_data.ItemTypes.SHIELD); } else if (weapType1 == 4 && weapType2 == 2) { sd.ReqItems.Add(s_data.ItemTypes.EUSHIELD); } else if (weapType1 == 6 && weapType2 == 6) { sd.ReqItems.Add(s_data.ItemTypes.BOW); } else if (weapType1 == 6 && weapType2 == 7) { sd.ReqItems.Add(s_data.ItemTypes.ONEHANDED); } else if (weapType1 == 6 && weapType2 == 8) { sd.ReqItems.Add(s_data.ItemTypes.TWOHANDED); } else if (weapType1 == 6 && weapType2 == 9) { sd.ReqItems.Add(s_data.ItemTypes.AXE); } else if (weapType1 == 6 && weapType2 == 10) { sd.ReqItems.Add(s_data.ItemTypes.WARLOCKROD); } else if (weapType1 == 6 && weapType2 == 11) { sd.ReqItems.Add(s_data.ItemTypes.STAFF); } else if (weapType1 == 6 && weapType2 == 12) { sd.ReqItems.Add(s_data.ItemTypes.XBOW); } else if (weapType1 == 6 && weapType2 == 13) { sd.ReqItems.Add(s_data.ItemTypes.DAGGER); } else if (weapType1 == 6 && weapType2 == 14) { sd.ReqItems.Add(s_data.ItemTypes.BARD); } else if (weapType1 == 6 && weapType2 == 15) { sd.ReqItems.Add(s_data.ItemTypes.CLERICROD); } else if (weapType1 == 10 && weapType2 == 0) { sd.ReqItems.Add(s_data.ItemTypes.LIGHTARMOR); } else if (weapType1 == 14 && weapType2 == 1) { sd.ReqItems.Add(s_data.ItemTypes.DEVILSPIRIT); } break; case "ssou": // summon monster s_data.summon_data summon; while (Convert.ToInt32(TxtFile.commands[propIndex]) != 0) { summon = new s_data.summon_data(); summon.ID = Convert.ToInt32(TxtFile.commands[propIndex]); propIndex++; summon.Type = Convert.ToByte(TxtFile.commands[propIndex]); propIndex++; summon.MinSummon = Convert.ToByte(TxtFile.commands[propIndex]); propIndex++; summon.MaxSummon = Convert.ToByte(TxtFile.commands[propIndex]); propIndex++; sd.SummonList.Add(summon); } break; case "att": // if attack skill sd.isAttackSkill = true; sd.Time = Convert.ToInt32(TxtFile.commands[propIndex]); propIndex++; sd.MagPer = Convert.ToInt32(TxtFile.commands[propIndex]); propIndex++; sd.MinAttack = Convert.ToInt32(TxtFile.commands[propIndex]); propIndex++; sd.MaxAttack = Convert.ToInt32(TxtFile.commands[propIndex]); propIndex++; sd.PhyPer = Convert.ToInt32(TxtFile.commands[propIndex]); propIndex++; break; case "efr": sd.efrUnk1 = Convert.ToInt32(TxtFile.commands[propIndex]); propIndex++; int type2 = Convert.ToInt32(TxtFile.commands[propIndex]); if (type2 == 6) { sd.RadiusType = s_data.RadiusTypes.TRANSFERRANGE; } else if (type2 == 2) { sd.RadiusType = s_data.RadiusTypes.FRONTRANGERADIUS; } else if (type2 == 7) { sd.RadiusType = s_data.RadiusTypes.MULTIPLETARGET; } else if (type2 == 4) { sd.RadiusType = s_data.RadiusTypes.PENETRATION; } else if (type2 == 3) { sd.RadiusType = s_data.RadiusTypes.PENETRATIONRANGED; } else if (type2 == 1) { sd.RadiusType = s_data.RadiusTypes.SURROUNDRANGERADIUS; } propIndex++; sd.Distance = Convert.ToInt32(TxtFile.commands[propIndex]); // in decimeters propIndex++; sd.SimultAttack = Convert.ToInt32(TxtFile.commands[propIndex]); propIndex++; int unk2 = Convert.ToInt32(TxtFile.commands[propIndex]); propIndex++; int unk3 = Convert.ToInt32(TxtFile.commands[propIndex]); propIndex++; break; default: //Console.WriteLine(" {0} {1} {2}", propIndex, nameString, sd.Name); effectEnd = true; break; } } } catch (Exception ex) { Systems.Debugger.Write(ex); } // this property only affects target when player target is set sd.canSelfTargeted = true; sd.needPVPstate = true; ////////////// set skill property's additional info for non attack skillz if (!sd.isAttackSkill) { if (sd.Properties1.ContainsKey("heal") || // heal sd.Properties1.ContainsKey("curl")) // bad status removal { sd.TargetType = Global.s_data.TargetTypes.PLAYER; sd.needPVPstate = false; } if (sd.Properties1.ContainsKey("resu")) // resurrection { sd.TargetType = Global.s_data.TargetTypes.PLAYER; sd.canSelfTargeted = false; sd.needPVPstate = false; } if (sd.Properties1.ContainsKey("terd") || // parry reduce sd.Properties1.ContainsKey("thrd") || // Attack ratio reduce sd.Properties1.ContainsKey("cspd") || // decay sd.Properties1.ContainsKey("csmd") || // weaken sd.Properties1.ContainsKey("cssr") || // impotent sd.Properties1.ContainsKey("st") || // stun sd.Properties1.ContainsKey("bu") || // burn sd.Properties1.ContainsKey("fb")) // frostbite { sd.TargetType = Global.s_data.TargetTypes.PLAYER | s_data.TargetTypes.MOB; sd.canSelfTargeted = false; } } #region Information /* * sd.EffectLvl1 = Convert.ToInt32(TxtFile.commands[82]); * if (sd.ID == 3977) * Console.WriteLine("{0}", sd.Properties2); * if(Convert.ToInt64(TxtFile.commands[78]) < 255) sd.eLevel = Convert.ToByte(TxtFile.commands[78]); * if (ID == 3639) * { * for (int i = 0; i <= TxtFile.commands.Length - 1; i++) * Console.WriteLine(" {0} {1}", i, TxtFile.commands[i]); * } * if (ID == 160) * { * for (int i = 0; i <= TxtFile.commands.Length - 1; i++) * Console.WriteLine(" {0} {1}", i, TxtFile.commands[i]); * } */ #endregion Data.SkillBase[ID] = sd; } Console.WriteLine("[INFO] Loaded " + TxtFile.amountLine + " skills"); }
public static void ItemDatabase(string path) { //Split information lines TxtFile.ReadFromFile(path, '\t'); //Set string info string Stringinformation = null; //Repeat for each line in the file for (int t = 0; t <= TxtFile.amountLine - 1; t++) { //Load from file #region Load file info Stringinformation = TxtFile.lines[t].ToString(); TxtFile.commands = Stringinformation.Split('\t'); item_database it = new item_database(); it.Name = TxtFile.commands[2]; it.ID = Convert.ToInt32(TxtFile.commands[1]); it.Class_A = Convert.ToInt32(TxtFile.commands[9]); it.Class_D = Convert.ToInt32(TxtFile.commands[10]); it.Class_B = Convert.ToInt32(TxtFile.commands[11]); it.Class_C = Convert.ToInt32(TxtFile.commands[12]); it.Race = Convert.ToByte(TxtFile.commands[14]); it.SOX = Convert.ToByte(TxtFile.commands[15]); it.SoulBound = Convert.ToByte(TxtFile.commands[18]); it.Shop_price = Convert.ToInt32(TxtFile.commands[26]); it.Storage_price = Convert.ToInt32(TxtFile.commands[30]); it.Sell_Price = Convert.ToInt32(TxtFile.commands[31]); it.Level = Convert.ToByte(TxtFile.commands[33]); it.Max_Stack = Convert.ToInt32(TxtFile.commands[57]); it.Gender = Convert.ToByte(TxtFile.commands[58]); it.Degree = Convert.ToByte(TxtFile.commands[61]); //Stone related (Stone creation) #region Stone creation it.EARTH_ELEMENTS_AMOUNT_REQ = Convert.ToInt32(TxtFile.commands[118]); it.EARTH_ELEMENTS_NAME = Convert.ToString(TxtFile.commands[119]); it.WATER_ELEMENTS_AMOUNT_REQ = Convert.ToInt32(TxtFile.commands[120]); it.WATER_ELEMENTS_NAME = Convert.ToString(TxtFile.commands[121]); it.FIRE_ELEMENTS_AMOUNT_REQ = Convert.ToInt32(TxtFile.commands[122]); it.FIRE_ELEMENTS_NAME = Convert.ToString(TxtFile.commands[123]); it.WIND_ELEMENTS_AMOUNT_REQ = Convert.ToInt32(TxtFile.commands[124]); it.WIND_ELEMENTS_NAME = Convert.ToString(TxtFile.commands[125]); #endregion it.Defans.Durability = Convert.ToDouble(TxtFile.commands[63]); it.Defans.MinPhyDef = Convert.ToDouble(TxtFile.commands[65]); it.Defans.PhyDefINC = Convert.ToDouble(TxtFile.commands[67]); it.Defans.Parry = Convert.ToDouble(TxtFile.commands[68]); it.Defans.MinBlock = Convert.ToByte(Math.Round(Convert.ToDouble(TxtFile.commands[74]))); it.Defans.MaxBlock = Convert.ToByte(Math.Round(Convert.ToDouble(TxtFile.commands[75]))); it.Defans.MinMagDef = Convert.ToDouble(TxtFile.commands[76]); it.Defans.MagDefINC = Convert.ToDouble(TxtFile.commands[78]); it.Defans.PhyAbsorb = Convert.ToDouble(TxtFile.commands[79]); it.Defans.MagAbsorb = Convert.ToDouble(TxtFile.commands[80]); it.Defans.AbsorbINC = Convert.ToDouble(TxtFile.commands[81]); it.needEquip = Convert.ToBoolean(Convert.ToByte(TxtFile.commands[93])); it.ATTACK_DISTANCE = Convert.ToInt16(TxtFile.commands[94]); it.Attack.Min_LPhyAttack = Convert.ToDouble(TxtFile.commands[95]); it.Attack.Min_HPhyAttack = Convert.ToDouble(TxtFile.commands[97]); it.Attack.PhyAttackInc = Convert.ToDouble(TxtFile.commands[99]); it.Attack.Min_LMagAttack = Convert.ToDouble(TxtFile.commands[100]); it.Attack.Min_HMagAttack = Convert.ToDouble(TxtFile.commands[102]); it.Attack.MagAttackINC = Convert.ToDouble(TxtFile.commands[104]); it.Attack.MinAttackRating = Convert.ToDouble(TxtFile.commands[113]); it.Attack.MaxAttackRating = Convert.ToDouble(TxtFile.commands[114]); it.Attack.MinCrit = Convert.ToByte(Convert.ToDouble(TxtFile.commands[116])); it.Attack.MaxCrit = Convert.ToByte(Convert.ToDouble(TxtFile.commands[117])); it.ObjectName = TxtFile.commands[119]; it.Use_Time = Convert.ToInt32(TxtFile.commands[118]); it.Use_Time2 = Convert.ToInt32(TxtFile.commands[122]); it.MaxBlueAmount = Convert.ToByte(TxtFile.commands[158]); if (it.ObjectName.Contains("SKILL")) { foreach (s_data sd in Data.SkillBase) { if (sd != null) { if (sd.Name == it.ObjectName) { it.SkillID = sd.ID; break; } } } } Data.ItemBase[it.ID] = it; #endregion //Item slot types all ot #region Item Slot Types if (it.Name.Contains("SHIELD") && it.Name.Contains("EU") && !it.Name.Contains("ETC")) { it.Itemtype = item_database.ItemType.EU_SHIELD; } else if (it.Name.Contains("SHIELD") && it.Name.Contains("CH") && !it.Name.Contains("ETC")) { it.Itemtype = item_database.ItemType.CH_SHIELD; } else if (it.Class_B == 4 && it.Class_C == 1 && it.Class_D == 3) { it.Itemtype = item_database.ItemType.ARROW; } else if (it.Class_B == 4 && it.Class_C == 2 && it.Class_D == 3) { it.Itemtype = item_database.ItemType.BOLT; } else if (it.Class_B == 1 && it.Class_C == 1 && it.Class_D == 1) { it.Itemtype = item_database.ItemType.HAT; } else if (it.Class_B == 3 && it.Class_C == 2 && it.Class_D == 1) { it.Itemtype = item_database.ItemType.SHOULDER; } else if (it.Class_B == 3 && it.Class_C == 3 && it.Class_D == 1) { it.Itemtype = item_database.ItemType.SUIT; } else if (it.Class_B == 3 && it.Class_C == 4 && it.Class_D == 1) { it.Itemtype = item_database.ItemType.TROUSERS; } else if (it.Class_B == 3 && it.Class_C == 5 && it.Class_D == 1) { it.Itemtype = item_database.ItemType.HANDS; } else if (it.Class_B == 3 && it.Class_C == 6 && it.Class_D == 1) { it.Itemtype = item_database.ItemType.SHOES; } else if (it.Class_B == 6 && it.Class_C == 7 && it.Class_D == 1) { it.Itemtype = item_database.ItemType.EU_SWORD; } else if (it.Class_B == 6 && it.Class_C == 8 && it.Class_D == 1) { it.Itemtype = item_database.ItemType.EU_TSWORD; } else if (it.Class_B == 6 && it.Class_C == 9 && it.Class_D == 1) { it.Itemtype = item_database.ItemType.EU_AXE; } else if (it.Class_B == 6 && it.Class_C == 10 && it.Class_D == 1) { it.Itemtype = item_database.ItemType.EU_DARKSTAFF; } else if (it.Class_B == 6 && it.Class_C == 11 && it.Class_D == 1) { it.Itemtype = item_database.ItemType.EU_TSTAFF; } else if (it.Class_B == 6 && it.Class_C == 12 && it.Class_D == 1) { it.Itemtype = item_database.ItemType.EU_CROSSBOW; } else if (it.Class_B == 6 && it.Class_C == 13 && it.Class_D == 1) { it.Itemtype = item_database.ItemType.EU_DAGGER; } else if (it.Class_B == 6 && it.Class_C == 14 && it.Class_D == 1) { it.Itemtype = item_database.ItemType.EU_HARP; } else if (it.Class_B == 6 && it.Class_C == 15 && it.Class_D == 1) { it.Itemtype = item_database.ItemType.EU_STAFF; } else if (it.Class_B == 5 && it.Class_C == 1 && it.Class_D == 1) { it.Itemtype = item_database.ItemType.EARRING; } else if (it.Class_B == 5 && it.Class_C == 3 && it.Class_D == 1) { it.Itemtype = item_database.ItemType.RING; } else if (it.Class_B == 5 && it.Class_C == 2 && it.Class_D == 1) { it.Itemtype = item_database.ItemType.NECKLACE; } else if (it.Class_A == 3 && it.Class_C == 2 && it.Class_D == 1 && it.Class_B == 6) { it.Itemtype = item_database.ItemType.SWORD; } else if (it.Class_A == 3 && it.Class_C == 3 && it.Class_D == 1 && it.Class_B == 6) { it.Itemtype = item_database.ItemType.BLADE; } else if (it.Class_A == 3 && it.Class_C == 4 && it.Class_D == 1 && it.Class_B == 6) { it.Itemtype = item_database.ItemType.SPEAR; } else if (it.Class_A == 3 && it.Class_C == 5 && it.Class_D == 1 && it.Class_B == 6) { it.Itemtype = item_database.ItemType.GLAVIE; } else if (it.Class_A == 3 && it.Class_C == 6 && it.Class_D == 1 && it.Class_B == 6) { it.Itemtype = item_database.ItemType.BOW; } #endregion //Item armor type: #region Item Armor Types if (it.Name.Contains("LIGHT") && it.Name.Contains("EU")) { it.Type = item_database.ArmorType.LIGHT; } else if (it.Name.Contains("LIGHT") && it.Name.Contains("CH")) { it.Type = item_database.ArmorType.PROTECTOR; } else if (it.Name.Contains("HEAVY") && it.Name.Contains("EU")) { it.Type = item_database.ArmorType.HEAVY; } else if (it.Name.Contains("HEAVY") && it.Name.Contains("CH")) { it.Type = item_database.ArmorType.ARMOR; } else if (it.Name.Contains("CLOTHES") && it.Name.Contains("EU")) { it.Type = item_database.ArmorType.ROBE; } else if (it.Name.Contains("CLOTHES") && it.Name.Contains("CH")) { it.Type = item_database.ArmorType.GARMENT; } else if (it.Name.Contains("C_SUPER")) { it.Type = item_database.ArmorType.GM; } #endregion //Jewelry #region Jewelry else if (it.Name.Contains("_RING_") && !it.Name.Contains("ETC")) { it.Itemtype = Global.item_database.ItemType.RING; } else if (it.Name.Contains("_EARRING_") && !it.Name.Contains("ETC")) { it.Itemtype = Global.item_database.ItemType.EARRING; } else if (it.Name.Contains("_NECKLACE_") && !it.Name.Contains("ETC")) { it.Itemtype = Global.item_database.ItemType.NECKLACE; } #endregion //Grabpets #region Grabpet else if (it.Name.Contains("COS_P") && it.Class_A == 3 && it.Class_B == 1 && it.Class_C == 2 && it.Class_D == 2) { it.Pettype = item_database.PetType.GRABPET; } #endregion //Attackpets #region Attack pets else if (it.Name.Contains("COS_P") && it.Class_A == 3 && it.Class_B == 1 && it.Class_C == 1 && it.Class_D == 2) { it.Pettype = item_database.PetType.ATTACKPET; } #endregion //Transport horses #region Transport horses else if (it.Name.Contains("COS_T")) { it.Pettype = item_database.PetType.JOBTRANSPORT; } #endregion //Normal horses #region Transport horses else if (it.Name.Contains("COS_C")) { it.Pettype = item_database.PetType.TRANSPORT; } #endregion //Quest items , define more later. #region Quest Items else if (it.Name.Contains("QNQ")) { it.Questtype = item_database.QuestType.QUEST; } #endregion //Avatars #region Avatar related #region Avatars else if (it.Name.Contains("AVATAR") && it.Name.Contains("AVATAR")) { it.Type = item_database.ArmorType.AVATAR; } #endregion //Avatars Attach #region Avatars Attach else if (it.Name.Contains("AVATAR") && it.Name.Contains("ATTACH")) { it.Type = item_database.ArmorType.AVATARATTACH; } #endregion //Avatars Hat #region Avatars Hat else if (it.Name.Contains("AVATAR") && it.Name.Contains("HAT")) { it.Type = item_database.ArmorType.AVATARHAT; } #endregion #endregion //Potions #region Potions #region Normal potions else if (it.Name.Contains("CANDY") && it.Name.Contains("RED")) { it.Etctype = item_database.EtcType.HP_POTION; } else if (it.Name.Contains("POTION") && it.Name.Contains("HP") && it.Class_C == 1 && it.Item_Mall_Type != 2) { it.Etctype = item_database.EtcType.HP_POTION; } else if (it.Name.Contains("CANDY") && it.Name.Contains("BLUE")) { it.Etctype = item_database.EtcType.MP_POTION; } else if (it.Name.Contains("POTION") && it.Name.Contains("MP") && it.Class_C == 2 && it.Item_Mall_Type != 2) { it.Etctype = item_database.EtcType.MP_POTION; } else if (it.Name.Contains("CANDY") && it.Name.Contains("VIOLET")) { it.Etctype = item_database.EtcType.VIGOR_POTION; } else if (it.Name.Contains("ITEM_ETC_ALL_POTION")) { it.Etctype = item_database.EtcType.VIGOR_POTION; } #endregion #region HP / MP Changing potions else if (it.Name.Contains("HP_INC")) { it.Etctype = item_database.EtcType.HPSTATPOTION; } else if (it.Name.Contains("MP_INC")) { it.Etctype = item_database.EtcType.MPSTATPOTION; } #endregion #region Speed Potions else if (it.Name.Contains("POTION_SPEED")) { it.Etctype = item_database.EtcType.SPEED_POTION; } #endregion #region Berserk potions else if (it.Name.Contains("HWAN_POTION")) { it.Etctype = Global.item_database.EtcType.BERSERKPOTION; } #endregion #endregion //Tickets all types #region Silver Skill Tickets else if (it.Name.Contains("TICKET") && it.Name.Contains("SILVER") && it.Name.Contains("1D") && it.Name.Contains("SKILL")) { it.Ticket = item_database.Tickets.SKILL_SILVER_1_DAY; } else if (it.Name.Contains("TICKET") && it.Name.Contains("SILVER") && it.Name.Contains("4W") && it.Name.Contains("SKILL")) { it.Ticket = item_database.Tickets.SKILL_SILVER_4_WEEKS; } else if (it.Name.Contains("TICKET") && it.Name.Contains("SILVER") && it.Name.Contains("8W") && it.Name.Contains("SKILL")) { it.Ticket = item_database.Tickets.SKILL_SILVER_8_WEEKS; } else if (it.Name.Contains("TICKET") && it.Name.Contains("SILVER") && it.Name.Contains("12W") && it.Name.Contains("SKILL")) { it.Ticket = item_database.Tickets.SKILL_SILVER_12_WEEKS; } else if (it.Name.Contains("TICKET") && it.Name.Contains("SILVER") && it.Name.Contains("16W") && it.Name.Contains("SKILL")) { it.Ticket = item_database.Tickets.SKILL_SILVER_16_WEEKS; } #endregion #region Gold Skill Tickets else if (it.Name.Contains("TICKET") && it.Name.Contains("GOLD") && it.Name.Contains("1D") && it.Name.Contains("SKILL")) { it.Ticket = item_database.Tickets.SKILL_GOLD_1_DAY; } else if (it.Name.Contains("TICKET") && it.Name.Contains("GOLD") && it.Name.Contains("4W") && it.Name.Contains("SKILL")) { it.Ticket = item_database.Tickets.SKILL_GOLD_4_WEEKS; } else if (it.Name.Contains("TICKET") && it.Name.Contains("GOLD") && it.Name.Contains("8W") && it.Name.Contains("SKILL")) { it.Ticket = item_database.Tickets.SKILL_GOLD_8_WEEKS; } else if (it.Name.Contains("TICKET") && it.Name.Contains("GOLD") && it.Name.Contains("12W") && it.Name.Contains("SKILL")) { it.Ticket = item_database.Tickets.SKILL_GOLD_12_WEEKS; } else if (it.Name.Contains("TICKET") && it.Name.Contains("GOLD") && it.Name.Contains("16W") && it.Name.Contains("SKILL")) { it.Ticket = item_database.Tickets.SKILL_GOLD_16_WEEKS; } #endregion #region Silver Tickets else if (it.Name.Contains("MALL_SILVER_TIME") && it.Name.Contains("1D")) { it.Ticket = item_database.Tickets.SILVER_1_DAY; } else if (it.Name.Contains("MALL_SILVER_TIME") && it.Name.Contains("4W")) { it.Ticket = item_database.Tickets.SILVER_4_WEEKS; } else if (it.Name.Contains("MALL_SILVER_TIME") && it.Name.Contains("8W")) { it.Ticket = item_database.Tickets.SILVER_8_WEEKS; } else if (it.Name.Contains("MALL_SILVER_TIME") && it.Name.Contains("12W")) { it.Ticket = item_database.Tickets.SILVER_12_WEEKS; } else if (it.Name.Contains("MALL_SILVER_TIME") && it.Name.Contains("16W")) { it.Ticket = item_database.Tickets.SILVER_16_WEEKS; } #endregion #region Gold Tickets else if (it.Name.Contains("MALL_GOLD_TIME") && it.Name.Contains("1D")) { it.Ticket = item_database.Tickets.GOLD_1_DAY; } else if (it.Name.Contains("MALL_GOLD_TIME") && it.Name.Contains("4W")) { it.Ticket = item_database.Tickets.GOLD_4_WEEKS; } else if (it.Name.Contains("MALL_GOLD_TIME") && it.Name.Contains("8W")) { it.Ticket = item_database.Tickets.GOLD_8_WEEKS; } else if (it.Name.Contains("MALL_GOLD_TIME") && it.Name.Contains("12W")) { it.Ticket = item_database.Tickets.GOLD_12_WEEKS; } else if (it.Name.Contains("MALL_GOLD_TIME") && it.Name.Contains("16W")) { it.Ticket = item_database.Tickets.GOLD_16_WEEKS; } #endregion #region Premium Quest Tickets else if (it.Name.Contains("TICKET") && it.Name.Contains("PREM")) { it.Ticket = item_database.Tickets.PREMIUM_QUEST_TICKET; } #endregion #region Open Market else if (it.Name.Contains("OPEN_MARKET")) { it.Ticket = item_database.Tickets.OPEN_MARKET; } #endregion #region Dungeon tickets else if (it.Name.Contains("TICKET") && it.Name.Contains("EGYPT")) { it.Ticket = item_database.Tickets.DUNGEON_EGYPT; } else if (it.Name.Contains("TICKET") && it.Name.Contains("FORGOTTEN")) { it.Ticket = item_database.Tickets.DUNGEON_FORGOTTEN_WORLD; } else if (it.Name.Contains("TICKET") && it.Name.Contains("BATTLE_ARENA")) { it.Ticket = item_database.Tickets.BATTLE_ARENA; } else if (it.Name.Contains("ITEM_ETC_TELEPORT_HOLE")) { it.Ticket = item_database.Tickets.DUNGEON_FORGOTTEN_WORLD; } #endregion #region Warehouse else if (it.Name.Contains("TICKET") && it.Name.Contains("WAREHOUSE")) { it.Ticket = item_database.Tickets.WAREHOUSE; } #endregion #region Auto Potion Ticket else if (it.Name.Contains("TICKET") && it.Name.Contains("AUTO_POTION")) { it.Ticket = item_database.Tickets.AUTO_POTION; } #endregion #region Beginner tickets else if (it.Name.Contains("ETC") && it.Name.Contains("_HELP")) { it.Ticket = item_database.Tickets.BEGINNER_HELPERS; } #endregion //Chat related items #region Global chat else if (it.Name.Contains("GLOBAL") && it.Name.Contains("CHAT")) { it.Etctype = item_database.EtcType.GLOBALCHAT; } #endregion //Stall decoration #region Stall decoration else if (it.Name.Contains("BOOTH")) { it.Etctype = item_database.EtcType.STALLDECORATION; } #endregion //Monster mask #region Monster Masks else if (it.Name.Contains("TRANS_MONSTER")) { it.Etctype = item_database.EtcType.MONSTERMASK; } #endregion //Elixirs #region Elixirs else if (it.Name.Contains("ETC") && it.Name.Contains("REINFORCE") && it.Name.Contains("RECIPE") && it.Name.Contains("_B") && it.Class_C == 1) { it.Etctype = item_database.EtcType.ELIXIR; } #endregion //Job suits #region Job Suits //Hunter suits else if (it.Name.Contains("TRADE_HUNTER") && it.Name.Contains("CH")) { it.Type = item_database.ArmorType.HUNTER; } else if (it.Name.Contains("TRADE_HUNTER") && it.Name.Contains("EU")) { it.Type = item_database.ArmorType.HUNTER; } //Thief suits else if (it.Name.Contains("TRADE_THIEF") && it.Name.Contains("CH")) { it.Type = item_database.ArmorType.THIEF; } else if (it.Name.Contains("TRADE_THIEF") && it.Name.Contains("EU")) { it.Type = item_database.ArmorType.THIEF; } #endregion //Return scrolls #region Return scrolls else if (it.Name.Contains("SCROLL_RETURN")) { it.Etctype = item_database.EtcType.RETURNSCROLL; } #endregion //Reverse scrolls #region Reverse scrolls else if (it.Name.Contains("SCROLL") && it.Name.Contains("REVERSE")) { it.Etctype = item_database.EtcType.REVERSESCROLL; } #endregion //Thief scrolls #region Thief scrolls else if (it.Name.Contains("SCROLL") && it.Name.Contains("THIEF")) { it.Etctype = item_database.EtcType.BANDITSCROLL; } #endregion //Summon scrolls #region Summon scrolls else if (it.Name.Contains("SUMMON") && it.Name.Contains("SCROLL")) { it.Etctype = item_database.EtcType.SUMMONSCROLL; } #endregion //Skin change scrolls #region Skin change scrolls else if (it.Name.Contains("SKIN_CHANGE")) { it.Etctype = item_database.EtcType.CHANGESKIN; } #endregion //Inventory expansion #region Inventory expansions else if (it.Name.Contains("INVENTORY") && it.Name.Contains("ADDITION")) { it.Etctype = item_database.EtcType.INVENTORYEXPANSION; } #endregion //Warehouse expansion #region Warehouse expansions else if (it.Name.Contains("WAREHOUSE") && it.Name.Contains("ADDITION")) { it.Etctype = item_database.EtcType.WAREHOUSE; } #endregion //Alchemy materials #region Alchemy materials else if (it.Name.Contains("ARCHEMY") && it.Name.Contains("MAT")) { it.Etctype = item_database.EtcType.ALCHEMY_MATERIAL; } #endregion //Tablets #region Tablets // later have to differ assimilate stones that has % not like astral and steady else if (it.Name.Contains("ARCHEMY") && it.Name.Contains("MAGICTABLET")) { it.Itemtype = item_database.ItemType.MAGICTABLET; } else if (it.Name.Contains("ARCHEMY") && it.Name.Contains("ATTRTABLET")) { it.Itemtype = item_database.ItemType.MAGICTABLET; } #endregion //Elements #region Elements else if (it.Name.Contains("ARCHEMY") && it.Name.Contains("ELEMENT")) { it.Etctype = item_database.EtcType.ELEMENTS; } #endregion //Stones (Note: Need to filter it more detailed later to deny some stones). #region Stones else if (it.Name.Contains("ARCHEMY") && it.Name.Contains("ATTRSTONE") && !it.Name.Contains("AST")) { it.Etctype = item_database.EtcType.STONES; } else if (it.Name.Contains("ARCHEMY") && it.Name.Contains("MAGICSTONE") && !it.Name.Contains("AST")) { it.Etctype = item_database.EtcType.STONES; } else if (it.Name.Contains("ARCHEMY") && it.Name.Contains("MAGICSTONE") && it.Name.Contains("ASTRAL")) { it.Etctype = item_database.EtcType.ASTRALSTONE; } #endregion //Destroyer rondo #region Destroyer rondo else if (it.Name.Contains("ITEM_ETC_ARCHEMY_RONDO_02")) { it.Etctype = item_database.EtcType.DESTROYER_RONDO; } #endregion //Gender switch tools #region Gender switch else if (it.Name.Contains("TRANSGENDER")) { it.Etctype = item_database.EtcType.ITEMCHANGETOOL; } #endregion //Guild items #region Guild Items else if (it.Name.Contains("GUILD_CREST")) { it.Etctype = item_database.EtcType.GUILD_ICON; } #endregion //Event items #region Event else if (it.Name.Contains("TREASURE")) { it.Etctype = item_database.EtcType.EVENT; } #endregion //######################################################## // Silk Prices Definitions //######################################################## #region Silk pricing if (it.Etctype == item_database.EtcType.AVATAR28D || it.Etctype == item_database.EtcType.CHANGESKIN || it.Etctype == item_database.EtcType.GLOBALCHAT || it.Etctype == item_database.EtcType.INVENTORYEXPANSION || it.Etctype == item_database.EtcType.RETURNSCROLL || it.Etctype == item_database.EtcType.REVERSESCROLL || it.Etctype == item_database.EtcType.STALLDECORATION || it.Etctype == item_database.EtcType.WAREHOUSE || it.Pettype == item_database.PetType.GRABPET || it.Type == item_database.ArmorType.AVATAR || it.Type == item_database.ArmorType.AVATARHAT || it.Type == item_database.ArmorType.AVATARATTACH) { it.Shop_price = Systems.SetSilk(it.ID); } #endregion //######################################################## // Drop Database //######################################################## //Armors #region Armors if ((it.Name.Contains("LIGHT") && it.Name.Contains("EU") && !it.Name.Contains("DEF") && !it.Name.Contains("EVENT") && !it.Name.Contains("ETC") && !it.Name.Contains("ROC") && !it.Name.Contains("RARE") && !it.Name.Contains("SET") && !it.Name.Contains("SUPER")) || (it.Name.Contains("LIGHT") && it.Name.Contains("CH") && !it.Name.Contains("DEF") && !it.Name.Contains("EVENT") && !it.Name.Contains("ETC") && !it.Name.Contains("ROC") && !it.Name.Contains("RARE") && !it.Name.Contains("SET") && !it.Name.Contains("SUPER")) || (it.Name.Contains("HEAVY") && it.Name.Contains("EU") && !it.Name.Contains("DEF") && !it.Name.Contains("EVENT") && !it.Name.Contains("ETC") && !it.Name.Contains("ROC") && !it.Name.Contains("RARE") && !it.Name.Contains("SET") && !it.Name.Contains("SUPER")) || (it.Name.Contains("HEAVY") && it.Name.Contains("CH") && !it.Name.Contains("DEF") && !it.Name.Contains("EVENT") && !it.Name.Contains("ETC") && !it.Name.Contains("ROC") && !it.Name.Contains("RARE") && !it.Name.Contains("SET") && !it.Name.Contains("SUPER")) || (it.Name.Contains("CLOTHES") && it.Name.Contains("EU") && !it.Name.Contains("DEF") && !it.Name.Contains("EVENT") && !it.Name.Contains("ETC") && !it.Name.Contains("ROC") && !it.Name.Contains("RARE") && !it.Name.Contains("SET") && !it.Name.Contains("SUPER")) || (it.Name.Contains("CLOTHES") && it.Name.Contains("CH") && !it.Name.Contains("DEF") && !it.Name.Contains("EVENT") && !it.Name.Contains("ETC") && !it.Name.Contains("ROC") && !it.Name.Contains("RARE") && !it.Name.Contains("SET") && !it.Name.Contains("SUPER")) && it.SOX == 0) { Data.ArmorDataBase.ID.Add(it.ID); } #endregion //Weapons #region Weapons if ((it.Name.Contains("ITEM_EU_AXE") && !it.Name.Contains("_DEF") && !it.Name.Contains("RARE") && !it.Name.Contains("SET")) || (it.Name.Contains("ITEM_EU_CROSSBOW") && !it.Name.Contains("_DEF") && !it.Name.Contains("RARE") && !it.Name.Contains("SET")) || (it.Name.Contains("ITEM_EU_DAGGER") && !it.Name.Contains("_DEF") && !it.Name.Contains("RARE") && !it.Name.Contains("SET")) || (it.Name.Contains("ITEM_EU_DARKSTAFF") && !it.Name.Contains("_DEF") && !it.Name.Contains("RARE") && !it.Name.Contains("SET")) || (it.Name.Contains("ITEM_EU_HARP") && !it.Name.Contains("_DEF") && !it.Name.Contains("RARE") && !it.Name.Contains("SET")) || (it.Name.Contains("ITEM_EU_STAFF") && !it.Name.Contains("_DEF") && !it.Name.Contains("RARE") && !it.Name.Contains("SET")) || (it.Name.Contains("ITEM_EU_SWORD") && !it.Name.Contains("_DEF") && !it.Name.Contains("RARE") && !it.Name.Contains("SET")) || (it.Name.Contains("ITEM_EU_TSTAFF") && !it.Name.Contains("_DEF") && !it.Name.Contains("RARE") && !it.Name.Contains("SET")) || (it.Name.Contains("ITEM_EU_TSWORD") && !it.Name.Contains("_DEF") && !it.Name.Contains("RARE") && !it.Name.Contains("SET")) || (it.Name.Contains("ITEM_CH_TBLADE") && !it.Name.Contains("_DEF") && !it.Name.Contains("RARE") && !it.Name.Contains("SET")) || (it.Name.Contains("ITEM_CH_BLADE") && !it.Name.Contains("_DEF") && !it.Name.Contains("RARE") && !it.Name.Contains("SET")) || (it.Name.Contains("ITEM_CH_BOW") && !it.Name.Contains("_DEF") && !it.Name.Contains("RARE") && !it.Name.Contains("SET")) || (it.Name.Contains("ITEM_EU_SHIELD") && !it.Name.Contains("_DEF") && !it.Name.Contains("RARE") && !it.Name.Contains("SET")) || (it.Name.Contains("ITEM_CH_SHIELD") && !it.Name.Contains("_DEF") && !it.Name.Contains("RARE") && !it.Name.Contains("SET")) || (it.Name.Contains("ITEM_CH_SPEAR") && !it.Name.Contains("_DEF") && !it.Name.Contains("RARE") && !it.Name.Contains("SET")) || (it.Name.Contains("ITEM_CH_SWORD") && !it.Name.Contains("_DEF") && !it.Name.Contains("RARE") && !it.Name.Contains("SET"))) { Data.WeaponDataBase.ID.Add(it.ID); } #endregion //Jewelerys #region Jewelerys if ((it.Name.Contains("RING") && !it.Name.Contains("DEF")) && (it.Name.Contains("ITEM_CH") && !it.Name.Contains("RARE") && !it.Name.Contains("SET") && !it.Name.Contains("BASIC")) || (it.Name.Contains("NECKLACE") && !it.Name.Contains("DEF")) && (it.Name.Contains("ITEM_CH") && !it.Name.Contains("RARE") && !it.Name.Contains("SET") && !it.Name.Contains("BASIC")) || (it.Name.Contains("NECKLACE") && !it.Name.Contains("DEF")) && (it.Name.Contains("ITEM_EU") && !it.Name.Contains("RARE") && !it.Name.Contains("SET") && !it.Name.Contains("BASIC")) || (it.Name.Contains("RING") && !it.Name.Contains("DEF")) && (it.Name.Contains("ITEM_EU") && !it.Name.Contains("RARE") && !it.Name.Contains("SET") && !it.Name.Contains("BASIC"))) { Data.JewelDataBase.ID.Add(it.ID); } #endregion //Seal items #region Seal items if (it.SOX == 2 && !it.Name.Contains("_SET") && !it.Name.Contains("_HONOR") && !it.Name.Contains("EVENT") && !it.Name.Contains("ETC") && !it.Name.Contains("ROC") && !it.Name.Contains("BASIC") && !it.Name.Contains("DEF")) { Data.SoxDataBase.ID.Add(it.ID); } #endregion //Stones #region Stones else if (it.Itemtype == Global.item_database.ItemType.MAGICTABLET && !it.Name.Contains("ASTRAL") || it.Itemtype == Global.item_database.ItemType.ATTRTABLET && !it.Name.Contains("ASTRAL")) { Data.StoneDataBase.ID.Add(it.ID); } #endregion //Alchemy materials #region Alchemy materials else if (it.Etctype == Global.item_database.EtcType.ALCHEMY_MATERIAL) { Data.MaterialDataBase.ID.Add(it.ID); } #endregion //Elixirs #region Elixirs else if (it.Etctype == Global.item_database.EtcType.ELIXIR) { Data.ElixirDataBase.ID.Add(it.ID); } #endregion //Soulbound #region Soulbound information //Tmp if (it.Name.Contains("PRE_MALL")) { it.Accountbound = 0; } #endregion //Distances #region Distances if (it.Itemtype == item_database.ItemType.SWORD || it.Itemtype == item_database.ItemType.EU_SWORD) { it.ATTACK_DISTANCE = 1; } else if (it.Itemtype == item_database.ItemType.SPEAR) { it.ATTACK_DISTANCE = 2; } else if (it.Itemtype == item_database.ItemType.GLAVIE) { it.ATTACK_DISTANCE = 2; } else if (it.Itemtype == item_database.ItemType.BOW || it.Itemtype == item_database.ItemType.EU_CROSSBOW) { it.ATTACK_DISTANCE = 8; } #endregion //Race fixes #region Race fixes if (it.Name.Contains("_EU_") || it.Name.Contains("BOLT")) { it.Race = 1; } else if (it.Name.Contains("_CH_") || it.Name.Contains("ARROW") || it.Name.Contains("QUIVER")) { it.Race = 0; } #endregion //1 damage weapon fixes. #region Weapon fixes if (it.Name.Contains("DEF") && it.Name.Contains("STAFF")) { it.Attack.Min_HPhyAttack = it.Attack.Min_HMagAttack; it.Attack.Min_LPhyAttack = it.Attack.Min_LMagAttack; } #endregion } Console.WriteLine("[INFO] Loaded " + TxtFile.amountLine + " items"); }
public static void ObjectDataBase(string path) { //Split lines TxtFile.ReadFromFile(path, '\t'); //Set string definition string s = null; //Repeat for each line in the file for (int l = 0; l <= TxtFile.amountLine - 1; l++) { //General data #region General data s = TxtFile.lines[l].ToString(); TxtFile.commands = s.Split('\t'); int ID = Convert.ToInt32(TxtFile.commands[1]); objectdata o = new objectdata(); o.ID = ID; o.Name = TxtFile.commands[2]; o.Level = Convert.ToByte(TxtFile.commands[57]); o.Exp = Convert.ToInt32(TxtFile.commands[79]); o.HP = Convert.ToInt32(TxtFile.commands[59]); o.Type = Convert.ToByte(TxtFile.commands[11]); o.ObjectType = Convert.ToByte(TxtFile.commands[15]); o.PhyDef = Convert.ToInt32(TxtFile.commands[71]); o.MagDef = Convert.ToInt32(TxtFile.commands[72]); o.HitRatio = Convert.ToInt32(TxtFile.commands[75]); o.ParryRatio = Convert.ToInt32(TxtFile.commands[77]); o.Agresif = Convert.ToByte(TxtFile.commands[93]); o.Skill = new int[500]; o.Speed1 = Convert.ToInt32(TxtFile.commands[46]); o.Speed2 = Convert.ToInt32(TxtFile.commands[47]); o.SpeedWalk = Convert.ToInt32(TxtFile.commands[46]); o.SpeedRun = Convert.ToInt32(TxtFile.commands[47]); o.SpeedZerk = Convert.ToInt32(TxtFile.commands[48]); #endregion //Normal monsters #region Normal monsters if (o.Type == 1 && o.Name.Contains("MOB_") && !o.Name.Contains("HUNTER") && !o.Name.Contains("THIEF")) { o.Object_type = objectdata.NamdedType.MONSTER; } #endregion //Npc's and structures #region Npc / Structures if (o.Type == 2) { if (o.Name.Contains("NPC")) { o.Object_type = objectdata.NamdedType.NPC; } else { o.Object_type = objectdata.NamdedType.STRUCTURE; } } #endregion //Pet objects #region Pet objects if (o.Type == 3) { if (o.Name.Contains("COS_T_") && !o.Name.Contains("TRADE") && !o.Name.Contains("FORTR")) { o.Object_type = objectdata.NamdedType.JOBTRANSPORT; } if (o.Name.Contains("COS_P_")) { o.Object_type = objectdata.NamdedType.GRABPET; } if (o.Name.Contains("COS_C_")) { o.Object_type = objectdata.NamdedType.NORMALTRANSPORT; } } #endregion //Fortress war objects #region Fw objects if (o.Type == 4) { if (o.Name.Contains("FW")) { o.Object_type = objectdata.NamdedType.FORTRESSWARMONSTER; } } #endregion //Structures #region structures if (o.Type == 5) { o.Object_type = objectdata.NamdedType.STRUCTURE; } #endregion //Player objects #region Player objects if (o.Name.Contains("CHAR_CH")) { o.Race = 0; o.Object_type = objectdata.NamdedType.PLAYER; } if (o.Name.Contains("CHAR_EU")) { o.Race = 1; o.Object_type = objectdata.NamdedType.PLAYER; } #endregion //Job objects #region Job if (o.Name.Contains("THIEF_NPC") || o.Name.Contains("HUNTER_NPC")) { o.Object_type = objectdata.NamdedType.JOBMONSTER; o.Type = 4; o.Agresif = 1; } #endregion //Skills for the objects for (byte sk = 0; sk <= 8; sk++) { //Get information from line 83 if not null if (Convert.ToInt32(TxtFile.commands[83 + sk]) != 0 && Data.SkillBase[Convert.ToInt32(TxtFile.commands[83 + sk])].MagPer != 0) { //Read skill info o.Skill[o.amountSkill] = Convert.ToInt32(TxtFile.commands[83 + sk]); //Add amount skill to objects o.amountSkill++; } } //Add object to object database Data.ObjectBase[ID] = o; } //Write information to the console Console.WriteLine("[INFO] Loaded " + TxtFile.amountLine + " objects"); }