WoW:API UnitIsFriend: Difference between revisions

upgraded deprecated template
(added: if not (UnitIsFriend("player","target")))
(upgraded deprecated template)
Line 1: Line 1:
{{wowapi}}
This function will determine if the target 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.
This function will determine if the target 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.


Line 17: Line 18:


:;Not IsFriend : /script if not (UnitIsFriend("player","target")) then SendChatMessage("%t is evil!","SAY","Orcish"); end; <br> This is to find if the target not is friendly with you (enemy). If you target an unfriendly target with the name "60Mage" this script will write "60Mage is evil!" in /s.
:;Not IsFriend : /script if not (UnitIsFriend("player","target")) then SendChatMessage("%t is evil!","SAY","Orcish"); end; <br> This is to find if the target not is friendly with you (enemy). If you target an unfriendly target with the name "60Mage" this script will write "60Mage is evil!" in /s.
----
{{template:WoW API}}
Anonymous user