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

Flag Returner

I use this for returning dropped flags in WSG, but that's all it'll do.

Code:
using System;
using System.Linq;
using Styx;
using Styx.Common;
using Styx.Plugins;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;

namespace Plugins
{
    internal class FlagReturn : HBPlugin
    {
        private static string _flagName = String.Empty;

        public static string FlagName
        {
            get { return _flagName; }
            set { _flagName = value; }
        }

        private static LocalPlayer Me
        {
            get { return StyxWoW.Me; }
        }

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

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

        public override Version Version
        {
            get { return new Version(1, 0, 0, 0); }
        }

        public override void Pulse()
        {
            if (!StyxWoW.IsInWorld || !Battlegrounds.IsInsideBattleground)
            {
                return;
            }

            if (FlagName == String.Empty)
            {
                if (Me.IsHorde)
                {
                    FlagName = "Horde Flag";
                }

                if (Me.IsAlliance)
                {
                    FlagName = "Alliance Flag";
                }
            }

            foreach (
                WoWGameObject gameObj in
                    ObjectManager.GetObjectsOfType<WoWGameObject>()
                                 .Where(gameObj => gameObj.Name == FlagName && gameObj.WithinInteractRange))
            {
                Logging.Write("Interacting With {0}", gameObj.Name);

                gameObj.Interact();
            }
        }
    }
}
 
Doesn't seem to work. I stood beside a dropped flag for 10 secs and it never returned it.
 
Doesn't seem to work. I stood beside a dropped flag for 10 secs and it never returned it.

That's odd. I've been using it forever, without issue. Are you using an English language WoW client?
 
Back
Top