Jump to content

Decurse Group debuffs and switch target


Recommended Posts

Hi I want my follow bot to remove poison and disease in the group. Unfortunately it only removes the debuff from the first target and does not switch to other targets. He then just stands around and tries to continue to use the spell but remains focused on the first group member.

I've read around in the forum, but apparently it's mostly about keeping buffs up. Or maybe I just have a monkey brain that is too small

Thank you very much for everyone who takes the time

hasDebuff = false;
        for i=1,40 do
	        local texture, count, debuffType = UnitDebuff("target", i);
            if debuffType == "Poison" then
                hasDebuff = true
                break;
            end
        end

true

hasDebuff

 

Link to comment
Share on other sites

You can build a List with all Party Members and then try to check each one of them:

 

    public static bool GroupCureSpellPoison(Spell spell)
    {
        if (!spell.KnownSpell || !spell.IsSpellUsable || !spell.IsDistanceGood || ObjectManager.Me.HaveBuff("Drink") || ObjectManager.Me.HaveBuff("Food"))
        {
            return false;
        }

        IEnumerable<WoWPlayer> members = Partystuff.getPartymembers().Where(o => o.IsAlive);
        if (members.Count() > 0)
        {
            foreach (WoWPlayer member in members)
            {
                if (!TraceLine.TraceLineGo(member.Position) && HasPoisonDebuff(member))
                {
                    Spells.Focus(spell, member);
                }
            }
        }
        return false;
    }

 

Link to comment
Share on other sites

Works great. I thank both of you. Really been helpful.

Maybe one last question. Sorry ?

Can you somehow tell wrobot that it should use certain spells as a healer in party mode? Take the Stoneclaw Totem as an example. Works perfectly as a grinder or wRotation but is completely ignored in party mode as a healer. But I also only use built-in Profile Creator conditions.

 

Conditions:
Buff = Stoneclaw Totem, False

Health Percent = Smaller, 90

Target targeting Me = True

Me in Combat = True

WROBOTFORUM.png

Edited by dripcommander
here are my settings if someone wants to see them first .
Link to comment
Share on other sites

  • 1 year later...
On 8/9/2020 at 5:00 PM, Talamin said:

You can build a List with all Party Members and then try to check each one of them:

 

    public static bool GroupCureSpellPoison(Spell spell)
    {
        if (!spell.KnownSpell || !spell.IsSpellUsable || !spell.IsDistanceGood || ObjectManager.Me.HaveBuff("Drink") || ObjectManager.Me.HaveBuff("Food"))
        {
            return false;
        }

        IEnumerable<WoWPlayer> members = Partystuff.getPartymembers().Where(o => o.IsAlive);
        if (members.Count() > 0)
        {
            foreach (WoWPlayer member in members)
            {
                if (!TraceLine.TraceLineGo(member.Position) && HasPoisonDebuff(member))
                {
                    Spells.Focus(spell, member);
                }
            }
        }
        return false;
    }

HasPoisonDebuff(member))

guy,where s this function ?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...