Thread Tools Display Modes
08-15-09, 12:01 PM   #1
sentox
A Defias Bandit
Join Date: Jul 2009
Posts: 2
LUA script in KG panels - Check for buffs

Hello all out there, i have made a little box with KG panels wich i want to do the following:

I would like it to show up if i am missing any of thees buffs.
Power Word: fortitude or Prayer of Fortitude
Devine Spirit or Payer of Spirit
Inner Fire

In the box i want 3 text's like this
_____________
| Fortitude |
| Spirit |
| Inner fire |
|___________|
This then shows up when iam missing one of the buffs, the one iam missing is like with gray text the others are white.

Hope someone can follow me and is willing to help,
right now i have this script in the box, and that fine but that checs for buffs on boss i want it to check for buffs on me and only show if iam missing, fort, spir og innerfire..

if UnitExists("target") then
if (not UnitIsFriend("player","target")) and (UnitLevel("target") ==-1) then
local i = 1
local ttw,dam,hit,crit,scorch,wisdom,sw= false,false,false,false,false,false,falde
local scorchColor = "545454"
local coeColor = "545454"
local ttwColor = "545454"
local hitColor = "545454"
local critColor = "545454"
local wisdomColor = "545454"
local swColor = "545454"
-- Priest sex!
local priest1 = "Sentox"
while true do
local name,_,_,count,_,_,_,caster = UnitAura("target",i,"HARMFUL")
if not name then
break
elseif (name == "Shadow Word: Pain") and UnitExists(caster) then
if (UnitName(caster) == priest1) then
ttw = true
end
elseif (name == "Vampiric Touch") and UnitExists(caster) then
if (UnitName(caster) == priest1) then
dam = true
end
elseif (name == "Shadow Weaving") and UnitExists(caster) then
if (UnitName(caster) == priest1) then
sw = true
end
elseif ((name == "Misery") or (name == "Elend")) then
hit = true
elseif ((name == "Totem of Wrath") or (name == "Totem des Ingrimms")) then
crit = true
elseif (name == "Devouring Plague") then
scorch = true
elseif (name == "Vampiric Embrace") and UnitExists(caster) then
if (UnitName(caster) == priest1) then
wisdom = true
end
end
i = i + 1
end
if scorch then
scorchColor = "ffffff"
end
if ttw then
ttwColor = "ffffff"
end
if dam then
coeColor = "ffffff"
end
if hit then
hitColor = "ffffff"
end
if crit then
critColor = "ffffff"
end
if sw then
swColor = "ffffff"
end
if wisdom then
wisdomColor = "ffffff"
end
self.text:SetText('|cff'..ttwColor..'SW:P|r|cff'..coeColor..' VT|r\n|cff'..hitColor..'Misery|r|cff'..wisdomColor..' VE|r\n|cff'..critColor..'Totem|r|cff'..scorchColor..' DP|r\n|cff'..swColor..'SW|r|cff'..swColor..' Lol|r')
self:Show()
else
self:Hide()
end
else
self:Hide()
end



Hope someone can help me, Sentox! if you have any Question or need to know more plx ask i will answer as fast as i can..
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » LUA script in KG panels - Check for buffs


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