If you want to use the funciton but it is local, just copy&paste it to your code?
Lua Code:
local function IsItemAlreadySlottedToCraft(inventorySlot)
local bag, slot = ZO_Inventory_GetBagAndIndex(inventorySlot)
if SYSTEMS:IsShowing("alchemy") then
return SYSTEMS:GetObject("alchemy"):IsItemAlreadySlottedToCraft(bag, slot)
elseif ZO_Enchanting_IsSceneShowing() then
return ZO_Enchanting_GetVisibleEnchanting():IsItemAlreadySlottedToCraft(bag, slot)
elseif ZO_Smithing_IsSceneShowing() then
return ZO_Smithing_GetActiveObject():IsItemAlreadySlottedToCraft(bag, slot)
elseif ZO_RETRAIT_STATION_MANAGER:IsRetraitSceneShowing() then
return SYSTEMS:GetObject("retrait"):IsItemAlreadySlottedToCraft(bag, slot)
end
return false
end