public void Load() { foreach (KeyBind Inputkey in Keylist) { Inputkey.RequireAlt = Reader.ReadByte(Inputkey.function.ToString(), "RequireAlt", Inputkey.RequireAlt); Inputkey.RequireShift = Reader.ReadByte(Inputkey.function.ToString(), "RequireShift", Inputkey.RequireShift); Inputkey.RequireTilde = Reader.ReadByte(Inputkey.function.ToString(), "RequireTilde", Inputkey.RequireTilde); Inputkey.RequireCtrl = Reader.ReadByte(Inputkey.function.ToString(), "RequireCtrl", Inputkey.RequireCtrl); string Input = Reader.ReadString(Inputkey.function.ToString(), "RequireKey", Inputkey.Key.ToString()); Enum.TryParse(Input, out Inputkey.Key); } }
public GuildBuffInfo(InIReader reader, int i) { Id = reader.ReadInt32("Buff-" + i.ToString(), "Id", 0); Icon = reader.ReadInt32("Buff-" + i.ToString(), "Icon", 0); name = reader.ReadString("Buff-" + i.ToString(), "Name", ""); LevelRequirement = reader.ReadByte("Buff-" + i.ToString(), "LevelReq", 0); PointsRequirement = reader.ReadByte("Buff-" + i.ToString(), "PointsReq", 1); TimeLimit = reader.ReadInt32("Buff-" + i.ToString(), "TimeLimit", 0);; ActivationCost = reader.ReadInt32("Buff-" + i.ToString(), "ActivationCost", 0); Stats = new Stats(); Stats[Stat.MaxAC] = reader.ReadByte("Buff-" + i.ToString(), "BuffAc", 0); Stats[Stat.MaxMAC] = reader.ReadByte("Buff-" + i.ToString(), "BuffMAC", 0); Stats[Stat.MaxDC] = reader.ReadByte("Buff-" + i.ToString(), "BuffDc", 0); Stats[Stat.MaxMC] = reader.ReadByte("Buff-" + i.ToString(), "BuffMc", 0); Stats[Stat.MaxSC] = reader.ReadByte("Buff-" + i.ToString(), "BuffSc", 0); Stats[Stat.HP] = reader.ReadInt32("Buff-" + i.ToString(), "BuffMaxHp", 0); Stats[Stat.MP] = reader.ReadInt32("Buff-" + i.ToString(), "BuffMaxMp", 0); Stats[Stat.MineRatePercent] = reader.ReadByte("Buff-" + i.ToString(), "BuffMineRate", 0); Stats[Stat.GemRatePercent] = reader.ReadByte("Buff-" + i.ToString(), "BuffGemRate", 0); Stats[Stat.FishRatePercent] = reader.ReadByte("Buff-" + i.ToString(), "BuffFishRate", 0); Stats[Stat.ExpRatePercent] = reader.ReadByte("Buff-" + i.ToString(), "BuffExpRate", 0); Stats[Stat.CraftRatePercent] = reader.ReadByte("Buff-" + i.ToString(), "BuffCraftRate", 0); Stats[Stat.SkillGainMultiplier] = reader.ReadByte("Buff-" + i.ToString(), "BuffSkillRate", 0); Stats[Stat.HealthRecovery] = reader.ReadByte("Buff-" + i.ToString(), "BuffHpRegen", 0); Stats[Stat.SpellRecovery] = reader.ReadByte("Buff-" + i.ToString(), "BuffMpRegen", 0); Stats[Stat.AttackBonus] = reader.ReadByte("Buff-" + i.ToString(), "BuffAttack", 0); Stats[Stat.ItemDropRatePercent] = reader.ReadByte("Buff-" + i.ToString(), "BuffDropRate", 0); Stats[Stat.GoldDropRatePercent] = reader.ReadByte("Buff-" + i.ToString(), "BuffGoldRate", 0); }
public static void LoadAwakeAttribute() { if (!File.Exists(ConfigPath + @".\AwakeningSystem.ini")) { return; } InIReader reader = new InIReader(ConfigPath + @".\AwakeningSystem.ini"); Awake.AwakeSuccessRate = reader.ReadByte("Attribute", "SuccessRate", Awake.AwakeSuccessRate); Awake.AwakeHitRate = reader.ReadByte("Attribute", "HitRate", Awake.AwakeHitRate); Awake.MaxAwakeLevel = reader.ReadInt32("Attribute", "MaxUpgradeLevel", Awake.MaxAwakeLevel); Awake.Awake_WeaponRate = reader.ReadByte("IncreaseValue", "WeaponValue", Awake.Awake_WeaponRate); Awake.Awake_HelmetRate = reader.ReadByte("IncreaseValue", "HelmetValue", Awake.Awake_HelmetRate); Awake.Awake_ArmorRate = reader.ReadByte("IncreaseValue", "ArmorValue", Awake.Awake_ArmorRate); for (int i = 0; i < 4; i++) { Awake.AwakeChanceMax[i] = reader.ReadByte("Value", "ChanceMax_" + ((ItemGrade)(i + 1)).ToString(), Awake.AwakeChanceMax[i]); } for (int i = 0; i < (int)AwakeType.HPMP; i++) { List<byte>[] value = new List<byte>[2]; for (int k = 0; k < 2; k++) { value[k] = new List<byte>(); } for (int j = 0; j < 4; j++) { byte material1 = 1; material1 = reader.ReadByte("Materials_BaseValue", ((AwakeType)(i + 1)).ToString() + "_" + ((ItemGrade)(j + 1)).ToString() + "_Material1", material1); byte material2 = 1; material2 = reader.ReadByte("Materials_BaseValue", ((AwakeType)(i + 1)).ToString() + "_" + ((ItemGrade)(j + 1)).ToString() + "_Material2", material2); value[0].Add(material1); value[1].Add(material2); } Awake.AwakeMaterials.Add(value); } for (int c = 0; c < 4; c++) { Awake.AwakeMaterialRate[c] = reader.ReadFloat("Materials_IncreaseValue", "Materials_" + ((ItemGrade)(c + 1)).ToString(), Awake.AwakeMaterialRate[c]); } }
public static void LoadGuildSettings() { if (!File.Exists(ConfigPath + @".\GuildSettings.ini")) { Guild_CreationCostList.Add(new ItemVolume(){Amount = 1000000}); Guild_CreationCostList.Add(new ItemVolume(){ItemName = "WoomaHorn",Amount = 1}); return; } InIReader reader = new InIReader(ConfigPath + @".\GuildSettings.ini"); Guild_RequiredLevel = reader.ReadByte("Guilds", "MinimumLevel", Guild_RequiredLevel); Guild_ExpRate = reader.ReadFloat("Guilds", "ExpRate", Guild_ExpRate); Guild_PointPerLevel = reader.ReadByte("Guilds", "PointPerLevel", Guild_PointPerLevel); Guild_WarTime = reader.ReadInt64("Guilds", "WarTime", Guild_WarTime); Guild_WarCost = reader.ReadUInt32("Guilds", "WarCost", Guild_WarCost); int i = 0; while (reader.ReadUInt32("Required-" + i.ToString(),"Amount",0) != 0) { Guild_CreationCostList.Add(new ItemVolume() { ItemName = reader.ReadString("Required-" + i.ToString(), "ItemName", ""), Amount = reader.ReadUInt32("Required-" + i.ToString(), "Amount", 0) } ); i++; } i = 0; while (reader.ReadInt64("Exp", "Level-" + i.ToString(), -1) != -1) { Guild_ExperienceList.Add(reader.ReadInt64("Exp", "Level-" + i.ToString(), 0)); i++; } i = 0; while (reader.ReadInt32("Cap", "Level-" + i.ToString(), -1) != -1) { Guild_MembercapList.Add(reader.ReadInt32("Cap", "Level-" + i.ToString(), 0)); i++; } byte TotalBuffs = reader.ReadByte("Guilds", "TotalBuffs", 0); for (i = 0; i < TotalBuffs; i++) { Guild_BuffList.Add(new GuildBuffInfo(reader, i)); } }
public static void LoadMines() { if (!File.Exists(ConfigPath + @".\Mines.ini")) { MineSetList.Add(new MineSet(1)); MineSetList.Add(new MineSet(2)); SaveMines(); return; } InIReader reader = new InIReader(ConfigPath + @".\Mines.ini"); int i = 0; MineSet Mine; while (reader.ReadByte("Mine" + i.ToString(), "SpotRegenRate", 255) != 255) { Mine = new MineSet(); Mine.Name = reader.ReadString("Mine" + i.ToString(), "Name", Mine.Name); Mine.SpotRegenRate = reader.ReadByte("Mine" + i.ToString(), "SpotRegenRate", Mine.SpotRegenRate); Mine.MaxStones = reader.ReadByte("Mine" + i.ToString(), "MaxStones", Mine.MaxStones); Mine.HitRate = reader.ReadByte("Mine" + i.ToString(), "HitRate", Mine.HitRate); Mine.DropRate = reader.ReadByte("Mine" + i.ToString(), "DropRate", Mine.DropRate); Mine.TotalSlots = reader.ReadByte("Mine" + i.ToString(), "TotalSlots", Mine.TotalSlots); int j = 0; while (reader.ReadByte("Mine" + i.ToString(), "D" + j.ToString() + "-MinSlot", 255) != 255) { Mine.Drops.Add(new MineDrop() { ItemName = reader.ReadString("Mine" + i.ToString(), "D" + j.ToString() + "-ItemName", ""), MinSlot = reader.ReadByte("Mine" + i.ToString(), "D" + j.ToString() + "-MinSlot", 255), MaxSlot = reader.ReadByte("Mine" + i.ToString(), "D" + j.ToString() + "-MaxSlot", 255), MinDura = reader.ReadByte("Mine" + i.ToString(), "D" + j.ToString() + "-MinDura", 255), MaxDura = reader.ReadByte("Mine" + i.ToString(), "D" + j.ToString() + "-MaxDura", 255), BonusChance = reader.ReadByte("Mine" + i.ToString(), "D" + j.ToString() + "-BonusChance", 255), MaxBonusDura = reader.ReadByte("Mine" + i.ToString(), "D" + j.ToString() + "-MaxBonusDura", 255) }); j++; } MineSetList.Add(Mine); i++; } }
public static void LoadRandomItemStats() { //note: i could have used a flat file system for this which would be faster, //BUT: it's only loaded @ server startup so speed isnt vital. //and i think settings should be available outside the exe for ppl to edit it easyer + lets ppl share config without forcing ppl to run it in an exe if (!File.Exists(ConfigPath + @".\RandomItemStats.ini")) { RandomItemStatsList.Add(new RandomItemStat()); RandomItemStatsList.Add(new RandomItemStat(ItemType.Weapon)); RandomItemStatsList.Add(new RandomItemStat(ItemType.Armour)); RandomItemStatsList.Add(new RandomItemStat(ItemType.Helmet)); RandomItemStatsList.Add(new RandomItemStat(ItemType.Necklace)); RandomItemStatsList.Add(new RandomItemStat(ItemType.Bracelet)); RandomItemStatsList.Add(new RandomItemStat(ItemType.Ring)); RandomItemStatsList.Add(new RandomItemStat(ItemType.Belt)); SaveRandomItemStats(); return; } InIReader reader = new InIReader(ConfigPath + @".\RandomItemStats.ini"); int i = 0; RandomItemStat stat; while (reader.ReadByte("Item" + i.ToString(),"MaxDuraChance",255) != 255) { stat = new RandomItemStat(); stat.MaxDuraChance = reader.ReadByte("Item" + i.ToString(), "MaxDuraChance", 0); stat.MaxDuraStatChance = reader.ReadByte("Item" + i.ToString(), "MaxDuraStatChance", 1); stat.MaxDuraMaxStat = reader.ReadByte("Item" + i.ToString(), "MaxDuraMaxStat", 1); stat.MaxAcChance = reader.ReadByte("Item" + i.ToString(), "MaxAcChance", 0); stat.MaxAcStatChance = reader.ReadByte("Item" + i.ToString(), "MaxAcStatChance", 1); stat.MaxAcMaxStat = reader.ReadByte("Item" + i.ToString(), "MaxAcMaxStat", 1); stat.MaxMacChance = reader.ReadByte("Item" + i.ToString(), "MaxMacChance", 0); stat.MaxMacStatChance = reader.ReadByte("Item" + i.ToString(), "MaxMacStatChance", 1); stat.MaxMacMaxStat = reader.ReadByte("Item" + i.ToString(), "MaxMACMaxStat", 1); stat.MaxDcChance = reader.ReadByte("Item" + i.ToString(), "MaxDcChance", 0); stat.MaxDcStatChance = reader.ReadByte("Item" + i.ToString(), "MaxDcStatChance", 1); stat.MaxDcMaxStat = reader.ReadByte("Item" + i.ToString(), "MaxDcMaxStat", 1); stat.MaxMcChance = reader.ReadByte("Item" + i.ToString(), "MaxMcChance", 0); stat.MaxMcStatChance = reader.ReadByte("Item" + i.ToString(), "MaxMcStatChance", 1); stat.MaxMcMaxStat = reader.ReadByte("Item" + i.ToString(), "MaxMcMaxStat", 1); stat.MaxScChance = reader.ReadByte("Item" + i.ToString(), "MaxScChance", 0); stat.MaxScStatChance = reader.ReadByte("Item" + i.ToString(), "MaxScStatChance", 1); stat.MaxScMaxStat = reader.ReadByte("Item" + i.ToString(), "MaxScMaxStat", 1); stat.AccuracyChance = reader.ReadByte("Item" + i.ToString(), "AccuracyChance", 0); stat.AccuracyStatChance = reader.ReadByte("Item" + i.ToString(), "AccuracyStatChance", 1); stat.AccuracyMaxStat = reader.ReadByte("Item" + i.ToString(), "AccuracyMaxStat", 1); stat.AgilityChance = reader.ReadByte("Item" + i.ToString(), "AgilityChance", 0); stat.AgilityStatChance = reader.ReadByte("Item" + i.ToString(), "AgilityStatChance", 1); stat.AgilityMaxStat = reader.ReadByte("Item" + i.ToString(), "AgilityMaxStat", 1); stat.HpChance = reader.ReadByte("Item" + i.ToString(), "HpChance", 0); stat.HpStatChance = reader.ReadByte("Item" + i.ToString(), "HpStatChance", 1); stat.HpMaxStat = reader.ReadByte("Item" + i.ToString(), "HpMaxStat", 1); stat.MpChance = reader.ReadByte("Item" + i.ToString(), "MpChance", 0); stat.MpStatChance = reader.ReadByte("Item" + i.ToString(), "MpStatChance", 1); stat.MpMaxStat = reader.ReadByte("Item" + i.ToString(), "MpMaxStat", 1); stat.StrongChance = reader.ReadByte("Item" + i.ToString(), "StrongChance", 0); stat.StrongStatChance = reader.ReadByte("Item" + i.ToString(), "StrongStatChance", 1); stat.StrongMaxStat = reader.ReadByte("Item" + i.ToString(), "StrongMaxStat", 1); stat.MagicResistChance = reader.ReadByte("Item" + i.ToString(), "MagicResistChance", 0); stat.MagicResistStatChance = reader.ReadByte("Item" + i.ToString(), "MagicResistStatChance", 1); stat.MagicResistMaxStat = reader.ReadByte("Item" + i.ToString(), "MagicResistMaxStat", 1); stat.PoisonResistChance = reader.ReadByte("Item" + i.ToString(), "PoisonResistChance", 0); stat.PoisonResistStatChance = reader.ReadByte("Item" + i.ToString(), "PoisonResistStatChance", 1); stat.PoisonResistMaxStat = reader.ReadByte("Item" + i.ToString(), "PoisonResistMaxStat", 1); stat.HpRecovChance = reader.ReadByte("Item" + i.ToString(), "HpRecovChance", 0); stat.HpRecovStatChance = reader.ReadByte("Item" + i.ToString(), "HpRecovStatChance", 1); stat.HpRecovMaxStat = reader.ReadByte("Item" + i.ToString(), "HpRecovMaxStat", 1); stat.MpRecovChance = reader.ReadByte("Item" + i.ToString(), "MpRecovChance", 0); stat.MpRecovStatChance = reader.ReadByte("Item" + i.ToString(), "MpRecovStatChance", 1); stat.MpRecovMaxStat = reader.ReadByte("Item" + i.ToString(), "MpRecovMaxStat", 1); stat.PoisonRecovChance = reader.ReadByte("Item" + i.ToString(), "PoisonRecovChance", 0); stat.PoisonRecovStatChance = reader.ReadByte("Item" + i.ToString(), "PoisonRecovStatChance", 1); stat.PoisonRecovMaxStat = reader.ReadByte("Item" + i.ToString(), "PoisonRecovMaxStat", 1); stat.CriticalRateChance = reader.ReadByte("Item" + i.ToString(), "CriticalRateChance", 0); stat.CriticalRateStatChance = reader.ReadByte("Item" + i.ToString(), "CriticalRateStatChance", 1); stat.CriticalRateMaxStat = reader.ReadByte("Item" + i.ToString(), "CriticalRateMaxStat", 1); stat.CriticalDamageChance = reader.ReadByte("Item" + i.ToString(), "CriticalDamageChance", 0); stat.CriticalDamageStatChance = reader.ReadByte("Item" + i.ToString(), "CriticalDamageStatChance", 1); stat.CriticalDamageMaxStat = reader.ReadByte("Item" + i.ToString(), "CriticalDamageMaxStat", 1); stat.FreezeChance = reader.ReadByte("Item" + i.ToString(), "FreezeChance", 0); stat.FreezeStatChance = reader.ReadByte("Item" + i.ToString(), "FreezeStatChance", 1); stat.FreezeMaxStat = reader.ReadByte("Item" + i.ToString(), "FreezeMaxStat", 1); stat.PoisonAttackChance = reader.ReadByte("Item" + i.ToString(), "PoisonAttackChance", 0); stat.PoisonAttackStatChance = reader.ReadByte("Item" + i.ToString(), "PoisonAttackStatChance", 1); stat.PoisonAttackMaxStat = reader.ReadByte("Item" + i.ToString(), "PoisonAttackMaxStat", 1); stat.AttackSpeedChance = reader.ReadByte("Item" + i.ToString(), "AttackSpeedChance", 0); stat.AttackSpeedStatChance = reader.ReadByte("Item" + i.ToString(), "AttackSpeedStatChance", 1); stat.AttackSpeedMaxStat = reader.ReadByte("Item" + i.ToString(), "AttackSpeedMaxStat", 1); stat.LuckChance = reader.ReadByte("Item" + i.ToString(), "LuckChance", 0); stat.LuckStatChance = reader.ReadByte("Item" + i.ToString(), "LuckStatChance", 1); stat.LuckMaxStat = reader.ReadByte("Item" + i.ToString(), "LuckMaxStat", 1); stat.CurseChance = reader.ReadByte("Item" + i.ToString(), "CurseChance", 0); RandomItemStatsList.Add(stat); i++; } }
public static void LoadBaseStats() { if (!File.Exists(ConfigPath + @".\BaseStats.ini")) { SaveBaseStats(); return; } InIReader reader = new InIReader(ConfigPath + @".\BaseStats.ini"); for (int i = 0; i < ClassBaseStats.Length; i++) { ClassBaseStats[i].HpGain = reader.ReadFloat(BaseStatClassNames[i], "HpGain", ClassBaseStats[i].HpGain); ClassBaseStats[i].HpGainRate = reader.ReadFloat(BaseStatClassNames[i], "HpGainRate", ClassBaseStats[i].HpGainRate); ClassBaseStats[i].MpGainRate = reader.ReadFloat(BaseStatClassNames[i], "MpGainRate", ClassBaseStats[i].MpGainRate); ClassBaseStats[i].BagWeightGain = reader.ReadFloat(BaseStatClassNames[i], "BagWeightGain", ClassBaseStats[i].BagWeightGain); ClassBaseStats[i].WearWeightGain = reader.ReadFloat(BaseStatClassNames[i], "WearWeightGain", ClassBaseStats[i].WearWeightGain); ClassBaseStats[i].HandWeightGain = reader.ReadFloat(BaseStatClassNames[i], "HandWeightGain", ClassBaseStats[i].HandWeightGain); ClassBaseStats[i].MinAc = reader.ReadByte(BaseStatClassNames[i], "MinAc", ClassBaseStats[i].MinAc); ClassBaseStats[i].MaxAc = reader.ReadByte(BaseStatClassNames[i], "MaxAc", ClassBaseStats[i].MaxAc); ClassBaseStats[i].MinMac = reader.ReadByte(BaseStatClassNames[i], "MinMac", ClassBaseStats[i].MinMac); ClassBaseStats[i].MaxMac = reader.ReadByte(BaseStatClassNames[i], "MaxMac", ClassBaseStats[i].MaxMac); ClassBaseStats[i].MinDc = reader.ReadByte(BaseStatClassNames[i], "MinDc", ClassBaseStats[i].MinDc); ClassBaseStats[i].MaxDc = reader.ReadByte(BaseStatClassNames[i], "MaxDc", ClassBaseStats[i].MaxDc); ClassBaseStats[i].MinMc = reader.ReadByte(BaseStatClassNames[i], "MinMc", ClassBaseStats[i].MinMc); ClassBaseStats[i].MaxMc = reader.ReadByte(BaseStatClassNames[i], "MaxMc", ClassBaseStats[i].MaxMc); ClassBaseStats[i].MinSc = reader.ReadByte(BaseStatClassNames[i], "MinSc", ClassBaseStats[i].MinSc); ClassBaseStats[i].MaxSc = reader.ReadByte(BaseStatClassNames[i], "MaxSc", ClassBaseStats[i].MaxSc); ClassBaseStats[i].StartAgility = reader.ReadByte(BaseStatClassNames[i], "StartAgility", ClassBaseStats[i].StartAgility); ClassBaseStats[i].StartAccuracy = reader.ReadByte(BaseStatClassNames[i], "StartAccuracy", ClassBaseStats[i].StartAccuracy); ClassBaseStats[i].StartCriticalRate = reader.ReadByte(BaseStatClassNames[i], "StartCriticalRate", ClassBaseStats[i].StartCriticalRate); ClassBaseStats[i].StartCriticalDamage = reader.ReadByte(BaseStatClassNames[i], "StartCriticalDamage", ClassBaseStats[i].StartCriticalDamage); ClassBaseStats[i].CritialRateGain = reader.ReadByte(BaseStatClassNames[i], "CritialRateGain", ClassBaseStats[i].CritialRateGain); ClassBaseStats[i].CriticalDamageGain = reader.ReadByte(BaseStatClassNames[i], "CriticalDamageGain", ClassBaseStats[i].CriticalDamageGain); } }
public static void Load() { if (!Directory.Exists(DataPath)) { Directory.CreateDirectory(DataPath); } if (!Directory.Exists(MapPath)) { Directory.CreateDirectory(MapPath); } if (!Directory.Exists(SoundPath)) { Directory.CreateDirectory(SoundPath); } //Graphics FullScreen = Reader.ReadBoolean("Graphics", "FullScreen", FullScreen); TopMost = Reader.ReadBoolean("Graphics", "AlwaysOnTop", TopMost); FPSCap = Reader.ReadBoolean("Graphics", "FPSCap", FPSCap); Resolution = Reader.ReadInt32("Graphics", "Resolution", Resolution); DebugMode = Reader.ReadBoolean("Graphics", "DebugMode", DebugMode); //Network UseConfig = Reader.ReadBoolean("Network", "UseConfig", UseConfig); if (UseConfig) { IPAddress = Reader.ReadString("Network", "IPAddress", IPAddress); /* * if (IPAddress != "game.edens-elite.co.uk") * IPAddress = "game.edens-elite.co.uk"; */ Port = Reader.ReadInt32("Network", "Port", Port); } //Logs LogErrors = Reader.ReadBoolean("Logs", "LogErrors", LogErrors); LogChat = Reader.ReadBoolean("Logs", "LogChat", LogChat); //Sound Volume = Reader.ReadByte("Sound", "Volume", Volume); SoundOverLap = Reader.ReadInt32("Sound", "SoundOverLap", SoundOverLap); MusicVolume = Reader.ReadByte("Sound", "Music", MusicVolume); //Game AccountID = Reader.ReadString("Game", "AccountID", AccountID); Password = Reader.ReadString("Game", "Password", Password); SkillMode = Reader.ReadBoolean("Game", "SkillMode", SkillMode); SkillBar = Reader.ReadBoolean("Game", "SkillBar", SkillBar); Effect = Reader.ReadBoolean("Game", "Effect", Effect); LevelEffect = Reader.ReadBoolean("Game", "LevelEffect", Effect); DropView = Reader.ReadBoolean("Game", "DropView", DropView); NameView = Reader.ReadBoolean("Game", "NameView", NameView); HPView = Reader.ReadBoolean("Game", "HPMPView", HPView); FontName = Reader.ReadString("Game", "FontName", FontName); TransparentChat = Reader.ReadBoolean("Game", "TransparentChat", TransparentChat); DisplayDamage = Reader.ReadBoolean("Game", "DisplayDamage", DisplayDamage); TargetDead = Reader.ReadBoolean("Game", "TargetDead", TargetDead); DuraView = Reader.ReadBoolean("Game", "DuraWindow", DuraView); ServerTimeZone = Reader.ReadString("Game", "ServerTimeZone", ServerTimeZone); MonsterName = Reader.ReadBoolean("Game", "MonsterName", MonsterName); //Ice DropEffect = Reader.ReadBoolean("Game", "DropEffect", DropEffect); //Ice for (int i = 0; i < SkillbarLocation.Length / 2; i++) { SkillbarLocation[i, 0] = Reader.ReadInt32("Game", "Skillbar" + i.ToString() + "X", SkillbarLocation[i, 0]); SkillbarLocation[i, 1] = Reader.ReadInt32("Game", "Skillbar" + i.ToString() + "Y", SkillbarLocation[i, 1]); } //Chat ShowNormalChat = Reader.ReadBoolean("Chat", "ShowNormalChat", ShowNormalChat); ShowYellChat = Reader.ReadBoolean("Chat", "ShowYellChat", ShowYellChat); ShowWhisperChat = Reader.ReadBoolean("Chat", "ShowWhisperChat", ShowWhisperChat); ShowLoverChat = Reader.ReadBoolean("Chat", "ShowLoverChat", ShowLoverChat); ShowMentorChat = Reader.ReadBoolean("Chat", "ShowMentorChat", ShowMentorChat); ShowGroupChat = Reader.ReadBoolean("Chat", "ShowGroupChat", ShowGroupChat); ShowGuildChat = Reader.ReadBoolean("Chat", "ShowGuildChat", ShowGuildChat); //Filters FilterNormalChat = Reader.ReadBoolean("Filter", "FilterNormalChat", FilterNormalChat); FilterWhisperChat = Reader.ReadBoolean("Filter", "FilterWhisperChat", FilterWhisperChat); FilterShoutChat = Reader.ReadBoolean("Filter", "FilterShoutChat", FilterShoutChat); FilterSystemChat = Reader.ReadBoolean("Filter", "FilterSystemChat", FilterSystemChat); FilterLoverChat = Reader.ReadBoolean("Filter", "FilterLoverChat", FilterLoverChat); FilterMentorChat = Reader.ReadBoolean("Filter", "FilterMentorChat", FilterMentorChat); FilterGroupChat = Reader.ReadBoolean("Filter", "FilterGroupChat", FilterGroupChat); FilterGuildChat = Reader.ReadBoolean("Filter", "FilterGuildChat", FilterGuildChat); //AutoPatcher P_Patcher = Reader.ReadBoolean("Launcher", "Enabled", P_Patcher); P_Host = Reader.ReadString("Launcher", "Host", P_Host); P_PatchFileName = Reader.ReadString("Launcher", "PatchFile", P_PatchFileName); P_NeedLogin = Reader.ReadBoolean("Launcher", "NeedLogin", P_NeedLogin); P_Login = Reader.ReadString("Launcher", "Login", P_Login); P_Password = Reader.ReadString("Launcher", "Password", P_Password); P_AutoStart = Reader.ReadBoolean("Launcher", "AutoStart", P_AutoStart); P_ServerName = Reader.ReadString("Launcher", "ServerName", P_ServerName); P_BrowserAddress = Reader.ReadString("Launcher", "Browser", P_BrowserAddress); if (C_WebLink.StartsWith("www.", StringComparison.OrdinalIgnoreCase)) { C_WebLink = C_WebLink.Insert(0, "http://"); } if (!P_Host.EndsWith("/")) { P_Host += "/"; } if (P_Host.StartsWith("www.", StringComparison.OrdinalIgnoreCase)) { P_Host = P_Host.Insert(0, "http://"); } if (P_BrowserAddress.StartsWith("www.", StringComparison.OrdinalIgnoreCase)) { P_BrowserAddress = P_BrowserAddress.Insert(0, "http://"); } if (C_DonateLink.StartsWith("www.", StringComparison.OrdinalIgnoreCase)) { C_DonateLink = C_DonateLink.Insert(0, "http://"); } MissIndicator = Reader.ReadBoolean("Custom", "MissIndicator", MissIndicator); DamageIndicator = Reader.ReadBoolean("Custom", "DamageIndicator", DamageIndicator); MagicDamageIndicator = Reader.ReadBoolean("Custom", "MagicDamageIndicator", MagicDamageIndicator); CriticalIndicator = Reader.ReadBoolean("Custom", "CriticalIndicator", CriticalIndicator); HealIndicator = Reader.ReadBoolean("Custom", "HealIndicator", HealIndicator); ManaRecovIndicator = Reader.ReadBoolean("Custom", "ManaRecovIndicator", ManaRecovIndicator); BossHPBar = Reader.ReadBoolean("Custom", "BossHPBar", BossHPBar); MobLightEffect = Reader.ReadBoolean("Custom", "MobLightEffect", MobLightEffect); }
public static void LoadRefine() { if (!File.Exists(ConfigPath + @".\RefineSystem.ini")) { SaveRefine(); return; } InIReader reader = new InIReader(ConfigPath + @".\RefineSystem.ini"); OnlyRefineWeapon = reader.ReadBoolean("Config", "OnlyRefineWeapon", OnlyRefineWeapon); RefineBaseChance = reader.ReadByte("Config", "BaseChance", RefineBaseChance); RefineTime = reader.ReadInt32("Config", "Time", RefineTime); RefineIncrease = reader.ReadByte("Config", "StatIncrease", RefineIncrease); RefineCritChance = reader.ReadByte("Config", "CritChance", RefineCritChance); RefineCritIncrease = reader.ReadByte("Config", "CritIncrease", RefineCritIncrease); RefineWepStatReduce = reader.ReadByte("Config", "WepStatReducedChance", RefineWepStatReduce); RefineItemStatReduce = reader.ReadByte("Config", "ItemStatReducedChance", RefineItemStatReduce); RefineCost = reader.ReadInt32("Config", "RefineCost", RefineCost); RefineOreName = reader.ReadString("Ore", "OreName", RefineOreName); }
public static void LoadRandomItemStats() { if (!File.Exists(@".\RandomItemStats.ini")) { RandomItemStatsList.Add(new RandomItemStat()); RandomItemStatsList.Add(new RandomItemStat(ItemType.Weapon)); RandomItemStatsList.Add(new RandomItemStat(ItemType.Armour)); RandomItemStatsList.Add(new RandomItemStat(ItemType.Helmet)); RandomItemStatsList.Add(new RandomItemStat(ItemType.Necklace)); RandomItemStatsList.Add(new RandomItemStat(ItemType.Bracelet)); RandomItemStatsList.Add(new RandomItemStat(ItemType.Ring)); RandomItemStatsList.Add(new RandomItemStat(ItemType.Belt)); SaveRandomItemStats(); return; } InIReader reader = new InIReader(@".\RandomItemStats.ini"); int i = 0; RandomItemStat stat; while (reader.ReadByte("Item" + i.ToString(), "MaxDuraChance", 255) != 255) { stat = new RandomItemStat { MaxDuraChance = reader.ReadByte("Item" + i.ToString(), "MaxDuraChance", 0), MaxDuraStatChance = reader.ReadByte("Item" + i.ToString(), "MaxDuraStatChance", 1), MaxDuraMaxStat = reader.ReadByte("Item" + i.ToString(), "MaxDuraMaxStat", 1), MaxAcChance = reader.ReadByte("Item" + i.ToString(), "MaxAcChance", 0), MaxAcStatChance = reader.ReadByte("Item" + i.ToString(), "MaxAcStatChance", 1), MaxAcMaxStat = reader.ReadByte("Item" + i.ToString(), "MaxAcMaxStat", 1), MaxMacChance = reader.ReadByte("Item" + i.ToString(), "MaxMacChance", 0), MaxMacStatChance = reader.ReadByte("Item" + i.ToString(), "MaxMacStatChance", 1), MaxMacMaxStat = reader.ReadByte("Item" + i.ToString(), "MaxMACMaxStat", 1), MaxDcChance = reader.ReadByte("Item" + i.ToString(), "MaxDcChance", 0), MaxDcStatChance = reader.ReadByte("Item" + i.ToString(), "MaxDcStatChance", 1), MaxDcMaxStat = reader.ReadByte("Item" + i.ToString(), "MaxDcMaxStat", 1), MaxMcChance = reader.ReadByte("Item" + i.ToString(), "MaxMcChance", 0), MaxMcStatChance = reader.ReadByte("Item" + i.ToString(), "MaxMcStatChance", 1), MaxMcMaxStat = reader.ReadByte("Item" + i.ToString(), "MaxMcMaxStat", 1), MaxScChance = reader.ReadByte("Item" + i.ToString(), "MaxScChance", 0), MaxScStatChance = reader.ReadByte("Item" + i.ToString(), "MaxScStatChance", 1), MaxScMaxStat = reader.ReadByte("Item" + i.ToString(), "MaxScMaxStat", 1), AccuracyChance = reader.ReadByte("Item" + i.ToString(), "AccuracyChance", 0), AccuracyStatChance = reader.ReadByte("Item" + i.ToString(), "AccuracyStatChance", 1), AccuracyMaxStat = reader.ReadByte("Item" + i.ToString(), "AccuracyMaxStat", 1), AgilityChance = reader.ReadByte("Item" + i.ToString(), "AgilityChance", 0), AgilityStatChance = reader.ReadByte("Item" + i.ToString(), "AgilityStatChance", 1), AgilityMaxStat = reader.ReadByte("Item" + i.ToString(), "AgilityMaxStat", 1), HpChance = reader.ReadByte("Item" + i.ToString(), "HpChance", 0), HpStatChance = reader.ReadByte("Item" + i.ToString(), "HpStatChance", 1), HpMaxStat = reader.ReadByte("Item" + i.ToString(), "HpMaxStat", 1), MpChance = reader.ReadByte("Item" + i.ToString(), "MpChance", 0), MpStatChance = reader.ReadByte("Item" + i.ToString(), "MpStatChance", 1), MpMaxStat = reader.ReadByte("Item" + i.ToString(), "MpMaxStat", 1), StrongChance = reader.ReadByte("Item" + i.ToString(), "StrongChance", 0), StrongStatChance = reader.ReadByte("Item" + i.ToString(), "StrongStatChance", 1), StrongMaxStat = reader.ReadByte("Item" + i.ToString(), "StrongMaxStat", 1), MagicResistChance = reader.ReadByte("Item" + i.ToString(), "MagicResistChance", 0), MagicResistStatChance = reader.ReadByte("Item" + i.ToString(), "MagicResistStatChance", 1), MagicResistMaxStat = reader.ReadByte("Item" + i.ToString(), "MagicResistMaxStat", 1), PoisonResistChance = reader.ReadByte("Item" + i.ToString(), "PoisonResistChance", 0), PoisonResistStatChance = reader.ReadByte("Item" + i.ToString(), "PoisonResistStatChance", 1), PoisonResistMaxStat = reader.ReadByte("Item" + i.ToString(), "PoisonResistMaxStat", 1), HpRecovChance = reader.ReadByte("Item" + i.ToString(), "HpRecovChance", 0), HpRecovStatChance = reader.ReadByte("Item" + i.ToString(), "HpRecovStatChance", 1), HpRecovMaxStat = reader.ReadByte("Item" + i.ToString(), "HpRecovMaxStat", 1), MpRecovChance = reader.ReadByte("Item" + i.ToString(), "MpRecovChance", 0), MpRecovStatChance = reader.ReadByte("Item" + i.ToString(), "MpRecovStatChance", 1), MpRecovMaxStat = reader.ReadByte("Item" + i.ToString(), "MpRecovMaxStat", 1), PoisonRecovChance = reader.ReadByte("Item" + i.ToString(), "PoisonRecovChance", 0), PoisonRecovStatChance = reader.ReadByte("Item" + i.ToString(), "PoisonRecovStatChance", 1), PoisonRecovMaxStat = reader.ReadByte("Item" + i.ToString(), "PoisonRecovMaxStat", 1), CriticalRateChance = reader.ReadByte("Item" + i.ToString(), "CriticalRateChance", 0), CriticalRateStatChance = reader.ReadByte("Item" + i.ToString(), "CriticalRateStatChance", 1), CriticalRateMaxStat = reader.ReadByte("Item" + i.ToString(), "CriticalRateMaxStat", 1), CriticalDamageChance = reader.ReadByte("Item" + i.ToString(), "CriticalDamageChance", 0), CriticalDamageStatChance = reader.ReadByte("Item" + i.ToString(), "CriticalDamageStatChance", 1), CriticalDamageMaxStat = reader.ReadByte("Item" + i.ToString(), "CriticalDamageMaxStat", 1), FreezeChance = reader.ReadByte("Item" + i.ToString(), "FreezeChance", 0), FreezeStatChance = reader.ReadByte("Item" + i.ToString(), "FreezeStatChance", 1), FreezeMaxStat = reader.ReadByte("Item" + i.ToString(), "FreezeMaxStat", 1), PoisonAttackChance = reader.ReadByte("Item" + i.ToString(), "PoisonAttackChance", 0), PoisonAttackStatChance = reader.ReadByte("Item" + i.ToString(), "PoisonAttackStatChance", 1), PoisonAttackMaxStat = reader.ReadByte("Item" + i.ToString(), "PoisonAttackMaxStat", 1), AttackSpeedChance = reader.ReadByte("Item" + i.ToString(), "AttackSpeedChance", 0), AttackSpeedStatChance = reader.ReadByte("Item" + i.ToString(), "AttackSpeedStatChance", 1), AttackSpeedMaxStat = reader.ReadByte("Item" + i.ToString(), "AttackSpeedMaxStat", 1), LuckChance = reader.ReadByte("Item" + i.ToString(), "LuckChance", 0), LuckStatChance = reader.ReadByte("Item" + i.ToString(), "LuckStatChance", 1), LuckMaxStat = reader.ReadByte("Item" + i.ToString(), "LuckMaxStat", 1), CurseChance = reader.ReadByte("Item" + i.ToString(), "CurseChance", 0) }; RandomItemStatsList.Add(stat); i++; } }
public static void LoadMines() { if (!File.Exists(@".\Mines.ini")) { MineSetList.Add(new MineSet(1)); MineSetList.Add(new MineSet(2)); SaveMines(); return; } InIReader reader = new InIReader(@".\Mines.ini"); int i = 0; MineSet Mine; while (reader.ReadByte("Mine" + i.ToString(), "SpotRegenRate", 255) != 255) { Mine = new MineSet(); Mine.Name = reader.ReadString("Mine" + i.ToString(), "Name", Mine.Name); Mine.SpotRegenRate = reader.ReadByte("Mine" + i.ToString(), "SpotRegenRate", Mine.SpotRegenRate); Mine.MaxStones = reader.ReadByte("Mine" + i.ToString(), "MaxStones", Mine.MaxStones); Mine.HitRate = reader.ReadByte("Mine" + i.ToString(), "HitRate", Mine.HitRate); Mine.DropRate = reader.ReadByte("Mine" + i.ToString(), "DropRate", Mine.DropRate); Mine.TotalSlots = reader.ReadByte("Mine" + i.ToString(), "TotalSlots", Mine.TotalSlots); int j = 0; while (reader.ReadByte("Mine" + i.ToString(), "D" + j.ToString() + "-MinSlot", 255) != 255) { Mine.Drops.Add(new MineDrop() { ItemName = reader.ReadString("Mine" + i.ToString(), "D" + j.ToString() + "-ItemName", ""), MinSlot = reader.ReadByte("Mine" + i.ToString(), "D" + j.ToString() + "-MinSlot", 255), MaxSlot = reader.ReadByte("Mine" + i.ToString(), "D" + j.ToString() + "-MaxSlot", 255), MinDura = reader.ReadByte("Mine" + i.ToString(), "D" + j.ToString() + "-MinDura", 255), MaxDura = reader.ReadByte("Mine" + i.ToString(), "D" + j.ToString() + "-MaxDura", 255), BonusChance = reader.ReadByte("Mine" + i.ToString(), "D" + j.ToString() + "-BonusChance", 255), MaxBonusDura = reader.ReadByte("Mine" + i.ToString(), "D" + j.ToString() + "-MaxBonusDura", 255) }); j++; } MineSetList.Add(Mine); i++; } }
public static void Load() { if (!Directory.Exists(DataPath)) { Directory.CreateDirectory(DataPath); } if (!Directory.Exists(MapPath)) { Directory.CreateDirectory(MapPath); } if (!Directory.Exists(SoundPath)) { Directory.CreateDirectory(SoundPath); } //Graphics FullScreen = Reader.ReadBoolean("Graphics", "FullScreen", FullScreen); TopMost = Reader.ReadBoolean("Graphics", "AlwaysOnTop", TopMost); FPSCap = Reader.ReadBoolean("Graphics", "FPSCap", FPSCap); HighResolution = Reader.ReadBoolean("Graphics", "HighResolution", HighResolution); DebugMode = Reader.ReadBoolean("Graphics", "DebugMode", DebugMode); //Network UseConfig = Reader.ReadBoolean("Network", "UseConfig", UseConfig); if (UseConfig) { IPAddress = Reader.ReadString("Network", "IPAddress", IPAddress); Port = Reader.ReadInt32("Network", "Port", Port); } //Logs LogErrors = Reader.ReadBoolean("Logs", "LogErrors", LogErrors); LogChat = Reader.ReadBoolean("Logs", "LogChat", LogChat); //Sound Volume = Reader.ReadByte("Sound", "Volume", Volume); SoundOverLap = Reader.ReadInt32("Sound", "SoundOverLap", SoundOverLap); //Game AccountID = Reader.ReadString("Game", "AccountID", AccountID); Password = Reader.ReadString("Game", "Password", Password); SkillMode = Reader.ReadBoolean("Game", "SkillMode", SkillMode); SkillBar = Reader.ReadBoolean("Game", "SkillBar", SkillBar); SkillSet = Reader.ReadBoolean("Game", "SkillSet", SkillSet); Effect = Reader.ReadBoolean("Game", "Effect", Effect); LevelEffect = Reader.ReadBoolean("Game", "LevelEffect", Effect); DropView = Reader.ReadBoolean("Game", "DropView", DropView); NameView = Reader.ReadBoolean("Game", "NameView", NameView); HPView = Reader.ReadBoolean("Game", "HPMPView", HPView); FontName = Reader.ReadString("Game", "FontName", FontName); TransparentChat = Reader.ReadBoolean("Game", "TransparentChat", TransparentChat); //Chat ShowNormalChat = Reader.ReadBoolean("Chat", "ShowNormalChat", ShowNormalChat); ShowYellChat = Reader.ReadBoolean("Chat", "ShowYellChat", ShowYellChat); ShowWhisperChat = Reader.ReadBoolean("Chat", "ShowWhisperChat", ShowWhisperChat); ShowLoverChat = Reader.ReadBoolean("Chat", "ShowLoverChat", ShowLoverChat); ShowMentorChat = Reader.ReadBoolean("Chat", "ShowMentorChat", ShowMentorChat); ShowGroupChat = Reader.ReadBoolean("Chat", "ShowGroupChat", ShowGroupChat); ShowGuildChat = Reader.ReadBoolean("Chat", "ShowGuildChat", ShowGuildChat); //Filters FilterNormalChat = Reader.ReadBoolean("Filter", "FilterNormalChat", FilterNormalChat); FilterWhisperChat = Reader.ReadBoolean("Filter", "FilterWhisperChat", FilterWhisperChat); FilterShoutChat = Reader.ReadBoolean("Filter", "FilterShoutChat", FilterShoutChat); FilterSystemChat = Reader.ReadBoolean("Filter", "FilterSystemChat", FilterSystemChat); FilterLoverChat = Reader.ReadBoolean("Filter", "FilterLoverChat", FilterLoverChat); FilterMentorChat = Reader.ReadBoolean("Filter", "FilterMentorChat", FilterMentorChat); FilterGroupChat = Reader.ReadBoolean("Filter", "FilterGroupChat", FilterGroupChat); FilterGuildChat = Reader.ReadBoolean("Filter", "FilterGuildChat", FilterGuildChat); }
public GuildBuffInfo(InIReader reader, int i) { Id = reader.ReadInt32("Buff-" + i.ToString(), "Id", 0); Icon = reader.ReadInt32("Buff-" + i.ToString(), "Icon", 0); name = reader.ReadString("Buff-" + i.ToString(), "Name", ""); LevelRequirement = reader.ReadByte("Buff-" + i.ToString(), "LevelReq", 0); PointsRequirement = reader.ReadByte("Buff-" + i.ToString(), "PointsReq", 1); TimeLimit = reader.ReadInt32("Buff-" + i.ToString(), "TimeLimit", 0);; ActivationCost = reader.ReadInt32("Buff-" + i.ToString(), "ActivationCost", 0); BuffAc = reader.ReadByte("Buff-" + i.ToString(), "BuffAc", 0); BuffMac = reader.ReadByte("Buff-" + i.ToString(), "BuffMAC", 0); BuffDc = reader.ReadByte("Buff-" + i.ToString(), "BuffDc", 0); BuffMc = reader.ReadByte("Buff-" + i.ToString(), "BuffMc", 0); BuffSc = reader.ReadByte("Buff-" + i.ToString(), "BuffSc", 0); BuffMaxHp = reader.ReadInt32("Buff-" + i.ToString(), "BuffMaxHp", 0); BuffMaxMp = reader.ReadInt32("Buff-" + i.ToString(), "BuffMaxMp", 0); BuffMineRate = reader.ReadByte("Buff-" + i.ToString(), "BuffMineRate", 0); BuffGemRate = reader.ReadByte("Buff-" + i.ToString(), "BuffGemRate", 0); BuffFishRate = reader.ReadByte("Buff-" + i.ToString(), "BuffFishRate", 0); BuffExpRate = reader.ReadByte("Buff-" + i.ToString(), "BuffExpRate", 0); BuffCraftRate = reader.ReadByte("Buff-" + i.ToString(), "BuffCraftRate", 0); BuffSkillRate = reader.ReadByte("Buff-" + i.ToString(), "BuffSkillRate", 0); BuffHpRegen = reader.ReadByte("Buff-" + i.ToString(), "BuffHpRegen", 0); BuffMPRegen = reader.ReadByte("Buff-" + i.ToString(), "BuffMpRegen", 0); BuffAttack = reader.ReadByte("Buff-" + i.ToString(), "BuffAttack", 0); BuffDropRate = reader.ReadByte("Buff-" + i.ToString(), "BuffDropRate", 0); BuffGoldRate = reader.ReadByte("Buff-" + i.ToString(), "BuffGoldRate", 0); }
public static void Load() { //Languahe GameLanguage.LoadClientLanguage(@".\Language.ini"); if (!Directory.Exists(DataPath)) { Directory.CreateDirectory(DataPath); } if (!Directory.Exists(MapPath)) { Directory.CreateDirectory(MapPath); } if (!Directory.Exists(SoundPath)) { Directory.CreateDirectory(SoundPath); } //Graphics FullScreen = Reader.ReadBoolean("Graphics", "FullScreen", FullScreen); Borderless = Reader.ReadBoolean("Graphics", "Borderless", Borderless); TopMost = Reader.ReadBoolean("Graphics", "AlwaysOnTop", TopMost); FPSCap = Reader.ReadBoolean("Graphics", "FPSCap", FPSCap); Resolution = Reader.ReadInt32("Graphics", "Resolution", Resolution); DebugMode = Reader.ReadBoolean("Graphics", "DebugMode", DebugMode); //Network UseConfig = Reader.ReadBoolean("Network", "UseConfig", UseConfig); if (UseConfig) { IPAddress = Reader.ReadString("Network", "IPAddress", IPAddress); Port = Reader.ReadInt32("Network", "Port", Port); } //Logs LogErrors = Reader.ReadBoolean("Logs", "LogErrors", LogErrors); LogChat = Reader.ReadBoolean("Logs", "LogChat", LogChat); //Sound Volume = Reader.ReadByte("Sound", "Volume", Volume); SoundOverLap = Reader.ReadInt32("Sound", "SoundOverLap", SoundOverLap); MusicVolume = Reader.ReadByte("Sound", "Music", MusicVolume); //Game AccountID = Reader.ReadString("Game", "AccountID", AccountID); Password = Reader.ReadString("Game", "Password", Password); SkillMode = Reader.ReadBoolean("Game", "SkillMode", SkillMode); SkillBar = Reader.ReadBoolean("Game", "SkillBar", SkillBar); //SkillSet = Reader.ReadBoolean("Game", "SkillSet", SkillSet); Effect = Reader.ReadBoolean("Game", "Effect", Effect); LevelEffect = Reader.ReadBoolean("Game", "LevelEffect", Effect); DropView = Reader.ReadBoolean("Game", "DropView", DropView); NameView = Reader.ReadBoolean("Game", "NameView", NameView); HPView = Reader.ReadBoolean("Game", "HPMPView", HPView); ModeView = Reader.ReadBoolean("Game", "ModeView", ModeView); FontName = Reader.ReadString("Game", "FontName", FontName); TransparentChat = Reader.ReadBoolean("Game", "TransparentChat", TransparentChat); DisplayDamage = Reader.ReadBoolean("Game", "DisplayDamage", DisplayDamage); TargetDead = Reader.ReadBoolean("Game", "TargetDead", TargetDead); ExpandedBuffWindow = Reader.ReadBoolean("Game", "ExpandedBuffWindow", ExpandedBuffWindow); DuraView = Reader.ReadBoolean("Game", "DuraWindow", DuraView); for (int i = 0; i < SkillbarLocation.Length / 2; i++) { SkillbarLocation[i, 0] = Reader.ReadInt32("Game", "Skillbar" + i.ToString() + "X", SkillbarLocation[i, 0]); SkillbarLocation[i, 1] = Reader.ReadInt32("Game", "Skillbar" + i.ToString() + "Y", SkillbarLocation[i, 1]); } //Chat ShowNormalChat = Reader.ReadBoolean("Chat", "ShowNormalChat", ShowNormalChat); ShowYellChat = Reader.ReadBoolean("Chat", "ShowYellChat", ShowYellChat); ShowWhisperChat = Reader.ReadBoolean("Chat", "ShowWhisperChat", ShowWhisperChat); ShowLoverChat = Reader.ReadBoolean("Chat", "ShowLoverChat", ShowLoverChat); ShowMentorChat = Reader.ReadBoolean("Chat", "ShowMentorChat", ShowMentorChat); ShowGroupChat = Reader.ReadBoolean("Chat", "ShowGroupChat", ShowGroupChat); ShowGuildChat = Reader.ReadBoolean("Chat", "ShowGuildChat", ShowGuildChat); //Filters FilterNormalChat = Reader.ReadBoolean("Filter", "FilterNormalChat", FilterNormalChat); FilterWhisperChat = Reader.ReadBoolean("Filter", "FilterWhisperChat", FilterWhisperChat); FilterShoutChat = Reader.ReadBoolean("Filter", "FilterShoutChat", FilterShoutChat); FilterSystemChat = Reader.ReadBoolean("Filter", "FilterSystemChat", FilterSystemChat); FilterLoverChat = Reader.ReadBoolean("Filter", "FilterLoverChat", FilterLoverChat); FilterMentorChat = Reader.ReadBoolean("Filter", "FilterMentorChat", FilterMentorChat); FilterGroupChat = Reader.ReadBoolean("Filter", "FilterGroupChat", FilterGroupChat); FilterGuildChat = Reader.ReadBoolean("Filter", "FilterGuildChat", FilterGuildChat); //AutoPatcher P_Patcher = Reader.ReadBoolean("Launcher", "Enabled", P_Patcher); P_Host = Reader.ReadString("Launcher", "Host", P_Host); P_PatchFileName = Reader.ReadString("Launcher", "PatchFile", P_PatchFileName); P_NeedLogin = Reader.ReadBoolean("Launcher", "NeedLogin", P_NeedLogin); P_Login = Reader.ReadString("Launcher", "Login", P_Login); P_Password = Reader.ReadString("Launcher", "Password", P_Password); P_AutoStart = Reader.ReadBoolean("Launcher", "AutoStart", P_AutoStart); P_ServerName = Reader.ReadString("Launcher", "ServerName", P_ServerName); P_BrowserAddress = Reader.ReadString("Launcher", "Browser", P_BrowserAddress); if (!P_Host.EndsWith("/")) { P_Host += "/"; } if (P_Host.StartsWith("www.", StringComparison.OrdinalIgnoreCase)) { P_Host = P_Host.Insert(0, "http://"); } if (P_BrowserAddress.StartsWith("www.", StringComparison.OrdinalIgnoreCase)) { P_BrowserAddress = P_BrowserAddress.Insert(0, "http://"); } }
public static void LoadMentor() { if (!File.Exists(ConfigPath + @".\MentorSystem.ini")) { SaveMarriage(); return; } InIReader reader = new InIReader(ConfigPath + @".\MentorSystem.ini"); MentorLevelGap = reader.ReadByte("Config", "LevelGap", MentorLevelGap); MentorSkillBoost = reader.ReadBoolean("Config", "MenteeSkillBoost", MentorSkillBoost); MentorLength = reader.ReadByte("Config", "MentorshipLength", MentorLength); MentorDamageBoost = reader.ReadByte("Config", "MentorDamageBoost", MentorDamageBoost); MentorExpBoost = reader.ReadByte("Config", "MenteeExpBoost", MentorExpBoost); MenteeExpBank = reader.ReadByte("Config", "PercentXPtoMentor", MenteeExpBank); }
public GuildBuffInfo(InIReader reader, int i) { Id = reader.ReadInt32("Buff-" + i.ToString(), "Id",0); Icon = reader.ReadInt32("Buff-" + i.ToString(), "Icon", 0); name = reader.ReadString("Buff-" + i.ToString(), "Name",""); LevelRequirement = reader.ReadByte("Buff-" + i.ToString(), "LevelReq",0); PointsRequirement = reader.ReadByte("Buff-" + i.ToString(), "PointsReq",1); TimeLimit = reader.ReadInt32("Buff-" + i.ToString(), "TimeLimit",0);; ActivationCost = reader.ReadInt32("Buff-" + i.ToString(), "ActivationCost",0); BuffAc = reader.ReadByte("Buff-" + i.ToString(), "BuffAc",0); BuffMac = reader.ReadByte("Buff-" + i.ToString(), "BuffMAC",0); BuffDc = reader.ReadByte("Buff-" + i.ToString(), "BuffDc",0); BuffMc = reader.ReadByte("Buff-" + i.ToString(), "BuffMc",0); BuffSc = reader.ReadByte("Buff-" + i.ToString(), "BuffSc",0); BuffMaxHp = reader.ReadInt32("Buff-" + i.ToString(), "BuffMaxHp",0); BuffMaxMp = reader.ReadInt32("Buff-" + i.ToString(), "BuffMaxMp",0); BuffMineRate = reader.ReadByte("Buff-" + i.ToString(), "BuffMineRate",0); BuffGemRate = reader.ReadByte("Buff-" + i.ToString(), "BuffGemRate",0); BuffFishRate = reader.ReadByte("Buff-" + i.ToString(), "BuffFishRate",0); BuffExpRate = reader.ReadByte("Buff-" + i.ToString(), "BuffExpRate",0); BuffCraftRate = reader.ReadByte("Buff-" + i.ToString(), "BuffCraftRate",0); BuffSkillRate = reader.ReadByte("Buff-" + i.ToString(), "BuffSkillRate",0); BuffHpRegen = reader.ReadByte("Buff-" + i.ToString(), "BuffHpRegen",0); BuffMPRegen = reader.ReadByte("Buff-" + i.ToString(), "BuffMpRegen",0); BuffAttack = reader.ReadByte("Buff-" + i.ToString(), "BuffAttack",0); BuffDropRate = reader.ReadByte("Buff-" + i.ToString(), "BuffDropRate",0); BuffGoldRate = reader.ReadByte("Buff-" + i.ToString(), "BuffGoldRate",0); }
static Settings() { Main.EnqueueMessage("Loading Config file."); if (File.Exists(ConfigPath)) { InIReader IReader = new InIReader(ConfigPath); //Path MapPath = IReader.ReadString("Path", "MapPath", MapPath); LogPath = IReader.ReadString("Path", "LogPath", LogPath); ClientPath = IReader.ReadString("Path", "ClientPath", ClientPath); //Database SQLServer = IReader.ReadString("Database", "SQLServer", SQLServer); SQLDatabase = IReader.ReadString("Database", "SQLDatabase", SQLDatabase); SQLUserID = IReader.ReadString("Database", "SQLUserID", SQLUserID); SQLPassword = IReader.ReadString("Database", "SQLPassword", SQLPassword); //Network IPAddress = IReader.ReadString("Network", "IPAddress", IPAddress); Port = IReader.ReadInt32("Network", "Port", Port); TimeOut = IReader.ReadInt64("Network", "TimeOut", TimeOut); MaxUser = IReader.ReadInt32("Network", "MaxUser", MaxUser); ReLogTime = IReader.ReadDouble("Network", "ReLogTime", ReLogTime); //Security CheckVersion = IReader.ReadBoolean("Security", "CheckVersion", CheckVersion); //Permission AllowNewAccount = IReader.ReadBoolean("Permission", "AllowNewAccount", AllowNewAccount); AllowChangePassword = IReader.ReadBoolean("Permission", "AllowChangePassword", AllowChangePassword); AllowLogin = IReader.ReadBoolean("Permission", "AllowLogin", AllowLogin); AllowNewCharacter = IReader.ReadBoolean("Permission", "AllowNewCharacter", AllowNewCharacter); AllowDeleteCharacter = IReader.ReadBoolean("Permission", "AllowDeleteCharacter", AllowDeleteCharacter); AllowStartGame = IReader.ReadBoolean("Permission", "AllowStartGame", AllowStartGame); //Game DropRange = IReader.ReadInt32("Game", "DropRange", DropRange); DropStackSize = IReader.ReadInt32("Game", "DropStackSize", DropStackSize); ItemTimeOut = IReader.ReadInt32("Game", "ItemTimeOut", ItemTimeOut); ExpRate = IReader.ReadSingle("Game", "ExpRate", ExpRate); DropRate = IReader.ReadSingle("Game", "DropRate", DropRate); StartLevel = IReader.ReadByte("Game", "StartLevel", StartLevel); StartGold = IReader.ReadInt64("Game", "StartGold", StartGold); if (ExpRate <= 0) { ExpRate = 1; } if (StartLevel <= 0) { StartLevel = 1; } Main.EnqueueMessage("Config file loaded."); } else { Main.EnqueueMessage("Config file not found, creating Config file."); Save(); } LoadVersion(); LoadExperienceList(); }