Elitist Jerks
Register
Blogs
Forums


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

Reply
 
LinkBack Thread Tools
Old 06/01/08, 5:18 PM   #301
Gearknight
Piston Honda
 
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!"]

Offline
Reply With Quote
Old 06/01/08, 7:11 PM   #302
Kiyathel
Glass Joe
 
Human Mage
 
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?

Offline
Reply With Quote
Old 06/02/08, 10:54 AM   #303
Darhuuk
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).

Offline
Reply With Quote
Old 06/02/08, 11:28 AM   #304
dinesh
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?

Offline
Reply With Quote
Old 06/02/08, 11:54 AM   #305
Darhuuk
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.

Offline
Reply With Quote
Old 06/02/08, 12:05 PM   #306
Andrast
DFTBA
 
Andrast's Avatar
 
Draenei Shaman
 
Frostmourne
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.

Australia Offline
Reply With Quote
Old 06/02/08, 1:18 PM   #307
Darhuuk
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 1:56 PM.

Offline
Reply With Quote
Old 06/02/08, 1:48 PM   #308
dinesh
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.

Offline
Reply With Quote
Old 06/02/08, 11:58 PM   #309
Andrast
DFTBA
 
Andrast's Avatar
 
Draenei Shaman
 
Frostmourne
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.

Australia Offline
Reply With Quote
Old 06/05/08, 8:46 AM   #310
Caladnei
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...

Offline
Reply With Quote
Old 06/07/08, 2:06 AM   #311
bimmian
Von Kaiser
 
Tauren Shaman
 
Darkspear
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 -?

Offline
Reply With Quote
Old 06/08/08, 4:39 PM   #312
Houseplant
Glass Joe
 
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?

Offline
Reply With Quote
Old 06/09/08, 10:16 AM   #313
Gearknight
Piston Honda
 
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.

Offline
Reply With Quote
Old 06/09/08, 12:19 PM   #314
Fulnir
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

Offline
Reply With Quote
Old 06/09/08, 12:40 PM   #315
Moloko
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 2:15 PM.

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
[DogTags] - Share yours! Fulnir User Interface and AddOns 164 03/30/08 1:30 AM