Thread Tools Display Modes
Prev Previous Post   Next Post Next
01-03-11, 12:54 PM   #1
Calabera
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Jan 2011
Posts: 2
First wow mod, need help to trouble shoot.

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
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » First wow mod, need help to trouble shoot.


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