MV add variable after using item?

this is connected to this plugin, but others else.

I make all recipes locked till have the book to unlock a few of the recipes.

<learn recipe #>
the problem is
the unlock can only fill 1 recipe. can't recipe 1, 3, 5. or from 1 - 5.

there's a plugin command to unlock many by using 'crafting learn recipeID'

I can add the common event to the item, but I don't want to spam/create many common events for each book recipe.
5.png

I merge them into one common event, and variable to pick which to unlock after using them. but as the title speaks, how to add a variable after using the item?

a script after using an item? or a plugin to add a variable after using an item?
I don't really undestand, but... If I'm right, when your variable "recipe learn" is 1, then it should learn recipes from 1 to 7, according to the above.
I don't really undestand, but... If I'm right, when your variable "recipe learn" is 1, then it should learn recipes from 1 to 7, according to the above.
yes, but I haven't input the variable. so the variable stays 0.

I want that when using a (certain) item, the variable will change.
4.png
using this recipe book, the variable will change to 1 before going to the common event.
No, this can be done only by common event, but why don't you do this by note field, like with recipe no.1? Put "<learn recipe 1><learn recipe 2>etc." in the note field, and you don't need to use variable and common event for this.
or maybe "<learn recipe 1,2,3,4,5>" should work.
No, this can be done only by common event, but why don't you do this by note field, like with recipe no.1? Put "<learn recipe 1><learn recipe 2>etc." in the note field, and you don't need to use variable and common event for this.
or maybe "<learn recipe 1,2,3,4,5>" should work.
I did try using that before... not working.

using <learn recipe 1><learn recipe 2>etc, only the first one will appear.
using <learn recipe 1,2,3,4,5>, not recognized
Hmm, I see. Then, I found good solution I think. Use one common event (as you did on the first post), then insert conditional branch -> script -> $gameParty.lastItem().id and check it's equal item id of the proper recipe book waas used.
(got solution from this: https://forums.rpgmakerweb.com/index.php?threads/checking-if-item-was-used.125361/)
Hmm, I see. Then, I found good solution I think. Use one common event (as you did on the first post), then insert conditional branch -> script -> $gameParty.lastItem().id and check it's equal item id of the proper recipe book waas used.
(got solution from this: https://forums.rpgmakerweb.com/index.php?threads/checking-if-item-was-used.125361/)
yes, this can work.
thx for the help

Original thread: https://forums.rpgmakerweb.com/threads/add-variable-after-using-item.143561/