I made a weapons mastery using YEP_BuffsStatesCore
this is the original code
↓↓↓↓↓↓↓↓↓↓↓↓
<Custom Passive Condition>
// Get all currently equipped weapons for the user.
var weapons = user.weapons();
// Set the swords variable.
var swords = 2;
// Set the initial condition to be false.
condition = false;
// Loop through each of the weapons.
for (var i = 0; i < weapons.length; ++i) {
// Get the currently looped weapon.
var weapon = weapons;
// Check if the weapon exists and if the weapon type ID matches the sword ID.
if (weapon && weapon.wtypeId === swords) {
// Set the condition to be true.
condition = true;
// Break the loop.
break;
}
}
</Custom Passive Condition>
↑↑↑↑↑↑↑↑↑↑↑↑
this is the original code
I thought a simple change would make Armor mastery too.
But of course, the Armor Mastery that I made didn't work properly
this is my code
↓↓↓↓↓↓↓↓↓↓↓↓
<Custom Passive Condition>
// Get all currently equipped armors for the user.
var armors = user.armors();
// Set the shields variable.
var shields = 2;
// Set the initial condition to be false.
condition = false;
// Loop through each of the armors.
for (var i = 0; i < armors.length; ++i) {
// Get the currently looped armors.
var armors = armors;
// Check if the armors exists and if the armors type ID matches the shields ID.
if (armors && armors.wtypeId === shields) {
// Set the condition to be true.
condition = true;
// Break the loop.
break;
}
}
</Custom Passive Condition>
↑↑↑↑↑↑↑↑↑↑↑↑
this is my code
Why does this problem occur?
I changed swords to armors, and tried armors to armor, but it never worked!
I'd appreciate it if you could tell me what I'm doing wrong.
this is the original code
↓↓↓↓↓↓↓↓↓↓↓↓
<Custom Passive Condition>
// Get all currently equipped weapons for the user.
var weapons = user.weapons();
// Set the swords variable.
var swords = 2;
// Set the initial condition to be false.
condition = false;
// Loop through each of the weapons.
for (var i = 0; i < weapons.length; ++i) {
// Get the currently looped weapon.
var weapon = weapons;
// Check if the weapon exists and if the weapon type ID matches the sword ID.
if (weapon && weapon.wtypeId === swords) {
// Set the condition to be true.
condition = true;
// Break the loop.
break;
}
}
</Custom Passive Condition>
↑↑↑↑↑↑↑↑↑↑↑↑
this is the original code
I thought a simple change would make Armor mastery too.
But of course, the Armor Mastery that I made didn't work properly
this is my code
↓↓↓↓↓↓↓↓↓↓↓↓
<Custom Passive Condition>
// Get all currently equipped armors for the user.
var armors = user.armors();
// Set the shields variable.
var shields = 2;
// Set the initial condition to be false.
condition = false;
// Loop through each of the armors.
for (var i = 0; i < armors.length; ++i) {
// Get the currently looped armors.
var armors = armors;
// Check if the armors exists and if the armors type ID matches the shields ID.
if (armors && armors.wtypeId === shields) {
// Set the condition to be true.
condition = true;
// Break the loop.
break;
}
}
</Custom Passive Condition>
↑↑↑↑↑↑↑↑↑↑↑↑
this is my code
Why does this problem occur?
I changed swords to armors, and tried armors to armor, but it never worked!
I'd appreciate it if you could tell me what I'm doing wrong.