• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [BuffHelpter] WoW's 8th Anniversary

    Discussion in 'Archives' started by hackersrage, Dec 1, 2012.

    1. hackersrage

      hackersrage Member Buddy Store Developer

      Joined:
      Nov 18, 2012
      Messages:
      342
      Likes Received:
      15
      Trophy Points:
      18
      Just to give credit, this plugin was based off the other plugin ... which in turn was based off COIHelper.

      I have cleaned up the code and made this more generic so that when this event is over, it can easily be utilized for whatever the special use buff occasion may be.

      First release 1.0
      Code:
      using System.ComponentModel;
      using System.Drawing;
      using System.Linq;
      using System.Threading;
      using System.Windows.Forms;
      using System.Windows.Media;
      using System;
      using Styx.Helpers;
      using Styx.WoWInternals;
      using Styx.WoWInternals.WoWObjects;
      using System.IO;
      using System.Xml.Linq;
      using Styx.Plugins;
      using Styx;
      using Styx.CommonBot;
      using Styx.Common.Helpers;
      using Styx.CommonBot.POI;
      using Styx.CommonBot.Profiles;
      using Styx.CommonBot.Database;
      using Styx.Common;
      using Styx.CommonBot.Frames;
      using System.Collections.Generic;
      using System.Diagnostics;
      
      namespace BuffHelper
      {
          public partial class BuffHelper : HBPlugin
          {
              public override string Name { get { return "Buff Helper"; } }
              public override string Author { get { return "hackersrage"; } }
              public override Version Version { get { return new Version(1, 0); } }
              public override bool WantButton { get { return true; } }
              public override string ButtonText { get { return "No Config"; } }
      
              public bool IsBuffActive() {
                  if (Me.HasAura("WoW's 8th Anniversary")) { return true; }
                  return false;
              }
      
              public static void slog(string format, params object[] args) { Logging.Write("[BuffHelper]:" + format, args); }
              private static LocalPlayer Me { get { return StyxWoW.Me; } }
              public override void Initialize() { Logging.Write(Colors.Lime, "Celebration Helper"); }
              public override void Pulse() { DoBuffCheck(); }
              public bool DoBuffCheck() {
                  if ( StyxWoW.Me.IsDead || StyxWoW.Me.IsGhost ) {
                      return false;
                  }
      			WoWItem buff = Me.BagItems.FirstOrDefault(h => h.Entry == 71134);
                  if ((buff != null) && (buff.CooldownTimeLeft.TotalMilliseconds <= 0) && !Me.Mounted && !IsBuffActive()) {
                      buff.Use();
                      Logging.Write(Colors.CornflowerBlue, "Used : WoW's 8th Anniversary");
                  }
      			return false;
              }
          }
      }
      
      You can download the current version here. If this proves popular, I will setup an SVN, but for the moment, that seems a bit nuts.

      View attachment BuffHelper1.0.zip

      Download, and extract to your Plugins folder. No configuration necessary. Just enable it, and make sure the anniversary item is in your inventory.

      Update Log

      1.0 - View attachment BuffHelper1.0.zip
      Cleaned up variables.
      Added check for IsGhost
      Added check for IsDead

      *Note - While the "WoW 8th Anniversary" item is no longer available. This code can be recycled to utilize other item buffs. I am waiting for another event item that everyone gets before updating this to use that.
       
      Last edited: Dec 19, 2012
    2. sftwlkr

      sftwlkr New Member

      Joined:
      Oct 28, 2012
      Messages:
      37
      Likes Received:
      0
      Trophy Points:
      0
      Awsome! Thanks!
       
    3. hampmust

      hampmust New Member

      Joined:
      Feb 16, 2012
      Messages:
      3
      Likes Received:
      0
      Trophy Points:
      0
      Sadly no use now days :/
       
    4. ghost

      ghost New Member

      Joined:
      Apr 8, 2012
      Messages:
      97
      Likes Received:
      0
      Trophy Points:
      0
      thanks for the code, i used it to create an alchemists flask plugins :)
       
    5. lynar

      lynar New Member

      Joined:
      Jan 15, 2010
      Messages:
      394
      Likes Received:
      2
      Trophy Points:
      0
      Will try this out with my luck potions, if you don't mind?

      Didn't get it.. will try to learn som basic codes tonight :)
       
      Last edited: Dec 26, 2012
    6. eknuhs

      eknuhs New Member

      Joined:
      Nov 17, 2012
      Messages:
      23
      Likes Received:
      0
      Trophy Points:
      0
      does this work with darkmoon faire?
       
    7. tumbum

      tumbum Active Member

      Joined:
      Mar 17, 2011
      Messages:
      3,341
      Likes Received:
      13
      Trophy Points:
      38
      Still working, or someone change to 9th anniversary buff? please.
       
    8. r00flr00fl

      r00flr00fl Member

      Joined:
      Apr 26, 2012
      Messages:
      174
      Likes Received:
      0
      Trophy Points:
      16

    Share This Page