Items can only be used by certain class (menu screen)

I found a plugin for VXA by himeworks but as I have 0 skill in java scripting I can't convert it at all to work on MV. So here I am asking for help on the following:

In my game, you can buy/find magic books that can be used from the menu-item screen only that learns a skill to a specific class. The problem is that I know how to do this with eventing but as I have over 100 skills and a lot of magic casters this will let me go crazy if I need to event everything for each skill.

here is the link to HimeWorks plugin:

http://himeworks.com/redirect.php?type=script&name=Custom_Use_Conditions

Original thread: https://forums.rpgmakerweb.com/threads/items-can-only-be-used-by-certain-class-menu-screen.77744/