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

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Help with possibly a very simple code

remtownloljk

New Member
Joined
Dec 4, 2011
Messages
60
Hi guys, so basically im using this plugin for using a spell that requires you to click the ground to place it for eg; Heroic Leap.

It allows me to use a specific macro ingame and it will automatically Heroic Leap to Target, Focus or My position. So what im wondering is can someone help me out with having the exact same plugin BUT have it place my spell exactly 30yrds in front of me.

Heres the plugin i edited to make my Demo/Mocking Banner and Heroic Leap automatically be placed on my target by running HB/Plugin and using this macro ingame --> /script warriorNum =3;

Thanks!

Code:
using System;
using Styx;
using Styx.CommonBot;
using Styx.Plugins;
using Styx.WoWInternals;

namespace WarriorBuddy
{
    public class WarriorBuddy : HBPlugin
    {
        static int _warriorType;
        WoWPoint _target;

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

        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()
        {
            _warriorType = Lua.GetReturnVal<int>("return warriorNum", 0);
            if (StyxWoW.Me.CurrentTarget == null)
            {
                Lua.DoString("warriorNum = 0;");
                _warriorType = 0;
                return;
            }

            switch (_warriorType)
            {
                case 1:
                    _target = GetPoint();
                    SpellManager.Cast("Demoralizing Banner");
                    SpellManager.ClickRemoteLocation(_target);
                    Lua.DoString("warriorNum = 0;");
                    _warriorType = 0;
                    break;
                case 2:
                    _target = GetPoint();
                    SpellManager.Cast("Mocking Banner");
                    SpellManager.ClickRemoteLocation(_target);
                    Lua.DoString("warriorNum = 0;");
                    _warriorType = 0;
                    break;
        case 3:
                    _target = GetPoint();
                    SpellManager.Cast("Heroic Leap");
                    SpellManager.ClickRemoteLocation(_target);
                    Lua.DoString("warriorNum = 0;");
                    _warriorType = 0;
                    break;
            }
        }

        static WoWPoint GetPoint()
        {
            var focus = StyxWoW.Me.CurrentTarget;
            return focus.Location;
        }

    }
}
 
Back
Top