Page 1 of 1

Say my targets name/class/race macro

PostPosted: Mon Mar 14, 2016 4:47 pm
by Simonich
Anyone have such macro?

I want to be able to do raid warning of the name/class and race of the person im targetting.
Or at least just the name.

Any idea?

Also a macro which will target the target of another specific person instantly.

Thank you

Re: Say my targets name/class/race macro

PostPosted: Mon Mar 14, 2016 5:12 pm
by AfterAfterlife
Here's what you need:
  • UnitName("target")
  • UnitClass("target")
  • UnitRace("target")

A simple macro that combine all of this would be something like this:
Code: Select all
/script SendChatMessage("Warning: " ..UnitName("target").. " - " ..UnitRace("target").. " " ..UnitClass("target").. " - You are in the fire!", "RAID");

Output: (let's say you are targeting "Mr.Stone")
"Warning: Mr.Stone - Orc Warrior - You are in the fire!"


To target a target of someone else, you use:
  • TargetByName("name")
  • TargetUnit("unit")

For example, you want to target the target of Mr.Water, do this:
Code: Select all
/script TargetByName("Mr.Water"); TargetUnit("targettarget");