private void Wizard1FinishButtonClick(object sender, CancelEventArgs e) { LazySettings.SelectedCombat = SelectCombat.Text; LazySettings.SelectedEngine = SelectEngine.Text; LazySettings.FirstRun = false; LazySettings.SaveSettings(); Close(); }
private void SelectCombatSelectedIndexChanged(object sender, EventArgs e) { if (SelectCombat.SelectedIndex != -1) { LazySettings.SelectedCombat = SelectCombat.Text; LazySettings.SaveSettings(); var cs = (CustomClass)SelectCombat.SelectedItem; CombatEngine = ClassCompiler.Assemblys[cs.AssemblyName]; } }
public void StartBotting() { if (!ValidateKeys.AutoLoot) { Logging.Write(LogType.Error, "Please enable auto loot"); return; } if (ValidateKeys.ClickToMove) { Logging.Write(LogType.Error, "Please disable click to move"); return; } BarMapper.MapBars(); KeyHelper.LoadKeys(); if (!ValidateKeys.Validate()) { Thread.Sleep(2000); } Langs.Load(); if (EngineHandler.EngineStart()) { LazySettings.SaveSettings(); if (CombatEngine.StartOk) { CombatEngine.BotStarted(); } else { Logging.Write(LogType.Warning, "CustomClass returned false on StartOk not starting"); return; } Logging.Debug("Relogger: " + ReloggerSettings.ReloggingEnabled); Logging.Debug("Engine: " + EngineHandler.Name); Logging.Write("Bot started"); Logging.Debug("CurrentFlyingProfile: " + FlyingSettings.Profile); Logging.Debug("CurrentGrindingProfile: " + GrindingSettings.Profile); UpdateText(StartStopEngine, "Stop botting"); ShouldRelog = ReloggerSettings.ReloggingEnabled; LazyForm.Engine = EngineHandler.Name; DisableItems(); Engine.StartEngine(EngineHandler); StopAfter.BotStarted(); PeriodicRelogger.BotStarted(); PluginManager.BotStart(); PluginManager.StartPulseThread(true); } else { Logging.Write(LogType.Warning, "Engine returned false on load"); } }
private void SelectEngineSelectedIndexChanged(object sender, EventArgs e) { if (SelectEngine.SelectedIndex != -1) { var cs = (CustomEngine)SelectEngine.SelectedItem; LazySettings.SelectedEngine = SelectEngine.Text; LazySettings.SaveSettings(); EngineHandler = EngineCompiler.Assemblys[cs.AssemblyName]; EngineHandler.Load(); if (_radar != null && !_radar.IsDisposed) { OpenRadar(); } } }
private void CBDebug_CheckedChanged(object sender, EventArgs e) { if (CBDebug.Checked) { LazySettings.DebugLog = true; LazySettings.SaveSettings(); Logging.OnDebug += Logging_OnDebug; } else { LazySettings.DebugLog = false; LazySettings.SaveSettings(); Logging.OnDebug -= Logging_OnDebug; } }
private void SaveSettings() { LazySettings.SetupUseHotkeys = SetupUseHotkeys.Checked; LazySettings.LogOutOnFollowTime = SetupTBLogOutOnFollow.Text; LazySettings.SoundFollow = SetupCBSoundFollow.Checked; LazySettings.SoundWhisper = SetupCBSoundWhisper.Checked; LazySettings.SoundStop = SetupCBSoundStop.Checked; LazySettings.HookMouse = SetupCBBackground.Checked; LazySettings.BackgroundMode = false; LazySettings.LogoutOnFollow = SetupCBLogoutOnFollow.Checked; string clientLanguage = ClientLanguage.SelectedItem.ToString(); var lazyLanguage = (LazySettings.LazyLanguage)Enum.Parse(typeof(LazySettings.LazyLanguage), clientLanguage); LazySettings.Language = lazyLanguage; LazySettings.SaveSettings(); }
public void SaveSettings() { LazySettings.DebugMode = SetupDebugMode.Checked; LazySettings.SetupUseHotkeys = SetupUseHotkeys.Checked; LazySettings.StopAfterBool = SetupCBStopAfter.Checked; LazySettings.StopAfter = SetupTBStopAfter.Text; LazySettings.LogOutOnFollowTime = SetupTBLogOutOnFollow.Text; LazySettings.SoundFollow = SetupCBSoundFollow.Checked; LazySettings.SoundWhisper = SetupCBSoundWhisper.Checked; LazySettings.SoundStop = SetupCBSoundStop.Checked; LazySettings.Shutdown = SetupCBShutdown.Checked; LazySettings.BackgroundMode = SetupCBBackground.Checked; LazySettings.LogoutOnFollow = SetupCBLogoutOnFollow.Checked; LazySettings.HookMouse = CBHookMouse.Checked; LazySettings.Latency = Latency.Value; // LazySettings.CombatBoolEat = CombatCBEat.Checked; LazySettings.CombatBoolDrink = CombatCBDrink.Checked; LazySettings.CombatEatAt = CombatTBEatAt.Text; LazySettings.CombatDrinkAt = CombatTBDrinkAt.Text; LazySettings.KeysGroundMountBar = KeysGroundMountBar.SelectedItem.ToString(); LazySettings.KeysGroundMountKey = KeysGroundMountKey.SelectedItem.ToString(); LazySettings.KeysAttack1Bar = KeysAttack1Bar.SelectedItem.ToString(); LazySettings.KeysAttack1Key = KeysAttack1Key.SelectedItem.ToString(); LazySettings.KeysEatBar = KeysEatBar.SelectedItem.ToString(); LazySettings.KeysEatKey = KeysEatKey.SelectedItem.ToString(); LazySettings.KeysDrinkBar = KeysDrinkBar.SelectedItem.ToString(); LazySettings.KeysDrinkKey = KeysDrinkKey.SelectedItem.ToString(); LazySettings.KeysStafeLeftKeyText = KeysStafeLeftKey.SelectedItem.ToString(); LazySettings.KeysStafeRightKeyText = KeysStafeRightKey.SelectedItem.ToString(); LazySettings.KeysInteractKeyText = KeysInteractKey.SelectedItem.ToString(); LazySettings.KeysInteractTargetText = KeysInteractTarget.SelectedItem.ToString(); LazySettings.KeysTargetLastTargetText = KeysTargetLast.SelectedItem.ToString(); //Mail LazySettings.ShouldMail = CBMail.Checked; LazySettings.MailTo = TBMailTo.Text; LazySettings.MacroForMail = MacroForMail.Checked; LazySettings.KeysMailMacroBar = KeysMailMacroBar.SelectedItem.ToString(); LazySettings.KeysMailMacroKey = KeysMailMacroKey.SelectedItem.ToString(); //Vendor LazySettings.ShouldVendor = CBDoVendor.Checked; LazySettings.ShouldRepair = CBDoRepair.Checked; LazySettings.SellCommon = CBSellCommon.Checked; LazySettings.SellUncommon = CBSellUnCommon.Checked; LazySettings.SellPoor = CBSellPoor.Checked; LazySettings.FreeBackspace = IMinFreeBagSlots.Text; //Relogger ReloggerSettings.AccountName = SetupTBRelogUsername.Text; ReloggerSettings.AccountPw = SetupTBRelogPW.Text; ReloggerSettings.CharacterName = SetupTBRelogCharacter.Text; ReloggerSettings.ReloggingEnabled = SetupCBRelogEnableRelogger.Checked; ReloggerSettings.PeriodicReloggingEnabled = SetupCBRelogEnablePeriodicRelog.Checked; ReloggerSettings.PeriodicLogIn = SetupIIRelogLogInAfter.Value; ReloggerSettings.PeriodicLogOut = SetupIIRelogLogOutAfter.Value; ReloggerSettings.AccountAccount = SetupIIRelogLogAccount.Value; ReloggerSettings.SaveSettings(); //Language string clientLanguage = ClientLanguage.SelectedItem.ToString(); var lazyLanguage = (LazySettings.LazyLanguage)Enum.Parse(typeof(LazySettings.LazyLanguage), clientLanguage); if (LazySettings.Language != lazyLanguage) { if (!ItemDatabase.IsOpen) { ItemDatabase.Open(); } ItemDatabase.ClearDatabase(); } LazySettings.Language = lazyLanguage; LazySettings.SaveSettings(); SaveMailList(); SaveProtectedList(); }