Code:
function()
local names = {}
local stacks = {}
local info = {}
local unitStringName;
for i = 1,10,1 do
if select(1,GetRaidRosterInfo(i)) ~= nil then
if select(5,GetRaidRosterInfo(i)) == "Death Knight" then
r,g,b = 196,30,59
elseif select(5,GetRaidRosterInfo(i)) == "Druid" then
r,g,b = 255,125,10
elseif select(5,GetRaidRosterInfo(i)) == "Hunter" then
r,g,b = 171,212,115
elseif select(5,GetRaidRosterInfo(i)) == "Mage" then
r,g,b = 105,204,240
elseif select(5,GetRaidRosterInfo(i)) == "Monk" then
r,g,b = 85,138,132
elseif select(5,GetRaidRosterInfo(i)) == "Paladin" then
r,g,b = 245,140,186
elseif select(5,GetRaidRosterInfo(i)) == "Priest" then
r,g,b = 255,255,255
elseif select(5,GetRaidRosterInfo(i)) == "Rogue" then
r,g,b = 255,245,105
elseif select(5,GetRaidRosterInfo(i)) == "Shaman" then
r,g,b = 0,112,222
elseif select(5,GetRaidRosterInfo(i)) == "Warlock" then
r,g,b = 148,130,201
elseif select(5,GetRaidRosterInfo(i)) == "Warrior" then
r,g,b = 199,156,110
end
names[i] = string.format("|cff%02x%02x%02x%s", r, g, b, select(1,GetRaidRosterInfo(i)))
else
r,g,b = 100,100,100
unitStringName = "No Player"
names[i] = string.format("|cff%02x%02x%02x%s", r, g, b, name)
end
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId;
if not unitStringName == "No Player" then
name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId = UnitDebuff(select(1,GetRaidRosterInfo(i)),"Shadowed Soul")
end
if count ~= nil then
if count < 6 then
r2,g2,b2 = 0,255,0
elseif count < 11 then
r2,g2,b2 = 255,266,0
elseif count < 16 then
r2,g2,b2 = 255,128,0
else
r2,g2,b2 = 255,0,0
end
stacks[i] = string.format("|cff%02x%02x%02x%d", r2, g2, b2, count)
else
r2,g2,b2 = 15,150,190
count = 0
stacks[i] = string.format("|cff%02x%02x%02x%d", r2, g2, b2, count)
end
info[i] = names[i] .. ": " .. stacks[i] .. "\n"
if i == 1 then
output = "Shadowed Soul:\n"..info[i];
else
output = output..info[i]
end
end
return output
end