You are a doll! I am totally hijacking those for mine as they are tons more effiecent space wise than mine now - I have my power/hp on mourseover cause I havent had the room to "fit it all in" so thank you so much for sharing!
Funny how I looked /goggle for some threads on STUF LUA I could jack but found none (even the one on EJ was locked/outdated cause all my old codes no longer work with STUF any more) and the thread on the old WoW forums is gone now since Cata.
So thanks again and I'll be sure if I find more to post them in hopes they help some out.
OH - These below were taken from maybe Fuji or (dang I cant remember the name but they did a Paladin UI with vertical coding) these are UNTESTED for the most part but someone may know how to get the to work again....I'm sure its simple wording or something but I dont use them any more so...I will separate them with ---------
BLOCK OF TEXT INC!!
Code:
function(unit, cache)
local str1 = ''
local str2 = ''
local str3 = ''
local str4 = ''
local str5 = ''
local _, partyMaster, _ = GetLootMethod()
if UnitAffectingCombat("player") == 1 then
str1 = 'C'
end
if IsRaidLeader("player")==1 then
str2 = 'L'
end
if UnitIsPVP("player") == 1 then
str3 = 'P'
end
if partyMaster == 0 then
str5 = '+'
end
if IsResting("player") == 1 then
str4 = 'R'
end
return '|cffff4500%s|r |cffffff00%s|r |cffff9900%s|r |cff00ff00%s|r |cffffffff%s|r ', str1,str2,str3,str4,str5
end
------------------------------
PET:
Code:
function(unit, cache, textframe)
local name = UnitName( unit )
if name ~= nil then
local strLen = strlen( name )
local tmp = ''
local outStr = ''
if strLen > 14 then
strLen = 14
end
for i = 1, strLen, 1 do
tmp = strsub( name, i, i )
if i == 1 then
outStr = outStr..tmp
else
outStr = outStr..'\n'..tmp
end
end
return '%s', outStr
end
end
--------------------------------------------
PET HAPPY:
Code:
function(unit, cache, textframe)
local happiness,_ = GetPetHappiness(unit)
if happiness == 1 then
return "|cffff2400*|r"
elseif happiness == 2 then
return "|cffFFD700*|r"
elseif happiness == 3 then
return "|cff238E23*|r"
end
end
----------------------------------
COMBO POINTS:
Code:
function(unit, cache, textframe)
local comboPoints = GetComboPoints(unit)
local outStr = ''
if comboPoints ~= 0 then
for i = 1, comboPoints, 1 do
outStr = outStr .. '*\n'
end
return '|cffFFFF00%s|r', outStr
end
end
function(unit, cache, textframe)
local comboPoints = GetComboPoints(unit)
local outStr = ''
if comboPoints ~= 0 then
for i = 1, comboPoints, 1 do
outStr = outStr .. '*'
end
return '|cffFFFF00%s|r', outStr
end
end
----------------------------------
STRING STATES:
Code:
function(unit, cache)
local str1 = ''
local str2 = ''
local str3 = ''
local str4 = ''
local str5 = ''
local cr1 = ''
local cr2 = ''
local cr3 = ''
local cr4 = ''
local cr5 = ''
local _, partyMaster, _ = GetLootMethod()
if UnitAffectingCombat("player") == 1 then
str1 = 'C'
cr1 = '\n'
end
if IsRaidLeader("player")==1 then
str2 = 'L'
cr2 = '\n'
end
if UnitIsPVP("player") == 1 then
str3 = 'P'
cr3 = '\n'
end
if partyMaster == 0 then
str5 = '+'
cr5 = '\n'
end
if IsResting("player") == 1 then
str4 = 'R'
cr4 = '\n'
end
return '|cffff4500%s|r%s|cffffff00%s|r%s|cffff9900%s|r%s|cff00ff00%s|r%s|cffffffff%s|r%s', str1, cr1, str2, cr2, str3, cr3, str4, cr4, str5, cr5
end
--------------------------------
Code:
function(unit, cache, textframe)
local name = UnitName( unit )
if name ~= nil then
local strLen = strlen( name )
local tmp = ''
local outStr = ''
if strLen > 14 then
strLen = 14
end
for i = 1, strLen, 1 do
tmp = strsub( name, i, i )
if i == 1 then
outStr = outStr..tmp
else
outStr = outStr..'\n'..tmp
end
end
return '%s', outStr
end
end
-------------------------------
HEALTH STRING:
Code:
function(unit, cache, textframe)
local curHealth = UnitHealth( unit )
local maxHealth = UnitHealthMax( unit )
local healthPercent = floor( ( curHealth / maxHealth ) * 100 )
local healthStr = tostring( healthPercent )
local strLen = strlen( healthStr )
local isEnemy = UnitIsEnemy( "Paloladin", unit )
local isDead = UnitIsDead(unit)
local tmp = ''
local outStr = ''
if isDead == nil then
for i = 1, strLen, 1 do
tmp = strsub( healthStr, i, i )
if i == 1 then
outStr = outStr..tmp
else
outStr = outStr..'\n'..tmp
end
end
else
outStr = '*\nD\nE\nA\nD\n*'
end
if isEnemy == nil then
return '%s', outStr
else
return '|cffFF4500%s|r', outStr
end
end
-----------------------------
Vertical name:
Code:
function(unit, cache, textframe)
local name = UnitName( unit )
if name ~= nil then
local strLen = strlen( name )
local tmp = ''
local outStr = ''
if strLen > 14 then
strLen = 14
end
for i = 1, strLen, 1 do
tmp = strsub( name, i, i )
if i == 1 then
outStr = outStr..tmp
else
outStr = outStr..'\n'..tmp
end
end
return '%s', outStr
end
end
----------------------------------
health vertical:
Code:
function(unit, cache, textframe)
local curHealth = UnitHealth( unit )
local maxHealth = UnitHealthMax( unit )
local healthPercent = floor( ( curHealth / maxHealth ) * 100 )
local healthStr = tostring( healthPercent )
local strLen = strlen( healthStr )
local isEnemy = UnitIsEnemy( "Paloladin", unit )
local isDead = UnitIsDead(unit)
local tmp = ''
local outStr = ''
if isDead == nil then
for i = 1, strLen, 1 do
tmp = strsub( healthStr, i, i )
if i == 1 then
outStr = outStr..tmp
else
outStr = outStr..'\n'..tmp
end
end
else
outStr = '*\nD\nE\nA\nD\n*'
end
if isEnemy == nil then
return '%s', outStr
else
return '|cffFF4500%s|r', outStr
end
end