Skill custom formula help.

Hello, I am trying to make a skill that applies a stacking damage over time state to an enemy. On the skill's first use, it will apply state 1, on its second use, it will remove state 1 and add state 2, and on its third use, it will remove state 2 and add state 3 which is the final stack of the DoT. I attempted to use a script called "Neon Black's Stacking States" to accomplish this, but the script conflicts with another script in my project and does not work properly. As a result of that, I'm wondering if this stacking DoT can be created through the custom formula. Thank you in advance for your help.
This functionality is possible using conditional states.

http://forums.rpgmakerweb.com/index.php?/topic/22215-conditional-states/

The example should be sufficient to understand how to use the script for what you want.  You can ramp up states using this script.
Well, I figured out how to make state 1 change into state 2, but I can't seem to figure out how to make state 2 go to state 3. I know next to nothing about how ruby works, but I tried the following.

<conditional state>

if a.state?(4)

   5

else

   4

if a.state?(5)

   6

end

</conditional state>

 

and

<conditional state>

if a.state?(4)

   5

else

   4

end

</conditional state>

<conditional state>

if a.state?(5)

   6

else

   6

end

</conditional state>

 

Neither of them worked, so clearly I'm doing something wrong, might you be able to help me figure this out?
Code:
if a.state?(4)   5else   4if a.state?(5)   6end
--> The structure of this is TOTALLY WRONG... you cannot put an if without ending the other if first... in your code, you have two successive ifs, and the upper one didn't have an end clause

Code:
if a.state?(4)   5elsif a.state?(5)   6else    4end
if a.state?(4) 5else 4if a.state?(5) 6end--> The structure of this is TOTALLY WRONG... you cannot put an if without ending the other if first... in your code, you have two successive ifs, and the upper one didn't have an end clause

Code:
if a.state?(4)   5elsif a.state?(5)   6else    4end
Shows you how much I know about ruby, anyway I'll try your variant to see if it works.
tell me if it works, though I think it should...
tell me if it works, though I think it should...
Works like a charm, thank you very much for your help.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/skill-custom-formula-help.23117/