- Joined
- Apr 7, 2015
- Messages
- 66
- Reaction score
- 20
- First Language
- English
- Primarily Uses
- N/A
So I'm wondering if anyone can help me out with something I'm attempting to do here, and point out what I'm doing wrong... It's a bit complicated, so I'll try and give as much detail as I possibly can without this becoming word soup 
I have a class that allows the user create Shadow Clones of themselves.
Example: User casts "Phantom Zone", and three separate states are applied (Phantom1, Phantom2, & Phantom3), each one a shadow clone that appears behind them and mimics their movements. That's working fine.
- The class has certain skills that are only usable when the user is afflicted by at least one of those three states is afflicted, and will 'Cost' one of these states (but not all of them.)
- If the user has one of these three states applied (or all of them) then I want the Custom Requirement/Execution to check and see if User has Phantom1 State = if yes, skill shows up as usable. If Skill is used, State is removed.
-If User does not have Phantom1 State, then check and see if User has Phantom2 State =if yes, skill shows up as usable. If Skill is used, State is removed.
-If User does not have Phantom2 State, then check and see if User has Phantom3 State = if yes, skill shows up as usable. If Skill is used, State is removed.
If anyone has a method for accomplishing this, I would greatly appreciate the help!
I've tinkered and tried a few different methods, but I can't seem to get the Custom Requirement to work. I get Syntax Errors and the skill shows up as usable regardless of whether the states have been applied or not. When I open up the skill menu. Here's how the Skill is currently set up:
<Custom Requirement>
if (user.isStateAffected(139)) {
value = true;
} else {
if (user.isStateAffected(140)) {
value = true;
} else {
if (user.isStateAffected(141)) {
value = true;
} else {
value = false;
}
</Custom Requirement>
<Custom Execution>
// Check if the user is affected by Phantom3 State.
if (user.isStateAffected(141)) {
// Remove the state from the user.
user.removeState(141);
// Check if the user is affected by Phantom2 State.
} else if (user.isStateAffected(140)) {
// Remove the state from the user.
user.removeState(140);
// Check if the user is affected by Phantom1 State.
} else if (user.isStateAffected(139)) {
// Remove the state from the user.
user.removeState(139);
}
</Custom Execution>
I have a class that allows the user create Shadow Clones of themselves.
Example: User casts "Phantom Zone", and three separate states are applied (Phantom1, Phantom2, & Phantom3), each one a shadow clone that appears behind them and mimics their movements. That's working fine.
- The class has certain skills that are only usable when the user is afflicted by at least one of those three states is afflicted, and will 'Cost' one of these states (but not all of them.)
- If the user has one of these three states applied (or all of them) then I want the Custom Requirement/Execution to check and see if User has Phantom1 State = if yes, skill shows up as usable. If Skill is used, State is removed.
-If User does not have Phantom1 State, then check and see if User has Phantom2 State =if yes, skill shows up as usable. If Skill is used, State is removed.
-If User does not have Phantom2 State, then check and see if User has Phantom3 State = if yes, skill shows up as usable. If Skill is used, State is removed.
If anyone has a method for accomplishing this, I would greatly appreciate the help!
I've tinkered and tried a few different methods, but I can't seem to get the Custom Requirement to work. I get Syntax Errors and the skill shows up as usable regardless of whether the states have been applied or not. When I open up the skill menu. Here's how the Skill is currently set up:
<Custom Requirement>
if (user.isStateAffected(139)) {
value = true;
} else {
if (user.isStateAffected(140)) {
value = true;
} else {
if (user.isStateAffected(141)) {
value = true;
} else {
value = false;
}
</Custom Requirement>
<Custom Execution>
// Check if the user is affected by Phantom3 State.
if (user.isStateAffected(141)) {
// Remove the state from the user.
user.removeState(141);
// Check if the user is affected by Phantom2 State.
} else if (user.isStateAffected(140)) {
// Remove the state from the user.
user.removeState(140);
// Check if the user is affected by Phantom1 State.
} else if (user.isStateAffected(139)) {
// Remove the state from the user.
user.removeState(139);
}
</Custom Execution>

