Nothing is ever simple in mod-making.
Once I got the fight to happen without interruption, I discovered that nine times out of ten, they'd end up running up the stairs at the back of the bar, as Lathenil's AI made him retreat to cast spells. Then when the guard came in to arrest him, he couldn't find him at the top of the stairs! He'd get stuck in the corner at the bottom, trying to walk through the wall.
Fixed that by changing Lathenil's combat preferences. Now the fight happens in the middle of the room, and Lathenil's where the guard can reach him.
Then the guard would just run up to him and say "Hello", instead of "Stop criminal scum!" - several iterations of script and AI changes before that was fixed.
And having arrested Lathenil, he has to escort him off to the jail. The guard decided that the straight-line path was quickest, so he led Lathenil onto the deck of the Clarabel, and stopped at the rail, staring across at the Castle. I abandoned the full escort, and just disabled the player controls until they left the Count's Arms, and moved them directly to jail (do not pass Go, do not collect...) before giving the player control back to go visit him in his cell.
Then it took forever to get the Assassins that attack the player to reach him without getting into fights with patrols or citizens on the way. Since I have no control over where the player chooses to go, the assassins have to find him, so I couldn't just place them somewhere harmless. And then they just said "Hello", like the guard. Different fix this time, because I needed them to start a fight.
Nearly there, just a few more tests needed, for fast travel and detours. If the assassins get stuck somewhere, the quest won't end, so I have to detect that and move them...