Esempio n. 1
0
        /// <summary>
        /// Use the Tan Leather spell 5 times to tan 25 hides
        /// </summary>
        /// <returns>true is successful</returns>
        protected override bool ProcessInventory()
        {
            if (spellbookClosed)
            {
                SafeWait(1000); //Make sure that the bank closes before trying to switch to the spellbook tab on the first run
                spellbookClosed = false;
            }

            int casts = Math.Min(5, RunParams.Iterations / 5);

            for (int i = 0; i < casts - 1; i++)
            {
                Inventory.ClickSpellbookLunar(SpellSlot.X, SpellSlot.Y);
                RunParams.Iterations -= 5;
                if (SafeWaitPlus(TAN_HIDE_SPELL_TIME + 250, 100))
                {
                    return(false);
                }
            }
            //Do last cast with a shorter wait
            Inventory.ClickSpellbookLunar(SpellSlot.X, SpellSlot.Y);
            RunParams.Iterations -= 5;
            if (SafeWaitPlus(350, 150))
            {
                return(false);
            }

            return(true);
        }
Esempio n. 2
0
        /// <summary>
        /// Uses Contact NPC to contact the Dark Mage and have him repair pouches.
        /// Assumes that the required runes are already in the player's inventory.
        /// </summary>
        /// <returns>true if successful</returns>
        protected bool RepairPouches()
        {
            Inventory.ClickSpellbookLunar(5, 0);
            NPCContact npcContact = new NPCContact(RSClient);

            if (!npcContact.WaitForPopup())
            {
                return(false);
            }
            if (npcContact.RepairPouches(Textbox))
            {
                DamagedPouches = false;
                return(true);
            }

            return(false);   //failed to repair pouches
        }