Elitist Jerks
Register
Blogs
Chat
Forums
New Posts


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

Welcome to Elitist Jerks
If this is your first visit, please be sure to check out the FAQ and the forum rules. Users must register to post and new registrations are subject to a one day "mute" period to get acquainted with the community. To start viewing messages, select the forum that you want to visit from the selection below.

Reply
 
LinkBack (110) Thread Tools
Old 06/01/08, 6:18 PM   #301 (permalink)
Don Flamenco
 
Dwarf Hunter
 
Kul Tiras
Originally Posted by Grital View Post
Someone had a good idea in the thread earlier, but it throws a syntax error and I didn't see anyone ever fix it. His initial code was

[if not PVP(unit="player") then
    if((HasAura("Alchemist's Stone",unit="player") & MissingMP >= 3080) then "Mana Pot!" end)
    if((not(HasAura("Alchemist's Stone",unit="player")) & MissingMP >= 2200) then "Mana Pot!" end)
end]
I can't get it to work either. Anyone have any ideas? It'd be nice to only use mana pots when I can get the full (potential) effect.

Also I can modify any finished code in this to work with Mana Tide to, put it on my group frames etc., that'd be nice.
This works:

[((not PVP) & (( (not HasAura("Alchemist's Stone")) & MissingMP >= 2200 ) | (MissingMP >= 3080) ) ) ? "Mana Pot!" ]

here's mana tide tag:

[((not PVP) & (PercentMP < 76)) ? "Mana Tide!"]
 
User is offline.
Reply With Quote
Old 06/01/08, 8:11 PM   #302 (permalink)
Glass Joe
 
Human Warrior
 
Uldaman
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?
 
User is offline.
Reply With Quote
Old 06/02/08, 11:54 AM   #303 (permalink)
Glass Joe
 
Tauren Warrior
 
Bloodfeather (EU)
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 View Post
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).
 
User is offline.
Reply With Quote
Old 06/02/08, 12:28 PM   #304 (permalink)
Piston Honda
 
Gnome Rogue
 
Dalaran
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?
 
User is offline.
Reply With Quote
Old 06/02/08, 12:54 PM   #305 (permalink)
Glass Joe
 
Tauren Warrior
 
Bloodfeather (EU)
Originally Posted by dinesh View Post
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.
 
User is offline.
Reply With Quote
Old 06/02/08, 1:05 PM   #306 (permalink)
Snapple! (apple + tin)
 
Andrast's Avatar
 
Draenei Shaman
 
Thaurissan
Originally Posted by Darhuuk View Post
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.
 
User is offline.
Reply With Quote
Old 06/02/08, 2:18 PM   #307 (permalink)
Glass Joe
 
Tauren Warrior
 
Bloodfeather (EU)
Originally Posted by Andrast View Post
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.

Thanks for the tip!

Last edited by Darhuuk : 06/02/08 at 2:56 PM.
 
User is offline.
Reply With Quote
Old 06/02/08, 2:48 PM   #308 (permalink)
Piston Honda
 
Gnome Rogue
 
Dalaran
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.
 
User is offline.
Reply With Quote
Old 06/03/08, 12:58 AM   #309 (permalink)
Snapple! (apple + tin)
 
Andrast's Avatar
 
Draenei Shaman
 
Thaurissan
Originally Posted by Darhuuk View Post
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.
 
User is offline.
Reply With Quote
Old 06/05/08, 9:46 AM   #310 (permalink)
Glass Joe
 
Night Elf Rogue
 
Kil'Jaeden (EU)
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...
 
User is offline.
Reply With Quote
Old 06/07/08, 3:06 AM   #311 (permalink)
Von Kaiser
 
Troll Hunter
 
Area 52
Trying to make a simple range check for my hunter. If I am in range, it shows a "+", if I am out of range, it shows a "-". So far I have this:

[if Range <= 35 then
    '+'
else
    '-'
end]
It is acting weird though.

