For some reason, I can't get this tag to show the mob's difficulty color. What I originally had was this:
[(if Classification = "Boss" and IsFriend then
White
elseif Classification = "Boss" and ~IsFriend then
Red
end) (if Classification and Classification ~= "Boss" then
Classification " "
elseif Classification = "Boss" then
Classification
end) (if IsFriend and Classification ~= "Boss" then
Level:White
elseif Classification ~= "Boss" then
Level:DifficultyColor
end) (IsPlayer ? " " SmartRace) " " DruidForm:Paren]
Everything worked exactly as I wanted it to except that enemy mobs would have their levels in white, not their difficulty color. I switched it slightly to this:
[(if Classification = "Boss" and IsFriend then
White
elseif Classification = "Boss" and ~IsFriend then
Red
end) (if Classification and Classification ~= "Boss" then
Classification " "
elseif Classification = "Boss" then
Classification
end) (if IsFriend and Classification ~= "Boss" then
Level:White
elseif Classification = "Boss" then
""
else
Level:DifficultyColor
end) (IsPlayer ? " " SmartRace) " " DruidForm:Paren]
Still no difficulty-colored levels. Nothing else changed, as far as I can tell. Any thoughts?
Has anyone gotten the code below to work? I was thrilled when I found it, because it's exactly what I need, but I can't get it to work. I can't seem to find any errors in it (though I don't know any LUA, so if there's syntax errors in it, I probably wouldn't find them), yet the code won't load. I added/edited the files in <WoWDir>\Interface\AddOns\PitBull\libs\LibDogTag-Unit-3.0 (& \Categories), which should be the correct path as far as I can tell.
Any help is welcome, would be awesome if I got this to work.
Originally Posted by Hythloday
After reading about it in another thread, this is code to be able to interrogate the number of classes in a party/raid in a DogTag. It can be used to put all the buffs that you *lack* on the player's unit frame if you use Pitbull.
#1: Create a file called Class.lua in the LibDogTag-Unit-3.0/Categories folder with the contents:
local MAJOR_VERSION = "LibDogTag-Unit-3.0"
local MINOR_VERSION = tonumber(("$Revision: 66768 $"):match("%d+")) or 0
if MINOR_VERSION > _G.DogTag_Unit_MINOR_VERSION then
_G.DogTag_Unit_MINOR_VERSION = MINOR_VERSION
end
DogTag_Unit_funcs[#DogTag_Unit_funcs+1] = function(DogTag_Unit, DogTag)
local L = DogTag_Unit.L
DogTag:AddEventHandler("Unit", "PARTY_MEMBERS_CHANGED", function(event, ...)
DogTag:FireEvent("PartyChanged")
end)
DogTag:AddTag("Unit", "PartyClassCount", {
code = function(classname)
classCount = 0
partySize = GetNumPartyMembers()
if(partySize > 0) then
for n=1,partySize do
loc, unitClassName = UnitClass("party" .. n)
if unitClassName == string.upper(classname) then
classCount = classCount + 1
end
end
loc, unitClassName = UnitClass("player")
if unitClassName == string.upper(classname) then
classCount = classCount + 1
end
end
return classCount
end,
arg = {
'classname', 'string', '@req', -- name, types, default
},
ret = 'number', -- return value
events = "PARTY_MEMBERS_CHANGED",
doc = L["Returns the number of characters of this class in the party"], -- the description
example = ('[PartyClassCount("priest")] => %q; [PartyClassCount("deathknight")] => "0"'):format(L["1"]),
category = L["Classes"]
})
DogTag:AddTag("Unit", "RaidClassCount", {
code = function(classname)
classCount = 0
raidSize = GetNumRaidMembers()
if(raidSize > 0) then
for n=1,raidSize do
loc, unitClassName = UnitClass("raid" .. n)
if unitClassName == string.upper(classname) then
classCount = classCount + 1
end
end
loc, unitClassName = UnitClass("player")
if unitClassName == string.upper(classname) then
classCount = classCount + 1
end
end
return classCount
end,
arg = {
'classname', 'string', '@req',
},
ret = 'number',
events = "PARTY_MEMBERS_CHANGED",
doc = L["Returns the number of characters of this class in the raid"],
example = ('[RaidClassCount("priest")] => %q; [RaidHasClass("deathknight")] => "0"'):format(L["3"]),
category = L["Classes"]
})
DogTag:AddTag("Unit", "PartyHasClass", {
alias = [[PartyClassCount(classname=classname) > 0]],
arg = {
'classname', 'string', '@req'
},
doc = L["Returns true if there is at least one player of this class in the party"],
example = '[PartyHasClass("priest")] => "true"',
category = L["Classes"]
})
DogTag:AddTag("Unit", "RaidHasClass", {
alias = [[RaidClassCount(classname=classname) > 0]],
arg = {
'classname', 'string', '@req'
},
doc = L["Returns true if there is at least one player of this class in the raid"],
example = '[RaidHasClass("priest")] => "true"',
category = L["Classes"]
})
end
#2 Edit LibDogTag-Unit-3.0/lib.xml to include this file.
#3 Change your name dogtag to:
[Name] [(PartyHasClass("mage") or RaidHasClass("mage")) and not (HasAura("Arcane Brilliance") or HasAura("Arcane Intellect")) and "AB":Red]
This will add the text "AB" in red after your name if there's a mage who *should* be buffing you, but isn't. Works for Pitbull at least, and should work for Cowtip (but I haven't tested it).
I have made those changes, and they work for me. I don't know what exactly to tell you - I followed the instructions as written. Do you get a "tag not found" error?
I have made those changes, and they work for me. I don't know what exactly to tell you - I followed the instructions as written. Do you get a "tag not found" error?
Yes, also, the help for "Classes" does not show up in the DogTags help. I restarted WoW 3 times and quadruple checked the libs.xml, but can't seem to find what I did wrong. I guess I'll keep trying a few more times, must be something really stupid that I'm overlooking.
Yes, also, the help for "Classes" does not show up in the DogTags help. I restarted WoW 3 times and quadruple checked the libs.xml, but can't seem to find what I did wrong. I guess I'll keep trying a few more times, must be something really stupid that I'm overlooking.
Are you sure that on game startup you are loading the modified Dogtag library? Make sure there aren't any embedded dogtag libraries floating around.
Basically if you go into your addons folder and check inside each addon alphabetically you may find one that has the dogtag library embedded which is loaded before LibDogTag. I will admit that I might be wrong about this but check all the addons from A-L and you may find your culprit.
Are you sure that on game startup you are loading the modified Dogtag library? Make sure there aren't any embedded dogtag libraries floating around.
Basically if you go into your addons folder and check inside each addon alphabetically you may find one that has the dogtag library embedded which is loaded before LibDogTag. I will admit that I might be wrong about this but check all the addons from A-L and you may find your culprit.
Ah, ok, this is the problem then. I edited the embeded version that is supplied with Pitbull. I'll just download a standalone DogTags lib. One question though, do I just delete the embeded versions or do they just not load if an "extern" version is available?
* Edit: LibDogTag-3.0 does not contain LibDotTag-Unit-3.0, which I can find nowhere as a stand alone version.
** Edit 2: Ok, found it somewhere, odd, doesn't seem to be on WoWAce.
*** Edit 3: Finally got it working by editing the embeds.xml in CowTip & Pitbull and placing LibDogTag-3.0 & LibDogTag-Unit-3.0 in the Addons root folder.
Well, you can manually delete the embed versions, but if you use WAU to update it will just pull down a new embedded version next time you get an update for Pitbull I believe.
What you really should do in this case is go through and unembed all your addons - changing WAU options is the easiest way to do this. Backup first, just in case.
Ah, ok, this is the problem then. I edited the embeded version that is supplied with Pitbull. I'll just download a standalone DogTags lib. One question though, do I just delete the embeded versions or do they just not load if an "extern" version is available?
* Edit: LibDogTag-3.0 does not contain LibDotTag-Unit-3.0, which I can find nowhere as a stand alone version.
** Edit 2: Ok, found it somewhere, odd, doesn't seem to be on WoWAce.
*** Edit 3: Finally got it working by editing the embeds.xml in CowTip & Pitbull and placing LibDogTag-3.0 & LibDogTag-Unit-3.0 in the Addons root folder.
Thanks for the tip!
Since cowtip and pitbull both contain the dogtag library the one that is "alphabetically" first (in this case cowtip) gets loaded. See Ace2 Memory Concerns - WowAce Wiki for some more details on embedding libraries if you're interested.
The best way to do this is to wowaceupdater and download your mods without externals. Then you can edit the dogtag library manually and place it on "ignore" so that your changes won't get overwritten every time the dogtag gets updated. Another advantage of un-embedding is that your load times will be slightly improved.
Is there a way to produce a clock (something like 15:44) via DogTags? I can't look into the ingame help right now for I'm at work, but I don't recall ever seeing code for this...
Hello,
A friend of mine made me this tag for my Pitbull target frame a couple of months ago, but I suspect this to be part of my screens freezing for an instant when people change groups/Die/Disconnect, etc.
Is there any way I can make it less complex while still saving the functionality? I love the mouseover thing as well. I'm thinking maybe using the "HPColor" tag in some way, but I don't really know enough about dogtags to make it :/
I searched the thread, but couldn't find any resolution to the [TalentTree] tag problem. Is it possible at all to get people's talent specs reliably now? I can't seem to get it to work with:
[Level:DifficultyColor] [Upper(TalentTree(unit="target"):ClassColor)] [Upper(Classification (if (IsPlayer or (IsEnemy and not IsPet)) then
Class
end):ClassColor)] [Upper(DruidForm:Paren)] [Upper(SmartRace)]
It works 100% when I target myself, and sometimes when I target someone else, inspect their talents, de-target them, and then re-target them.
edit: Forgot to mention I am using this in my Pitbull Target Frame, and I have everything up to date WITHOUT externals using WAU.
Using Statblocks_DogTags, I have code that looks like
[FractionalHP(unit='player')]
[if PercentHP(unit='pet')<55 then "MEND PET":green end]
[FractionalHP(unit='pet')]
The middle line displays the text MEND PET when my pet's health is below 55%. When my pet's health is above 55%, the text isn't displayed, but there is a blank line for where the text should be. How can I modify my code to not have that blank line appear? I realize I can swap the second and third lines and simply not have to worry about the blank line, but there are other things I want to add and this little problem will still be there.
I searched the thread, but couldn't find any resolution to the [TalentTree] tag problem. Is it possible at all to get people's talent specs reliably now? I can't seem to get it to work with:
[Level:DifficultyColor] [Upper(TalentTree(unit="target"):ClassColor)] [Upper(Classification (if (IsPlayer or (IsEnemy and not IsPet)) then
Class
end):ClassColor)] [Upper(DruidForm:Paren)] [Upper(SmartRace)]
It works 100% when I target myself, and sometimes when I target someone else, inspect their talents, de-target them, and then re-target them.
edit: Forgot to mention I am using this in my Pitbull Target Frame, and I have everything up to date WITHOUT externals using WAU.
It doesn't work anymore.
If I recall correctly, only on unpvp flagged people, will it show up. Its really not worth using anymore.
As you can see when someone has aggro the frame colours red. Problem is (And I noticed thanks to Saeto's highlight) that I cant see what the class is that has gotten aggro.
So I would like to know if there's a dogtag to show who has aggro.
Trying out my new Shammy Shield Timers on pitbull. Thanks to Lorienne for the origin of the code.
Looks really nice! What could make it better though (imo), is that you make a dot for each charge, instead of a written number. I.e. "¤¤¤¤¤¤" instead of "ES6".
However it might look like crap, I don't know
Originally Posted by Led ++
As you can see when someone has aggro the frame colours red. Problem is (And I noticed thanks to Saeto's highlight) that I cant see what the class is that has gotten aggro.
I'm not sure there is any dogtag for just having aggro, but you could use the threat dogtags I guess.
MissingThreat(unit="player")
Return the missing threat that you have against enemy unit or that friendly unit has against your target, if ThreatLib is available
[MissingThreat] => "30"
I haven't tested it, but what it's mean't to do is show the classname in classcolor (wherever you choose to have it) IF you don't have enough threat toward that individual, else it should be completly blank. Though I'm quite unsure if you can use MissingThreat in this way, so it's possible that it won't work at all. If it doesn't work, try the other threat dogtags (can be found at LibDogTag-3.0 - WowAce Wiki)
Try it out
Edit: Reading the threat dogtags again, I belive using the "PercentThreat" may leave better results than "MissingThreat". (Still not tested though)
Since Threat was broken with Aloft when they changed over from Threat-1.0 to Threat-2.0, which resulted in the discontinuation of the Threatbar, is there any way of making a DogTag similar to the following work?
In its current form it's giving me several invalid tag errors, which I suspect is due to the fact that hovering healthbars (the default Blizzard ones) don't return UnitID codes as far as I recall - is there any workaround to this or am I on my own here until somebody decides to add Threatbar back into Aloft?
I wrote this dog tag to alleviate a common error that I would make while grinding honor in the battlegrounds on my Paladin alt. I needed some way to remind myself to set the proper paladin aura each time I died or mounted/dismounted. Quite often I would forget to toggle Improved Concentration Aura after racing across the battlefield on my mount. As it turns out, Crusader Aura does little for spell push back when a rogue is poking you in the back! So I would get killed, and then resurrect at the graveyard only to once again forget that my aura is removed on death and must be manually turned back on. This was a learning curve for me because I've spent so much time playing my warrior main, and his stance does not reset upon death. I had always assumed Paladins worked this way before I started playing one.
So I searched for an addon that would remind me when to change auras or alert me when I had no aura, but I was never happy with any that I tested. They were either too full of unwanted features or did not properly get my attention. So this morning I finally got around to trying to write my own DogTag. I've been using a handful of tags that I copied from forums and really liked the system. I must admit that I struggled with the syntax a lot and went through many broken renditions before I could get it to work according to my plan. The Test Area in Dog Tag Help is really fantastic for working out the kinks. While it seems to be functional, I would like to know if there might be ways to tighten it up or write it more elegantly.
The worst part by far for me was figuring out how to join the 3 sections of text together without getting syntax errors. I have no background in programming so I don't really understand the composition of the text, such as it's staggered layout, when to use carriage returns, when to enclose text in [ ] and the proper use of end. I searched though the help menus and the Wiki page and can't find a single reference to end, how it's used, and why. Would anybody care to shed some light on this for me?
[(if HasAura("Summon Charger") & (not HasAura("Crusader Aura")) then
Outline "Crusader Aura!":White:Angle
elseif HasAura("Crusader Aura") & (not HasAura("Summon Charger")) then
Outline "Change Aura!":White:Angle
elseif not HasAura("Devotion Aura") & not HasAura("Retribution Aura") & not HasAura("Concentration Aura") & not HasAura("Shadow Resistance Aura") & not HasAura("Frost Resistance Aura") & not HasAura("Fire Resistance Aura") & not HasAura("Crusader Aura") then
Outline "Missing Aura!":White:Angle
end)]
If you are mounted (on lvl 60 pally mount), and do not have Crusader Aura it will display. <Crusader Aura!>
If you dismount without turning off Crusader Aura it will display <Change Aura!>
If you have no Paladin Aura (because you died or right clicked the aura) it will display <Missing Aura!>
If you are using another mount, such as the Amani War Bear, then just substitute that in the tag.
[[if (unit = "player") then
(if AuraDuration("Slice and Dice") >= 30 then
AuraDuration("Slice and Dice"):Round:Green:Paren
elseif (AuraDuration("Slice and Dice") < 30) and (AuraDuration("Slice and Dice") >= 10) then
AuraDuration("Slice and Dice"):Round:Color("ffff00"):Paren
elseif (AuraDuration("Slice and Dice") < 10) and (AuraDuration("Slice and Dice") >= 5) then
AuraDuration("Slice and Dice"):Round:Color("ff8800"):Paren
elseif (AuraDuration("Slice and Dice") < 5) and (AuraDuration("Slice and Dice") > 0) then
AuraDuration("Slice and Dice"):Round:Red:Paren
else
""
end)
end]]
It might be a bit weird to quote myself, but I just finished with my new UI and I couldnt get this old tag running. It is supposed to show me time left for my SnD and it did so with my old UI, but it doesnt work anymore. It keeps giving my a syntax error. Any ideas why?
Edit: Yeah I got an idea why... The right tag was the one I was using on my old UI, not the one I posted back here. So I just copied it wrong from my original post...
Should someone want to try the "working" tag, its this one:
[[if (unit = "player") and HasAura("Slice and Dice") then
(if AuraDuration("Slice and Dice") >= 30 then
AuraDuration("Slice and Dice"):Round:Green:Paren
elseif (AuraDuration("Slice and Dice") < 30) and (AuraDuration("Slice and Dice") >= 10) then
AuraDuration("Slice and Dice"):Round:Color("ffff00"):Paren
elseif (AuraDuration("Slice and Dice") < 10) and (AuraDuration("Slice and Dice") >= 5) then
AuraDuration("Slice and Dice"):Round:Color("ff8800"):Paren
elseif (AuraDuration("Slice and Dice") < 5) and (AuraDuration("Slice and Dice") > 0) then
AuraDuration("Slice and Dice"):Round:Red:Paren
end)
end]]