Now that I'm back from work, let me butt in again.
Since you hadn't specified what you wanted the ID targeting for, I just assumed a general case. But since you want to do a kind of TAB targeting but only actually target based on a GUID, then that is in fact possible.
Basically you would want to modify the "target by name" or "target only players" macro to "target by GUID" instead. Something like this should do the trick:
|
Source code
|
1
2
|
/run foundIt=false for i=1,10 do TargetNearestEnemy(IsShiftKeyDown()) if UnitExists("target") and UnitGUID("target") == [I]IDToLookFor[/I] then foundIt=true break end end
/run if not foundIt then TargetUnit("") end
|
Replace the
IDToLookFor with the GUID you want to look for.
A slight variation on this code could allow you to define an array of GUIDs to look for and allow targeting any of them. The only problem would be getting the list into the game since macros are only run via user interaction. Though you might want to check my macro guide since it does cover some of this aspect as well.
Anyway, you would define the list like this (much like the silence list in DIYCE):
|
Source code
|
1
2
3
4
5
|
ListOfGUIDS = {
[I]ID1[/I] = true,
[I]ID2[/I] = true,
[I]ID3[/I] = true,
}
|
where the
IDx are the GUIDs themselves.
Then the macro would become:
|
Source code
|
1
2
|
/run foundIt=false for i=1,10 do TargetNearestEnemy(IsShiftKeyDown()) if UnitExists("target") and ListOfGUIDS[UnitGUID('target')] then foundIt=true break end end
/run if not foundIt then TargetUnit("") end
|
The cute thing with this is if you wanted to temporarily remove an ID from being targeted, you could simply set the entry to
false instead of
true and the entry would then be ignored. More GUIDs could be added to the list and the macro wouldn't need to change.
Edit:
For the stuff that isn't actually TAB targetable, you might try
TargetUnit("mouseover"). This'll target whatever the mouse is currently hovering over. Would of course require you to move the mouse over the mob, but at least it is one method.
Edit 2:
Forgot to mention. You would want to do the mouseover trick with the UnitGUID() thing so you could modify the macro like so:
|
Source code
|
1
2
3
|
/run foundIt=false if UnitExists("mouseover") and ListOfGUIDS[UnitGUID('mouseover')] then TargetUnit("mouseover") foundIt=true end
/run if not foundIt then for i=1,10 do TargetNearestEnemy(IsShiftKeyDown()) if UnitExists("target") and ListOfGUIDS[UnitGUID('target')] then foundIt=true break end end end
/run if not foundIt then TargetUnit("") end
|