How to Check Item List before Giving Items to NPC

Hello Everyone. I'm new to this forum so please tell me if I'm doing something wrong with this post.


Anyway, I am making a game and I want to give items to NPC. I tried the conditional branch to check if item is in inventory but that's not what I need, because I want to let the player check the inventory first then confirm the item to be given to the NPC. I am not sure if that's even possible, but hope you could help me.


Any replies would be much appreciated  🙂  Thanks  🙂 🙂
you can use control variable : game data to load the number of items of any type into the variable, and then chack the variable to see how many the player has.
Might be misinterpreting the request incorrectly, but I am thinking the original question is to allow the player to speak to the NPC, and given an item select screen to select the item.


If so there are 2 ways to go about this (both with links!)


Speaking to the NPC who then pops up a window for you to select your items:


Vlue has a script for this: http://www.rpgmakercentral.com/topic/19709-advanced-select-item/


Use an item on the NPC without needing to speak to the NPC first.


I found a tutorial on youtube that could help with that =) when I pasted the link it was a huge video so I put it in this spoiler.




I could be wrong though... So if I understood it incorrectly, apologies... and ignore me =D


Hope this helps!


~ Dinhbat
If you want the player to select the item when talking to the NPC, set it up as a Key Item and use the Select Key Item command to put the item id into a variable.  Then you can do a conditional branch to see what the variable is - if it's the correct item ID, remove the item and do whatever processing you want to do.
Thanks for the replies, but what I want to happen is when the player talks to an NPC there will be choices as Talk, Give and Cancel.. When the player choose Talk, there will be a 'Show Text' Event, which I managed already. And when the player choose Give, the inventory or item list will pop-up so the player can choose what item to give. It's somewhat like the sell command where player confirms which to sell and how many to sell..


Anyway, I did appreciate all the replies.


Thanks again.
yeah, the only way to do this without scripting is if you make that item as a key item. Else you will need a script that allows showing of normal items in a list for events.
Thanks everyone! I'll try all your suggestions.  🙂 🙂
YES!!  🤘 🤣 🤘


It worked!! Thanks to all your suggestions guys!!  😀 😀
yeah, the only way to do this without scripting is if you make that item as a key item. Else you will need a script that allows showing of normal items in a list for events.

So, there's a way to do it using script?? How's that??  🤔
yhomick, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.



If you want to add something, simply edit your earlier post.
So, there's a way to do it using script?? How's that??  🤔



If you can do it without scripting, do it without scripting.  You've got something that works.


The reference is to either changing the Select Key Items command so non-key items will be shown (basically, ALL items will be shown), or to write a new window and class that are similar to Select Key Item, but allow all items to be shown.  If you're happy with the way it's working for you now, don't go down that track.
So, there's a way to do it using script?? How's that??  🤔



Ofc there is, edit the key item choosing window to show all items or script your own item choosing window.


but like Shaz said, if you can use the non-script option, better just go that way.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-check-item-list-before-giving-items-to-npc.72780/