WoW:API UnitIsFriend: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
If the second parameter is "target" and nothing is targeted, this function returns <tt>nil</tt>. | If the second parameter is "target" and nothing is targeted, this function returns <tt>nil</tt>. | ||
Note: returns either nil or 1, not a boolean value. | |||
[[Category:API Functions|UnitIsFriend]] | [[Category:API Functions|UnitIsFriend]] | ||
[[Category:API Unit Functions|UnitIsFriend]] | [[Category:API Unit Functions|UnitIsFriend]] |
Revision as of 15:45, 30 October 2005
/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.
Note: returns either nil or 1, not a boolean value.