Exemple #1
0
        protected override bool Execute()
        {
            Screen.ReadWindow();

            if ((Minimap.Hitpoints() < RunParams.StartEatingBelow) && !BankAndHeal()) //Heal if hitpoints are low
            {
                return(false);                                                        //Quit immediately if we are unable to restore hitpoints
            }

            if (TryPassObstacles(Obstacles))
            {
                RunParams.Iterations--;
                FailedCircuits = 0;
            }
            else
            {
                FailedCircuits++;
            }

            if (!Inventory.StandardTeleport(Inventory.StandardTeleports.Camelot))
            {
                SafeWait(3000);
                if (!Inventory.StandardTeleport(Inventory.StandardTeleports.Camelot, true, true))
                {
                    return(false);
                }
            }

            return(FailedCircuits < FailureLimit);
        }
Exemple #2
0
 /// <summary>
 /// Teleports to the player's house and waits to verify arrival
 /// </summary>
 /// <returns></returns>
 protected bool TeleportToHouse()
 {
     if (Inventory.StandardTeleport(Inventory.StandardTeleports.House, false))
     {
         teleportWatch.Restart();
         return(true);
     }
     return(false);
 }
Exemple #3
0
 /// <summary>
 /// Moves the bot back to its Camelot starting position
 /// </summary>
 /// <returns></returns>
 protected bool Reset()
 {
     if (Inventory.StandardTeleport(Inventory.StandardTeleports.Camelot, false))
     {
         teleportWatch.Restart();
         return(true);
     }
     return(false);   //TODO restock at the GE
 }
Exemple #4
0
        /// <summary>
        /// Restore hitpoints at the Seers' Village bank and reset location to the Seers' bank teleport before continuing
        /// </summary>
        /// <returns></returns>
        private bool BankAndHeal()
        {
            Bank bank;

            SetFoodSlots(); //Record which inventory slots are currenty empty and will be occupied by food
            if (!Banking.MoveToBank(5000) || !Banking.OpenBank(out bank))
            {
                return(false);
            }
            bank.WithdrawAll(FoodBankSlot.X, FoodBankSlot.Y);
            bank.Close();
            if (!ManageHitpoints() || !Banking.OpenBank(out bank))  //Eat food from initially empty inventory slots until we have very high health.
            {
                return(false);
            }
            DepositFood(bank);
            bank.Close();

            if (!Inventory.StandardTeleport(Inventory.StandardTeleports.Camelot))
            {
                return(Inventory.StandardTeleport(Inventory.StandardTeleports.Camelot, true, true));
            }
            return(true);
        }