Free items with every purchase of another

Is it possible to have such bundles sold in shops?
I haven't come across a script which does that. It is possible to do it with variables, but it will be cumbersome.

You would have to set an individual variable (e.g. variable 29) for the item which the shop sells which has this feature. (Let's hope your shops don't have a wide variety of stock, as it has to be a separate variable for each different item!). You would do this immediately before the Shop Processing command. Now the game knows how many of item X the player has before buying anything.

Immediately after the shop processing, have a new variable (e.g. variable 35) set to the item(s)
Conditional branch
Is the new variable (35) greater than the original variable (29)
If it is, have the shop keeper say "Here is your free item for having bought our Deluxe Ear Muffs", and give it via Change Item command.
If it's not, then nothing.

You would have to do that for each item involved.
I haven't come across a script which does that. It is possible to do it with variables, but it will be cumbersome.

You would have to set an individual variable (e.g. variable 29) for the item which the shop sells which has this feature. (Let's hope your shops don't have a wide variety of stock, as it has to be a separate variable for each different item!). You would do this immediately before the Shop Processing command. Now the game knows how many of item X the player has before buying anything.

Immediately after the shop processing, have a new variable (e.g. variable 35) set to the item(s)
Conditional branch
Is the new variable (35) greater than the original variable (29)
If it is, have the shop keeper say "Here is your free item for having bought our Deluxe Ear Muffs", and give it via Change Item command.
If it's not, then nothing.

You would have to do that for each item involved.

And in which menu is it that we set these "variables" before shop processing?
They are set via a command on the first tab of the Event Command Menu.

Your question shows that you are new to the engine. I strongly urge you to work through Andar's compilation of info for new users, especially the playable tutorial for switches and variables that he links to. Spending a bit of time on it now will save you a huge amount of time and frustration in the future. Without a firm grasp of switches and variables, and eventing in general, you simply won't be able to make a game.

Original thread: https://forums.rpgmakerweb.com/threads/free-items-with-every-purchase-of-another.82927/