I built a town in Minecraft, and I want to add a currency system. I know you can test for exactly a certain number with /execute; however, it's very annoying to have to sort out EXACTLY the amount needed to buy something. So my question: Is there a way to test for 3 or more of an item? Like, if you're holding 64 currency and the item you're buying costs 3?
What i would do is use some form of container for a player to put the currency into and then use a repeating command block with always active on and then put in the command
replaceitem blocks <pos:x y z> slot.container <container slot number> currency 3
Then put a chain command block in front of the arrow on the repeating command block and set it to: conditional then put in the command
replaceitem @p <slot number> 61
And just have a whole set of command blocks that just give back however much they put in - however much it costs = result, or just use a villager to sell stuff to people but by giving it custom trades look to the wiki for this or use xp as currency and again look at the wiki for this one as well