public void OnPulse() { if (ZetaDia.CurrentQuest == null || ZetaDia.CurrentQuest.QuestSnoId == -1) { Core.Logger.Debug("Waiting while Quest is invalid (-1)"); BotMain.PauseFor(TimeSpan.FromSeconds(1)); } HookManager.CheckHooks(); GameUI.SafeClickUIButtons(); VisualizerViewModel.Instance.UpdateVisualizer(); }
public void OnDisabled() { IsEnabled = false; BotMain.OnStart -= OnStart; BotMain.OnStop -= OnStop; TabUi.RemoveTab(); HookManager.CheckHooks(); Navigator.PlayerMover = new DefaultPlayerMover(); Navigator.StuckHandler = new DefaultStuckHandler(); CombatTargeting.Instance.Provider = new DefaultCombatTargetingProvider(); LootTargeting.Instance.Provider = new DefaultLootTargetingProvider(); ObstacleTargeting.Instance.Provider = new DefaultObstacleTargetingProvider(); ItemManager.Current = new BlankItemManager(); Zeta.Bot.RoutineManager.Current = null; ModuleManager.Disable(); s_logger.Information($@"{Name} v{Version} is now DISABLED."); }
public void OnEnabled() { using (ZetaDia.Memory.AcquireFrame()) { if (IsEnabled || !Application.Current.CheckAccess()) { return; } Core.Init(); BotMain.OnStart += OnStart; BotMain.OnStop += OnStop; TrinitySettings.InitializeSettings(); SkillUtils.UpdateActiveSkills(); HookManager.CheckHooks(); TabUi.InstallTab(); SetupDemonBuddy(); UILoader.PreLoadWindowContent(); ModuleManager.Enable(); s_logger.Information($@"{Name} v{Version} is now ENABLED. {Description}"); IsEnabled = true; } }
private void OnStart(IBot bot) { HookManager.CheckHooks(); }