MV Custom Shop

Hi makers. So, I'm traying to make a custom shop where the stock of the itens are determined by a x amout of another itens. The context is: in my game, there's an alchemist that makes itens if you gave him x amout of another itens. Ex: if you gave him 5 coal, his shop will seal 1 powdered coal. If you gave him 10, will seal 2. If you gave him 6, he will seal one. Is there a way to make this with event or there's a free plugin out there?
this cold help

thanks

I get it with BO_CustomShops.js.

Original thread: https://forums.rpgmakerweb.com/threads/custom-shop.177653/