MV Learning Skills via Kill Count

So I'm looking to have one of my characters be able to learn skills depending on the number of enemies they have slain. So they'd learn skills at 10 kills, 25 kills, 100 kills, etc etc (as an example). I saw a lead on how to do it using Yanfly's Battle Statistics but I couldn't figure out how to make it work using: user.killCount(). I have no knowledge when it comes to coding and any help would be very much appreciated.
Do you have Skill Core?
If you pick-up Skill Core, this might help you with getting the skills learned during combat:

Yeah, i have Yanfly's Skill Core and already using the Blue Magic script on another character. I dont' know how to convert that to learning skill via kills. How would I convert the following to depend on how many kills the actor gained?


<Post-Damage Eval>
if (target.isActor() && target._classId === 20) {
if (!target.isLearnedSkill(item.id)) {
target.learnSkill(item.id);
var text = target.name() + ' has learned '
text = text + item.name + '!';
$gameMessage.add(text);
}
}
</Post-Damage Eval>
<Custom Parameters>
var DragonArts = 0;
DragonArts += user.killCount() * 1;
if (DragonArts >= 1) {
user.learnSkill(1486);
}
</Custom Parameters>

This seems to work for me upon testing it. but it won't let me learn anything beyond the battle. Does anyone know how to keep this going w/o it resetting? thanks

Basically, if I want my character to learn something at 10 kills, and there are only 2 enemies on the field, they will never learn the ability due to the variable resetting at the beginning of every battle.
My JS skill sucks, or I would have taken a swing at it for you.

Doesn't the line:

var DragonArts = 0;

reset it? Can you just remove that?

-------------------

I could use clarification on your OP:

This is for a single Actor?

How many Skill are there that they learn this way?

Do all Enemies give the same "kill points" ?
Moved to: Plugin Support
It does. I found a solution after going to the discord.


<Custom Parameter>
if (user.killCount() >= 1) user.learnSkill(1486)
if (user.killCount() >= 3) user.learnSkill(1487)
if (user.killCount() >= 5) user.learnSkill(1488)
</Custom Parameter>

This code works like a charm, assuming that the skills being learned are able to be learned by the user. Many thanks to Aesica on the /r/RPGMaker discord.

This issue has been resolved. Thanks everyone.

Original thread: https://forums.rpgmakerweb.com/threads/learning-skills-via-kill-count.135090/