Relearning the Same Skill More than Once...

The problem is I am using Yanfly's Learn Skills which allows you to learn skills from a menu. I am also using replace skills which replaces weaker skills with stronger ones. So you don't end up with duplicates. So once you have Fire I and you learn Fire II, Fire II replaces Fire I but then Fire I becomes available for purchase again in the learn skills menu...Is there anyway I can prevent the buying the same skill 2x? Adding it to some sort of skill blacklist once learned or something? Or maybe making the skill sealed instead of forgotten?

Code:
#==============================================================================# Replace Skills# By Omegas7# [URL="http://www.myrpgmaker.com"]http://www.myrpgmaker.com[/URL] (Currently Offline)# =============================================================================# When the player has a certain skill, it will replace other skills.# For example, if your game has Fire I, II, and III, but you just want the# player to use the last fire skill available, you would make it like this:# If player has Fire II, remove Fire I.# If player has Fire III, remove Fire II and Fire I.# That is exactly how this script works, good for said idea.## Substitutions { <- This is the start of the list# New => Old, <- Remember the commas between lines# New => Old, <- Remember the commas between lines# New => Old# } <- This is the end of the list## New is the ID of the condition skill, and Old is the ID of the skill(s) to# be replaced. If you want multiple skills to be replaced, put their IDs in# [ ], each separated by a comma.# =============================================================================module Skill_SubstitutionSubstitutions = {136 => 132, # Skill ID 2 will replace skill ID 1# Skill ID 4 will replace skill ID 3# Skill ID 5 will replace skills ID 1, 2, 3 and 4.}endclass Game_Actor < Game_Battlerinclude Skill_Substitutionalias omega_learn_skill learn_skilldef learn_skill(skill_id)omega_learn_skill(skill_id)clear_weaker_skillsenddef clear_weaker_skillsfor greater in 0...Substitutions.keys.sizeif skill_learn?($data_skills[Substitutions.keys[greater]])if !(Substitutions[Substitutions.keys[greater]].is_a?(Array))forget_skill(Substitutions[Substitutions.keys[greater]])elsefor weaker in 0...Substitutions[Substitutions.keys[greater]].sizeforget_skill(Substitutions[Substitutions.keys[greater]][weaker])endendendendendend
some common event shop scripts )I assume that's how the skill purchase works in your case) have add-ons or script commands to hide or unhide options based on conditions.

You should look if one of those is compatible with Yanfly's (after checking Yanfly's script itself, there usually are such addons directly linked)

Original thread: https://forums.rpgmakerweb.com/threads/relearning-the-same-skill-more-than-once.16562/