Making Dynamic Requirement for Equip

Hi I looked around, but couldn't find any plugins available that really worked for this issue:

I want a character to only be able to equip a certain item if a parameter value is the highest. So, for example, the player can equip the Sword of Attack if his attack is higher than any other parameter.
(IF atk > def AND atk > m.atk AND atk > m.def THEN equip = true).

Does anyone know of anyone know of any plugins or methods to do this? Extra points if an item will auto-unequip if a parameter is no longer the highest.

Thanks!
I am unsure if this can be done without a plugin. If those more knowledgeable than me advise that one is required please Report this post and ask for the thread to be moved to JS Plugin Requests.
Thanks.
I'm not sure but I think that there's no plugin for this method
I didn't test it but you could probably make it work with Yanfly's Equip Requirements.
http://yanfly.moe/2016/02/27/yep-75-equip-requirements/

Make sure to read the help section, and here is a notetag to get you started.
Code:
<Custom Equip Requirement Condition>
if (user.atk > user.def &&
    user.atk > user.mat &&
   // and so on...
) {
    condition = true;
} else {
    condition = false;
}
</Custom Equip Requirement Condition>
Start small to test it works first then add all the conditions.
Aloe,
Thank you SO much! I tested out a notetag based on your guidance and I think that'll work great! I appreciate your help!
Moved to: JS Plugin Requests

Original thread: https://forums.rpgmakerweb.com/threads/making-dynamic-requirement-for-equip.107527/