From ed9f31a89a50dbe33dbf975a5e92c4657e78a600 Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 15 Nov 2020 15:38:47 +0100 Subject: [PATCH] macrotweak: add /use and /equip command to vanilla --- modules/macrotweak.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/macrotweak.lua b/modules/macrotweak.lua index 94a22df2..f14ba406 100644 --- a/modules/macrotweak.lua +++ b/modules/macrotweak.lua @@ -17,4 +17,14 @@ pfUI:RegisterModule("macrotweak", "vanilla", function () userinput = nil end) end + + -- add /use and /equip to the macro api + _G.SLASH_PFUSE1, _G.SLASH_PFUSE2, _G.SLASH_PFUSE3, _G.SLASH_PFUSE4 = '/use', '/pfuse', '/equip', '/pfequip' + function _G.SlashCmdList.PFUSE(msg) + if not msg or msg == "" then return end + local bag, slot = FindItem(msg) + if bag and slot then + UseContainerItem(bag, slot) + end + end end)