Skill Custom Show Javascript

Yanfly's Skill Core lets you use custom notetags to show skills. Here's their sample code:


<Custom Show Eval>
if (user.level > 50) {
visible = true;
} else {
visible = false;
}
</Custom Show Eval>




How do I change this to check for a specific class or subclass? Since subclass has to reference another plugin, I can work with just using the class.


I tried this but it didn't work:

Code:
<Custom Show Eval>
if (user.class = 4) {
  visible = true;
} else {
  visible = false;
}
</Custom Show Eval>
<Custom Show Eval>
if (user.classId = 4) {
visible = true;
} else {
visible = false;
}
</Custom Show Eval>


you sure it's not classId? (I haven't looked into it at all, but Yanfly/Kadokawa usually does it that way, also that's how it's listed in the Json file)
That didn't work.


I tried adding a second =, but now it won't show at all, even with the correct class.
I'll recreate what you're trying to do and get back to you if I find anything
Thank you!
And we're in! This worked for me
 

Code:
<Custom Show Eval>
if (this._classId === 4) {
  visible = true;
} else {
  visible = false;
}
</Custom Show Eval>
Hazaa!!! Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/skill-custom-show-javascript.70635/