Elitist Jerks
Register
Blogs
Forums


Go Back   Elitist Jerks » Public Discussion » User Interface and AddOns

Reply
 
LinkBack Thread Tools
Old 07/15/10, 4:04 PM   #226
Antiganon
Glass Joe
 
Night Elf Hunter
 
Undermine
Text for Raid Frames

So I'm working on some Raid Frames that will essentially replace grid for my non-healers. I need it to show Name (4 letters max), Missing HP (in place of name, if HP is not full), AFK/DC/FD/FI/Dead (in place of name, if unit is AFK or Offline or Feigning Death or Divine Intervention'd or Dead/Ghost).

Here is what I have so far:
local AFK = Afk(unit)
local AFKTIME = AFKDuration(unit)
local DC = Offline(unit)
local DCTIME = OfflineDuration(unit)
local DEAD = Dead(unit)
local DEADTIME = DeadDuration(unit)
local FD = UnitAura(unit,"FEIGN DEATH")
local DI = UnitAura(unit,"DIVINE INTERVENTION")
local cur,max = HP(unit),MaxHP(unit)
local miss = max-cur

if AFK then
return "AFK\n%s",AFKTIME
elseif DC then
return "DC\n%s",DCTIME
elseif DEAD then
return "AFK\n%s",DEADTIME
elseif FD then
return "FD"
elseif DI then
return "DI"
elseif miss ~= 0 then
return "- %s",Short(miss)
else
return Name(unit):sub(1,4)
So far, Name, FD (and I assume DI, since they are functionally identical with different buffs), AFK are confirmed to work. I have not tested DEAD, DC, miss.

My issue is that AFKTIME displays as a massively huge decimal number. I had a fix for this before, but I have no idea what it was.

Anyone know how to fix it?

Offline
Reply With Quote
Old 07/29/10, 9:27 PM   #227
Proza
Glass Joe
 
poop
Blood Elf Druid
 
No WoW Account
Does anyone know how to view the unit-player's group number when in a raid? The DogTag is pretty simple, however I'm having a really hard time researching the code to display the player's group number (in Pitbull, that is).

Offline
Reply With Quote
Old 07/30/10, 6:50 AM   #228
Hamsda
Piston Honda
 
Hamsda's Avatar
 
Goblin Priest
 
Mannoroth (EU)
I think this API function should help you with your luatext

There are only 10 types of people... those who understand binary and those who don't.

Germany Offline
Reply With Quote
Old 08/01/10, 9:39 PM   #229
ctrlfrk
Glass Joe
 
Orc Hunter
 
Firetree
Originally Posted by Antiganon View Post
return "AFK\n%s",AFKTIME
change that into
return "AFK\n%.2f",AFKTIME
That should display the afk time as a 'float' with only 2 decimal places.

Offline
Reply With Quote
Old 09/23/10, 11:04 PM   #230
Dankz
Von Kaiser
 
Dankz's Avatar
 
Undead Mage
 
Caelestrasz
Class Colored Borders + Aggro

Simply trying to get KGPanels to be class colored unless the until has aggro, then red.

I'm using
local _, class = UnitClass("player");
if class == "WARRIOR" then
self:SetBackdropBorderColor(0.95, 0.23, 0.23, 0.50)
elseif class == "PRIEST" then
self:SetBackdropBorderColor(1, 0.96, 0.98, 0.50)
elseif class == "MAGE" then
self:SetBackdropBorderColor(0.00, 1, 1, 0.50)
elseif class == "DRUID" then
self:SetBackdropBorderColor(1, 0.49, 0.04, 0.50)
elseif class == "PALADIN" then
self:SetBackdropBorderColor(0.92, 0.22, 0.46, 0.50)
elseif class == "HUNTER" then
self:SetBackdropBorderColor(0.33, 0.86, 0.00, 0.50)
elseif class == "ROGUE" then
self:SetBackdropBorderColor(1, 0.94, 0.16, 0.50)
elseif class == "SHAMAN" then
self:SetBackdropBorderColor(0.13, 0.42, 1, 0.50)
elseif class == "WARLOCK" then
self:SetBackdropBorderColor(0.36, 0.18, 1, 0.50)
elseif class == "DEATHKNIGHT" then
self:SetBackdropBorderColor(0.77, 0.12, 0.23, 0.50)
end
for the class colored, simply want to add aggro indicator to it.


