Help with items and variables.

Hello Again.

I am looking for a simple script event command in event processing that add's an item that corresponds with a specific variable. 

In example, If potions are item 102, and elixirs are item 103. If a variable equals 102 it should add a potion to in inventory, but if the variable is instead 103 it will add an elixir to the inventory.

How can this be accomplished with a simple script event command?
variable = $game_variables[50]amount = $game_variables[51]$game_party.gain_item($data_items[variable],amount)^ use that code in the script event command.

replace the 50 in the variable section with your chosen variable. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/help-with-items-and-variables.36328/