First of all, thanks for taking the time to visit my post.
I have some programming background, I used to study CIS before I decided to join the military and go in a medical career.
Now, I am trying to make a simple mod using nothing but local values.
I want the mod to detect if I have Dark Intent up, if I have Improved Soul Fire up, and last but not least to see if Conflag is off from CD. (Yes I play a warlock)
Code:
EventFrame:RegisterEvent("PLAYER_LOGIN")
function CalaberaAnnounce:PLAYER_ENTERS_COMBAT()
local myDarkIntent
myDarkIntent = UnitBuff("player", "Dark Intent");
end;
else
DEFAULT_CHAT_FRAME:AddMessage("You are missing Dark Intent!");
end;
--- Improved Soul Fire Check
local impSoulFire
impSoulFire = UnitBuff("player", "Improved Soul Fire", 2)
end;
else
DEFAULT_CHAT_FRAME:AddMessage("You are missing Improved Soul Fire!")
end;
--- Conflag Check
lolcal conflagCDC
local start, duration, enabled = GetSpellCooldown("Conflagrate");
if enabled == 0 then
DEFAULT_CHAT_FRAME:AddMessage("Conflag is ready for use!");
elseif ( start > 0 and duration > 0) then
DEFAULT_CHAT_FRAME:AddMessage("Conflag is on Cooldown " .. (start + duration - GetTime()) .. " secs to be up.");
else
DEFAULT_CHAT_FRAME:AddMessage("Conflag is ready for use!");
end;
Where did I go wrong with this in my Lua?
My TOC reads as follows:
Code:
## Interface: 40000
## CalaberaAnnounce
## Version: v.1.0.b
## Description: Mod to remind me when Dark Intent is not buffed, Conflag is off GCD, and when Improved Soul Fire has fallen.
## Author: Calabera of Skullcrusher - US
## SavedVariables: DestroAnnouceVar
CalaberaAnnounce.lua