Ok, here is the situation. I'm able to make your script work perfectly. I think I need some kind of edit however.
I'm going to try to explain this as plainly as possible.... here goes!
I'm making a "Spellsword" class.
The way the I want the Spellsword to work is he learns skills the more he imbues his sword with elemental type magic... so he learns abilities such as Fire Sword and Ice Sword from normal leveling.. now I use your script so if he uses Fire Sword 20 times he learns "Flaming Charge"....
CONSIDER:
The Spellsword can only use the abilities from that type of element he casts on his sword.
EXAMPLE:
Valdraek casts Fire Sword!
Now in the skill menu it should now give him his abilities for that type of element:
Notice how when you use Fire Sword you have access to two abilities:
Flaming Charge, and Blazing Whirlwind
Now.... if you cast Ice Sword:
THe two fire abilities are removed and are replaced with the abilities of ice:
Freezing Rain, Glacial Blast
And this works fine with common eventing, every event just makes the actor forget the abilities, I even went as far as creating a state for the two element sword types.
DILEMMA:
Now that I have incorporated your awesome script..
I iearn the ability of Fire Sword, and it stays with you, if I use Ice Sword the ability is forgotten like normal, however when I use Fire Sword again, it says "Valdraek has learned Fiery Charge" which isn't necassarily a bad thing.. but the problem I'm having.. is using my common events to change between the element types. It should be something like this:
*Using FireSword*
If Valdraek has used Fire Sword 20 times: Learn Flaming Charge
If Valdraek has used Fire Sword 60 times: Learn Blazing Whirlwind
Forget Ice Abilities (And all other elemental types once I add them there will be 8 in all I think.)
The way I have this system is with a common event, but I don't know how to make it so that when you use the elemental sword type, it actually calls the learned abilities from the script..
So if Valdraek is Level 17.. and posesses Flaming Charge: He would only learn flaming charge:
And not the other Fire abilities..
I don't know if I'm explaining this right.. but it is very important system for my game. The COmmon event system looks like this right now..
Trigger Common Event When Use of Fire Sword
Change Skills:[Valdraek], - Glacial Blast
Change Skills:[Valdraek], - Freezing Rain (These get rid of all the skills of the opposite swords and then add the skills appropriate.)
Change Skills:[Valdraek], + Flaming Charge
Change Skills:[Valdraek], + Blazing Whirlwind
etc.
Now I think it should look like this but I don't know how to make it happen:
Trigger Common Event When Use of Fire Sword
Change Skills:[Valdraek], - Glacial Blast
Change Skills:[Valdraek], - Freezing Rain (These get rid of all the skills of the opposite swords and then add the skills appropriate.)
Conditional Branch: If Valdraek has used [Fire Sword] 20 times, and is at least level 17:Change Skills:[Valdraek], + Flaming Charge
Conditional Branch: If Valdraek has used [Fire Sword] 60 times, and is at least level 22:Change Skills:[Valdraek], + Blazing Whirlwind
etc.
This I think would work perfectly and if you can, I would like you to make this an addon for your script, or at least tell me how to get it done. I hope that this was a bit for clarifying for you, please let me know if you don't understnad a part of this.