Need Help Making A Skill That Recovers TP, Except For When A Certain State Is Applied

Hi, I need help making a skill that 1 gains TP, except for when a certain state is applied, then it gains nothing.
I plan on making this the primer for all of my skills going forward so it's kinda a necessity. Sorry if this is easy to do, but I'm not used to JavaScript. I'm currently using a majority of Yanfly plugins if that helps.
Easily doable with action sequencing. Essentially you just put a conditional branch into your sequence that does A unless user is state affected.
Easily doable with action sequencing. Essentially you just put a conditional branch into your sequence that does A unless user is state affected.
I thought about it, but I feel it saves me a lot more time being able to just copy and paste a script onto different skills and saves me the event space.
I would suggest you do what @SGHarlekin recommended with a bit of conditional code, just stick it into a Yanfly's Skill Core notetag instead of adding a full action sequence to the skill.

You don't actually describe your skill at all, so I'm going to presume you use it on an ally.

Code:
<After Eval>
if (!target.isStateAffected(14))
    target.gainTp(20);
</After Eval>

Replace the 14 and 20 with the appropriate state ID and amount of TP.
I thought about it, but I feel it saves me a lot more time being able to just copy and paste a script onto different skills and saves me the event space.
Not sure what this event space is supposed to be, but turans way would work just as well. Note tag's a note tag.
Not sure what this event space is supposed to be
Same here - action sequences in MV have nothing to do with events.
Not sure what this event space is supposed to be, but turans way would work just as well. Note tag's a note tag.
Sorry, was confused when I saw what you were suggesting, it was early in the morning. Thought you meant, add an event in skills that triggers a Conditional statement that checks if they have the state applied. My fault

I believe my problem is solved

I would suggest you do what @SGHarlekin recommended with a bit of conditional code, just stick it into a Yanfly's Skill Core notetag instead of adding a full action sequence to the skill.

You don't actually describe your skill at all, so I'm going to presume you use it on an ally.

Code:
<After Eval>
if (!target.isStateAffected(14))
    target.gainTp(20);
</After Eval>

Replace the 14 and 20 with the appropriate state ID and amount of TP.
Thanks, also sorry for the lack if information. I want the skill to affect the user.

Original thread: https://forums.rpgmakerweb.com/threads/need-help-making-a-skill-that-recovers-tp-except-for-when-a-certain-state-is-applied.160819/