"Input Number" and "change item" from that number

Hello everyone, I have a question about "Input Number" that I spent my week but I can't solve it.


Please take a look at my attachment.


In this event, I want player input a number of ores for crafting gem. 3 ores = 1 gem. The event will check if the number of gems in inventory is greater or equal to number player input. If true, start crafting, adding Gem and subtracting ores. The problem is: I want to subtracting ores = input but adding gem = 1/3 input. And in changing item command, there's only "increase" or "decrease" constant.


For example: I input 30. That means I will receive 10 Gems and lost 30 ores. If I decrease ore = input, so how can I add gem = input/3 ?

Untitled.jpg
use a second variable and calculate the input/3 with two control variable commands for that.


First command to give the second variable the value of input, second command to divide the number in the second variable by three
Andar, can you give me an example? I tried but failed
@catnora...


Reduce the Ore first (Red Ore - Input...)


Then divide Input by 3 (Input = Input/3...)


Then increase Gem (HP Gem + Input...)


Try that, maybe..?

Original thread: https://forums.rpgmakerweb.com/threads/input-number-and-change-item-from-that-number.67381/