From 0-8 yards it works properly, showing a +.
From 9-28 yards it shows a -.
From 29-35 it shows a +.
From 35+ it shows a -.

What is it about the 9-28 yard range would cause it to show a -?
 
User is offline.
Reply With Quote
Old 06/08/08, 5:39 PM   #312 (permalink)
n00b
 
Houseplant's Avatar
 
Undead Rogue
 
Quel'dorei
I am trying to figure out a way to have CowTip show what zone the target is in, but I see no way to do this. Can anyone help?

 
User is offline.
Reply With Quote
Old 06/09/08, 11:16 AM   #313 (permalink)
Don Flamenco
 
Dwarf Hunter
 
Kul Tiras
Originally Posted by Houseplant View Post
I am trying to figure out a way to have CowTip show what zone the target is in, but I see no way to do this. Can anyone help?
[Zone] works for me.
 
User is offline.
Reply With Quote
Old 06/09/08, 1:19 PM   #314 (permalink)
Von Kaiser
 
Fulnir's Avatar
 
Blood Elf Priest
 
Mazrigos (EU)
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 :/

Here's the tag:
[(MissingHP > 0) & ([(HP >= MaxHP * 0.8) & (IsPlayer ? (-MissingHP):Hide(0):Color("00BB00") ! (HP:Short:Color("00BB00") "/":Color("FFFFCC") MaxHP:Short:Color("00BB00")))] [((HP < MaxHP * 0.8) >= MaxHP * 0.5) & (IsPlayer ? (-MissingHP):Color("FFFF66") ! (HP:Short:Color("FFFF66") "/":Color("FFFFCC") MaxHP:Short:Color("FFFF66")))] [(HP < MaxHP * 0.5) & (IsPlayer ? (-MissingHP):Color("ff7f7f") ! (HP:Short:Color("ff7f7f") "/":Color("FFFFCC") MaxHP:Short:Color("ff7f7f")))] " | ":Color("FFFFCC"))] [(IsPlayer ? (IsMouseOver & (HP:Short "/" MaxHP:Short):Color("FFFFCC"))) (IsPlayer ? (~IsMouseOver & PercentHP:Percent:Color("FFFFCC")) ! PercentHP:Percent:Color("FFFFCC"))]
Thank you
 
User is offline.
Reply With Quote
Old 06/09/08, 1:40 PM   #315 (permalink)
Glass Joe
 
Draenei Shaman
 
Kel'Thuzad
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.

Last edited by Moloko : 06/09/08 at 3:15 PM.
 
User is offline.
Reply With Quote
Old 06/10/08, 7:41 PM   #316 (permalink)
n00b
 
Houseplant's Avatar
 
Undead Rogue
 
Quel'dorei
In CowTip I have a DogTag that shows the guild, but when someone is unguilded it leaves an open space between two other lines.

[(Guild = 'player':Guild ? Cyan) Guild:Angle]
That is the DogTag, but I don't see how that can have anything to do with there being a space when someone is unguilded. Any help?

 
User is offline.
Reply With Quote
Old 06/11/08, 8:30 AM   #317 (permalink)
Von Kaiser
 
Human Paladin
 
Zirkel des Cenarius (EU)
Again a request for help by me.

I plan to use Statblocks which has a Statblocks_DogTags thing.

Now what would interesst me as a tank is: Am I uncrushable?

There is this macro:

/script DEFAULT_CHAT_FRAME:AddMessage("Need 102.4 combined avoidance. Currently at:",0.8,0.8,1)
/script DEFAULT_CHAT_FRAME:AddMessage(GetDodgeChance()+GetBlockChance()+GetParryCha
nce()+5+(GetCombatRating(CR_DEFENSE_SKILL)*150/355 + 20)*0.04,1,0.5,0)

Is it possible to create a dog tag for this? Or no wai?
 
