Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        private void BotMain_OnStart(IBot bot)
        {
            if (!Service.IsConnected)
            {
                Service.Connect();
                CommunicationThread.ThreadStart();
            }

            SelectBehavior();
            CurrentBehavior.Activate();
        }
Esempio n. 3
0
        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;
        }
Esempio n. 4
0
 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;
 }