WoW:API UnitIsFriend

From AddOn Studio
Revision as of 23:05, 14 July 2005 by WoWWiki>Earen
Jump to navigation Jump to search

/script if (UnitIsFriend("player","target")) then AssistUnit("target"); end

Note: in the context of this function, "friend" is any PC in your faction or any NPC that is friendly towards you (i.e. is green if you target it). It has nothing to do with whether you have added the unit to your friends list or not.

If the second parameter is "target" and nothing is targeted, this function returns nil.