Good point Wraith Staff.
Here's the script I cam up with anyway:
;Artificial Intelligence Script
;Created by Ched 31.05.2011
;Header
;This script uses fake file paths to the sounds.
;Replace the sounds with your actual sound files for this to work properly.
;This script also assumes 500 is full health.
;If you plan to have a different value for maximum health adjust the values accordingly.
desc = Plays a variety of hurt sounds
;Triggers
:state=0,plrhealthgreater=499:state=100
:state=0,plrhealthgreater=299,plrhealthless=500:state=60
:state=0,plrhealthgreater=99,plrhealthless=300:state=20
:state=0,plrhealthless=100:state=10
;100% Sounds
:state=100,random=1:state=1,sound=audiobank\voices\hurting\hurt1.wav
:state=100,random=1:state=1,sound=audiobank\voices\hurting\hurt2.wav
:state=100,random=1:state=1,sound=audiobank\voices\hurting\hurt3.wav
;60% - 100% Sounds
:state=60,random=1:state=1,sound=audiobank\voices\hurting\hurt4.wav
:state=60,random=1:state=1,sound=audiobank\voices\hurting\hurt5.wav
:state=60,random=1:state=1,sound=audiobank\voices\hurting\hurt6.wav
;20% - 60% Sounds
:state=20,random=1:state=1,sound=audiobank\voices\hurting\hurt7.wav
:state=20,random=1:state=1,sound=audiobank\voices\hurting\hurt8.wav
:state=20,random=1:state=1,sound=audiobank\voices\hurting\hurt9.wav
;<20% Sounds
:state=10,random=1:state=1,sound=audiobank\voices\hurting\hurt10.wav
:state=10,random=1:state=1,sound=audiobank\voices\hurting\hurt11.wav
:state=10,random=1:state=1,sound=audiobank\voices\hurting\hurt12.wav
;wait for sound to be finished
:state=1,soundfinished=1:state=0
;End of Script
You will also need to make blank hurt sounds within the player's sound set otherwise they will still play when you take a hit.
[url="http://raptr.com/No_Turn_Right?src=em_forum"]
[/url]