User is offline.
Reply With Quote
Old 06/11/08, 4:29 PM   #318 (permalink)
Von Kaiser
 
Nataliah's Avatar
 
Night Elf Hunter
 
Terenas
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.

Last edited by Nataliah : 06/11/08 at 5:24 PM.
 
User is offline.
Reply With Quote
Old 06/12/08, 12:44 AM   #319 (permalink)
Glass Joe
 
Winco's Avatar
 
Orc Shaman
 
Stonemaul
Originally Posted by Moloko View Post
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.
 
User is offline.
Reply With Quote
Old 06/19/08, 11:36 AM   #320 (permalink)
Glass Joe
 
Draenei Shaman
 
Fenris
Trying out my new Shammy Shield Timers on pitbull. Thanks to Lorienne for the origin of the code.

Focus Earth Shield



[Outline][(if AuraDuration("Earth Shield") then
    AuraDuration("Earth Shield"):FormatDuration("f"):Green
end) "    " (if NumAura("Earth Shield") = 6 then
    "ES6":Green
elseif NumAura("Earth Shield") = 5 then
    "ES5":Green
elseif NumAura("Earth Shield") = 4 then
    "ES4":Yellow
elseif NumAura("Earth Shield") = 3 then
    "ES3":Yellow
elseif NumAura("Earth Shield") = 2 then
    "ES2":Red
elseif NumAura("Earth Shield") = 1 then
    "ES1":Red
elseif NumAura("Earth Shield") = 0 then
    "ES Gone":Gray
end)]

Player Earth Shield



[Outline][(if AuraDuration("Earth Shield", unit="player") then
    AuraDuration("Earth Shield"):FormatDuration("f"):Green
end)]
 [if NumAura("Earth Shield") = 6 then
    "ES6":Green
elseif NumAura("Earth Shield") = 5 then
    "ES5":Green
elseif NumAura("Earth Shield") = 4 then
    "ES4":Yellow
elseif NumAura("Earth Shield") = 3 then
    ".ES3":Yellow
elseif NumAura("Earth Shield") = 2 then
    "ES2":Red
elseif NumAura("Earth Shield") = 1 then
    "ES1":Red
elseif NumAura("Earth Shield") = 0 then
    "ES Gone":Gray
end]
Water Shield



[Outline][(if AuraDuration("Water Shield", unit="player") then
    AuraDuration("Water Shield"):FormatDuration("f"):Green
end)]
 [if NumAura("Water Shield") = 3 then
    "WS 3":Fuchsia
elseif NumAura("Water Shield") = 2 then
    "WS 2":Yellow
elseif NumAura("Water Shield") = 1 then
    "WS 1":White
elseif NumAura("Water Shield") = 0 then
    "WS Gone":Gray
end]

Lightning Shield



[Outline][(if AuraDuration("Lightning Shield", unit="player") then
    AuraDuration("Lightning Shield"):FormatDuration("f"):Green
end)]
[(if NumAura("Lightning Shield") = 3 then
    "LS 3":Blue
elseif NumAura("Lightning Shield") = 2 then
    "LS 2":Cyan
elseif NumAura("Lightning Shield") = 1 then
    "LS 1":White
elseif NumAura("Lightning Shield") = 0 then
    "LS Gone":Gray
end)]
No Shields on


Last edited by tyeni : 06/19/08 at 11:50 AM.
 
User is offline.
Reply With Quote
Old 06/20/08, 5:04 AM   #321 (permalink)
Piston Honda
 
Led ++'s Avatar
 
Tauren Druid
 
Vek'nilash (EU)
Hi there, currently my party frames look like:


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.

http://thepiratebootybay.com/ THE best Addon site out there!
 
User is offline.
Reply With Quote
Old 06/20/08, 8:08 AM   #322 (permalink)
Glass Joe
 
Blood Elf Paladin
 
Shattered Hand (EU)
Originally Posted by tyeni View Post
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 ++