Example #1
0
        public void Dust()
        {
            navigation.StartBot();

            while (true)
            {
                try
                {
                    navigation.StartDust();

                    if (navigation.ActualLocation == Places.DustMap)
                    {
                        for (int i = ocr.GetDustStep(); i <= 5; i++)
                        {
                            BattleAlgorithm battleAlgorithm = new BattleAlgorithm();
                            battleAlgorithm.Run(i);

                            if (i != 5)
                            {
                                navigation.WaitForNextDustStep(i);
                            }
                            else
                            {
                                navigation.EndDust();
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    writer.WriteError($"{ex.Message}");
                    navigation.StartBot();
                }
            }
        }
Example #2
0
 public void WaitForNextDustStep(int i)
 {
     WriteHelper.WriteWarning($"Esperando a la etapa {i + 1}...");
     while (ocr.GetDustStep() == i)
     {
         Thread.Sleep(6000);
     }
 }