

The macro couldn't be generated in combat, but it could be run. The first would be to write an add-on which dynamically generates macros containing the desired name. There are a couple of ways to work around this, but they aren't great. Fluffy Bunny) or a "unit ID" (which work like variables, but are set by the game's internal code).įinally, raid target icons can only be set on unit IDs as well, making it impossible to set a raid target icon on a unit whose name isn't stored in the macro (or available via a unit ID). Instead, they accept either a literal unit name (e.g. The second part of the problem is that none of those commands support the use of Lua variables (those are what you can set in a macro).

As a result, changing your target can only be done via built-in slash commands like /assist and /target. the built-in interface), not by addons or via the /run command. The first part of the problem is that all of the targeting functions are protected, meaning they can only be called by "secure" code (i.e. I hate to be the bearer of bad news, but what you are asking for cannot be done, as it runs afoul of Blizzard's anti-botting/-scripting security measures. But I suspect the answer to what you are trying to ask is "Sorry, you cannot do that." If this is the thing you are trying to do, then I could go into more detail on how to use Focus to store off a target for later use. A lot of Crowd Control macros use Focus for exactly this purpose. In order to do something like that, you would need to store the mob in question as a Focus, then later target your Foucs. There is no way, for example, to set a Skull raid icon on something and then later target it by virtue of it simply having the Skull icon over it. Indirect access ("party2target," "targettarget," "pettarget").You can't do like "Set my target as the KILLTHIS variable" and then later "Target KILLTHIS." There is no way to "store" a target for future use in an arbitrary variable. Perhaps an example of a situation where this macro could be used would help? You could be a little more specific about what you want.
