[SOLVED] Need help creating a item requirement plugin

I guys !

The plugin i'm wishing to build look like that (no code for now) :
-if the notebox contains <Class : x> (x is the classe name)
then the item is only useable for the class (usable in the item menu)
-else the item is useable for all classes

I'm pretty sure to know how to check what is inside the notebox BUT after that step i'm totally lost : i don't know on which function i need to do something and how the game can know when items can be used or not.

Thanks for reading my post and waiting for help if someone know how to do !
Maybe alias Game_BattlerBase.prototype.meetsUsableItemConditions (cf rpg_objects.js).
is that function used for the item requirment for the item menu (not in battle) ?
here is my code :
Sans titre.png
http://yanfly.moe/2017/05/12/yep-136-item-requirements-rpg-maker-mv/

That plugin can do exactly what you need. Use this notetag in the item:

<Enable Requirements>
Class: IDNumber
</Enable Requirements>

You'll need Yanfly's Item Core as well for this to work properly. Item Requirements must be below Item Core or it won't work right.

http://yanfly.moe/2015/10/16/yep-11-item-core/
i have it but the main problem is that it only works in the battle scene.

I'm trying to make scrolls that are only useable by a certain class in the menu (NOT in battle). Those scrolls add competence so i don't want a warrior to learn a magic spell or things like that.
Oops, yes, the plugin is working fine, it's just that the meetsUsableItemRequirements function checks the item user (in the menu I think this is the highest PHA party member) rather than the item target. I should have remembered that... 😴

I'm not sure if there's a way around that using Lunatic Mode or something. 😅

Maybe try this plugin by Himeworks instead: http://himeworks.com/2016/02/effect-conditions/ 😮‍💨
Oops, yes, the plugin is working fine, it's just that the meetsUsableItemRequirements function checks the item user (in the menu I think this is the highest PHA party member) rather than the item target. I should have remembered that... 😴

I'm not sure if there's a way around that using Lunatic Mode or something. 😅

Maybe try this plugin by Himeworks instead: http://himeworks.com/2016/02/effect-conditions/ 😮‍💨
Oh ! thanks a lot man !!! That's exacly what i was looking for before i started learning javascript for creating my own plugin !!!
I'll use it thanks ! You save around 2 weeks of my time ! In addition i can learn own it works !
Thanks again !!!

This adventure made me wanting learning how all of that stuff works and then maybe creating my own things one day. In a few months i'll can help others !

Original thread: https://forums.rpgmakerweb.com/threads/solved-need-help-creating-a-item-requirement-plugin.108202/