What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Click Crystallized Earth, Water or Shadow when 10 of them.

BIRDIE13

Member
Joined
Sep 10, 2011
Messages
42
Reaction score
0
Been botting Cobalt Ore for a long time now, and the bags get half full of Cobalt Ore and the rest crystallized water, earth and shadow. Would be great if someone made a plugin that clicks it!
 
I made a plugin that Converts Motes, Crystallized, and opens "Satchel of Helpful Goods" received from Random Dungeons. Oh, it also uses Aquatic Form if your Swimming and a Druid.

Code:
using System;
using System.Linq;
using Styx;
using Styx.Helpers;
using Styx.Logic.Combat;
using Styx.Plugins.PluginClass;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;


namespace Smarter
{
    public class Smarter : HBPlugin
    {
        private bool _firstPulse = true;
        private readonly WaitTimer _satchelCheckTimer = new WaitTimer(new TimeSpan(0, 0, 5, 0));
        private readonly WaitTimer _moteCheckTimer = WaitTimer.TenSeconds;
        private readonly WaitTimer _swimCheckTimer = WaitTimer.OneSecond;
        private readonly WaitTimer _eternalCheck = WaitTimer.TenSeconds;
        private readonly LocalPlayer _me = ObjectManager.Me;
        private bool _hasAquaticForm;


        public override void Pulse()
        {
            if (_firstPulse)
            {
                if (SpellManager.HasSpell("Aquatic Form"))
                {
                    _hasAquaticForm = true;
                }
                _firstPulse = false;
            }


            if (_hasAquaticForm && _swimCheckTimer.IsFinished)
            {
                SwimCheck();
                _swimCheckTimer.Reset();
            }
            if (_eternalCheck.IsFinished)
            {
                EternalCheck();
                _eternalCheck.Reset();
            }
            if (_satchelCheckTimer.IsFinished)
            {
                SatchelCheck();
                _satchelCheckTimer.Reset();
            }
            if (_moteCheckTimer.IsFinished)
            {
                MoteCheck();
                _moteCheckTimer.Reset();
            }
        }


        private void EternalCheck()
        {
            if (_me.Shapeshift != ShapeshiftForm.Normal) return;


            if (!_me.BagItems.Exists(o => o.Name.Contains("Crystallized"))) return;


            var items = _me.BagItems.Where(o => o.Name.Contains("Crystallized") && o.StackCount >= 10).ToList();
            for (int i = 0; i < items.Count(); i++)
            {
                items[i].Use(true);
                StyxWoW.SleepForLagDuration();
            }
        }


        private void SwimCheck()
        {
            if (!_me.IsSwimming) return;


            if (_me.Shapeshift == ShapeshiftForm.Aqua) return;


            SpellManager.Cast("Aquatic Form");
            StyxWoW.SleepForLagDuration();
        }


        private void MoteCheck()
        {
            if (_me.Shapeshift != ShapeshiftForm.Normal) return;


            if (!_me.BagItems.Exists(o => o.Name.Contains("Mote"))) return;


            var items = _me.BagItems.Where(o => o.Name.Contains("Mote of") && o.StackCount >= 10).ToList();
            for (int i = 0; i < items.Count(); i++)
            {
                items[i].Use(true);
                StyxWoW.SleepForLagDuration();
            }
        }
        private void SatchelCheck()
        {
            if (!_me.BagItems.Exists(o => o.Name == "Satchel of Helpful Goods")) return;


            var items = _me.BagItems.Where(o => o.Name == "Satchel of Helpful Goods").ToList();
            for (var i = 0; i < items.Count(); i++)
            {
                items[i].Use(true);
                StyxWoW.SleepForLagDuration();
            }
        }


        public override string Name
        {
            get { return "GetItRightGetItTight"; }
        }


        public override string Author
        {
            get { return "Smarter"; }
        }


        public override Version Version
        {
            get { return new Version(0, 0, 1, 0); }
        }
    }
}
You're welcome,
Smarter
 
Last edited:
Back
Top