Create a State that causes Frozen/Burn/Paralyze upon Physical Hit

I am wondering if someone has figured out the proper way to create a state that while active on an enemy does the following:


1) If a character attacks that enemy with a Physical Skill, the character attacking has a state added (I.E. an "on fire" enemy can cause Burn if Physically attacked.


2) Optional: Takes 0 damage from such Physical attacks, except if that attack's Element is something that the enemy is weak to (I.E. an "on fire" enemy takes 0 damage from a Fire Physical Attack, but takes damage from a Water Physical Attack)


I do have Yanfly's Buffs and States Core, among many others that would be applicable.


Other random examples:


Thunder Bug is struck by Joe with a Punch skill: Thunder Bug takes 0 damage, but Joe becomes Paralyzed.


Fire Bug is struck by Alice with a Kick skill: Fire Bug takes 0 damage, but Alice becomes Burned.


Ice Bug is struck by Marshal with a Fire Headbutt skill: Ice Bug takes damage normally, and Marshal does NOT become Frozen.
You would be able to do that by utilizing the Buff and State Core's  Lunatic Mode – Custom Action Effects
That's what I'm using. I thought  would ask if someone had already created an efficient working version. I think I may have one, but it causes the attacker to freeze up infront of the enemy (I'm using Action Sequences to have them approach the enemy.) Its a WIP.
ah so what you need is the actual setup to do them using the script?
Correct; the setup of what you would put in the notebox

Original thread: https://forums.rpgmakerweb.com/threads/create-a-state-that-causes-frozen-burn-paralyze-upon-physical-hit.64020/