MZ Common event when state is removed

Hey there, Just wondering if there is already a plugin for this out there, I haven't found one and it would be pretty useful for me.

I have a character transform, and it lasts for three turns or until end of battle, but I need him to transform back to normal at the end of battle or end of the three turns, whichever happens, I can do this through a common event, but I need to be able to run that common event when the transform state wears off.
I'm using MZ.
if possible please let me know, otherwise I would really appreciate the help making some kind of plugin for this.
You can set a common event to run after battle here.
VisuMZ_1_BattleCore > Mechanics Settings > Common Events (On Map ) > Post-Battle Event

It will queue the common event to run as soon as you are back to a map scene.

---

VisuMZ_1_SkillsStatesCore

Code:
<JS On Expire State>
 code
 code
</JS On Expire State>

Will allow you to run code when the state expires.

---

If you plan to swap units in/out of battle, you may consider:
VisuMZ_2_PartySystem

You may also be interested in: OZZ-ActorSummoning
Wow, I dont know how I missed that in the battlecore, that works great, deffinitely going to be making good use of that and the pre battle events.
Thank you yet again!

Original thread: https://forums.rpgmakerweb.com/threads/common-event-when-state-is-removed.142293/