• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Flag Returner

    Discussion in 'Requests' started by beagler89, May 10, 2013.

    1. beagler89

      beagler89 Member

      Joined:
      Feb 14, 2012
      Messages:
      48
      Likes Received:
      0
      Trophy Points:
      6
      Last edited: May 10, 2013
    2. Pookie

      Pookie New Member

      Joined:
      May 10, 2013
      Messages:
      4
      Likes Received:
      0
      Trophy Points:
      0
      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();
                  }
              }
          }
      }
      
      
       
    3. beagler89

      beagler89 Member

      Joined:
      Feb 14, 2012
      Messages:
      48
      Likes Received:
      0
      Trophy Points:
      6
      Doesn't seem to work. I stood beside a dropped flag for 10 secs and it never returned it.
       
    4. Pookie

      Pookie New Member

      Joined:
      May 10, 2013
      Messages:
      4
      Likes Received:
      0
      Trophy Points:
      0
      That's odd. I've been using it forever, without issue. Are you using an English language WoW client?
       
    5. beagler89

      beagler89 Member

      Joined:
      Feb 14, 2012
      Messages:
      48
      Likes Received:
      0
      Trophy Points:
      6
      Nevermind, works well with Lazyraider. Tyrael will not pulse it.
       

    Share This Page