LIMIT = 100
def get_count(type=-1, color=-1, container=Backpack(), recurse=False):
FindTypeEx(type, color, container, recurse)
return FindCount()
total = Count(-1) # total items quantiry (if you have only 100gp in your pack, this will return 100)
if total > LIMIT:
AddToSystemJournal("total quantity: " + str(total) + " greater than LIMIT: " + str(LIMIT))
count = get_count()
if count > LIMIT:
AddToSystemJournal("quantity: " + str(count) + " greater than LIMIT: " + str(LIMIT))