/script SendChatMessage(("%s @ %.1f%% of %f"):format((UnitName(“target”)),(UnitHealth(“target”)/UnitHealthMax(“target”))*100),(UnitHealth(“target”)),“SAY”,“DARNASSIAN”,1)
For some reason, it doesn’t work. I just added the language to make it more interesting. What way could I make it so that it only displays a system message in my chat box?
/run local s = UnitName("target") and string.format("%s @ %.1f%% of %f", UnitName("target"), (UnitHealth("target")/UnitHealthMax("target"))*100, UnitHealth("target")) or "no target" SendChatMessage(s, "SAY")
to test without sending to chat,
/run local s = UnitName("target") and string.format("%s @ %.1f%% of %f", UnitName("target"), (UnitHealth("target")/UnitHealthMax("target"))*100, UnitHealth("target")) or "no target" print(s)
1 Like
%thp
https://www.curseforge.com/wow/addons/macro-talk
1 Like