Two things:
1. You shouldn't be starting a script like that on an actor, especially not one so small it could be inlined,
especially not on multiple actors.
2. GetSecondsPassed, unless you have exactly 0.5 FPS (
exactly), will never be 2.
You might also want to avoid using GetDistance so often, but that's a minor detail.
A cleaner, merged version:
begin DBtestscriptfloat timerIf ( menumode ) returnendifif ( mycrime == 3 ) StartCombat "Player" SetFight 100 Set myCrime to 4elseif ( myCrime == 4 ) if ( GetDistance "player" <= 256 ) set mycrime to 5 endifelseif ( myCrime == 5 ) if ( timer < 2.0 ) set timer to ( timer + GetSecondsPassed ) else set myCrime to 6 SetFight 0 StopCombat "player" ForceGreeting endifendifend DBtestscript
I also cleaned up some of the timing; for example, they now greet you after they start fighting and after their fight AI is set to 0.