View Single Post
05-31-11, 01:11 PM   #13
jurundo
Banned
Join Date: May 2011
Posts: 9
I've checked and it seems you are right, the targeting functions are protected but the functions dealing with units are not.
UnitExists("unit") - Returns 1 if the specified unit exists, nil otherwise. UnitIsEnemy("unit", "otherUnit") - Returns true if the specified units are enemies, false otherwise.
UnitIsFriend("unit", "otherUnit") - Returns true if the specified units are friends (PC of same faction or friendly NPC), false otherwise.
UnitIsUnit("unit", "otherUnit") - Determine if two units are the same unit.
UnitPlayerControlled("unit") - Returns true if the specified unit is controlled by a player, false otherwise.
Is there some way to use them?
Something which would look like what is below:
/script "s" target=t, focus=f, UnitIsUnit(t, f) = true, end
/focus [s]
  Reply With Quote