Btw. I've added some experimental support for reactions to melee attacks.
Configurable via global switch
constants:
extendedMeleeReactions: 2 # default 0
0 = vanilla, cannot react to melee attacks
1 = can react to melee attacks, if attacked from the front... same effect as Yankes' script above
2 = can react to melee attacks, if attacked from any side
PS: The scripts can change the % chance to perform a melee reaction in all 3 cases. But only with option "2" the reaction from any side can be triggered, that's not scriptable (yet).
PPS: turn on only if you're 120% sure you want it