Floor crafting with identical items

I'm soon going to add the ability to combine spell scrolls to Arcana, where combining two spell scrolls of the same spell and level will add one level (up to a maximum) and get rid of one of the scrolls. I have the technical know-how for most of this, but I am not sure what the best way to detect two of the same item is. Any tips?
Continue to help post