Example #1
0
        protected override bool Execute()
        {
            //Move to the bank and open it
            if (!Banking.MoveToBank(7000, true, BankIconMinSize))
            {
                if (StopFlag)
                {
                    return(false);
                }

                Point moveTowardBank = Minimap.RadialToRectangular(350, 1);
                LeftClick(moveTowardBank.X, moveTowardBank.Y);
                if (SafeWait(6000))
                {
                    return(false);
                }
                Vision.WaitDuringPlayerAnimation(10000);
                if (!MoveToBankPhasmatys(2700))
                {
                    return(false);
                }
            }
            if (StopFlag || !ClickBankBooth())
            {
                return(false);
            }

            if (StopFlag)
            {
                return(false);
            }
            BankItems();

            if (!MoveToFireLine() || StopFlag)
            {
                return(false);
            }
            if (SafeWait(5000))
            {
                return(false);
            }
            Vision.WaitDuringPlayerAnimation(10000);

            if (!SetFires() || StopFlag)
            {
                return(false);
            }

            return(true);
        }
Example #2
0
        /// <summary>
        /// Teleports to Edgeville and moves to the Edgeville bank
        /// </summary>
        /// <returns>true if successful</returns>
        protected bool MoveToEdgevilleBank()
        {
            //teleport to Edgeville bank
            Inventory.GloryTeleport(Inventory.GloryTeleports.Edgeville, false);
            Stopwatch watch = new Stopwatch();

            watch.Start();
            MoveMouse(Minimap.Center.X + 35, Minimap.Center.Y + 8, 35);
            SafeWait(Inventory.TELEPORT_DURATION);

            //Start moving to bank booth
            Point bankIconOffsetTarget = new Point(2 * MinimapGauge.GRID_SQUARE_SIZE, MinimapGauge.GRID_SQUARE_SIZE / 2);

            if (!Banking.MoveToBank(0, true, 4, 2, bankIconOffsetTarget))
            {
                return(false);
            }

            CheckItems();
            Inventory.OpenInventory();
            MoveMouse(Screen.Center.X, Screen.Center.Y + 30, 15);
            return(true);
        }
Example #3
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);
        }