Having trouble getting a class restriction script working

I need to restrict item use based on class. I've found this: http://www.rpgmakervxace.net/topic/26740-items-class-restriction/

It seems like exactly what I need, however it doesn't appear to work. The documentation isn't very good, so when it says, <classes: x>, I'm not sure what X is referring to. Is it 1 for the first class in the list? 001, as the array in the GUI indicates? The class's name? I've tried all three, and none of those work. Has anyone had experience getting this to work, or is anyone familiar with a better script?
Please give a screenshot of your notetags.


The script works with class IDs, which are the numbers without leading zeros. And if it doesn't work, it's usually either an incompatibility with another script or you made a syntax error with the notetag.


I've moved this thread to Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
If you put <classes: 1> in the notetag for Item 1, only actors with Class 1 will be able to use that item.

Same thing for <!classes: X>

Note there should be no space between '<' and 'classes', and 'classes' and ':' (quotes for clarity)
So the ideal implementation would be this:

Let's say classes are Soldier, Chemist and Mage.

In my game, items are almost entirely used in combat for damage. This is a problem with the original script I posted. In combat, if I have <classes: 2> on a potion, then any class can still use that item, but it only has healing effects on <classes: 2>, but the failure state is still consuming the item with nothing happening. If I have a damage item, let's say bomb, and put <classes: 1> on it so that only a soldier can use it, then any class can use it and it pulls an error since monsters don't have classes. I actually contacted the script author, and he says that this is a problem with the script.

I've found an alternate script, 

http://www.rpgmakervxace.net/topic/3418-xs-class-items/

but this is also having problems. I don't understand it at all, but it only seems to restrict items for the first class, and even then it doesn't really work. Putting in <class: 1>, which should allow items only for that class, instead DISallows it for that class. Everyone else can use it. Putting <class: 2> on another item doesn't allow or disallow anyone from using it, and seemingly has no effect. It's confusing.

This is on a clean game file with no other scripts installed.

Any ideas on how to get either script to work, or a decent work-around or alternative would be appreciated.
Hi all, I found a script that works perfectly for other people running into this problem:

http://himeworks.com/2013/11/custom-use-conditions/

This lets you specify item usage in battle as I describe in this thread, as well as adding in a ton of other functionality. It's definitely the way to go if you're looking for a similar system in your games.

Original thread: https://forums.rpgmakerweb.com/threads/having-trouble-getting-a-class-restriction-script-working.44646/