Trying to figure out the best way to limit skills depending on a switch.

Hello!

I'm trying to make it so certain items and skills don't do anything if X switch is enabled. Of course, if X switch is disabled, then these items and skills work as intended. I was looking at Yanfly's Skill Core and saw that there was a way to run an evaluation before the code of the item/skill is ran.

<Before Eval>
code
code
</Before Eval>

This accepts JavaScript code, but I'm trying to figure out what exactly I would be using. Looking through the Script Calls list, there seems to only be a way to control switches, but not actually detect if a switch is enabled or not. I'm sure it's possible - but it's not in that list, so I don't know what it is.

Essentially, I'm just trying to do a "if switch X is on, do nothing, else, run as intended".

How could I go about accomplishing this?

Thanks.
I see no way to do this using skill core.

Use action sequences.
In setup action use:
if switch switchId on
break action
end

Replace the first line by the appropriate syntax by reading the help file, I'm on my phone so I can't check.

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-figure-out-the-best-way-to-limit-skills-depending-on-a-switch.78709/