Esempio n. 1
0
        public static void OnTick(object sender, ElapsedEventArgs e)
        {
            Training.SelectMonster();

            if (Training.monster_selected == false)
            {
                int dist = (int)(Math.Abs((nextx - Character.X)) + Math.Abs((nexty - Character.Y)));
                BotAction.WalkTo(nextx, nexty);

                double time        = (dist / Convert.ToInt64(Character.RunSpeed * 0.12f));
                Timer  RandomTimer = new Timer();
                RandomTimer.Elapsed += new ElapsedEventHandler(OnTickSecond);
                RandomTimer.Interval = time * 1000 + 1;
                RandomTimer.Start();
                RandomTimer.AutoReset = false;
                RandomTimer.Enabled   = true;
            }
            else
            {
                running = false;
            }
        }
Esempio n. 2
0
 public static void Manager()
 {
     {
         if (Data.bot && (Movement.enablelogic && (Data.dead == false)))
         {
             if (Globals.MainWindow.Checked(Globals.MainWindow.nopick) == false)
             {
                 if (Globals.MainWindow.Checked(Globals.MainWindow.normalpick) == true)
                 {
                     if (Movement.stuck == true)
                     {
                         Movement.StuckMove();
                     }
                     else
                     {
                         if (Globals.MainWindow.Checked(Globals.MainWindow.petpick) == true && Data.char_grabpetid != 0)
                         {
                             PickupControl.NormalFilter();
                         }
                         if (Globals.MainWindow.Checked(Globals.MainWindow.petpick) == false && PickupControl.there_is_pickable == true)
                         {
                             PickupControl.NormalFilter();
                         }
                         else
                         {
                             if (Buffas.buff_waiting == true)
                             {
                                 Buffas.BuffChecker();
                             }
                             else
                             {
                                 if (Training.monster_selected == false)
                                 {
                                     Training.SelectMonster();
                                 }
                                 else
                                 {
                                     Skills.CheckSkills();
                                 }
                             }
                         }
                     }
                 }
                 else if (Globals.MainWindow.Checked(Globals.MainWindow.advancepick) == true)
                 {
                     if (Movement.stuck == true)
                     {
                         Movement.StuckMove();
                     }
                     else
                     {
                         if (Globals.MainWindow.Checked(Globals.MainWindow.petpick) == true && Data.char_grabpetid != 0)
                         {
                             PickupControl.AdvanceFilter();
                         }
                         if (!Globals.MainWindow.Checked(Globals.MainWindow.petpick) == true && PickupControl.there_is_pickable == true)
                         {
                             PickupControl.AdvanceFilter();
                         }
                         else
                         {
                             if (Buffas.buff_waiting == true)
                             {
                                 Buffas.BuffChecker();
                             }
                             else
                             {
                                 if (Training.monster_selected == false)
                                 {
                                     Training.SelectMonster();
                                 }
                                 else
                                 {
                                     Skills.CheckSkills();
                                 }
                             }
                         }
                     }
                 }
             }
             else
             {
                 if (Movement.stuck == true)
                 {
                     Movement.StuckMove();
                 }
                 else
                 {
                     if (Buffas.buff_waiting == true)
                     {
                         Buffas.BuffChecker();
                     }
                     else
                     {
                         if (Training.monster_selected == false)
                         {
                             Training.SelectMonster();
                         }
                         else
                         {
                             Skills.CheckSkills();
                         }
                     }
                 }
             }
         }
     }
 }