function GetNumSetItemsEquipped(setID) -- From WeakAuras.GetNumSetItemsEquipped -- https://github.com/WeakAuras/WeakAuras2/blob/master/WeakAuras/Prototypes.lua#L969 if not setID or not type(setID) == "number" then return end local equipped = 0 local setName = GetItemSetInfo(setID) for i = 1, 18 do local item = GetInventoryItemID("player", i) if item and select(16, GetItemInfo(item)) == setID then equipped = equipped + 1 end end return equipped, 18, setName end