public static void WriteIni <T>(InIReader reader) where T : class, new() { Type objType = typeof(T); //取属性上的自定义特性 foreach (FieldInfo fieldInfo in objType.GetFields()) { object[] objAttrs = fieldInfo.GetCustomAttributes(typeof(IniAttribute), true); if (objAttrs.Length <= 0) { continue; } IniAttribute attr = objAttrs[0] as IniAttribute; if (attr == null) { continue; } if (fieldInfo.FieldType == typeof(bool)) { reader.Write(attr.Section, fieldInfo.Name, (bool)fieldInfo.GetValue(null)); } else if (fieldInfo.FieldType == typeof(int)) { reader.Write(attr.Section, fieldInfo.Name, (int)fieldInfo.GetValue(null)); } else if (fieldInfo.FieldType == typeof(string)) { reader.Write(attr.Section, fieldInfo.Name, (string)fieldInfo.GetValue(null)); } } }
/// <summary> /// 配置文件保存 /// </summary> public static void Save() { Reader.Write("AutoPatcher", "Client", Client); Reader.Write("AutoPatcher", "Host", Host); Reader.Write("AutoPatcher", "Login", Login); Reader.Write("AutoPatcher", "Password", Password); Reader.Write("AutoPatcher", "AllowCleanUp", AllowCleanUp); }
public static void Save(InIReader reader) { for (int i = 0; i < list.Count; i++) { reader.Write("Var", list[i].fieldName, list[i].value); } }
public static void SaveTrackedQuests(string charName) { //Quests for (int i = 0; i < TrackedQuests.Length; i++) { QuestTrackingReader.Write(charName, "Quest-" + i.ToString(), TrackedQuests[i]); } }
public static void Save() { Reader.Write("AutoPatcher", "Client", Client); Reader.Write("AutoPatcher", "Host", Host); Reader.Write("AutoPatcher", "Login", Login); Reader.Write("AutoPatcher", "Password", Password); Reader.Write("AutoPatcher", "Protocol", Protocol); Reader.Write("AutoPatcher", "AllowCleanUp", AllowCleanUp); Reader.Write("AutoPatcher", "CompressFiles", CompressFiles); }
public static void SaveMentor() { File.Delete(ConfigPath + @".\MentorSystem.ini"); InIReader reader = new InIReader(ConfigPath + @".\MentorSystem.ini"); reader.Write("Config", "LevelGap", MentorLevelGap); reader.Write("Config", "MenteeSkillBoost", MentorSkillBoost); reader.Write("Config", "MentorshipLength", MentorLength); reader.Write("Config", "MentorDamageBoost", MentorDamageBoost); reader.Write("Config", "MenteeExpBoost", MentorExpBoost); reader.Write("Config", "PercentXPtoMentor", MenteeExpBank); }
public static void SaveRefine() { File.Delete(ConfigPath + @".\RefineSystem.ini"); InIReader reader = new InIReader(ConfigPath + @".\RefineSystem.ini"); reader.Write("Config", "OnlyRefineWeapon", OnlyRefineWeapon); reader.Write("Config", "BaseChance", RefineBaseChance); reader.Write("Config", "Time", RefineTime); reader.Write("Config", "StatIncrease", RefineIncrease); reader.Write("Config", "CritChance", RefineCritChance); reader.Write("Config", "CritIncrease", RefineCritIncrease); reader.Write("Config", "WepStatReducedChance", RefineWepStatReduce); reader.Write("Config", "ItemStatReducedChance", RefineItemStatReduce); reader.Write("Config", "RefineCost", RefineCost); reader.Write("Ore", "OreName", RefineOreName); }
public static void SaveMarriage() { File.Delete(ConfigPath + @".\MarriageSystem.ini"); InIReader reader = new InIReader(ConfigPath + @".\MarriageSystem.ini"); reader.Write("Config", "EXPBonus", LoverEXPBonus); reader.Write("Config", "MarriageCooldown", MarriageCooldown); reader.Write("Config", "AllowLoverRecall", WeddingRingRecall); reader.Write("Config", "MinimumLevel", MarriageLevelRequired); reader.Write("Config", "ReplaceRingCost", ReplaceWedRingCost); }
public static void SaveFishing() { File.Delete(ConfigPath + @".\FishingSystem.ini"); InIReader reader = new InIReader(ConfigPath + @".\FishingSystem.ini"); reader.Write("Rates", "Attempts", FishingAttempts); reader.Write("Rates", "SuccessStart", FishingSuccessStart); reader.Write("Rates", "SuccessMultiplier", FishingSuccessMultiplier); reader.Write("Rates", "Delay", FishingDelay); reader.Write("Rates", "MonsterSpawnChance", FishingMobSpawnChance); reader.Write("Game", "Monster", FishingMonster); }
public static void SaveMail() { File.Delete(ConfigPath + @".\MailSystem.ini"); InIReader reader = new InIReader(ConfigPath + @".\MailSystem.ini"); reader.Write("AutoSend", "Gold", MailAutoSendGold); reader.Write("AutoSend", "Items", MailAutoSendItems); reader.Write("Rates", "FreeWithStamp", MailFreeWithStamp); reader.Write("Rates", "CostPer1k", MailCostPer1KGold); reader.Write("Rates", "InsurancePerItem", MailItemInsurancePercentage); }
public static void SaveBaseStats() { File.Delete(ConfigPath + @".\BaseStats.ini"); InIReader reader = new InIReader(ConfigPath + @".\BaseStats.ini"); for (int i = 0; i < ClassBaseStats.Length; i++) { reader.Write(BaseStatClassNames[i], "HpGain", ClassBaseStats[i].HpGain); reader.Write(BaseStatClassNames[i], "HpGainRate", ClassBaseStats[i].HpGainRate); reader.Write(BaseStatClassNames[i], "MpGainRate", ClassBaseStats[i].MpGainRate); reader.Write(BaseStatClassNames[i], "BagWeightGain", ClassBaseStats[i].BagWeightGain); reader.Write(BaseStatClassNames[i], "WearWeightGain", ClassBaseStats[i].WearWeightGain); reader.Write(BaseStatClassNames[i], "HandWeightGain", ClassBaseStats[i].HandWeightGain); reader.Write(BaseStatClassNames[i], "MinAc", ClassBaseStats[i].MinAc); reader.Write(BaseStatClassNames[i], "MaxAc", ClassBaseStats[i].MaxAc); reader.Write(BaseStatClassNames[i], "MinMac", ClassBaseStats[i].MinMac); reader.Write(BaseStatClassNames[i], "MaxMac", ClassBaseStats[i].MaxMac); reader.Write(BaseStatClassNames[i], "MinDc", ClassBaseStats[i].MinDc); reader.Write(BaseStatClassNames[i], "MaxDc", ClassBaseStats[i].MaxDc); reader.Write(BaseStatClassNames[i], "MinMc", ClassBaseStats[i].MinMc); reader.Write(BaseStatClassNames[i], "MaxMc", ClassBaseStats[i].MaxMc); reader.Write(BaseStatClassNames[i], "MinSc", ClassBaseStats[i].MinSc); reader.Write(BaseStatClassNames[i], "MaxSc", ClassBaseStats[i].MaxSc); reader.Write(BaseStatClassNames[i], "StartAgility", ClassBaseStats[i].StartAgility); reader.Write(BaseStatClassNames[i], "StartAccuracy", ClassBaseStats[i].StartAccuracy); reader.Write(BaseStatClassNames[i], "StartCriticalRate", ClassBaseStats[i].StartCriticalRate); reader.Write(BaseStatClassNames[i], "StartCriticalDamage", ClassBaseStats[i].StartCriticalDamage); reader.Write(BaseStatClassNames[i], "CritialRateGain", ClassBaseStats[i].CritialRateGain); reader.Write(BaseStatClassNames[i], "CriticalDamageGain", ClassBaseStats[i].CriticalDamageGain); } }
public static void Save() { //Graphics Reader.Write("Graphics", "FullScreen", FullScreen); Reader.Write("Graphics", "AlwaysOnTop", TopMost); Reader.Write("Graphics", "FPSCap", FPSCap); Reader.Write("Graphics", "Resolution", Resolution); Reader.Write("Graphics", "DebugMode", DebugMode); //Sound Reader.Write("Sound", "Volume", Volume); Reader.Write("Sound", "Music", MusicVolume); //Game Reader.Write("Game", "AccountID", AccountID); Reader.Write("Game", "Password", Password); Reader.Write("Game", "SkillMode", SkillMode); Reader.Write("Game", "SkillBar", SkillBar); Reader.Write("Game", "Effect", Effect); Reader.Write("Game", "LevelEffect", LevelEffect); Reader.Write("Game", "DropView", DropView); Reader.Write("Game", "NameView", NameView); Reader.Write("Game", "HPMPView", HPView); Reader.Write("Game", "FontName", FontName); Reader.Write("Game", "TransparentChat", TransparentChat); Reader.Write("Game", "DisplayDamage", DisplayDamage); Reader.Write("Game", "TargetDead", TargetDead); Reader.Write("Game", "DuraWindow", DuraView); for (int i = 0; i < SkillbarLocation.Length / 2; i++) { Reader.Write("Game", "Skillbar" + i.ToString() + "X", SkillbarLocation[i, 0]); Reader.Write("Game", "Skillbar" + i.ToString() + "Y", SkillbarLocation[i, 1]); } Reader.Write("Game", "ServerTimeZone", ServerTimeZone); Reader.Write("Game", "MonsterName", MonsterName); //Ice Reader.Write("Game", "DropEffect", DropEffect); //Ice //Chat Reader.Write("Chat", "ShowNormalChat", ShowNormalChat); Reader.Write("Chat", "ShowYellChat", ShowYellChat); Reader.Write("Chat", "ShowWhisperChat", ShowWhisperChat); Reader.Write("Chat", "ShowLoverChat", ShowLoverChat); Reader.Write("Chat", "ShowMentorChat", ShowMentorChat); Reader.Write("Chat", "ShowGroupChat", ShowGroupChat); Reader.Write("Chat", "ShowGuildChat", ShowGuildChat); //Filters Reader.Write("Filter", "FilterNormalChat", FilterNormalChat); Reader.Write("Filter", "FilterWhisperChat", FilterWhisperChat); Reader.Write("Filter", "FilterShoutChat", FilterShoutChat); Reader.Write("Filter", "FilterSystemChat", FilterSystemChat); Reader.Write("Filter", "FilterLoverChat", FilterLoverChat); Reader.Write("Filter", "FilterMentorChat", FilterMentorChat); Reader.Write("Filter", "FilterGroupChat", FilterGroupChat); Reader.Write("Filter", "FilterGuildChat", FilterGuildChat); //AutoPatcher Reader.Write("Launcher", "Enabled", P_Patcher); Reader.Write("Launcher", "Host", P_Host); Reader.Write("Launcher", "PatchFile", P_PatchFileName); Reader.Write("Launcher", "NeedLogin", P_NeedLogin); Reader.Write("Launcher", "Login", P_Login); Reader.Write("Launcher", "Password", P_Password); Reader.Write("Launcher", "ServerName", P_ServerName); Reader.Write("Launcher", "Browser", P_BrowserAddress); Reader.Write("Launcher", "AutoStart", P_AutoStart); Reader.Write("GameSettings", "Donation", C_DonateLink); Reader.Write("GameSettings", "WebLink", C_WebLink); Reader.Write("Custom", "MissIndicator", MissIndicator); Reader.Write("Custom", "DamageIndicator", DamageIndicator); Reader.Write("Custom", "MagicDamageIndicator", MagicDamageIndicator); Reader.Write("Custom", "CriticalIndicator", CriticalIndicator); Reader.Write("Custom", "HealIndicator", HealIndicator); Reader.Write("Custom", "ManaRecovIndicator", ManaRecovIndicator); Reader.Write("Custom", "BossHPBar", BossHPBar); Reader.Write("Custom", "MobLightEffect", MobLightEffect); }
public static void SaveMines() { File.Delete(ConfigPath + @".\Mines.ini"); InIReader reader = new InIReader(ConfigPath + @".\Mines.ini"); MineSet Mine; for (int i = 0; i < MineSetList.Count; i++) { Mine = MineSetList[i]; reader.Write("Mine" + i.ToString(), "Name", Mine.Name); reader.Write("Mine" + i.ToString(), "SpotRegenRate", Mine.SpotRegenRate); reader.Write("Mine" + i.ToString(), "MaxStones", Mine.MaxStones); reader.Write("Mine" + i.ToString(), "HitRate", Mine.HitRate); reader.Write("Mine" + i.ToString(), "DropRate", Mine.DropRate); reader.Write("Mine" + i.ToString(), "TotalSlots", Mine.TotalSlots); for (int j = 0; j < Mine.Drops.Count; j++) { MineDrop Drop = Mine.Drops[j]; reader.Write("Mine" + i.ToString(), "D" + j.ToString() + "-ItemName", Drop.ItemName); reader.Write("Mine" + i.ToString(), "D" + j.ToString() + "-MinSlot", Drop.MinSlot); reader.Write("Mine" + i.ToString(), "D" + j.ToString() + "-MaxSlot", Drop.MaxSlot); reader.Write("Mine" + i.ToString(), "D" + j.ToString() + "-MinDura", Drop.MinDura); reader.Write("Mine" + i.ToString(), "D" + j.ToString() + "-MaxDura", Drop.MaxDura); reader.Write("Mine" + i.ToString(), "D" + j.ToString() + "-BonusChance", Drop.BonusChance); reader.Write("Mine" + i.ToString(), "D" + j.ToString() + "-MaxBonusDura", Drop.MaxBonusDura); } } }
public void Save(InIReader reader, int i) { reader.Write("Buff-" + i.ToString(), "Id", Id); reader.Write("Buff-" + i.ToString(), "Icon", Icon); reader.Write("Buff-" + i.ToString(), "Name", name); reader.Write("Buff-" + i.ToString(), "LevelReq", LevelRequirement); reader.Write("Buff-" + i.ToString(), "PointsReq", PointsRequirement); reader.Write("Buff-" + i.ToString(), "TimeLimit", TimeLimit); reader.Write("Buff-" + i.ToString(), "ActivationCost", ActivationCost); reader.Write("Buff-" + i.ToString(), "BuffAc", Stats[Stat.MaxAC]); reader.Write("Buff-" + i.ToString(), "BuffMAC", Stats[Stat.MaxMAC]); reader.Write("Buff-" + i.ToString(), "BuffDc", Stats[Stat.MaxDC]); reader.Write("Buff-" + i.ToString(), "BuffMc", Stats[Stat.MaxMC]); reader.Write("Buff-" + i.ToString(), "BuffSc", Stats[Stat.MaxSC]); reader.Write("Buff-" + i.ToString(), "BuffMaxHp", Stats[Stat.HP]); reader.Write("Buff-" + i.ToString(), "BuffMaxMp", Stats[Stat.MP]); reader.Write("Buff-" + i.ToString(), "BuffMineRate", Stats[Stat.MineRatePercent]); reader.Write("Buff-" + i.ToString(), "BuffGemRate", Stats[Stat.GemRatePercent]); reader.Write("Buff-" + i.ToString(), "BuffFishRate", Stats[Stat.FishRatePercent]); reader.Write("Buff-" + i.ToString(), "BuffExpRate", Stats[Stat.ExpRatePercent]);; reader.Write("Buff-" + i.ToString(), "BuffCraftRate", Stats[Stat.CraftRatePercent]); reader.Write("Buff-" + i.ToString(), "BuffSkillRate", Stats[Stat.SkillGainMultiplier]); reader.Write("Buff-" + i.ToString(), "BuffHpRegen", Stats[Stat.HealthRecovery]); reader.Write("Buff-" + i.ToString(), "BuffMpRegen", Stats[Stat.SpellRecovery]); reader.Write("Buff-" + i.ToString(), "BuffAttack", Stats[Stat.AttackBonus]); reader.Write("Buff-" + i.ToString(), "BuffDropRate", Stats[Stat.ItemDropRatePercent]); reader.Write("Buff-" + i.ToString(), "BuffGoldRate", Stats[Stat.GoldDropRatePercent]); }
public static void SaveMines() { File.Delete(@".\Mines.ini"); InIReader reader = new InIReader(@".\Mines.ini"); MineSet Mine; for (int i = 0; i < MineSetList.Count; i++) { Mine = MineSetList[i]; reader.Write("Mine" + i.ToString(), "Name", Mine.Name); reader.Write("Mine" + i.ToString(), "SpotRegenRate", Mine.SpotRegenRate); reader.Write("Mine" + i.ToString(), "MaxStones", Mine.MaxStones); reader.Write("Mine" + i.ToString(), "HitRate", Mine.HitRate); reader.Write("Mine" + i.ToString(), "DropRate", Mine.DropRate); reader.Write("Mine" + i.ToString(), "TotalSlots", Mine.TotalSlots); for (int j = 0; j < Mine.Drops.Count; j++) { MineDrop Drop = Mine.Drops[j]; reader.Write("Mine" + i.ToString(), "D" + j.ToString() + "-ItemName", Drop.ItemName); reader.Write("Mine" + i.ToString(), "D" + j.ToString() + "-MinSlot", Drop.MinSlot); reader.Write("Mine" + i.ToString(), "D" + j.ToString() + "-MaxSlot", Drop.MaxSlot); reader.Write("Mine" + i.ToString(), "D" + j.ToString() + "-MinDura", Drop.MinDura); reader.Write("Mine" + i.ToString(), "D" + j.ToString() + "-MaxDura", Drop.MaxDura); reader.Write("Mine" + i.ToString(), "D" + j.ToString() + "-BonusChance", Drop.BonusChance); reader.Write("Mine" + i.ToString(), "D" + j.ToString() + "-MaxBonusDura", Drop.MaxBonusDura); } } }
public static void Save() { Reader.Write("Paths", "Envir", EnvirPath); Reader.Write("Paths", "Maps", MapPath); Reader.Write("Paths", "Export", ExportPath); Reader.Write("Paths", "NPCs", NPCPath); Reader.Write("Paths", "Quests", QuestPath); Reader.Write("Paths", "Drops", DropPath); Reader.Write("Database", "Version", DatabaseVersion); Reader.Write("Database", "CustomVersion", CustomDatabaseVersion); Reader.Write("Tool", "CurrentVersion", ToolVersion); Reader.Write("Paths", "Database", DatabasePath); Reader.Write("Config", "CreditxGold", CredxGold); SaveRandomItemStats(); SaveMines(); }
public static void SaveRandomItemStats() { File.Delete(@".\RandomItemStats.ini"); InIReader reader = new InIReader(@".\RandomItemStats.ini"); RandomItemStat stat; for (int i = 0; i < RandomItemStatsList.Count; i++) { stat = RandomItemStatsList[i]; reader.Write("Item" + i.ToString(), "MaxDuraChance", stat.MaxDuraChance); reader.Write("Item" + i.ToString(), "MaxDuraStatChance", stat.MaxDuraStatChance); reader.Write("Item" + i.ToString(), "MaxDuraMaxStat", stat.MaxDuraMaxStat); reader.Write("Item" + i.ToString(), "MaxAcChance", stat.MaxAcChance); reader.Write("Item" + i.ToString(), "MaxAcStatChance", stat.MaxAcStatChance); reader.Write("Item" + i.ToString(), "MaxAcMaxStat", stat.MaxAcMaxStat); reader.Write("Item" + i.ToString(), "MaxMacChance", stat.MaxMacChance); reader.Write("Item" + i.ToString(), "MaxMacStatChance", stat.MaxMacStatChance); reader.Write("Item" + i.ToString(), "MaxMACMaxStat", stat.MaxMacMaxStat); reader.Write("Item" + i.ToString(), "MaxDcChance", stat.MaxDcChance); reader.Write("Item" + i.ToString(), "MaxDcStatChance", stat.MaxDcStatChance); reader.Write("Item" + i.ToString(), "MaxDcMaxStat", stat.MaxDcMaxStat); reader.Write("Item" + i.ToString(), "MaxMcChance", stat.MaxMcChance); reader.Write("Item" + i.ToString(), "MaxMcStatChance", stat.MaxMcStatChance); reader.Write("Item" + i.ToString(), "MaxMcMaxStat", stat.MaxMcMaxStat); reader.Write("Item" + i.ToString(), "MaxScChance", stat.MaxScChance); reader.Write("Item" + i.ToString(), "MaxScStatChance", stat.MaxScStatChance); reader.Write("Item" + i.ToString(), "MaxScMaxStat", stat.MaxScMaxStat); reader.Write("Item" + i.ToString(), "AccuracyChance", stat.AccuracyChance); reader.Write("Item" + i.ToString(), "AccuracyStatChance", stat.AccuracyStatChance); reader.Write("Item" + i.ToString(), "AccuracyMaxStat", stat.AccuracyMaxStat); reader.Write("Item" + i.ToString(), "AgilityChance", stat.AgilityChance); reader.Write("Item" + i.ToString(), "AgilityStatChance", stat.AgilityStatChance); reader.Write("Item" + i.ToString(), "AgilityMaxStat", stat.AgilityMaxStat); reader.Write("Item" + i.ToString(), "HpChance", stat.HpChance); reader.Write("Item" + i.ToString(), "HpStatChance", stat.HpStatChance); reader.Write("Item" + i.ToString(), "HpMaxStat", stat.HpMaxStat); reader.Write("Item" + i.ToString(), "MpChance", stat.MpChance); reader.Write("Item" + i.ToString(), "MpStatChance", stat.MpStatChance); reader.Write("Item" + i.ToString(), "MpMaxStat", stat.MpMaxStat); reader.Write("Item" + i.ToString(), "StrongChance", stat.StrongChance); reader.Write("Item" + i.ToString(), "StrongStatChance", stat.StrongStatChance); reader.Write("Item" + i.ToString(), "StrongMaxStat", stat.StrongMaxStat); reader.Write("Item" + i.ToString(), "MagicResistChance", stat.MagicResistChance); reader.Write("Item" + i.ToString(), "MagicResistStatChance", stat.MagicResistStatChance); reader.Write("Item" + i.ToString(), "MagicResistMaxStat", stat.MagicResistMaxStat); reader.Write("Item" + i.ToString(), "PoisonResistChance", stat.PoisonResistChance); reader.Write("Item" + i.ToString(), "PoisonResistStatChance", stat.PoisonResistStatChance); reader.Write("Item" + i.ToString(), "PoisonResistMaxStat", stat.PoisonResistMaxStat); reader.Write("Item" + i.ToString(), "HpRecovChance", stat.HpRecovChance); reader.Write("Item" + i.ToString(), "HpRecovStatChance", stat.HpRecovStatChance); reader.Write("Item" + i.ToString(), "HpRecovMaxStat", stat.HpRecovMaxStat); reader.Write("Item" + i.ToString(), "MpRecovChance", stat.MpRecovChance); reader.Write("Item" + i.ToString(), "MpRecovStatChance", stat.MpRecovStatChance); reader.Write("Item" + i.ToString(), "MpRecovMaxStat", stat.MpRecovMaxStat); reader.Write("Item" + i.ToString(), "PoisonRecovChance", stat.PoisonRecovChance); reader.Write("Item" + i.ToString(), "PoisonRecovStatChance", stat.PoisonRecovStatChance); reader.Write("Item" + i.ToString(), "PoisonRecovMaxStat", stat.PoisonRecovMaxStat); reader.Write("Item" + i.ToString(), "CriticalRateChance", stat.CriticalRateChance); reader.Write("Item" + i.ToString(), "CriticalRateStatChance", stat.CriticalRateStatChance); reader.Write("Item" + i.ToString(), "CriticalRateMaxStat", stat.CriticalRateMaxStat); reader.Write("Item" + i.ToString(), "CriticalDamageChance", stat.CriticalDamageChance); reader.Write("Item" + i.ToString(), "CriticalDamageStatChance", stat.CriticalDamageStatChance); reader.Write("Item" + i.ToString(), "CriticalDamageMaxStat", stat.CriticalDamageMaxStat); reader.Write("Item" + i.ToString(), "FreezeChance", stat.FreezeChance); reader.Write("Item" + i.ToString(), "FreezeStatChance", stat.FreezeStatChance); reader.Write("Item" + i.ToString(), "FreezeMaxStat", stat.FreezeMaxStat); reader.Write("Item" + i.ToString(), "PoisonAttackChance", stat.PoisonAttackChance); reader.Write("Item" + i.ToString(), "PoisonAttackStatChance", stat.PoisonAttackStatChance); reader.Write("Item" + i.ToString(), "PoisonAttackMaxStat", stat.PoisonAttackMaxStat); reader.Write("Item" + i.ToString(), "AttackSpeedChance", stat.AttackSpeedChance); reader.Write("Item" + i.ToString(), "AttackSpeedStatChance", stat.AttackSpeedStatChance); reader.Write("Item" + i.ToString(), "AttackSpeedMaxStat", stat.AttackSpeedMaxStat); reader.Write("Item" + i.ToString(), "LuckChance", stat.LuckChance); reader.Write("Item" + i.ToString(), "LuckStatChance", stat.LuckStatChance); reader.Write("Item" + i.ToString(), "LuckMaxStat", stat.LuckMaxStat); reader.Write("Item" + i.ToString(), "CurseChance", stat.CurseChance); } }
public static void Save() { //Graphics Reader.Write("Graphics", "FullScreen", FullScreen); Reader.Write("Graphics", "AlwaysOnTop", TopMost); Reader.Write("Graphics", "FPSCap", FPSCap); Reader.Write("Graphics", "HighResolution", HighResolution); Reader.Write("Graphics", "DebugMode", DebugMode); //Sound Reader.Write("Sound", "Volume", Volume); //Game Reader.Write("Game", "SkillMode", SkillMode); Reader.Write("Game", "SkillBar", SkillBar); Reader.Write("Game", "SkillSet", SkillSet); Reader.Write("Game", "Effect", Effect); Reader.Write("Game", "LevelEffect", LevelEffect); Reader.Write("Game", "DropView", DropView); Reader.Write("Game", "NameView", NameView); Reader.Write("Game", "HPMPView", HPView); Reader.Write("Game", "FontName", FontName); Reader.Write("Game", "TransparentChat", TransparentChat); //Chat Reader.Write("Chat", "ShowNormalChat", ShowNormalChat); Reader.Write("Chat", "ShowYellChat", ShowYellChat); Reader.Write("Chat", "ShowWhisperChat", ShowWhisperChat); Reader.Write("Chat", "ShowLoverChat", ShowLoverChat); Reader.Write("Chat", "ShowMentorChat", ShowMentorChat); Reader.Write("Chat", "ShowGroupChat", ShowGroupChat); Reader.Write("Chat", "ShowGuildChat", ShowGuildChat); //Filters Reader.Write("Filter", "FilterNormalChat", FilterNormalChat); Reader.Write("Filter", "FilterWhisperChat", FilterWhisperChat); Reader.Write("Filter", "FilterShoutChat", FilterShoutChat); Reader.Write("Filter", "FilterSystemChat", FilterSystemChat); Reader.Write("Filter", "FilterLoverChat", FilterLoverChat); Reader.Write("Filter", "FilterMentorChat", FilterMentorChat); Reader.Write("Filter", "FilterGroupChat", FilterGroupChat); Reader.Write("Filter", "FilterGuildChat", FilterGuildChat); }
public bool Save(CustomAI mobToSave) { if (mobToSave == null || mobToSave.Name.Length <= 0) return false; InIReader Writer = new InIReader(@".\Custom\Unique AIs\" + mobToSave.Name + ".ini"); Writer.Write("Bools", "SetXY", mobToSave.SetXY); Writer.Write("Bools", "MapSpecific", mobToSave.MapSpecific); Writer.Write("Bools", "AnnounceSpawn", mobToSave.AnnounceSpawn); Writer.Write("Bools", "AnnounceDrop", mobToSave.AnnounceDrop); Writer.Write("Bools", "AnnounceDeath", mobToSave.AnnounceDeath); Writer.Write("Bools", "UseMassAttack", mobToSave.UseMassAttack); Writer.Write("Bools", "UseSpecialAttack", mobToSave.UseSpecialAttack); Writer.Write("Bools", "UseMeleeAttack", mobToSave.UseMeleeAttack); Writer.Write("Bools", "UseRangeAttack", mobToSave.UseRangeAttack); Writer.Write("Bools", "Target", mobToSave.Target); Writer.Write("Bools", "UseKillTimer", mobToSave.UseKillTimer); Writer.Write("Bools", "IgnorePets", mobToSave.IgnorePets); Writer.Write("Bools", "DamagePetsMore", mobToSave.DamagePetsMore); Writer.Write("Bools", "CanPara", mobToSave.CanPara); Writer.Write("Bools", "CanGreen", mobToSave.CanGreen); Writer.Write("Bools", "CanRed", mobToSave.CanRed); Writer.Write("Bools", "SpawnSlaves", mobToSave.Spawn_Slaves); if (mobToSave.MapSpecific) Writer.Write("Strings", "MapName", mobToSave.MapName); if (mobToSave.AnnounceSpawn) Writer.Write("Strings", "SpawnMessage", mobToSave.SpawnMessage); if (mobToSave.AnnounceDeath) Writer.Write("Strings", "DeathMessage", mobToSave.DeadMessage); if (mobToSave.AnnounceDrop) Writer.Write("Strings", "ItemMessage", mobToSave.ItemMessage); if (mobToSave.SetXY) { Writer.Write("Ints", "MapX", mobToSave.MapX); Writer.Write("Ints", "MapY", mobToSave.MapY); } if (mobToSave.UseMassAttack) { Writer.Write("Ints", "MassAttackEffect", mobToSave.MassAttackEffect); Writer.Write("Damage", "MassAttackDamage", mobToSave.MassAttackDamage); } if (mobToSave.UseSpecialAttack) { Writer.Write("Ints", "SpecialAttackEffect", mobToSave.SpecialAttackEffect); Writer.Write("Damage", "SpecialAttackDamage", mobToSave.SpecialAttackDamage); } if (mobToSave.UseMeleeAttack) { Writer.Write("Ints", "MeleeAttackEffect", mobToSave.MeleeAttackEffect); Writer.Write("Damage", "MeleeAttackDamage", mobToSave.MeleeAttackDamage); } if (mobToSave.UseRangeAttack) { Writer.Write("Ints", "RangeAttackEffect", mobToSave.RangeAttackEffect); Writer.Write("Damage", "RangeAttackDamage", mobToSave.RangeAttackDamage); } if (mobToSave.UseMagicAttack) { Writer.Write("Ints", "MagicAttackEffect", mobToSave.MagicAttackEffect); Writer.Write("Damage", "MagicAttackDamage", mobToSave.MagicAttackDamage); } if (mobToSave.Target) { Writer.Write("Strings", "TargetClass", mobToSave.TargetClass); //Default = Warrior Writer.Write("Damage", "TargetDamage", mobToSave.TargetAttackDamage); } if (mobToSave.DamagePetsMore || !mobToSave.IgnorePets) Writer.Write("Damage", "PetDamage", mobToSave.PetAttackDamage); if (mobToSave.UseKillTimer) { Writer.Write("Strings", "KillTimer", mobToSave.KillTimer); Writer.Write("Ints", "RespawnDays", mobToSave.RespawnDay); Writer.Write("Ints", "RespawnMonths", mobToSave.RespawnMonth); Writer.Write("Ints", "RespawnYears", mobToSave.RespawnYear); Writer.Write("Ints", "RespawnHours", mobToSave.RespawnHour); Writer.Write("Ints", "RespawnMinutes", mobToSave.RespawnMinute); } Writer.Write("Ints", "ItemCount", mobToSave.ItemCount); if (mobToSave.Spawn_Slaves) { for (int i = 0; i < mobToSave.Slaves.Count; i++) { Writer.Write("Slaves", "Slave" + i, mobToSave.Slaves[i].Name); Writer.Write("Slaves", "SlaveCount" + i, mobToSave.Slaves[i].Count); } } if (mobToSave.ItemCount > 0) { for (int i = 0; i < mobToSave.ItemCount; i++) { Writer.Write("Items", "Item" + i, mobToSave.Drops[i].Name); Writer.Write("Items", "ItemChance" + i, mobToSave.Drops[i].Chance); } } Writer.Write("States", "Status", mobToSave.Alive); Writer.Write("States", "CurrentMap", mobToSave.CurrentMap); Writer.Write("States", "CurrentX", mobToSave.CurrentX); Writer.Write("States", "CurrentY", mobToSave.CurrentY); return true; }
public static void SaveGem() { File.Delete(ConfigPath + @".\GemSystem.ini"); InIReader reader = new InIReader(ConfigPath + @".\GemSystem.ini"); reader.Write("Config", "GemStatIndependent", GemStatIndependent); }
public static void Save() { //Graphics Reader.Write("Graphics", "FullScreen", FullScreen); Reader.Write("Graphics", "Borderless", Borderless); Reader.Write("Graphics", "AlwaysOnTop", TopMost); Reader.Write("Graphics", "FPSCap", FPSCap); Reader.Write("Graphics", "Resolution", Resolution); Reader.Write("Graphics", "DebugMode", DebugMode); //Sound Reader.Write("Sound", "Volume", Volume); Reader.Write("Sound", "Music", MusicVolume); //Game Reader.Write("Game", "AccountID", AccountID); Reader.Write("Game", "Password", Password); Reader.Write("Game", "SkillMode", SkillMode); Reader.Write("Game", "SkillBar", SkillBar); //Reader.Write("Game", "SkillSet", SkillSet); Reader.Write("Game", "Effect", Effect); Reader.Write("Game", "LevelEffect", LevelEffect); Reader.Write("Game", "DropView", DropView); Reader.Write("Game", "NameView", NameView); Reader.Write("Game", "HPMPView", HPView); Reader.Write("Game", "ModeView", ModeView); Reader.Write("Game", "FontName", FontName); Reader.Write("Game", "TransparentChat", TransparentChat); Reader.Write("Game", "DisplayDamage", DisplayDamage); Reader.Write("Game", "TargetDead", TargetDead); Reader.Write("Game", "ExpandedBuffWindow", ExpandedBuffWindow); Reader.Write("Game", "DuraWindow", DuraView); for (int i = 0; i < SkillbarLocation.Length / 2; i++) { Reader.Write("Game", "Skillbar" + i.ToString() + "X", SkillbarLocation[i, 0]); Reader.Write("Game", "Skillbar" + i.ToString() + "Y", SkillbarLocation[i, 1]); } //Chat Reader.Write("Chat", "ShowNormalChat", ShowNormalChat); Reader.Write("Chat", "ShowYellChat", ShowYellChat); Reader.Write("Chat", "ShowWhisperChat", ShowWhisperChat); Reader.Write("Chat", "ShowLoverChat", ShowLoverChat); Reader.Write("Chat", "ShowMentorChat", ShowMentorChat); Reader.Write("Chat", "ShowGroupChat", ShowGroupChat); Reader.Write("Chat", "ShowGuildChat", ShowGuildChat); //Filters Reader.Write("Filter", "FilterNormalChat", FilterNormalChat); Reader.Write("Filter", "FilterWhisperChat", FilterWhisperChat); Reader.Write("Filter", "FilterShoutChat", FilterShoutChat); Reader.Write("Filter", "FilterSystemChat", FilterSystemChat); Reader.Write("Filter", "FilterLoverChat", FilterLoverChat); Reader.Write("Filter", "FilterMentorChat", FilterMentorChat); Reader.Write("Filter", "FilterGroupChat", FilterGroupChat); Reader.Write("Filter", "FilterGuildChat", FilterGuildChat); //AutoPatcher Reader.Write("Launcher", "Enabled", P_Patcher); Reader.Write("Launcher", "Host", P_Host); Reader.Write("Launcher", "PatchFile", P_PatchFileName); Reader.Write("Launcher", "NeedLogin", P_NeedLogin); Reader.Write("Launcher", "Login", P_Login); Reader.Write("Launcher", "Password", P_Password); Reader.Write("Launcher", "ServerName", P_ServerName); Reader.Write("Launcher", "Browser", P_BrowserAddress); Reader.Write("Launcher", "AutoStart", P_AutoStart); }
public static void SaveGoods() { File.Delete(ConfigPath + @".\GoodsSystem.ini"); InIReader reader = new InIReader(ConfigPath + @".\GoodsSystem.ini"); reader.Write("Goods", "On", GoodsOn); reader.Write("Goods", "MaxStored", GoodsMaxStored); reader.Write("Goods", "BuyBackTime", GoodsBuyBackTime); reader.Write("Goods", "BuyBackMaxStored", GoodsBuyBackMaxStored); }
public static void Save() { InIReader IReader = new InIReader(ConfigPath) { AutoSave = false }; //Paths IReader.Write("Paths", "DataPath", DataPath); IReader.Write("Paths", "MapPath", MapPath); IReader.Write("Paths", "SoundPath", SoundPath); //Graphics IReader.Write("Graphics", "FullScreen", FullScreen); IReader.Write("Graphics", "AlwaysOnTop", TopMost); //Network IReader.Write("Network", "IPAddress", IPAddress); IReader.Write("Network", "Port", Port); //Sound IReader.Write("Sound", "SoundOverLap", SoundOverLap); IReader.Write("Sound", "SoundOn", SoundOn); //Logs IReader.Write("Logs", "LogErrors", LogErrors); IReader.Write("Logs", "LogChat", LogChat); //Game Settings IReader.Write("Game Settings", "ShowItemNames", ShowItemNames); IReader.AutoSave = true; IReader.Save(); }
public static void SaveRandomItemStats() { File.Delete(ConfigPath + @".\RandomItemStats.ini"); InIReader reader = new InIReader(ConfigPath + @".\RandomItemStats.ini"); RandomItemStat stat; for (int i = 0; i < RandomItemStatsList.Count; i++) { stat = RandomItemStatsList[i]; reader.Write("Item" + i.ToString(), "MaxDuraChance", stat.MaxDuraChance); reader.Write("Item" + i.ToString(), "MaxDuraStatChance", stat.MaxDuraStatChance); reader.Write("Item" + i.ToString(), "MaxDuraMaxStat", stat.MaxDuraMaxStat); reader.Write("Item" + i.ToString(), "MaxAcChance", stat.MaxAcChance); reader.Write("Item" + i.ToString(), "MaxAcStatChance", stat.MaxAcStatChance); reader.Write("Item" + i.ToString(), "MaxAcMaxStat", stat.MaxAcMaxStat); reader.Write("Item" + i.ToString(), "MaxMacChance", stat.MaxMacChance); reader.Write("Item" + i.ToString(), "MaxMacStatChance", stat.MaxMacStatChance); reader.Write("Item" + i.ToString(), "MaxMACMaxStat", stat.MaxMacMaxStat); reader.Write("Item" + i.ToString(), "MaxDcChance", stat.MaxDcChance); reader.Write("Item" + i.ToString(), "MaxDcStatChance", stat.MaxDcStatChance); reader.Write("Item" + i.ToString(), "MaxDcMaxStat", stat.MaxDcMaxStat); reader.Write("Item" + i.ToString(), "MaxMcChance", stat.MaxMcChance); reader.Write("Item" + i.ToString(), "MaxMcStatChance", stat.MaxMcStatChance); reader.Write("Item" + i.ToString(), "MaxMcMaxStat", stat.MaxMcMaxStat); reader.Write("Item" + i.ToString(), "MaxScChance", stat.MaxScChance); reader.Write("Item" + i.ToString(), "MaxScStatChance", stat.MaxScStatChance); reader.Write("Item" + i.ToString(), "MaxScMaxStat", stat.MaxScMaxStat); reader.Write("Item" + i.ToString(), "AccuracyChance", stat.AccuracyChance); reader.Write("Item" + i.ToString(), "AccuracyStatChance", stat.AccuracyStatChance); reader.Write("Item" + i.ToString(), "AccuracyMaxStat", stat.AccuracyMaxStat); reader.Write("Item" + i.ToString(), "AgilityChance", stat.AgilityChance); reader.Write("Item" + i.ToString(), "AgilityStatChance", stat.AgilityStatChance); reader.Write("Item" + i.ToString(), "AgilityMaxStat", stat.AgilityMaxStat); reader.Write("Item" + i.ToString(), "HpChance", stat.HpChance); reader.Write("Item" + i.ToString(), "HpStatChance", stat.HpStatChance); reader.Write("Item" + i.ToString(), "HpMaxStat", stat.HpMaxStat); reader.Write("Item" + i.ToString(), "MpChance", stat.MpChance); reader.Write("Item" + i.ToString(), "MpStatChance", stat.MpStatChance); reader.Write("Item" + i.ToString(), "MpMaxStat", stat.MpMaxStat); reader.Write("Item" + i.ToString(), "StrongChance", stat.StrongChance); reader.Write("Item" + i.ToString(), "StrongStatChance", stat.StrongStatChance); reader.Write("Item" + i.ToString(), "StrongMaxStat", stat.StrongMaxStat); reader.Write("Item" + i.ToString(), "MagicResistChance", stat.MagicResistChance); reader.Write("Item" + i.ToString(), "MagicResistStatChance", stat.MagicResistStatChance); reader.Write("Item" + i.ToString(), "MagicResistMaxStat", stat.MagicResistMaxStat); reader.Write("Item" + i.ToString(), "PoisonResistChance", stat.PoisonResistChance); reader.Write("Item" + i.ToString(), "PoisonResistStatChance", stat.PoisonResistStatChance); reader.Write("Item" + i.ToString(), "PoisonResistMaxStat", stat.PoisonResistMaxStat); reader.Write("Item" + i.ToString(), "HpRecovChance", stat.HpRecovChance); reader.Write("Item" + i.ToString(), "HpRecovStatChance", stat.HpRecovStatChance); reader.Write("Item" + i.ToString(), "HpRecovMaxStat", stat.HpRecovMaxStat); reader.Write("Item" + i.ToString(), "MpRecovChance", stat.MpRecovChance); reader.Write("Item" + i.ToString(), "MpRecovStatChance", stat.MpRecovStatChance); reader.Write("Item" + i.ToString(), "MpRecovMaxStat", stat.MpRecovMaxStat); reader.Write("Item" + i.ToString(), "PoisonRecovChance", stat.PoisonRecovChance); reader.Write("Item" + i.ToString(), "PoisonRecovStatChance", stat.PoisonRecovStatChance); reader.Write("Item" + i.ToString(), "PoisonRecovMaxStat", stat.PoisonRecovMaxStat); reader.Write("Item" + i.ToString(), "CriticalRateChance", stat.CriticalRateChance); reader.Write("Item" + i.ToString(), "CriticalRateStatChance", stat.CriticalRateStatChance); reader.Write("Item" + i.ToString(), "CriticalRateMaxStat", stat.CriticalRateMaxStat); reader.Write("Item" + i.ToString(), "CriticalDamageChance", stat.CriticalDamageChance); reader.Write("Item" + i.ToString(), "CriticalDamageStatChance", stat.CriticalDamageStatChance); reader.Write("Item" + i.ToString(), "CriticalDamageMaxStat", stat.CriticalDamageMaxStat); reader.Write("Item" + i.ToString(), "FreezeChance", stat.FreezeChance); reader.Write("Item" + i.ToString(), "FreezeStatChance", stat.FreezeStatChance); reader.Write("Item" + i.ToString(), "FreezeMaxStat", stat.FreezeMaxStat); reader.Write("Item" + i.ToString(), "PoisonAttackChance", stat.PoisonAttackChance); reader.Write("Item" + i.ToString(), "PoisonAttackStatChance", stat.PoisonAttackStatChance); reader.Write("Item" + i.ToString(), "PoisonAttackMaxStat", stat.PoisonAttackMaxStat); reader.Write("Item" + i.ToString(), "AttackSpeedChance", stat.AttackSpeedChance); reader.Write("Item" + i.ToString(), "AttackSpeedStatChance", stat.AttackSpeedStatChance); reader.Write("Item" + i.ToString(), "AttackSpeedMaxStat", stat.AttackSpeedMaxStat); reader.Write("Item" + i.ToString(), "LuckChance", stat.LuckChance); reader.Write("Item" + i.ToString(), "LuckStatChance", stat.LuckStatChance); reader.Write("Item" + i.ToString(), "LuckMaxStat", stat.LuckMaxStat); reader.Write("Item" + i.ToString(), "CurseChance", stat.CurseChance); } }
public void Save(InIReader reader, int i) { reader.Write("Buff-" + i.ToString(), "Id", Id); reader.Write("Buff-" + i.ToString(), "Icon", Icon); reader.Write("Buff-" + i.ToString(), "Name", name); reader.Write("Buff-" + i.ToString(), "LevelReq", LevelRequirement); reader.Write("Buff-" + i.ToString(), "PointsReq", PointsRequirement); reader.Write("Buff-" + i.ToString(), "TimeLimit", TimeLimit);; reader.Write("Buff-" + i.ToString(), "ActivationCost", ActivationCost);; reader.Write("Buff-" + i.ToString(), "BuffAc", BuffAc);; reader.Write("Buff-" + i.ToString(), "BuffMAC", BuffMac);; reader.Write("Buff-" + i.ToString(), "BuffDc", BuffDc);; reader.Write("Buff-" + i.ToString(), "BuffMc", BuffMc);; reader.Write("Buff-" + i.ToString(), "BuffSc", BuffSc);; reader.Write("Buff-" + i.ToString(), "BuffMaxHp", BuffMaxHp);; reader.Write("Buff-" + i.ToString(), "BuffMaxMp", BuffMaxMp);; reader.Write("Buff-" + i.ToString(), "BuffMineRate", BuffMineRate);; reader.Write("Buff-" + i.ToString(), "BuffGemRate", BuffGemRate);; reader.Write("Buff-" + i.ToString(), "BuffFishRate", BuffFishRate);; reader.Write("Buff-" + i.ToString(), "BuffExpRate", BuffExpRate);; reader.Write("Buff-" + i.ToString(), "BuffCraftRate", BuffCraftRate);; reader.Write("Buff-" + i.ToString(), "BuffSkillRate", BuffSkillRate);; reader.Write("Buff-" + i.ToString(), "BuffHpRegen", BuffHpRegen);; reader.Write("Buff-" + i.ToString(), "BuffMpRegen", BuffMPRegen);; reader.Write("Buff-" + i.ToString(), "BuffAttack", BuffAttack);; reader.Write("Buff-" + i.ToString(), "BuffDropRate", BuffDropRate);; reader.Write("Buff-" + i.ToString(), "BuffGoldRate", BuffGoldRate);; }
public static void SaveGuildSettings() { File.Delete(ConfigPath + @".\GuildSettings.ini"); InIReader reader = new InIReader(ConfigPath + @".\GuildSettings.ini"); reader.Write("Guilds", "MinimumLevel", Guild_RequiredLevel); reader.Write("Guilds", "ExpRate", Guild_ExpRate); reader.Write("Guilds", "PointPerLevel", Guild_PointPerLevel); reader.Write("Guilds", "TotalBuffs", Guild_BuffList.Count); reader.Write("Guilds", "WarTime", Guild_WarTime); reader.Write("Guilds", "WarCost", Guild_WarCost); int i = 0; for (i = 0; i < Guild_ExperienceList.Count; i++) { reader.Write("Exp", "Level-" + i.ToString(), Guild_ExperienceList[i]); } for (i = 0; i < Guild_MembercapList.Count; i++) { reader.Write("Cap", "Level-" + i.ToString(), Guild_MembercapList[i]); } for (i = 0; i < Guild_CreationCostList.Count; i++) { reader.Write("Required-" + i.ToString(), "ItemName", Guild_CreationCostList[i].ItemName); reader.Write("Required-" + i.ToString(), "Amount", Guild_CreationCostList[i].Amount); } for (i = 0; i < Guild_BuffList.Count; i++) { Guild_BuffList[i].Save(reader, i); } }
public static void Save() { //Graphics Reader.Write("Graphics", "FullScreen", FullScreen); Reader.Write("Graphics", "AlwaysOnTop", TopMost); Reader.Write("Graphics", "FPSCap", FPSCap); Reader.Write("Graphics", "Resolution", Resolution); Reader.Write("Graphics", "DebugMode", DebugMode); //Sound Reader.Write("Sound", "Volume", Volume); Reader.Write("Sound", "Music", MusicVolume); //Game Reader.Write("Game", "AccountID", AccountID); Reader.Write("Game", "Password", Password); Reader.Write("Game", "SkillMode", SkillMode); Reader.Write("Game", "SkillBar", SkillBar); Reader.Write("Game", "SkillSet", SkillSet); Reader.Write("Game", "Effect", Effect); Reader.Write("Game", "LevelEffect", LevelEffect); Reader.Write("Game", "DropView", DropView); Reader.Write("Game", "NameView", NameView); Reader.Write("Game", "HPMPView", HPView); Reader.Write("Game", "FontName", FontName); Reader.Write("Game", "TransparentChat", TransparentChat); Reader.Write("Game", "DisplayDamage", DisplayDamage); //Chat Reader.Write("Chat", "ShowNormalChat", ShowNormalChat); Reader.Write("Chat", "ShowYellChat", ShowYellChat); Reader.Write("Chat", "ShowWhisperChat", ShowWhisperChat); Reader.Write("Chat", "ShowLoverChat", ShowLoverChat); Reader.Write("Chat", "ShowMentorChat", ShowMentorChat); Reader.Write("Chat", "ShowGroupChat", ShowGroupChat); Reader.Write("Chat", "ShowGuildChat", ShowGuildChat); //Filters Reader.Write("Filter", "FilterNormalChat", FilterNormalChat); Reader.Write("Filter", "FilterWhisperChat", FilterWhisperChat); Reader.Write("Filter", "FilterShoutChat", FilterShoutChat); Reader.Write("Filter", "FilterSystemChat", FilterSystemChat); Reader.Write("Filter", "FilterLoverChat", FilterLoverChat); Reader.Write("Filter", "FilterMentorChat", FilterMentorChat); Reader.Write("Filter", "FilterGroupChat", FilterGroupChat); Reader.Write("Filter", "FilterGuildChat", FilterGuildChat); //AutoPatcher Reader.Write("Launcher", "Enabled", P_Patcher); Reader.Write("Launcher", "Host", P_Host); Reader.Write("Launcher", "PatchFile", P_PatchFileName); Reader.Write("Launcher", "NeedLogin", P_NeedLogin); Reader.Write("Launcher", "Login", P_Login); Reader.Write("Launcher", "Password", P_Password); Reader.Write("Launcher", "ServerName", P_ServerName); Reader.Write("Launcher", "Browser", P_BrowserAddress); Reader.Write("Launcher", "AutoStart", P_AutoStart); }
public void Save() { Reader.Write("Guide", "01", "RequireAlt,RequireShift,RequireTilde,RequireCtrl"); Reader.Write("Guide", "02", "have 3 options: 0/1/2"); Reader.Write("Guide", "03", "0 < you cannot have this key pressed to use the function"); Reader.Write("Guide", "04", "1 < you have to have this key pressed to use this function"); Reader.Write("Guide", "05", "2 < it doesnt matter if you press this key to use this function"); Reader.Write("Guide", "06", "by default just use 2, unless you have 2 functions on the same key"); Reader.Write("Guide", "07", "example: change attack mode (ctrl+h) and help (h)"); Reader.Write("Guide", "08", "if you set either of those to requireshift 2, then they wil both work at the same time or not work"); Reader.Write("Guide", "09", ""); Reader.Write("Guide", "10", "To get the value for RequireKey look at:"); Reader.Write("Guide", "11", "https://msdn.microsoft.com/en-us/library/system.windows.forms.keys(v=vs.110).aspx"); foreach (KeyBind Inputkey in Keylist) { Reader.Write(Inputkey.function.ToString(), "RequireAlt", Inputkey.RequireAlt); Reader.Write(Inputkey.function.ToString(), "RequireShift", Inputkey.RequireShift); Reader.Write(Inputkey.function.ToString(), "RequireTilde", Inputkey.RequireTilde); Reader.Write(Inputkey.function.ToString(), "RequireCtrl", Inputkey.RequireCtrl); Reader.Write(Inputkey.function.ToString(), "RequireKey", Inputkey.Key.ToString()); } }
public static void SaveAwakeAttribute() { File.Delete(ConfigPath + @".\AwakeningSystem.ini"); InIReader reader = new InIReader(ConfigPath + @".\AwakeningSystem.ini"); reader.Write("Attribute", "SuccessRate", Awake.AwakeSuccessRate); reader.Write("Attribute", "HitRate", Awake.AwakeHitRate); reader.Write("Attribute", "MaxUpgradeLevel", Awake.MaxAwakeLevel); reader.Write("IncreaseValue", "WeaponValue", Awake.Awake_WeaponRate); reader.Write("IncreaseValue", "HelmetValue", Awake.Awake_HelmetRate); reader.Write("IncreaseValue", "ArmorValue", Awake.Awake_ArmorRate); for (int i = 0; i < 4; i++) { reader.Write("Value", "ChanceMax_" + ((ItemGrade)(i + 1)).ToString(), Awake.AwakeChanceMax[i]); } if (Awake.AwakeMaterials.Count == 0) { for (int i = 0; i < (int)AwakeType.HPMP; i++) { for (int j = 0; j < 4; j++) { reader.Write("Materials_BaseValue", ((AwakeType)(i + 1)).ToString() + "_" + ((ItemGrade)(j + 1)).ToString() + "_Material1", 1); reader.Write("Materials_BaseValue", ((AwakeType)(i + 1)).ToString() + "_" + ((ItemGrade)(j + 1)).ToString() + "_Material2", 1); } } } else { for (int i = 0; i < (int)AwakeType.HPMP; i++) { List<byte>[] value = Awake.AwakeMaterials[i]; for (int j = 0; j < value[0].Count; j++) { reader.Write("Materials_BaseValue", ((AwakeType)(i + 1)).ToString() + "_" + ((ItemGrade)(j + 1)).ToString() + "_Material1", value[0][j]); reader.Write("Materials_BaseValue", ((AwakeType)(i + 1)).ToString() + "_" + ((ItemGrade)(j + 1)).ToString() + "_Material2", value[1][j]); } Awake.AwakeMaterials.Add(value); } } for (int c = 0; c < 4; c++) { reader.Write("Materials_IncreaseValue", "Materials_" + ((ItemGrade)(c + 1)).ToString(), Awake.AwakeMaterialRate[c]); } }
public void Save(InIReader reader, int i) { reader.Write("Buff-" + i.ToString(), "Id", Id); reader.Write("Buff-" + i.ToString(), "Icon", Icon); reader.Write("Buff-" + i.ToString(), "Name", name); reader.Write("Buff-" + i.ToString(), "LevelReq", LevelRequirement); reader.Write("Buff-" + i.ToString(), "PointsReq", PointsRequirement); reader.Write("Buff-" + i.ToString(), "TimeLimit", TimeLimit); ; reader.Write("Buff-" + i.ToString(), "ActivationCost", ActivationCost); ; reader.Write("Buff-" + i.ToString(), "BuffAc", BuffAc); ; reader.Write("Buff-" + i.ToString(), "BuffMAC", BuffMac); ; reader.Write("Buff-" + i.ToString(), "BuffDc", BuffDc); ; reader.Write("Buff-" + i.ToString(), "BuffMc", BuffMc); ; reader.Write("Buff-" + i.ToString(), "BuffSc", BuffSc); ; reader.Write("Buff-" + i.ToString(), "BuffMaxHp", BuffMaxHp); ; reader.Write("Buff-" + i.ToString(), "BuffMaxMp", BuffMaxMp); ; reader.Write("Buff-" + i.ToString(), "BuffMineRate", BuffMineRate); ; reader.Write("Buff-" + i.ToString(), "BuffGemRate", BuffGemRate); ; reader.Write("Buff-" + i.ToString(), "BuffFishRate", BuffFishRate); ; reader.Write("Buff-" + i.ToString(), "BuffExpRate", BuffExpRate); ; reader.Write("Buff-" + i.ToString(), "BuffCraftRate", BuffCraftRate); ; reader.Write("Buff-" + i.ToString(), "BuffSkillRate", BuffSkillRate); ; reader.Write("Buff-" + i.ToString(), "BuffHpRegen", BuffHpRegen); ; reader.Write("Buff-" + i.ToString(), "BuffMpRegen", BuffMPRegen); ; reader.Write("Buff-" + i.ToString(), "BuffAttack", BuffAttack); ; reader.Write("Buff-" + i.ToString(), "BuffDropRate", BuffDropRate); ; reader.Write("Buff-" + i.ToString(), "BuffGoldRate", BuffGoldRate); ; }
public static void Save() { InIReader IReader = new InIReader(ConfigPath) { AutoSave = false }; //Path IReader.Write("Path", "MapPath", MapPath); IReader.Write("Path", "LogPath", LogPath); IReader.Write("Path", "ClientPath", ClientPath); //Database IReader.Write("Database", "SQLServer", SQLServer); IReader.Write("Database", "SQLDatabase", SQLDatabase); IReader.Write("Database", "SQLUserID", SQLUserID); IReader.Write("Database", "SQLPassword", SQLPassword); //Network IReader.Write("Network", "IPAddress", IPAddress); IReader.Write("Network", "Port", Port); IReader.Write("Network", "TimeOut", TimeOut); IReader.Write("Network", "MaxUser", MaxUser); IReader.Write("Network", "ReLogTime", ReLogTime); //Security IReader.Write("Security", "CheckVersion", CheckVersion); //Permission IReader.Write("Permission", "AllowNewAccount", AllowNewAccount); IReader.Write("Permission", "AllowChangePassword", AllowChangePassword); IReader.Write("Permission", "AllowLogin", AllowLogin); IReader.Write("Permission", "AllowNewCharacter", AllowNewCharacter); IReader.Write("Permission", "AllowDeleteCharacter", AllowDeleteCharacter); IReader.Write("Permission", "AllowStartGame", AllowStartGame); //Game IReader.Write("Game", "DropRange", DropRange); IReader.Write("Game", "DropStackSize", DropStackSize); IReader.Write("Game", "ItemTimeOut", ItemTimeOut); IReader.Write("Game", "ExpRate", ExpRate); IReader.Write("Game", "DropRate", DropRate); IReader.Write("Game", "StartLevel", StartLevel); IReader.Write("Game", "StartGold", StartGold); IReader.AutoSave = true; IReader.Save(); Main.EnqueueMessage("Config file Saved."); }