PHP Code:
local a =CreateFrame("Frame")
a:SetScript("OnEvent", function(self)
local index = GetMacroIndexByName("Nitro")
if index == 0 then
index = CreateMacro("Nitro", 1, "", 1)
end
local bootLink = GetInventoryItemLink("player", (GetInventorySlotInfo("FeetSlot")))
local bootName, bootID = (GetItemInfo(bootLink)), tonumber(bootLink:match("|Hitem:(%d+):"))
local beltName = GetItemInfo(GetInventoryItemLink("player", (GetInventorySlotInfo("WaistSlot"))))
local macrotext
if bootID == 35581 then
macrotext = "#showtooltip\n/castsequence reset=300 "..bootName..","..beltName
else
macrotext = "#showtooltip\n/use "..beltName
end
EditMacro(index, nil, nil, macrotext)
end)
a:RegisterEvent("PLAYER_ENTERING_WORLD")
a:RegisterEvent("UNIT_INVENTORY_CHANGED")
How to use. Un Tested. Report back with issues.
Should create a macro called "Nitro" that either does a /castsequence if boots are equipped, otherwise simply uses the belt.
EDIT: Tested, squashed two minor bugs.