Thread Tools Display Modes
10-14-09, 07:14 PM   #1
Farside
A Deviate Faerie Dragon
Join Date: Aug 2009
Posts: 19
KgPanels script help needed

I have this code working, and it does all the dog tags listed.

OnLoad:
self:RegisterEvent("PLAYER_TARGET_CHANGED")

OnEvent:
LibStub("LibDogTag-3.0"):AddFontString(self.text, kgPanels, [[[thickoutline][( [IsPlayer ? Name:ClassColor ! IsPet ? Name:ClassColor ! IsEnemy ? Name:HostileColor ! PvP ? Name:HostileColor ! Name:ClassColor] )] ]], "Unit", { unit = "target"})

Problem is when I don't have a target, I get the word Target in the kgpanel.

Any help is greatly appreciated.
  Reply With Quote
10-16-09, 06:12 AM   #2
Farside
A Deviate Faerie Dragon
Join Date: Aug 2009
Posts: 19
Got Help over at the WoWAce Kgpanels page.

Posting in case anyone else might find it usefull:

<OnLoad>
self:RegisterEvent("PLAYER_TARGET_CHANGED")

<OnEvent>
if UnitExists("target") then
LibStub("LibDogTag-3.0"):AddFontString(self.text, self, [[[thickoutline][( DogTag Code goes in here )] ]], "Unit", { unit = "target"})
else
LibStub("LibDogTag-3.0"):RemoveFontString(self.text)
end
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » KgPanels script help needed


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