Ad blocker interference detected!
Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers
Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.
→ WoW API
This function will determine whether two units are friendly to each other (i.e. able to help each other in combat).
isFriend = UnitIsFriend("unit","otherunit");
- Boolean flag - 1 if otherunit is friendly to unit; nil otherwise.
The following snippet outputs a message when the player has a hostile target.
if UnitExists("target") and not UnitIsFriend("player", "target") then print(UnitName("target") .. " is evil! Run!"); end