For normal AI:
1. Put yourself in god mode and spawn a pirate ship
2. It should remain stationary while rotating and firing at at you
For fleet AI (attack/defend/sentry mode):
1. Make a fleet, give it an order to put them in combat mode
2. After reaching their destination for a defend/attack order, they'll not move or rotate
3. They'll only fire guns at a target when it's right in front of it, but they still don't move or rotate