Yanfly Lunatic States Script Help (Thorn/Recoil)

Script reference: http://yanflychannel.wordpress.com/rmvxa/battle-scripts/lunatic-states/

I had originally posted this questions here: http://forums.rpgmakerweb.com/index.php?/topic/33026-state-when-inflicted-causes-recoil-to-enemy/

But then realized I was going to need script support.

I was looking at designing a skill that when inflicted on the user would sort of set up a barrier to counter the enemy when hit. I've been calling it recoil but have also been told it is known as thorn as well. 

Example Scenario:

-Enemy attacks player for 100 HP.

-Player sets up State.

-Enemy attacks player for 100 HP and suffers 10 HP since State is up (I was hoping to use 10% recoil).

After getting some guidance, I realize the best bet is to use the Yanfly's lunatic states script and use the shock effect to set this up. 

After useless attempts and researching... I have no idea how I can achieve this correctly.

Any assistance would be much appreciated.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-lunatic-states-script-help-thorn-recoil.33715/