Recycle Used Potion Bottles?

Hola,

Can anyone point me to a script that would allow the players to gain an item upon using an item? I would like to be able to have potion/apothecary bottles be retained after a potion is consumed, so that you can sell them back to the potion-making-people and get your next order at a discount. Problem is, I'm not sure the best way to do that. So.... Yeah, any help would be greatly appreciated. =)

Thank you muchly!
Not trying to discourage you from using a script, if that's what you want, but it's not necessary.

In the database, when you are creating an item, there is an "effects" box. When you click to add an effect, the last tab "Other" allows you to call a common event. You could create a common event that adds an empty bottle item when the potoin item is used.
And for the discounts, you can make this:

- Have a potion A with the standard price:
- Have a potion B (which is the same that potion A) with the reduced price
- On the shop, put a conditional branch that need to check if you have a bottle item
- On the "bottle branch" you have to make a shop processing with the potion B
- On "else", you have to make a shop processing with the potion A
Ah! Having spent the remainder of my lunch watching a tutorial on Common Events and feeling silly afterwards, I am now enlightened.
THANK YOU, mlogan!

Ack, a reply while I was replying. Thank you as well, CamusVerseaux!
@Anthro7 I can say from personal experience that that light pink font is almost unreadable on my phone.
Function above form - please edit it to black so that everyone can read it, not matter what device or what quality monitor they're using.

Thanks.

Original thread: https://forums.rpgmakerweb.com/threads/recycle-used-potion-bottles.94477/