using certain items of database for skills (MV)

I want a skill to use random items between 100 and lets say 105 (of my item database) to be used for skill.  If user doesn't have those items then skill can't be used and be darkened.


How would I write a function to check and see if variables 100-105 are currently in inventory (and more then 0) and will be randomly picked for the skill?


I have all of Yanfly plug ins.
It looks like Yanfly has one for this purpose. Here's the video to see if it suits your needs.
 










It's an extension to the skill core, so you'll need that plugin for it as well.
It is something like the video except I want the cost to be an item randomly picked instead of set.  I had thought of the plug in as well but have no idea how to have it look for the ingredients needed for the random skill cost.
Sorry I left for work and didn't get a chance to reply! Let me download the plugins tonight and check them out myself and see if I can get that to work with some light modifications. 😀  

EDIT: Ok, so I've gone through the plugin itself and it looks like there's opportunity to potentially modify the file to add in this functionality. I'm not 100% sure how to go about it. However, to be able to add in the ability to randomize automatic usage,you would need to rewrite the function collecting all possible recipes and displaying them on the battle menu, to collect all possible recipes that meet the usage requirements, roll a random int to decide which item to use and entirely bypass the battle menu. Just looking at it myself though, I don't feel like I have the working knowledge to do that just yet.
So you think I am able to make a pool of items and call a random int.  Sounds plausible but I am just not sure how to do $data.Items thing to pull it from my data base  and put it into the pool in a function.  Maybe easier to do in a Common Event that way I can use force action to use a set action for each different random item. 

Original thread: https://forums.rpgmakerweb.com/threads/using-certain-items-of-database-for-skills-mv.61855/