Pitbull & Lua - Weakened Soul
Hello =)
I have a peice of lua code for my pitbull frames which shows me as a healer my important buffs etc. I am absolutely rubbish with Lua and picked the code up somewhere on the web (Ty!). I have been trying to incorporate the Weakened Soul Debuff but I just can not get it to work =( I have hit a dead end and for the life of me can not work it out and I was hoping some nice person browsing this forum may be able to shed some light on it for me and put me out of my misery! Being a disc priest I have to see this debuff! ;) This is my code: local text = "" local count if UnitAura(unit, "Renew") ~= nil then text = text .. format("|cffffff00%s|r", " R ") end if UnitAura(unit, "Fear Ward") ~= nil then text = text .. format("|cff00ff00%s|r","FW ") end if UnitAura(unit, "Prayer of Mending") ~= nil then text = text .. format("%s","PoM ") end if UnitAura(unit, "Power Word: Shield") ~= nil then text = text .. format("|cffffff00%s|r","PW:S ") end if UnitAura(unit, "Pain Suppression") ~= nil then text = text .. format("|cff00ff00%s|r","PS ") end if UnitAura(unit, "Soulstone Resurrection") ~= nil then text = text .. format("|cff00ff00%s|r","SS ") end if UnitAura(unit, "Beacon of Light") ~= nil then text = text .. format("|cff00ff00%s|r","BoL ") end if UnitAura(unit, "Hand of Protection") ~= nil then text = text .. format("|cff00ff00%s|r","HoP ") end if UnitAura(unit, "Lifebloom ") ~= nil then _,_,_,count = UnitAura(unit, "Lifebloom") text = text .. format("|cffffff00%s|r[%d]","LB",count) end return text Any help offered I sincerely appreciate! =) |
I've got a similar set up with lua texts though I really need to tidy it up. I found that Weakened Soul had to have UnitAura(unit,i,"HARMFUL") to work, without the "HARMFUL" I couldn't get it to show. But that's with a disclaimer that I only dabble at the edges of lua, tweaking my local copies of addons to suit me, and don't know that much about it.
|
"Weakened Soul" is actually a debuff, so Terranell is absolutely right, you'll have to add the "HARMFUL"-flag, because without it, "HELPFUL" is implicitly set.
|
Hiya and ty for the replies! =)
Regarding 'Harmful' that is the information I found when googling, but no matter how I put it in (copying pieces of code here and there) it just would never work =( Mostly what I had was something like this: if UnitAura(unit, "Weakened Soul") ~= nil "Harmful" then text = text .. format("|cffffff00%s|r", "WS") end Again, I really have no idea what im doing when it comes to Lua I just love to tinker with it ;) |
Have you tried
if UnitAura(unit, "Weakened Soul","HARMFUL") ~= nil then text = text .. format("|cffffff00%s|r", "WS") end As a side note, can anyone explain what the benefits are to ~= nil over == true in terms of checking auras? |
It should work with
lua Code:
Quote:
Quote:
But a name - a string to be specific - is something different than "nil", so you can check if it is not nil. |
ahh thanks :D
|
Still not working, ty both for your help! I copied and pasted both of your codes but nope nothing =( I just cant see what im doing wrong, everything else shows up fine, its just the Weakened Soul.
I really want to find an answer to this as mentioned im a disc priest so its just not something I can do without! ;) Ty again :) |
All times are GMT -6. The time now is 10:11 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI