itemoftypeinbags

Returns the given item is in the players bags.

itemsoftypeinbags(type, subtype) : [itemids]
-- alts
itemsOfTypesInBags(type, subtype) : [itemids]
itemsoftype(type, subtype) : boolean

Example

if itemoftypeinbags(HealthStone) then
return cast(HealthStone, 'player')
end

Note

-- see https://wow.gamepedia.com/ItemType for a list of usable type constants