public static void LoadSettings() { var executableFileInfo = new FileInfo(Application.ExecutablePath); string executableDirectoryName = executableFileInfo.DirectoryName; OurDirectory = executableDirectoryName; var pIniManager = new IniManager(OurDirectory + SettingsName); try { if (!string.IsNullOrEmpty(pIniManager.GetString("Relog", "AccoutnName", string.Empty))) { AccountName = Encryptor.Decrypt(pIniManager.GetString("Relog", "AccoutnName", string.Empty)); } else { AccountName = string.Empty; } if (!string.IsNullOrEmpty(pIniManager.GetString("Relog", "AccoutnPW", string.Empty))) { AccountPw = Encryptor.Decrypt(pIniManager.GetString("Relog", "AccoutnPW", string.Empty)); } else { AccountPw = string.Empty; } ReloggingEnabled = pIniManager.GetBoolean("Relog", "EnableRelogging", false); PeriodicReloggingEnabled = pIniManager.GetBoolean("Relog", "EnablePeriodicRelogging", false); PeriodicLogOut = pIniManager.GetInt("Relog", "PeriodicLogOut", 60); PeriodicLogIn = pIniManager.GetInt("Relog", "PeriodicLogIn", 30); AccountAccount = pIniManager.GetInt("Relog", "AccountAccount", 1); CharacterName = pIniManager.GetString("Relog", "CharacterName", string.Empty); } catch (Exception) { Logging.Debug("Could not load relogger settings. All relogger values have been reset."); AccountName = ""; AccountPw = ""; ReloggingEnabled = false; PeriodicReloggingEnabled = false; PeriodicLogIn = 30; PeriodicLogOut = 60; AccountAccount = 1; } }
public static void LoadSettings() { var executableFileInfo = new FileInfo(Application.ExecutablePath); string executableDirectoryName = executableFileInfo.DirectoryName; string ourDirectory = executableDirectoryName; var pIniManager = new IniManager(ourDirectory + SettingsName); LoadedBeharvior = pIniManager.GetString("Config", "LoadedBeharvior", String.Empty); AvoidAddsCombat = pIniManager.GetBoolean("Config", "AvoidAddsCombat", false); SkipAddsDis = pIniManager.GetInt("Config", "SkipAddsDis", 0); AllowScripts = pIniManager.GetBoolean("Config", "AllowScripts", false); }
public static void LoadSettings() { var executableFileInfo = new FileInfo(Application.ExecutablePath); string executableDirectoryName = executableFileInfo.DirectoryName; OurDirectory = executableDirectoryName; var pIniManager = new IniManager(OurDirectory + SettingsName); Skin = pIniManager.GetBoolean("Grinding", "Skin", false); WaitForLoot = pIniManager.GetBoolean("Grinding", "WaitForLoot", false); StopLootOnFull = pIniManager.GetBoolean("Grinding", "StopLootOnFull", false); Loot = pIniManager.GetBoolean("Grinding", "Loot", true); Mount = pIniManager.GetBoolean("Grinding", "Mount", true); ApproachRange = pIniManager.GetInt("Grinding", "ApproachRange", 40); Profile = pIniManager.GetString("Grinding", "Profile", string.Empty); Jump = pIniManager.GetBoolean("Grinding", "Jump", false); SkipMobsWithAdds = pIniManager.GetBoolean("Grinding", "SkipMobsWithAdds", false); //ShouldTrain = pIniManager.GetBoolean("Grinding", "ShouldTrain", false); ShouldTrain = false; SkipAddsDistance = pIniManager.GetInt("Grinding", "SkipAddsDistance", 20); SkipAddsCount = pIniManager.GetInt("Grinding", "SkipAddsCount", 2); }
public static void LoadSettings() { var executableFileInfo = new FileInfo(Application.ExecutablePath); string executableDirectoryName = executableFileInfo.DirectoryName; OurDirectory = executableDirectoryName; var pIniManager = new IniManager(OurDirectory + SettingsName); SelectedEngine = pIniManager.GetString("Engine", "Selected", string.Empty); SelectedCombat = pIniManager.GetString("Combat", "Selected", string.Empty); FirstRun = pIniManager.GetBoolean("Config", "FirstRun", true); DebugMode = pIniManager.GetBoolean("Config", "DebugMode", false); Password = pIniManager.GetString("Config", "UserName", String.Empty); UserName = pIniManager.GetString("Config", "Password", String.Empty); BackgroundMode = pIniManager.GetBoolean("Config", "BackgroundMode", false); HookMouse = pIniManager.GetBoolean("Config", "HookMouse", false); SetupUseHotkeys = pIniManager.GetBoolean("Config", "UseHotkeys", false); StopAfterBool = pIniManager.GetBoolean("Config", "StopAfter", false); StopAfter = pIniManager.GetString("Config", "StopAfterTime", "120"); LogOutOnFollowTime = pIniManager.GetString("Config", "LogoutOnFollowTime", "2"); SoundFollow = pIniManager.GetBoolean("Config", "FollowSound", true); SoundWhisper = pIniManager.GetBoolean("Config", "WhisperSound", true); SoundStop = pIniManager.GetBoolean("Config", "SoundStop", true); Shutdown = pIniManager.GetBoolean("Config", "ShutdownComputer", false); LogoutOnFollow = pIniManager.GetBoolean("Config", "LogoutOnFollow", false); UseCtm = pIniManager.GetBoolean("Config", "UseCtm", false); DebugLog = pIniManager.GetBoolean("Config", "DebugLog", false); Latency = pIniManager.GetInt("Config", "Latency", 0); Language = (LazyLanguage)pIniManager.GetInt("Config", "Language", 0); // CombatBoolEat = pIniManager.GetBoolean("Combat", "CBEat", true); CombatBoolDrink = pIniManager.GetBoolean("Combat", "CBDrink", true); CombatEatAt = pIniManager.GetString("Combat", "COEat", "0"); CombatDrinkAt = pIniManager.GetString("Combat", "CODrink", "0"); KeysGroundMountBar = pIniManager.GetString("Keys", "GroundMountBar", "1"); KeysGroundMountKey = pIniManager.GetString("Keys", "GroundMountKey", "1"); KeysAttack1Bar = pIniManager.GetString("Keys", "Attack1Bar", "1"); KeysAttack1Key = pIniManager.GetString("Keys", "Attack1Key", "1"); KeysEatBar = pIniManager.GetString("Keys", "EatBar", "1"); KeysEatKey = pIniManager.GetString("Keys", "EatKey", "1"); KeysDrinkBar = pIniManager.GetString("Keys", "DrinkBar", "1"); KeysDrinkKey = pIniManager.GetString("Keys", "DrinkKey", "1"); KeysMoteExtractorBar = pIniManager.GetString("Keys", "MoteBar", "1"); KeysMoteExtractorKey = pIniManager.GetString("Keys", "MoteKey", "1"); KeysStafeLeftKeyText = pIniManager.GetString("Keys", "StafeLeftKeyText", "Q"); KeysStafeRightKeyText = pIniManager.GetString("Keys", "StafeRightKeyText", "E"); KeysInteractKeyText = pIniManager.GetString("Keys", "InteractText", "U"); KeysInteractTargetText = pIniManager.GetString("Keys", "InteractTargetText", "P"); KeysTargetLastTargetText = pIniManager.GetString("Keys", "KeysTargetLastTargetText", "G"); //Mail ShouldMail = pIniManager.GetBoolean("Mail", "ShouldMail", false); MailTo = pIniManager.GetString("Mail", "MailTo", string.Empty); //MacroForMail = pIniManager.GetBoolean("Mail", "MacroForMail", false); MacroForMail = false; KeysMailMacroBar = pIniManager.GetString("Mail", "KeysMailMacroBar", "1"); KeysMailMacroKey = pIniManager.GetString("Mail", "KeysMailMacroKey", "1"); //Vendor ShouldVendor = pIniManager.GetBoolean("Vendor", "ShouldVendor", false); ShouldRepair = pIniManager.GetBoolean("Vendor", "ShouldRepair", false); SellCommon = pIniManager.GetBoolean("Vendor", "SellCommon", false); SellUncommon = pIniManager.GetBoolean("Vendor", "SellUncommon", false); SellPoor = pIniManager.GetBoolean("Vendor", "SellPoor", false); FreeBackspace = pIniManager.GetString("Vendor", "FreeBackspace", "2"); }