Hi everyone,
I just started out with java(script) and I have some difficulty to get the result I want to archive.
I'm using yanfly passive states to create custom equipement sets that gives a passive state for example atk +10 for the user that has equiped the whole set. (thats working though).
But now I want to check if one of the two certain weapons are
equiped and then two types of certain armor and after that the rest of the set must be equiped to the user.
So straight forward the (check if the rest is equipped is working. But it seems like I don't get the part where
if (weapon1 OR weapon2) is equiped
and if (armor 1 OR armor 2) is equiped
and (armor 3 AND armor 4 AND armor5 AND armor6) is equiped
to turn the condition on.
else condition off
I think I'm doing the if inside an if inside an if part wrong haha ^^
Thanks in advanced for pointing me into the right direction.
I just started out with java(script) and I have some difficulty to get the result I want to archive.
I'm using yanfly passive states to create custom equipement sets that gives a passive state for example atk +10 for the user that has equiped the whole set. (thats working though)
But now I want to check if one of the two certain weapons are
equiped and then two types of certain armor and after that the rest of the set must be equiped to the user.
So straight forward the (check if the rest is equipped is working. But it seems like I don't get the part where
if (weapon1 OR weapon2) is equiped
and if (armor 1 OR armor 2) is equiped
and (armor 3 AND armor 4 AND armor5 AND armor6) is equiped
to turn the condition on.
else condition off
I think I'm doing the if inside an if inside an if part wrong haha ^^
Thanks in advanced for pointing me into the right direction.
JavaScript:
<Custom Passive Condition>
\\first check if there is one of the two weapons equiped
if (user.hasWeapon($dataWeapons[1]) || user.hasWeapon($dataWeapons[2])) {
\\second check if there are one of these armors are equiped
if (user.hasArmor($dataArmors[1]) || user.hasArmor($dataArmors[2])) {
\\ check if the rest is equipped.
if (user.hasArmor($dataArmors[4]) && user.hasArmor($dataArmors[5]) && user.hasArmor($dataArmors[6]) && user.hasArmor($dataArmors[7]) && user.hasArmor($dataArmors[8]) && user.hasArmor($dataArmors[9])){
condition = true;
} else {
condition = false;
} else {
condition = false;
}
} else {
Condition = false;
}
</Custom Passive Condition>