Hello, I'm using yanfly's Class Change Core/Sub Class/ Skill Core/ Equip Core. Since the class change plugin shows every spell from every available class, I decided to hide every spell unless the character is using an specific class/item.
In my game, the main class determines the base character attributes (like defensive, magical, balanced, etc.) while the subclass determines the tipe of magic the character can use (like fire spells, healing spells, etc.). Aside from it, the characters can equipe certain equips to gain access to other spells (like a fire materia ish). Every class/equips are available to all characters, it's up to the player to decide each character role in battle.
The problem is that I can't create an custom script (lunatic mode) to make it work. After more than 5 hours of research I could came up to 3 possible solutions but none of them work:
<Custom Show Eval>
if (user._classId == 5) {
visible = true ;
} else if (user._equips[10]._itemId == 111) {
visible = true;
} else if (user._equips[11]._itemId == 111) {
visible = true ;
} else {
visible = false;
</Custom Show Eval>
<Custom Show Eval>
if (this._classId === 5 ||
user._equips[10]._itemId == 111 ||
user._equips[11]._itemId == 111) {
visible = true;
} else {
visible = false;
}
</Custom Show Eval>
<Custom Show Eval>
visible = (this._classId === 5 || user._equips[10]._itemId == 111 || user._equips[11]._itemId == 111)
</Custom Show Eval>
I tried adding and removing parentheses but it wont work.
I got zero knowledge regarding programming, this the best I can do.
I was able to make it work using a single condition (like class id only), but I can't make it work with multiple ones.
In my game, the main class determines the base character attributes (like defensive, magical, balanced, etc.) while the subclass determines the tipe of magic the character can use (like fire spells, healing spells, etc.). Aside from it, the characters can equipe certain equips to gain access to other spells (like a fire materia ish). Every class/equips are available to all characters, it's up to the player to decide each character role in battle.
The problem is that I can't create an custom script (lunatic mode) to make it work. After more than 5 hours of research I could came up to 3 possible solutions but none of them work:
<Custom Show Eval>
if (user._classId == 5) {
visible = true ;
} else if (user._equips[10]._itemId == 111) {
visible = true;
} else if (user._equips[11]._itemId == 111) {
visible = true ;
} else {
visible = false;
</Custom Show Eval>
<Custom Show Eval>
if (this._classId === 5 ||
user._equips[10]._itemId == 111 ||
user._equips[11]._itemId == 111) {
visible = true;
} else {
visible = false;
}
</Custom Show Eval>
<Custom Show Eval>
visible = (this._classId === 5 || user._equips[10]._itemId == 111 || user._equips[11]._itemId == 111)
</Custom Show Eval>
I tried adding and removing parentheses but it wont work.
I got zero knowledge regarding programming, this the best I can do.
I was able to make it work using a single condition (like class id only), but I can't make it work with multiple ones.