Need an ERM script for wog to emulate shackles in battle

Need an ERM script for wog to emulate shackles in battle between human and Ai. I am not savvy enough and need someone to write this for me…

The idea is to make computer stay and fight to the end, the cowardly behavious of Ai is not my idea of fun.