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

Interacting with dropped flags?

twistedintel

New Member
Joined
Oct 3, 2010
Messages
35
Reaction score
0
So, I've been (for the past 20 minutes or so...) writing a plugin that will return dropped flags in WSG and TP, mainly for use with lazyraider, etc.

Currently it recognized the flag being dropped (finds it in ObjectManager) and accurately judges whether or not I'm in range of the flag. However it won't interact with the flag.

Code for this:
Code:
        public override void Pulse()
        {
            var DroppedFlag = ObjectManager.GetObjectsOfType<WoWGameObject>().Find(o => o.SubType == WoWGameObjectType.FlagDrop);
            if (DroppedFlag.IsValid && DroppedFlag.WithinInteractRange)
            {
                Logging.Write(Color.Aquamarine, "Clicking {0}!", DroppedFlag.Name);
                DroppedFlag.Interact();
                StyxWoW.SleepForLagDuration();
            }
            else if (DroppedFlag.IsValid && !DroppedFlag.WithinInteractRange)
            {
                Logging.Write(Color.Aquamarine,"Tried to click {0}, but was out of range.",DroppedFlag.Name);
            }
            else
                return;
        }
Anyone have any pointers on this? And yeah, I'm fairly positive that this is extremely in-efficient, and that there are better ways etc. but I'm not worried with that yet... Thanks in advance for any help.
 
This is working fine for me. I was actually going to add it to a plugin of mine , if you don't mind.
 
I've got a plugin already made that does this in a very efficient manner, just forgot to post it. Will post now.
 
Back
Top