MV YEP_SkillMasteryLevels

Hello, I'm trying to get the functionality of Yanfly's Skill Mastery plugin but in the form of a Common Event. Basically, I just need it to increment the skill's use upon when this Common Event is called. This is the code I found, but I want it to dynamically reference the ID of the skill being used and the actor ID of the user:
JavaScript:
var skillId = 1;
var skillUses = $gameActors.actor(1).skillMasteryUses(skillId);
$gameActors.actor(1).setSkillMasteryUses(skillId, intSkillUses + 1);
Right now, the code above would have to be copy pasted for every skill/actor combination since the IDs are hardcoded. I'm looking for the script call to reference these 2 IDs. Ty!
If you're merely leveling a recovery skill then you can put this in an After Eval or the damage formula instead of using a common event:
JavaScript:
if (!$gameParty.inBattle()) user.setSkillMasteryUses(item.id, user.skillMasteryUses(item.id) + 1);

If it absolutely needs to be through a common event then you could change it to a recovery skill, set two gameVariables using item.id and user.actorId() in the damage formula, then use your initial code with the gameVariables.

Original thread: https://forums.rpgmakerweb.com/threads/yep_skillmasterylevels.130353/