MV Yanfly Skill core - Custom show eval

ok so im still pretty new with javascript and ive been trying to mess around with yanflys skill core. More to the point the show eval use

i have it showing the skill at certen levels (using what they posted for it lol) but how would i add a 2nd eval to that to check both level and class? before showing the skill

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

would like to also make it check the job along with the level
Try this : (switch X with your class id)

<Custom Show Eval>
if (user.level >= 1 && user.isClass($dataClasses[X]) {
visible = true;
} else {
visible = false;
}
</Custom Show Eval>
Try this : (switch X with your class id)

<Custom Show Eval>
if (user.level >= 1 && user.isClass($dataClasses[X]) {
visible = true;
} else {
visible = false;
}
</Custom Show Eval>
:/ still not working the level part is working but it still ignores the class section
reason imtrying to get this to work is im doing something simuler to final fantasy 11 learn skill
where there lerned from a scroll and want the skill to only show on certen class`s at x level instead of all class`s that have the skill type
I do not understad very well what you are trying to do.

My code will show the skill if the user is more than level 1 and if he is Class X. Do you want these as conditions ?
I do not understad very well what you are trying to do.

My code will show the skill if the user is more than level 1 and if he is Class X. Do you want these as conditions ?
yes that is excatly what im trying to get but for some reason it still wont take the class into consideration using what you put it still checked if the player was the level i changed it to 5 just to see and it worked but the skill still showed on all classes instead of just class 4
yeah tested it with just Yanfly Core, Class, Subclass, Skill Core plugins on only and still doesn't work only the level requirement is checked completely ignores the class requirement

yeah.. i don't know but the above doesn't work when there together
they both work fine when used separately i can get the skill to either show up at x level or only on x class but when trying to use both like you have above the level cancels out the class and just shows up on all job when x level is reached
If you just copied it exactly, the code @Boonty originally posted has a syntax error - you need one more close parentheses after X)

You can also trim out most of the lines if you like:
Code:
<Custom Show Eval>
visible=user.level>=X && user.isClass($dataClasses[Y]);
</Custom Show Eval>
If you just copied it exactly, the code @Boonty originally posted has a syntax error - you need one more close parentheses after X)

You can also trim out most of the lines if you like:
Code:
<Custom Show Eval>
value=user.level>=X && user.isClass($dataClasses[Y]);
</Custom Show Eval>
Thank you!!!!!!!!!!!!!! though i had to change value with visable but other then that it works perfectly

im still pretty new to javascript soo didnt even notice the missing ) XD
Heh, sorry, I was just typing stuff with damage-related skill notetags, I had value in my fingers instead of visible.

And just to reiterate, it's a missing close parentheses, not semi-colon O__o
Heh, sorry, I was just typing stuff with damage-related skill notetags, I had value in my fingers instead of visible.

And just to reiterate, it's a missing close parentheses, not semi-colon O__o
i fixed it XD i was typing something else and used ; instead of ) xD

but again thank you!
Copying my excuse -__-
@ATT_Turan I was searching for the syntax error without finding it, kind of a noob in Java too haha

Glad that @Tray finded his responses with 2 ways.
If you just copied it exactly, the code @Boonty originally posted has a syntax error - you need one more close parentheses after X)

You can also trim out most of the lines if you like:
Code:
<Custom Show Eval>
visible=user.level>=X && user.isClass($dataClasses[Y]);
</Custom Show Eval>
sorry for another noob question but is there a way to add a 2nd level and class to this? like show the spell will show for 2 diffrent classes at 2 diffrent levels

sorry still not very good with adding more then a single thing to something

@Boonty thank you 🙂
sorry for another noob question but is there a way to add a 2nd level and class to this? like show the spell will show for 2 diffrent classes at 2 diffrent levels
JavaScript OR is ||
So you'd do (this class && this level) || (that class && that level)
JavaScript OR is ||
So you'd do (this class && this level) || (that class && that level)
so using what you said before

Code:
<Custom Show Eval>

visible=user.level>=1 && user.isClass($dataClasses[4]); || user.level>=4 && user.isClass($dataClasses[5]);

</Custom Show Eval>

sorry and again thanks for answering
A semicolon means this is the end of the code statement. If you keep one in the middle of the line, the rest of that will fail.
@ATT_Turan thank you!!! sorry all the noob questions >.<

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-skill-core-custom-show-eval.148671/