• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • How do i specify a Target? will tip paypal

    Discussion in 'Requests' started by remtown, Aug 21, 2013.

    1. remtown

      remtown New Member

      Joined:
      Jun 4, 2010
      Messages:
      13
      Likes Received:
      0
      Trophy Points:
      0
      Specifying a Target? will tip paypal

      Hi, so i have been playing around with a plugin that uses abilities that you need to click in a certain position on wow for eg; Angelic Feather, Heroic Leap, Psyfiend etc Basically all of them work for my target, my focus.

      Can someone help, this specific one drops Angelic Feather on my Focus, not sure how to change this so that it just drops it on me.

      Code:
      using System;using Styx;
      using Styx.CommonBot;
      using Styx.Plugins;
      using Styx.WoWInternals;
      
      
      namespace FeatherBuddy
      {
          public class FeatherBuddy : HBPlugin
          {
              static int _featherType;
              WoWPoint _target;
      
      
              public override string Name
              {
                  get { return "FeatherBuddy"; }
              }
      
      
              public override string Author
              {
                  get { return "xxxxx"; }
              }
      
      
              public override Version Version
              {
                  get { return new Version(1, 0, 0, 0); }
              }
      
      
              public override bool WantButton
              {
                  get { return false; }
              }
      
      
              public override void Pulse()
              {
                  _featherType = Lua.GetReturnVal<int>("return featherNum", 0);
                  if (StyxWoW.Me.FocusedUnit == null)
                  {
                      Lua.DoString("featherNum = 0;");
                      _featherType = 0;
                      return;
                  }
      
      
                  switch (_featherType)
                  {
                      case 1:
                          _target = GetPoint();
                          SpellManager.Cast("Angelic Feather");
                          SpellManager.ClickRemoteLocation(_target);
                          Lua.DoString("featherNum = 0;");
                          _featherType = 0;
                          break;
                      case 2:
                          _target = GetPoint();
                          SpellManager.Cast("Angelic Feather");
                          SpellManager.ClickRemoteLocation(_target);
                          Lua.DoString("featherNum = 0;");
                          _featherType = 0;
                          break;
                  }
              }
      
      
              static WoWPoint GetPoint()
              {
                  var focus = StyxWoW.Me.FocusedUnit;
                  return focus.Location;
              }
      
      
          }
      }
      Thanks very much, will definitely tip for this information :) so pm your paypal.
       
    2. chinajade

      chinajade Well-Known Member Moderator Buddy Core Dev

      Joined:
      Jul 20, 2010
      Messages:
      17,540
      Likes Received:
      172
      Trophy Points:
      63
      Hi, Remtown,

      If you want to drop the feather on youself, rather than your focus, change the GetPoint() method to look like this:

      static WoWPoint GetPoint()
      {
      return StyxWoW.Me.Location;​
      }​


      cheers & good luck with your project,
      chinajade
       

    Share This Page