First off, I'm using LuaNinja to remove most protection from lua.
Now.. I want to make a macro to be able to flip through Judgement of Light/Wisdom/Justice each time I click it. I already have an idea for it using CVars but I need to know which judgement is selected. Here's the question. Can I get #showtooltip to show the judgement stored in the cvar?
Code:
#showtooltip Judgement of Light
/run if (GetCVar("bam")=="Judgement of Light") then SetCVar("bam","Judgement of Justice") elseif (GetCVar("bam")=="Judgement of Justice") then SetCVar("bam","Judgement of Wisdom") elseif (GetCVar("bam")=="Judgement of Wisdom") then SetCVar("bam","Judgement of Light") end
Edit: Just changing the macro icon is fine too; I don't need the actual tooltip. It's just so I know which judgement I have toggled for use in my ret/prot luaninja-enabled macros.
Edit2: It would seem wowwiki's api list is incomplete. I found the api I needed at SetMacroSpell - World of Warcraft Programming: A Guide and Reference for Creating WoW Addons and changed my macro accordingly. Works perfect.
Code:
/run if (GetCVar("bam")=="Judgement of Light") then SetCVar("bam","Judgement of Justice") SetMacroSpell("JudgeCycle","Judgement of Justice") elseif (GetCVar("bam")=="Judgement of Justice") then SetCVar("bam","Judgement of Wisdom") SetMacroSpell("JudgeCycle","Judgement of Wisdom")elseif (GetCVar("bam")=="Judgement of Wisdom") then SetCVar("bam","Judgement of Light") SetMacroSpell("JudgeCycle","Judgement of Light") end