View Single Post
02-03-15, 11:30 PM   #10
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Choonstertwo View Post
Even though Lua doesn't have constants, there's nothing stopping you from using a normal local variable like a constant:
And if you're working with a large number of spells and want to avoid creating 50 variables, you could just use a table:

Code:
local id = {
    EARTH_SHIELD = 974,
    PURIFY_SPIRIT = 77130,
    RIPTIDE = 61295,
}

if GetSpellCooldown(id.RIPTIDE) == 0 then
    -- do stuff
end
But:

Originally Posted by Basil2 View Post
Addon plays arena as resto shaman.
You should probably clarify that comment. If you're writing a bot, that's against the TOS and the rules of this site, and you will not get any further help here.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote