Thread Tools Display Modes
Prev Previous Post   Next Post Next
03-11-22, 04:09 AM   #1
Firesong
A Deviate Faerie Dragon
Join Date: Jan 2022
Posts: 19
Question Finding reactive spells like Overpower or Revenge

I'm making an addon that will have one button and it will show the correct spell to cast.

So far I have this code working:

local inRange, unit = 0, "target"
if UnitExists("target") and UnitIsVisible("target") and IsUsableSpell("Charge") then
inRange = IsSpellInRange("Charge", "target")
end
if inRange == 1 then
CommandExtra.texture:SetColorTexture(0,255,0)
message = "Charge"
else
CommandExtra.texture:SetColorTexture(255,0,0)
message = "Do nothing"
end

My plan is to have a long-ish if else function for my warrior. My question is how to identify from Lua spells like Overpower or Revenge which flash up on screen and should be used first?

All help appreciated.
  Reply With Quote
 

WoWInterface » Developer Discussions » General Authoring Discussion » Finding reactive spells like Overpower or Revenge


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off