There is no function called
TargetSpecific. For a list of known functions (not all of them documented unfortunately) see
this RoMWiki page.
For a tutorial on creating macros, try
this one (shameless self-plug).
Now as for your particular question, as far as I know there isn't a way to just target a specific named PC/NPC/Mob. But that doesn't mean it can't be done at all.
Basically, the idea is to target a mob, see if it is the creature you actually want and if not, select a new target. We can't do this continuously or the game would freeze up while it tries to find your target, so we'll limit it to 10 tries.
|
Source code
|
1
2
|
/run for i=1,10 do TargetNearestEnemy() if UnitName("target")=="[I][B]Mob Name Here[/B][/I]" then break end end
/run if UnitName("target")~="[I][B]Mob Name Here[/B][/I]" then TargetUnit("") end
|
Change the
Mob Name Here part to the appropriate creature name.
The above should work for mobs and other enemies (that is, stuff you can normally TAB-target). To target friendly units and NPCs, change
TargetNearestEnemy() to
TargetNearestFriend().