Say my targets name/class/race macro

Say my targets name/class/race macro

by Simonich » Mon Mar 14, 2016 4:47 pm

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
Was good to have you all

Hail The Red Dawn <3
User avatar
Simonich
Legionnaire
Legionnaire
 

Re: Say my targets name/class/race macro

by AfterAfterlife » Mon Mar 14, 2016 5:12 pm

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");
AfterAfterlife
Grunt
Grunt
 


Return to Addons & macros