Using variables, condition branches and common events for a limited item quest.

Hi, I feel like this question has been answered a thousand times, but I couldn't make much sense of the answers I found about it and didn't want to necro-thread.

So, I have an item that drops from enemies and a vendor that wants to purchase that particular item. To make sure it wasn't sellable to any other vendor, I avoided using Shop Processing (although if it's possible to have only certain vendors buy certain items, I would love to know!) and have instead opted to use condition branches and variables.
The first condition branch checks if the player has any of the item in their inventory, if they do then it immediately jumps to another condition branch to check if they have 1, 2 or 3 of them. Each option is its own condition branch. If they don't have any of the item, then the conversation loops back to Show Choices.
I created the item and a common event that will "Control Variables: [0003: Rat Tail] += 1", then attached that common event to the item.

What am I doing wrong? Please explain to me like I'm a dummy.. because I am!
You explained the process and it sounds good. What's the problem?
please show us screenshots of what you've done - very often it is a tiny detail that gets omitted during descriptions that causes problems.

EDIT:
and you can get the current number of any item in inventory with the control variable command.
one point where your description is a bit vague is if you're using that or something else for checking the numbers.
1.jpg
2.jpg
3.jpg
4.jpg
It keeps getting stuck here;

1-2.jpg


And then it'll hop back to the start of the loop. I do have a Rat Tail in my inventory at the time.
Where are you setting variable 3. and maybe put in a condition before you first branch for variable 3. if variable == 0 then "no tails' break loop or goto leave (with label - not sure if they work inside conditional branches)
@Super_Munch
It seems to me that you're missing several basics on eventing.
I strongly suggest you follow the link to the "starting point" in my signature and work through the tutorials there.

what you should have done is something like this:
rattail.png
If you always give gold for the rat tails why would the player give 1 at a time to get 50g from this npc.

If thats their only function on this interaction you could chop a lot of the code.
I have a similar system in one part where you get rewarded for collecting and handing over a specific item here's my approach:

1655749421749.png

In this case "reward" is a set number that multiplies by the number of items so when it multiplies it saves to the variable to be added as gold.
If you always give gold for the rat tails why would the player give 1 at a time to get 50g from this npc.

If thats their only function on this interaction you could chop a lot of the code.
I have a similar system in one part where you get rewarded for collecting and handing over a specific item here's my approach:

View attachment 229873
In this case "reward" is a set number that multiplies by the number of items so when it multiplies it saves to the variable to be added as gold.
Is that screen cap from MV? I tried to replicate it on VX Ace but it isn't working, so I've gotten something wrong. Any idea how it would translate to VXA?

Sorry, I am useless with this stuff.
Is that screen cap from MV? I tried to replicate it on VX Ace but it isn't working, so I've gotten something wrong. Any idea how it would translate to VXA?
yes, but in those sections VXA and MV are identical, just a few different wordings.
what you're most likely missing was already given in my post and screenshot above that - you need to use the game data section of control variable.
1655755178399.png
I appreciate everybody's input, but I still can't wrap my head around it. I'm just going to remove that part of the event.

Thank you all anyway 🙂
The thread can be closed.
but I still can't wrap my head around it
then tell us what part you don't understand, step by step.

all we used is basic mathematics and basic game data.
tell us exactly the step where you have problems and we can explain that in more detail.

questions can be answered - silence not.

Original thread: https://forums.rpgmakerweb.com/threads/using-variables-condition-branches-and-common-events-for-a-limited-item-quest.148723/