-
Active Member
:confused: Help me wtih code plz
Hello,
I use an addon call Shield Maid. It helps decide what ability gives you the best mitigation for your rage points.
Otherwise I use pe with boxo's warrior profil, my question is whether instead of lighting an icon with the addon Sield maid, it could not just use the spell?
In the addon code, there is something like that:
local apply = not name or expires - systemTime <= ns.Config.shieldBlockTimeout
if estimatedBlock > estimatedAbsorb60 and currentRage >= 60 and apply then
self:ShowGlow()
else
self:HideGlow(name)
end
What can I change?
thank you
-
Legendary
Originally Posted by
ossuaire
Hello,
I use an addon call
Shield Maid. It helps decide what ability gives you the best mitigation for your rage points.
Otherwise I use pe with boxo's warrior profil, my question is whether instead of lighting an icon with the addon Sield maid, it could not just use the spell?
In the addon code, there is something like that:
What can I change?
thank you
You will have to unlock lua. There's programs for this in the bots/programs section.
I do not have the rest of the addon code to look at but you should be able to do either of these:
Replace "self:ShowGlow()" with "self:Click()", or do something along the line of "CastSpellByName(self:Name())". The self:Name() part will have to be changed to retrieve spell name, or if spell ID is easily accessible you can do CastSpellByID.
-
Post Thanks / Like - 1 Thanks
hackerlol (1 members gave Thanks to Alfalfa for this useful post)
-
Spell casting API is locked to Blizzard functions. Addons cannot cast without a Lua unlocker of some kind (there's free ones available in the bots/programs section.)
If you get a Lua unlocker working, you should be able to use this code block instead:
Code:
local apply = not name or expires - systemTime <= ns.Config.shieldBlockTimeout
if estimatedBlock > estimatedAbsorb60 and currentRage >= 60 and apply then
CastSpellByName("Shield Block")
end
-
Active Member
you are awesome guys, so quick to answer
Like I use Probably engine I also use firehack, so, the Jadd solution seems perfect!
I test in game and I share the full code if it works.
-
Active Member
looks great!
here is the link of the entire addon, remember need a lua unlocker.
https://mega.nz/#F!iE50hDoD
Original addon: Shield Maid - Warrior - World of Warcraft Addons - Curse
Thx for help.
-
Post Thanks / Like - 1 Thanks
Jadd (1 members gave Thanks to ossuaire for this useful post)