This may be what youre looking for.
;Artificial Intelligence Script
;Header
desc = Follow Waypoints
;Triggers
:waypointstate=0:animate=2,waypointstart
:waypointstate=3:animate=2,waypointnext
:waypointstate=4:animate=2,waypointrandom
:waypointstate=5:animate=2,waypointreverse
:plrcanbeseen:state=0,settarget
:state=0:rotatetoplr
:state=0,ifweapon=1,plrcanbeseen=46,plringunsight,rateoffire:useweapon,rundecal=6
:state=0,ifweapon=0:state=2,setframe=6
:state=0,shotdamage=1:strafe,setframe
:state=1:incframe=6
:state=1,frameatend=6:state=1,reloadweapon,sound=audiobankgunsreload.wav
;End of Script
Havent tested it though.