View Single Post
05-31-11, 10:17 AM   #11
jurundo
Banned
Join Date: May 2011
Posts: 9
I don't pretend I am good at that, but here is what I found.
TargetLastEnemy() - Selects the last targetted enemy as the current target.
TargetLastTarget() - Selects the last target as the current target.
TargetNearestEnemy([reverseFlag]) - Selects the nearest enemy as the current target.
TargetNearestEnemyPlayer([reverseFlag]) - Selects the nearest enemy player as the current target.
TargetUnit("unit") - Selects the specified unit as the current target.
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.

If we use these together we can make my macros work.

All I wonder now is if there is something which focus instead of targeting; even if it happens to not be the case, I am sure we can use the /focus command in some other way instead.

Yes, since I am editing, please find below what the macro could look like (note that there must be some huge scripting mistakes since I don't know much about that; all I want is to give an idea of what I am conceiving).

/script target = t, focus = f, if UnitPlayerControlled(t) and UnitExists(t) and UnitIsUnit(t, f) = false then runmacro "/focus" end
/targetenemyplayer

Last edited by jurundo : 05-31-11 at 10:43 AM.
  Reply With Quote