-
Member
Rejuvanation Lua?
Code:
/run if UnitHealth("player")/UnitHealthMax("player") < 0.8 then CastSpellByName ("Rejuvenation") end
/run if not UnitBuff("player", "Bear Form") then CastSpellByName("Bear Form") end
/startattack
/run if IsUsableSpell("Faerie Fire (Feral)(Feral)") then CastSpellByName ("Faerie Fire (Feral)(Feral)") end
/run if IsUsableSpell("Mangle(Bear Form)") then else CastSpellByName("Mangle(Bear Form)") end
/run if IsUsableSpell("Maul(Bear Form)") then CastSpellByName ("Maul(Bear Form)") end
The Problem is it keep spamming "Rejuvenation" once I hit 80% HP. I only want Rejuvenation to be cast once and then go back to bear form.
-
Member
Add a condition to check if you have the rejuv buff already.
-
Member
Originally Posted by
clozer
Add a condition to check if you have the rejuv buff already.
Now that where im clueless. The only condition macro i know.
if UnitBuff("player","Rejuvenation") but still it wont stop casting rejuvanation.
/run if UnitHealth("player")/UnitHealthMax("player") < 0.8 then CastSpellByName ("Rejuvenation") end
/run if not UnitBuff("player", "Rejuvenation") then CastSpellByName("Bear Form") end
/run if UnitHealth("player")/UnitHealthMax("player") < 0.8 then CastSpellByName ("Rejuvenation") elseif UnitBuff("player", "Rejuvenation") then CastSpellByName("Bear Form") end
no matter what i do it just keep spamming rejuvenation lol.
ive google search and even look at entire PLUA thread. I cant find any code to stop spamming rejuvanation.
Nevermind ill just use castsequence lol
/script CloseLoot()
/run if UnitHealth("player")/UnitHealthMax("player") < 0.9 then RunMacroText("/castsequence reset=5 Rejuvenation, null") end
/run if not UnitBuff("player", "Bear Form") then CastSpellByName("Bear Form") end
/startattack
/run local _,d,_ = GetSpellCooldown("Faerie Fire (Feral)(Feral)") if (d == 0) then CastSpellByName("Faerie Fire (Feral)(Feral)") end
/run local _,d,_ = GetSpellCooldown("Mangle(Bear Form)") if (d == 0) then CastSpellByName("Mangle(Bear Form)") end
/run local _,d,_ = GetSpellCooldown("Swipe(Bear Form)") if (d == 0) then CastSpellByName("Swipe(Bear Form)") end
it would be helpful if someone post an example how to use macro condition to stop casting for a spell with 0 cooldown.
Last edited by Totoy Tulog; 06-25-2019 at 09:11 PM.
-
Member
/run if UnitHealth("player")/UnitHealthMax("player") < 0.8 then CastSpellByName ("Rejuvenation") end
/run if not UnitBuff("player", "Rejuvenation") then CastSpellByName("Bear Form") end
thats completly wrong i guess - you want something like this
/run if UnitHealth("player")/UnitHealthMax("player") < 0.8 and not UnitBuff("player", "Rejuvenation") then CastSpellByName ("Rejuvenation") end
/run if not UnitBuff("player", "Bear Form") then CastSpellByName("Bear Form") end
Now he checks if the player has rejuv buff and is under 80% health. If he has the rejuv buff already he will go straight to next statement, if not he will cast rejuv.
-
Post Thanks / Like - 1 Thanks
Totoy Tulog (1 members gave Thanks to clozer for this useful post)
-
Member
Originally Posted by
clozer
/run if UnitHealth("player")/UnitHealthMax("player") < 0.8 then CastSpellByName ("Rejuvenation") end
/run if not UnitBuff("player", "Rejuvenation") then CastSpellByName("Bear Form") end
thats completly wrong i guess - you want something like this
/run if UnitHealth("player")/UnitHealthMax("player") < 0.8 and not UnitBuff("player", "Rejuvenation") then CastSpellByName ("Rejuvenation") end
/run if not UnitBuff("player", "Bear Form") then CastSpellByName("Bear Form") end
Now he checks if the player has rejuv buff and is under 80% health. If he has the rejuv buff already he will go straight to next statement, if not he will cast rejuv.
Thanks it works..
Code:
/script CloseLoot()
/cleartarget [dead]
/targetenemy [dead][noexist]
/startattack
/run if UnitHealth("player")/UnitHealthMax("player") < 0.8 and not UnitBuff("player", "Rejuvenation") then CastSpellByName ("Rejuvenation") end
/run if not UnitBuff("player", "Bear Form") then CastSpellByName("Bear Form") end
/run local _,d,_ = GetSpellCooldown("Faerie Fire (Feral)(Feral)") if (d == 0) then CastSpellByName("Faerie Fire (Feral)(Feral)") end
/run local _,d,_ = GetSpellCooldown("Mangle(Bear Form)") if (d == 0) then CastSpellByName("Mangle(Bear Form)") end
/run if CheckInteractDistance("target", 2) and IsUsableSpell("Swipe(Bear Form)") then CastSpellByName("Swipe(Bear Form)") end
Now if I want to remove the local _,d,_ = GetSpellCooldown and replace it with like this. It wont cast. maybe there a way to do distance check for melee spell..
Code:
/run if IsSpellInRange("Mangle(Bear Form)","target") and IsUsableSpell("Mangle(Bear Form)") then CastSpellByName("Mangle(Bear Form)") end
Last edited by Totoy Tulog; 06-26-2019 at 10:17 AM.
-
Member
Mare sure your conditions are true: IsSpellInRange("Mangle(Bear Form)","target") and: IsUsableSpell("Mangle(Bear Form)")
One of them or both are false, so he wont cast. Make sure wich one it is and find the error.