Quantcast
WoWInterface - View Single Post - Converting old Dogtags in Pitbull 4 to LuaTexts
View Single Post
07-30-21, 12:44 AM   #1
Caspa
A Kobold Labourer
Join Date: Jul 2021
Posts: 1
Converting old Dogtags in Pitbull 4 to LuaTexts

Hi all,

I had a couple of old Dogtags that worked fine back in the day, but are no longer supported in Pitbull 4
They are very simple at their core, I just want a coloured letter representing what HOTs I have on the target
And another to show a red letter when there is no MoTW/GoTW and a yellow letter when it's got less than 5mins

MoTW Dogtags used to look like this:

if((HasAura("Mark of the Wild") and (AuraDuration("Mark of the Wild) < 300)) or (HasAura("Gift of the Wild") and (AuraDuration("Gift of the Wild) < 300))) then "M":Yellow elseif(HasAura("Mark of the Wild") or HasAura("Gift of the Wild")) then "M":Green else "M":Red end

The other one I seem to have misplaced but basically the same as above with L1/L2/L3 representing Lifebloom, R for rejuvenation, and RG for Regrowth
I've had a go at creating it (based on a few working examples of similar but not quite the same things):

Code:
local l = ""
local r = ""
local rg = ""
local i = 1

while true do
 local name, _, _, _, count, _, _, caster = UnitAura(unit,i,"HELPFUL")
 if not name then
  break
 elseif name == "Rejuvenation" then
 r = "R"
 end
 elseif name == "Regrowth" then
 rg = "RG"
 end
 elseif name == "Lifebloom" then
  if count == "1" then l = "L1"
  end
  elseif count == "2" then l = "L2"
  end
  elseif count == "3" then l = "L3"
  end
 end
 i=i+1
end

return "|cffff0000%s|r", l, "|cff00ffff%s|r", rg, "|cff00ff00%s|r", r
end
But it doesn't work, I cannot for the life of me figure out why. I'm sure I'm being dumb and it's really obvious, any help greatly appreciated!
  Reply With Quote