Alert on item count
local CONFIG = {
Item = 'spear', -- Item to check. Id or name.
Count = 10, -- If lower than this then play sound.
Location = '', -- Container to check. Leave empty to check all open containers.
ConsiderEquipments = true, -- Should also count from equipments?
}
if connected() and itemcount(CONFIG.Item, CONFIG.Location, CONFIG.ConsiderEquipments) < CONFIG.Count then
playsound('default')
flashclient()
end