Making enemies take damage based on how much damage they did to an actor

Exactly what the title says, but let me explain.
I'm making a quest character that has a mechanic where if they get hit, the enemy also takes damage and has a poison state applied to them. How would I make this in the Actor page?
Hi, you will probably need scripts for this, you can check this thread (Kes's answer provides the scripts from Hime).

Original thread: https://forums.rpgmakerweb.com/threads/making-enemies-take-damage-based-on-how-much-damage-they-did-to-an-actor.178272/