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!

[Request] Plugin that targets healers in PvP

SpigotStyle

New Member
Joined
Jan 15, 2010
Messages
98
Some type of priority targeting. I know there are addons out there that place a raid marker over healers. I was wondering if there is a way to have BGbuddy sense these and attack the healers so I don't keep pounding on a warrior or DK that will not die because of his healer.
 
I was so about to post this request.
Can anyone help with this


Well Not shure But I can get you started as far as the add on gose it's called "healers have to die" from curse..
there might be some thing there to use in the coding..
 
would be coded in the CC... it's up to BGBuddy since it would just switch target (I think), definitely needs to target the healers because everyone complains when you don't kill the healer (although legit players don't do it either).

Good Suggestion :).
 
This was coded by me from scratch,

if you are going to use it, please let me know. as i expect full credit and notification that u used it
all the code is there, all it takes is me.target = besthealer(35)... etc.

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Styx;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;
using Styx.Helpers;



namespace PvPRogue.Managers
{

    /// <summary>
    /// Created by SwInY - 3/3/2012
    /// </summary>
    class BGHealers
    {
        /// <summary>
        /// Our Instance of this class
        /// </summary>
        public static BGHealers _Instance;

        /// <summary>
        /// Our [ In Object Manager ] Healers list using LUA
        /// LUA - GetBattlefieldScore(i)
        /// </summary>
        public List<WoWPlayer> lHealers = new List<WoWPlayer>();

        private string[] HealingSpecs = { "Restoration", "Holy", "Discipline"};

        /// <summary>
        /// This will create the list
        /// </summary>
        public BGHealers()
        {
            // Frame lock it as we are gunna be calling a loop of lua
            using (new FrameLock())
            {
                int BGPlayerCount = Lua.GetReturnVal<int>("return GetNumBattlefieldScores()", 0);

                // Loop threw all the players in the BG
                for (int i = 1; i < BGPlayerCount; i++)
                {
                    List<string> GetLua = Lua.GetReturnValues(string.Format("return GetBattlefieldScore({0})", i));
                    string[] NameSplit = GetLua[0].ToString().Split('-');
                    string Name = NameSplit[0].Trim();
                    string Spec = GetLua[15].ToString();

                    if (!HealingSpecs.Contains(Spec)) continue;

                    // Convert a "name" into a WoWPlayer 
                    WoWPlayer PlayerHealer = (from CurPlayer in ObjectManager.GetObjectsOfType<WoWPlayer>()
                        where CurPlayer.Name == Name
                        select CurPlayer).FirstOrDefault();

                    // If we actually have a player that we can see in our object manager
                    // Add him to our list!
                    if (PlayerHealer != null)
                    {
                        lHealers.Add(PlayerHealer);
                    }
                }
            }
        }


        public bool IsHealer(WoWUnit Player)
        {
            int Count = (from FindBest in Managers.BGHealers._Instance.lHealers
                    where FindBest.Guid ==  Player.Guid
                    select FindBest).Count();

            if (Count == 0) return false;
            return true;
        }

        /// <summary>
        /// Returns the best ENEMY healer to target from a Distance
        /// </summary>
        /// <param name="Distance"></param>
        /// <returns></returns>
        public WoWPlayer BestHealer(int Distance)
        {
            return (from FindBest in Managers.BGHealers._Instance.lHealers
                    where FindBest.Distance < Distance
                    where !FindBest.IsFriendly
                    where FindBest.InLineOfSpellSight
                    select FindBest).FirstOrDefault();
            
        }
    }
}
 
Last edited:
Swiny you really are boss, now if only you could tell dummies like me where to add your code it would be appreciated what file?? and full credit goes to you of course
 
Swiny you really are boss, now if only you could tell dummies like me where to add your code it would be appreciated what file?? and full credit goes to you of course


You are the man. Maybe you have a cs file for pluginfolder?

That would make my day !

Cheers m8
 
Rep++ me IMO.



AHHH well it really depends, cause i dont think a plugin could handle targeting,
it would have to be coded into the CC.
 
Back
Top