Hey there, I’m currently trying to create a macro for an addon I use.
The addon requires me to paste in a NPC id eg: /lootz skinning 688
I managed to create a macro that prints my target npc’s id:
/run local longID=(select(6, strsplit("-", UnitGUID("target")))); local id=(strsplit(" ", longID)); print(id);
The Issue is now, I have no idea how to insert that into my /lootz skinning command without getting an error. Can anyone help please?
You’ll need to find the command that /lootz
is executing and call that directly.
The command should be something like:
/lootz skinning 886
886 being the id of the creature I want to check
You need the function the slash command executes.
I believe that it’s this?:
function obj:Skinning(index)
local name = obj:GetUnloadedCreatureName(index)
if (name == nil) then
name = “Unknown Skinning”
end
–log:Info(“Show loot for creature: " … name … " (” … index … “)”)
render:SetTargetData(“Skinning”, index, name)
render:Show()
end
I’m no expert on Blizzards UI but had a little play with it and couldn’t get it to work with that function, but does seem to work with the slash command function.
/run local longID=(select(6, strsplit("-", UnitGUID("target")))); local id="skinning " .. (strsplit(" ", longID)); SlashCmdList.LEDII_LZ(id);
Elvenbane might have a better solution, but this at least seems to work for me.
This worked perfectly thank you!
I really appreciate you both responding and helping me c:
Nice, haven’t seen that technique before.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.