Thank you phkb, you helped me a little in my confusion.
However, AI and scrips using actually sometimes the same events, as you know yourself you can write an entire AI in js. So if an AI and a scrip got different approaches to, for example, "this ship get attacked", what comes first ? Simple example a js "this.ship.target = attacker" overwrites any "this.ship.reactToAIMessage("TARGET_LOST");" up to a level that even a derelict ship still attacks. You need to set "this.ship.target = null" before finally the target is lost. Currently my entire script is full of debugs, 15 min playing and 1h following up with the log. Its interesting what results you could get out of that.
Well, I guessed I just answered my own question, seems script overwrites AI, at least in this case.
Trying to survive behind the controls of a Caduceus Psi XT in Alpha test