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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...