Ok, I have insert yours to the fontflag lua file and tryed to identify the part where i change the hp flag.
I tryed this:
Code:
if not (unit == "targettarget" or unit == "focustarget") then
local hpp = createFont(hp, "OVERLAY", font, fontsize, fontflag, 1, 1, 1)
hpp:SetPoint("RIGHT", hp, -2, 0)
if(unit == "player") then
self:Tag(hpp, '[freeb:hp]')
if(unit == "target") then
self:Tag(hpp, '[syliha:hp]')
else
self:Tag(hpp, '[freeb:pp] [freeb:hp]')
end
end
But id says:
Code:
: Interface\AddOns\oUF_Freeb\freeb.lua:976: 'end' expected (to close 'function' at line 395) near '<eof>'
Sorry for my lua noobiness
I try...
Edit:
Got it! No error now, but there is no hp frame on the target now, it's empty :/
looks like this atm:
Code:
if not (unit == "targettarget" or unit == "focustarget") then
local hpp = createFont(hp, "OVERLAY", font, fontsize, fontflag, 1, 1, 1)
hpp:SetPoint("RIGHT", hp, -2, 0)
if(unit == "player") then
self:Tag(hpp, '[freeb:hp]')
if(unit == "target") then
self:Tag(hpp, '[syliha:hp]')
else
self:Tag(hpp, '[freeb:pp] [freeb:hp] [syliha:hp]')
end
end
end
and
Code:
oUF.Tags['syliha:hp'] = function(u)
local min, max = UnitHealth(u), UnitHealthMax(u)
return math.floor(min/max*100+.5).."%"
end
oUF.TagEvents['syliha:hp'] = 'UNIT_HEALTH'
Hmm this 100% thingy is now displayed on my playerframe O_o
http://www.abload.de/img/wowscrnshot_020312_13pibdk.jpg