public static void Pulse() { if (!Enabled) { return; } if (ZetaDia.Globals.IsLoadingWorld) { return; } if (!Service.IsConnected) { Service.Connect(); CommunicationThread.ThreadStart(); } if (ZetaDia.IsInGame) { InGamePulse(); } else { OutOfGamePulse(); } GameUI.SafeCheckClickButtons(); }
private void BotMain_OnStart(IBot bot) { if (!Service.IsConnected) { Service.Connect(); CommunicationThread.ThreadStart(); } SelectBehavior(); CurrentBehavior.Activate(); }
public void OnEnabled() { Enabled = true; Log.Info(" v{0} Enabled", Version); BotMain.OnStart += BotMain_OnStart; BotMain.OnStop += BotMain_OnStop; CurrentBehavior = DefaultBehavior; EventManager.Enable(); BotHistory.Enable(); TabUi.InstallTab(); ChangeMonitor.Enable(); Service.Connect(); CommunicationThread.ThreadStart(); // When start button is clicked, hooks are cleared, TreeHooks.Instance.OnHooksCleared += OnHooksCleared; }
private void Enable() { if (!Application.Current.CheckAccess()) { return; } Enabled = true; TrinityCombat.Party = new AutoFollowPartyProvider(); Log.Info(" v{0} Enabled", Version); BotMain.OnStart += BotMain_OnStart; BotMain.OnStop += BotMain_OnStop; CurrentBehavior = DefaultBehavior; EventManager.Enable(); TabUi.InstallTab(); ChangeMonitor.Enable(); Server.ServerStartAttempts = 0; Client.ConnectionAttempts = 0; Service.Connect(); CommunicationThread.ThreadStart(); TreeHooks.Instance.OnHooksCleared += OnHooksCleared; }