Can You Swap Items?

Okay so I'm still quite the novice at all of this, but is it possible to swap items?

Like, say you have an NPC who will give you Item A for Item B. For however many the MC may have of Item B, the NPC will give that many back with Item A. (Example: MC has 3 bottles, so they go to the NPC who will give them 3 potions in return.)

I know the answer is probably obvious and I'm overlooking something, but please help!
Yes. Look up variable tutorials for that kind of stuff. It's not very complicated once you become more comfortable with operating variables.
Yeah, after reading some tuts to guide you thru variable use, your event will look like this

Set variable A = Amount of Item A
Reduce Item A by Variable A amount
Add Item B by Variable A amount
Thank you all so much!

Original thread: https://forums.rpgmakerweb.com/threads/can-you-swap-items.107455/