I believe somebody has posted one before.
Here's the "look and shoot" one - I'm not that profecient in FPI so I probably won't be abel to answer any of your questions.
If it turns out I can't post this, please do say Rick and I'll remove this faster than you can say "sued"
;Artificial Intelegence Script
;Header
desc = Look and Shoot
;Triggers
:state=0,plrcanbeseen:state=1,settarget
:losetarget=100:runfpidefault=1
:state=0:runfpidefault=1
:state=1:rotatetoplr
:state=1,ifweapon=1,plrcanbeseen=46,plringunsight:useweapon,rundecal=6
:state=1,ifweapon=0:state=2,setframe=6
:state=2:incframe=6
:state=2,frameatend=6:state=1,reloadweapon,sound=audiobank\guns\reload.wav
;End of Script