MV (YEP) Limited Skill Uses - Forget the skill after using all points

Hello there.
I'm trying to implement the Guide/Alure system from Octopath Traveler, where the player can use an NPC in battle. The conditions are:

a) Each NPC have a different skill. Some NPC have unique skills, others can have the same.

b) When you use the NPC skill in battle, the skill will be used 3 times before it can be used again.

c) You can only have a single NPC per character (in that case, only 2 characters can use that kind of system), if you want to Guide/Allure another NPC, the one you already have will be replaced.

d) You can use that NPC in battle a limited number of times. If you use all the "points" for summon, the NPC will leave the party, return to his place so you can Guide/Alure them again.

---------------
ok, so let's set what I managed to think:
a) Simple NPC where the player interact with them, learns the skill and the event is deactivated. This can be controled by a switch or a condition to see if the actor knows the skill and then set a local switch on or off.

b) The skill can set a state that seals the skill type and calls a common event (I know that there are plugins that does that) that will cast the skills.

c) Can be controlled with switches, forgeting the current skill and learning the new one.

d) That's the part I didn't figured out yet. The plugin by default doesn't have an option to check if all the "points" were used.
Since this plugin requires (YEP) Skill Core, I tried to use that code:

<Limit Uses: 2> <After Eval> if (Game_BattlerBase.prototype.isSkillLimitedEmpty(90)) { $gameActors.actor(2).forgetSkill(90); } </After Eval>

isSkillLimitedEmpty() is a function I found in the code>
And yeah, it didn't work.

If anyone knows and wants to help how to do this type of check so I can make the actor forget the skill mid battle, or even knows a better way to recreate this system, I would be grateful.
Code:
Game_BattlerBase.prototype.isSkillLimitedEmpty(90)) {

$gameActors.actor(2).forgetSkill(90);
Both of these use the wrong syntax. You don't want to try to call the function declaration, and you (probably?) don't want to take the skill from a specific actor ID, you want to take it from whoever is using the skill.

Both of those should use the variable provided by Skill Core: user

Code:
user.isSkillLimitedEmpty(90)
user.forgetSkill(90)

The trick is, I think I recall from another recent thread that spending a skill use happens after After Eval.

So if it still doesn't work for you, instead of trying to forget the skill, you could just hide it.

Code:
<Custom Show Eval>
visible = user.skillLimitedUseCurrent(90);
</Custom Show Eval>
Thank you! The problem was with the syntax. I'll keep that in mind for other systems I might implement.

It worked with the <After Eval> btw.

Original thread: https://forums.rpgmakerweb.com/threads/yep-limited-skill-uses-forget-the-skill-after-using-all-points.163039/