public static void SaveSettings() { var executableFileInfo = new FileInfo(Application.ExecutablePath); string executableDirectoryName = executableFileInfo.DirectoryName; OurDirectory = executableDirectoryName; var pIniManager = new IniManager(OurDirectory + SettingsName); pIniManager.IniWriteValue("Fishing", "LureBar", LureBar); pIniManager.IniWriteValue("Fishing", "LureKey", LureKey); pIniManager.IniWriteValue("Fishing", "UseLure", UseLure.ToString()); }
public static void SaveSettings() { var executableFileInfo = new FileInfo(Application.ExecutablePath); string executableDirectoryName = executableFileInfo.DirectoryName; string ourDirectory = executableDirectoryName; var pIniManager = new IniManager(ourDirectory + SettingsName); pIniManager.IniWriteValue("Config", "LoadedBeharvior", LoadedBeharvior); pIniManager.IniWriteValue("Config", "AvoidAddsCombat", AvoidAddsCombat.ToString()); pIniManager.IniWriteValue("Config", "SkipAddsDis", SkipAddsDis.ToString()); pIniManager.IniWriteValue("Config", "AllowScripts", AllowScripts); }
public static void SaveSettings() { var executableFileInfo = new FileInfo(Application.ExecutablePath); string executableDirectoryName = executableFileInfo.DirectoryName; string ourDirectory = executableDirectoryName; var pIniManager = new IniManager(ourDirectory + SettingsName); pIniManager.IniWriteValue("Config", "LoadedRotationManager", LoadedRotationManager); }
public static void Save() { var pIniManager = new IniManager(OurDirectory + SettingsName); pIniManager.IniWriteValue("Geometry", "MainGeometry", MainGeometry); pIniManager.IniWriteValue("Geometry", "RotatorStatus", RotatorStatus); pIniManager.IniWriteValue("Geometry", "RotationForm", RotationForm); pIniManager.IniWriteValue("Geometry", "ProcessSelector", ProcessSelector); pIniManager.IniWriteValue("Geometry", "RotatorForm", RotatorForm); pIniManager.IniWriteValue("Geometry", "RuleEditor", RuleEditor); pIniManager.IniWriteValue("Geometry", "ScriptEditor", ScriptEditor); }
public static void SaveSettings() { var executableFileInfo = new FileInfo(Application.ExecutablePath); string executableDirectoryName = executableFileInfo.DirectoryName; OurDirectory = executableDirectoryName; var pIniManager = new IniManager(OurDirectory + SettingsName); pIniManager.IniWriteValue("Relog", "AccoutnName", Encryptor.Encrypt(AccountName)); pIniManager.IniWriteValue("Relog", "AccoutnPW", Encryptor.Encrypt(AccountPw)); pIniManager.IniWriteValue("Relog", "EnableRelogging", ReloggingEnabled.ToString()); pIniManager.IniWriteValue("Relog", "EnablePeriodicRelogging", PeriodicReloggingEnabled.ToString()); pIniManager.IniWriteValue("Relog", "PeriodicLogOut", PeriodicLogOut.ToString()); pIniManager.IniWriteValue("Relog", "PeriodicLogIn", PeriodicLogIn.ToString()); pIniManager.IniWriteValue("Relog", "AccountAccount", AccountAccount.ToString()); pIniManager.IniWriteValue("Relog", "CharacterName", CharacterName); }
// 从数据库读取文件,写入相关位置 public static bool initme() { RUNNING = false; if (!ObjectManager.Initialized) ObjectManager.Initialize(SpyLogin.WOW_P.Id); Thread.Sleep(1000); // 获取当前执行路径 var executableFileInfo = new FileInfo(Application.ExecutablePath); string executableDirectoryName = executableFileInfo.DirectoryName; // 根据角色职业和地图获取角色的战斗文件和地图文件 string stringClass = ""; switch (ObjectManager.MyPlayer.UnitClassId) { case (uint)Constants.UnitClass.UnitClass_Warrior: stringClass = "战士"; break; case (uint)Constants.UnitClass.UnitClass_Paladin: stringClass = "骑士"; break; case (uint)Constants.UnitClass.UnitClass_Hunter: stringClass = "猎人"; break; case (uint)Constants.UnitClass.UnitClass_Rogue: stringClass = "盗贼"; break; case (uint)Constants.UnitClass.UnitClass_Priest: stringClass = "牧师"; break; case (uint)Constants.UnitClass.UnitClass_Shaman: stringClass = "萨满"; break; case (uint)Constants.UnitClass.UnitClass_Mage: stringClass = "法师"; break; case (uint)Constants.UnitClass.UnitClass_Warlock: stringClass = "术士"; break; case (uint)Constants.UnitClass.UnitClass_Druid: stringClass = "德鲁伊"; break; case (uint)Constants.UnitClass.UnitClass_DeathKnight: stringClass = "死骑"; break; default: stringClass = "未知"; break; } if (!OraData.GetFileFromDB(2, stringClass, executableDirectoryName + "\\Behaviors")) { Logging.Write("SpyCJ:initme 错误:角色文件写入失败"); return false; } //调用Behavior var pIniManager = new IniManager(executableDirectoryName + PveBehaviorSettings.SettingsName); pIniManager.IniWriteValue("Config", "LoadedBeharvior", stringClass); //下载地图文件 string map = ObjectManager.MyPlayer.ZoneText; if (!OraData.GetFileFromDB(1, map, executableDirectoryName + "\\FlyingProfiles")) { Logging.Write("SpyCJ:initme 错误:下载地图文件失败"); return false; } //调用Profile FlyingProfile hh = new FlyingProfile(); hh.LoadFile(executableDirectoryName + "\\FlyingProfiles\\" + map + ".xml"); FlyingEngine.CurrentProfile = hh; FlyingSettings.Herb = true; FlyingSettings.Mine = true; FlyingSettings.SaveSettings(); //获得采集物品列表 List<string> rtv = SpyDB.GetMapCollect(map); if (rtv == null) return false; string[] toCollect; toCollect = rtv[0].Split('$'); Mine.Clear(); for (int iloop = 0; iloop < toCollect.Length; iloop++) { if (string.IsNullOrWhiteSpace(toCollect[iloop])) continue; Mine.AddMine(toCollect[iloop]); } Mine.HasLoaded = true; toCollect = rtv[1].Split('$'); Herb.Clear(); for (int iloop = 0; iloop < toCollect.Length; iloop++) { if (string.IsNullOrWhiteSpace(toCollect[iloop])) continue; Herb.AddHerb(toCollect[iloop]); } Herb.HasLoaded = true; // 设置飞行状态和战斗状态 LazySettings.SelectedEngine = "Flying Engine"; LazySettings.SelectedCombat = "Behavior Engine"; LazySettings.SaveSettings(); return true; }
public static void SaveSettings() { var executableFileInfo = new FileInfo(Application.ExecutablePath); string executableDirectoryName = executableFileInfo.DirectoryName; OurDirectory = executableDirectoryName; var pIniManager = new IniManager(OurDirectory + SettingsName); pIniManager.IniWriteValue("Engine", "Selected", SelectedEngine); pIniManager.IniWriteValue("Combat", "Selected", SelectedCombat); pIniManager.IniWriteValue("Config", "FirstRun", FirstRun); pIniManager.IniWriteValue("Config", "UserName", Password); pIniManager.IniWriteValue("Config", "Password", UserName); pIniManager.IniWriteValue("Config", "BackgroundMode", BackgroundMode); pIniManager.IniWriteValue("Config", "HookMouse", HookMouse); pIniManager.IniWriteValue("Config", "UseHotkeys", SetupUseHotkeys); pIniManager.IniWriteValue("Config", "StopAfter", StopAfterBool); pIniManager.IniWriteValue("Config", "StopAfterTime", StopAfter); pIniManager.IniWriteValue("Config", "FollowSound", SoundFollow); pIniManager.IniWriteValue("Config", "WhisperSound", SoundWhisper); pIniManager.IniWriteValue("Config", "SoundStop", SoundStop); pIniManager.IniWriteValue("Config", "ShutdownComputer", Shutdown); pIniManager.IniWriteValue("Config", "LogoutOnFollow", LogoutOnFollow); pIniManager.IniWriteValue("Config", "LogoutOnFollowTime", LogOutOnFollowTime); pIniManager.IniWriteValue("Config", "UseCtm", UseCtm); pIniManager.IniWriteValue("Config", "DebugLog", DebugLog); pIniManager.IniWriteValue("Config", "Latency", Latency); pIniManager.IniWriteValue("Config", "Language", Convert.ToInt32(Language)); //Other pIniManager.IniWriteValue("Combat", "CBEat", CombatBoolEat); pIniManager.IniWriteValue("Combat", "CBDrink", CombatBoolDrink); pIniManager.IniWriteValue("Combat", "COEat", CombatEatAt); pIniManager.IniWriteValue("Combat", "CODrink", CombatDrinkAt); pIniManager.IniWriteValue("Keys", "GroundMountBar", KeysGroundMountBar); pIniManager.IniWriteValue("Keys", "GroundMountKey", KeysGroundMountKey); pIniManager.IniWriteValue("Keys", "Attack1Bar", KeysAttack1Bar); pIniManager.IniWriteValue("Keys", "Attack1Key", KeysAttack1Key); pIniManager.IniWriteValue("Keys", "EatBar", KeysEatBar); pIniManager.IniWriteValue("Keys", "EatKey", KeysEatKey); pIniManager.IniWriteValue("Keys", "DrinkBar", KeysDrinkBar); pIniManager.IniWriteValue("Keys", "DrinkKey", KeysDrinkKey); pIniManager.IniWriteValue("Keys", "MoteBar", KeysMoteExtractorBar); pIniManager.IniWriteValue("Keys", "MoteKey", KeysMoteExtractorKey); pIniManager.IniWriteValue("Keys", "InteractText", KeysInteractKeyText); pIniManager.IniWriteValue("Keys", "InteractTargetText", KeysInteractTargetText); pIniManager.IniWriteValue("Keys", "StafeLeftKeyText", KeysStafeLeftKeyText); pIniManager.IniWriteValue("Keys", "StafeRightKeyText", KeysStafeRightKeyText); pIniManager.IniWriteValue("Keys", "KeysTargetLastTargetText", KeysTargetLastTargetText); //Mail pIniManager.IniWriteValue("Mail", "ShouldMail", ShouldMail); pIniManager.IniWriteValue("Mail", "MailTo", MailTo); pIniManager.IniWriteValue("Mail", "MacroForMail", MacroForMail); pIniManager.IniWriteValue("Mail", "KeysMailMacroBar", KeysMailMacroBar); pIniManager.IniWriteValue("Mail", "KeysMailMacroKey", KeysMailMacroKey); //Vendor pIniManager.IniWriteValue("Vendor", "ShouldVendor", ShouldVendor); pIniManager.IniWriteValue("Vendor", "ShouldRepair", ShouldRepair); pIniManager.IniWriteValue("Vendor", "SellCommon", SellCommon); pIniManager.IniWriteValue("Vendor", "SellUncommon", SellUncommon); pIniManager.IniWriteValue("Vendor", "SellPoor", SellPoor); pIniManager.IniWriteValue("Vendor", "FreeBackspace", FreeBackspace); //Add by Spyman pIniManager.IniWriteValue("Config", "WOWPath", WOWPath); pIniManager.IniWriteValue("Config", "WOWAccName", WOWAccName); pIniManager.IniWriteValue("Config", "WOWAccPath", WOWAccPass); pIniManager.IniWriteValue("Config", "WOWCharList", WOWCharList); pIniManager.IniWriteValue("Config", "WOWCharIdx", WOWCharIdx); pIniManager.IniWriteValue("Config", "WOWServer", WOWServer); pIniManager.IniWriteValue("Config", "StartHour", StartHour); pIniManager.IniWriteValue("Config", "StartMin", StartMin); pIniManager.IniWriteValue("Config", "StopHour", StopHour); pIniManager.IniWriteValue("Config", "StopMin", StopMin); pIniManager.IniWriteValue("Config", "FightFile", FightFile); pIniManager.IniWriteValue("Config", "MapFile", MapFile); pIniManager.IniWriteValue("Config", "DBIP", DBIP); pIniManager.IniWriteValue("Config", "DBSid", DBSid); pIniManager.IniWriteValue("Config", "MachineID", MachineID); pIniManager.IniWriteValue("Config", "AHer", AHer); pIniManager.IniWriteValue("Config", "WriteLazyLog", WriteLazyLog); }
public static void SaveSettings() { var executableFileInfo = new FileInfo(Application.ExecutablePath); string executableDirectoryName = executableFileInfo.DirectoryName; OurDirectory = executableDirectoryName; var pIniManager = new IniManager(OurDirectory + SettingsName); pIniManager.IniWriteValue("Flying", "Herb", Herb.ToString()); pIniManager.IniWriteValue("Flying", "Mine", Mine.ToString()); pIniManager.IniWriteValue("Flying", "ApproachModifier", ApproachModifier.ToString()); pIniManager.IniWriteValue("Flying", "MaxUnits", MaxUnits); pIniManager.IniWriteValue("Flying", "StopOnDeath", StopOnDeath.ToString()); pIniManager.IniWriteValue("Flying", "StopHarvest", StopHarvestWithPlayerAround.ToString()); pIniManager.IniWriteValue("Flying", "StopOnFullBags", StopOnFullBags.ToString()); pIniManager.IniWriteValue("Flying", "AvoidPlayers", AvoidPlayers.ToString()); pIniManager.IniWriteValue("Flying", "AutoBlacklist", AutoBlacklist.ToString()); pIniManager.IniWriteValue("Flying", "AvoidElites", AvoidElites.ToString()); pIniManager.IniWriteValue("Flying", "FindCorpse", FindCorpse.ToString()); pIniManager.IniWriteValue("Flying", "WaitForLoot", WaitForLoot.ToString()); pIniManager.IniWriteValue("Flying", "WaitForRessSick", WaitForRessSick.ToString()); pIniManager.IniWriteValue("Flying", "FlyingMountBar", FlyingMountBar); pIniManager.IniWriteValue("Flying", "FlyingMountKey", FlyingMountKey); pIniManager.IniWriteValue("Flying", "Profile", Profile); pIniManager.IniWriteValue("Flying", "DruidAvoidCombat", DruidAvoidCombat); pIniManager.IniWriteValue("Flying", "Fish", Fish); pIniManager.IniWriteValue("Flying", "Lure", Lure); pIniManager.IniWriteValue("Flying", "MaxTimeAtSchool", MaxTimeAtSchool); pIniManager.IniWriteValue("Flying", "FishApproach", FishApproach); pIniManager.IniWriteValue("Flying", "LureBar", LureBar); pIniManager.IniWriteValue("Flying", "LureKey", LureKey); pIniManager.IniWriteValue("Flying", "WaterwalkBar", WaterwalkBar); pIniManager.IniWriteValue("Flying", "WaterwalkKey", WaterwalkKey); pIniManager.IniWriteValue("Flying", "ExtraBar", ExtraBar); pIniManager.IniWriteValue("Flying", "ExtraKey", ExtraKey); pIniManager.IniWriteValue("Flying", "SendKeyOnStartCombat", SendKeyOnStartCombat); }
private static void WritePluginSettings(string name, bool enabled) { try { var pIniManager = new IniManager(LazyForms.OurDirectory + "\\Settings\\lazy_plugins.ini"); pIniManager.IniWriteValue("Plugins", name, enabled.ToString()); } catch { } }
public static void SaveSettings() { var executableFileInfo = new FileInfo(Application.ExecutablePath); string executableDirectoryName = executableFileInfo.DirectoryName; OurDirectory = executableDirectoryName; var pIniManager = new IniManager(OurDirectory + SettingsName); pIniManager.IniWriteValue("Grinding", "Profile", Profile); pIniManager.IniWriteValue("Grinding", "Skin", Skin.ToString()); pIniManager.IniWriteValue("Grinding", "WaitForLoot", WaitForLoot.ToString()); pIniManager.IniWriteValue("Grinding", "StopLootOnFull", StopLootOnFull.ToString()); pIniManager.IniWriteValue("Grinding", "Loot", Loot.ToString()); pIniManager.IniWriteValue("Grinding", "Mount", Mount.ToString()); pIniManager.IniWriteValue("Grinding", "Jump", Jump.ToString()); pIniManager.IniWriteValue("Grinding", "ApproachRange", ApproachRange.ToString()); pIniManager.IniWriteValue("Grinding", "SkipMobsWithAdds", SkipMobsWithAdds.ToString()); pIniManager.IniWriteValue("Grinding", "SkipAddsDistance", SkipAddsDistance.ToString()); pIniManager.IniWriteValue("Grinding", "SkipAddsCount", SkipAddsCount.ToString()); pIniManager.IniWriteValue("Grinding", "ShouldTrain", ShouldTrain.ToString()); }