Macro If (UnitIsPlayer("target")) Help
Posted: Thu Mar 24, 2016 11:11 pm
Hi, I have some code really close to work but I'm stuck with the if the target is a player or a npc.
What I want is something like this:
...but that doesn't work.
Thanks for the help.
What I want is something like this:
- Code: Select all
/run If(UnitIsPlayer("target")) then
SendChatMessage(UnitName("target").." is a level "..UnitLevel("target").." "..UnitRace("target").." "..UnitClass("target").." player.")
Else
SendChatMessage(UnitName("target").." is a level "..UnitLevel("target").." NPC.")
End
...but that doesn't work.
Thanks for the help.