Friendship and old fashioned persuasion?
Haven't seen that option. I'm not interested in this particular encounter per se. I just see a great template for ai response improvement!
For example, I'd make a character run for the guards. When they shout, I'd make that a DC. If a bystander notices you trying to stop this character, have them call for guards as well.