Offline
Reply With Quote
Old 10/10/10, 1:26 PM   #231
Noraj
Don Flamenco
 
Noraj's Avatar
 
Dwarf Paladin
 
Lightbringer
Originally Posted by Dankz View Post
Simply trying to get KGPanels to be class colored unless the until has aggro, then red.

I'm using
local _, class = UnitClass("player");
if class == "WARRIOR" then
self:SetBackdropBorderColor(0.95, 0.23, 0.23, 0.50)
elseif class == "PRIEST" then
self:SetBackdropBorderColor(1, 0.96, 0.98, 0.50)
elseif class == "MAGE" then
self:SetBackdropBorderColor(0.00, 1, 1, 0.50)
elseif class == "DRUID" then
self:SetBackdropBorderColor(1, 0.49, 0.04, 0.50)
elseif class == "PALADIN" then
self:SetBackdropBorderColor(0.92, 0.22, 0.46, 0.50)
elseif class == "HUNTER" then
self:SetBackdropBorderColor(0.33, 0.86, 0.00, 0.50)
elseif class == "ROGUE" then
self:SetBackdropBorderColor(1, 0.94, 0.16, 0.50)
elseif class == "SHAMAN" then
self:SetBackdropBorderColor(0.13, 0.42, 1, 0.50)
elseif class == "WARLOCK" then
self:SetBackdropBorderColor(0.36, 0.18, 1, 0.50)
elseif class == "DEATHKNIGHT" then
self:SetBackdropBorderColor(0.77, 0.12, 0.23, 0.50)
end
for the class colored, simply want to add aggro indicator to it.

You'll likely want to use UnitThreatSituation (API UnitThreatSituation - WoWWiki - Your guide to the World of Warcraft) to accomplish this. It should be as easy as adding another IF case before any of the class coloring -- IF the unit has aggro, color it red, ELSE check what class it is.

Skip using the second argument for UnitThreatSituation since you want to check for any aggro, instead of aggro of a specific unit.

"The question is not how far we are going to take it... the question is, do you possess the constitution to go as far as needed?" - Il Duce

Offline
Reply With Quote
Old 10/13/10, 1:34 PM   #232
shaak
Glass Joe
 
Blood Elf Paladin
 
Barthilas
Is it possible to just show the level of something.
The same way "[Level: DifficultyColor]" did with dogtags.

Offline
Reply With Quote
Old 10/17/10, 6:33 PM   #233
fyritke
Glass Joe
 
fyritke's Avatar
 
Undead Warlock
 
Turalyon
delete, figured it out

Last edited by fyritke : 10/18/10 at 6:15 PM.

Offline
Reply With Quote
Old 10/22/10, 7:18 PM   #234
Koreos
Glass Joe
 
Human Priest
 
Alleria
I am having difficulty trying to print the name of my target's owner (in case my target is a pet). What is the UnitId for it? Right now I have:
if IsPet() then
return '%s',Name(unit)
end
Which just prints the pet's name.

Offline
Reply With Quote
Old 03/16/11, 2:17 AM   #235
FrabjousNight
Glass Joe
 
Dwarf Paladin
 
Stormreaver
TextAuras

Hi there. Just before my WoW subscription ended, I put together a very large LuaText to display multiple auras, with animated timer bars, on PitBull4 unit frames. The bottom line of this image shows the default layout of the text for a resto druid, showing Swiftmend, Wild Growth, Rejuvenation, Regrowth, and Lifebloom. (There are defaults for all classes, both healer-oriented and dps-oriented)


The project page (link to curseforge) contains a few animations showing the text in action.

If you give this a try, please post your thoughts at the project page.

The LuaText is so huge that it's inconvenient to edit. If several people express interest, I may be able to resubscribe for a bit and restructure the code as an addon you can call from a short LuaText.

United States Offline
Reply With Quote
Reply

Go Back   Elitist Jerks » Public Discussion » User Interface and AddOns

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
The DogTags 3.0 Thread Trouble User Interface and AddOns 635 01/29/13 1:44 PM
[DogTags] - Share yours! Fulnir User Interface and AddOns 164 03/30/08 1:30 AM