Jump to content

Making a HealthBuff LUA with Conditional Poping.

Recommended Posts

Ok I don't know if this will work the way I have coded it so I'm here asking if this will do what it says it will do.


local buffed=0
if UnitExists("player") and not UnitIsFriend("player", "target") and not (UnitIsDead("player")) then
    health = GetHealth("player") if (health > 99,75,65,50,40,32,15,1) then
--[[                Evasion,Cloak of Shadows,Smoke Bomb,Lifeblood,
        local idBuffs={31224,76577,121279}
        local idPreparation=14185
        local spellname=GetSpellInfo(idPreparation)
        local start, duration, enabled = GetSpellCooldown(spellname)
        if (enabled==1) then
            for i=1, 4 do
                if (IsPlayerSpell(idHealthBuffs)) then
                    local start, duration, enabled = GetSpellCooldown(idHealthBuffs)
                    if (duration==0) then
                        local spellname=GetSpellInfo(idHealthBuffs)
                        print("buff: "..spellname)


But if this code does not do what I'm trying to get it to do... is there a way to combine all the Life Saving Buffs to be used the way their tool tips mean them to be used. I want to conserve space in my fight classes Rotation list by combining all the Life saving buffs to pop at different health spots to make them work the best for my class.

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...