A big hurdle to an automated saving process is the game doesn't keep track of what your current set is. Gear overlap also does happen a lot while leveling and edge cases start to appear where an automated process would start choosing the wrong equipment set to overwrite, especially if multiple pieces were to be replaced in the intended set.
As there is no existing macro command to save an equipment set. You'll still have to run a Lua script to do the task. Embedding this in a macro eats up a lot of the 255 character limit even if it's possible to compress the code to fit. That's on top of the space you're already using for your existing macro.
My suggestion is a hybrid approach. An addon would register a slash command that you can call from your macro for customizability. This uses the existing
EQUIP_SET command as a template.
Lua Code:
function SlashCmdList.SAVE_SET(msg)
local name=SecureCmdOptionParse(msg);
if name and name~="" then
local id=C_EquipmentSet.GetEquipmentSetID(name);
if id then C_EquipmentSet.SaveEquipmentSet(id); end
end
end
SLASH_SAVE_SET1="/saveset";
You'll be able to call this from a macro using
/saveset. It has macro conditional support through the use of
SecureCmdOptionParse().
Example:
Code:
/saveset [spec:1] Tank; DPS