Removing a certain amount of a specific item?

(I'm sorry I keep on asking questions but I'm moving into unfamiliar territory in my game.)

There's a part in the game where you go into someone's treasure chest and take items out of it, 5 of a weapon you already have, and 10 healing items you already have. It then becomes more of a moral choice thing if you want to go back and return some of the items.

I know how to make the show choices and stuff, but I'm not sure how to work things like input numbers and whatnot, and variables often confuse me.

Basically what I want is if they choose to deposit the weapons, I want a 0 to show up that they can move up or down within a maximum of five; and for the healing items, I want two 0's to show up that they can move up or down within a maximum of 10. For each of these, of course whatever number they choose will affect the amount of each that is removed from their inventory.

Any help would be greatly appreciated.
1. Choose a variable to use (just pick a non used variable number)

2. Input Numbers (choose the number of digits and set the chosen variable to contain the data)

3. Change Items/Change Weapons, chose Decrease and, and set the chosen variable in Operand.

Cheers.
1. Choose a variable to use (just pick a non used variable number)

2. Input Numbers (choose the number of digits and set the chosen variable to contain the data)

3. Change Items/Change Weapons, chose Decrease and, and set the chosen variable in Operand.

Cheers.
Um... alright I didn't quite follow that (I'm a visual learner who also learns by example) but I'll give it a go and get back to you.
@Koi:

Using 2 variables, commented what I did in the event.

Note that the event will only run if a player has at least one potion in the inventory.

varl-hlp_zps48cd49d8.png


I really encourage you to read up and get a great understanding of variables. It will make eventing much easier. 🙂
I think I'm doing it right...

When I playtested it all was working fine. (And yes, bouncey balls and sunflower seeds. The game is based around children.)

Untitled_zps6a164192.png


However, when it came to the sunflower seeds, which you took 10 of, I used the same conditional branch thing (of course changing it for the sunflower seeds), but made it use 2 digits for the number input so you could go up to 10.

And for some reason it doesn't work for that. Should I just lower it to 9?
10 worked fine in the event I posted above.

I think your current method is maybe a little unnecessarily lengthy. By using 2 variables, you eliminate the need of having 10 different conditional branches. You can use \v[x] where x = to the item deposit variable ID in the text, too, which means you won't need to set up a ton of extra conditions. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/removing-a-certain-amount-of-a-specific-item.23295/