LunaUnitFrames

LunaUnitFrames

268k Downloads

Mouseover unit name in 1.12 (still supporting?)

lvangh opened this issue · 2 comments

commented

Hello,

I'm trying to get the unitname of the MO target in 1.12. If you are not supporting this anymore I understand.

For example:
/run local mo,cd,t=GetMouseFocus().unit,179,GetTime() if t-cd >= (T or 0) then T = t SendChatMessage("Attempting BOP on "..mo,SAY)end

But this returns "player" or "target" or "targettarget". Is there a way to get the actual name back? I tried GetMouseFocus().unitname but that didn't work.

commented

UnitName(GetMouseFocus().unit)

commented

Thank you, I made this. Hope you're proud :P Reports attempted target and their current HP (and prevents message spam)

/run local mon,moh,cd,t=UnitName(GetMouseFocus().unit),UnitHealth(GetMouseFocus().unit),179,GetTime() if t-cd >= (T or 0) then T = t SendChatMessage("Attempting BOP on "..mon.." at "..moh.." HP",PARTY)end
/lunamo Blessing of Protection