Restricting an Item use if Switch is ON?

Is there a way to make so that an item can not be used at all if a game switch is ON?  Like you use an item, but you don't the player to keep using the same item over and over again so you make it turn on a switch and now when you try to use that item it just buzzes at you.  Or maybe have it blacked out or something.


Can you do this or do I have to do the messy common event work around?
Try this

View attachment Restrict_Items.js
This works perfectly except one thing....  the on/off is switched...  I want the item to be usable when the switch is off and blocked when it's on...  could you maybe tell me the line to change and I'll do it on my end?
In line 22


Put ! before $gameSwitches
That's it?!  really?!  I thought it was going to be harder than that.  thanks a lot this works great!

Original thread: https://forums.rpgmakerweb.com/threads/restricting-an-item-use-if-switch-is-on.65101/