Auto-translated
Bad :(
By the way, I'll modify your Hafad: I'll make his ability work on heroes too, even if they are in the town.
You can, of course, do it yourself) You'll only need one function without triggers and forced interactions.
void errorHook( fCallback )
Allows you to set an error handler. By default, when a script error occurs, the current thread terminates. Thanks to this function, you have the opportunity to adjust this behavior – before stopping, control will be passed to the fCallback function.
Found it at Novik's. If this doesn't help, then there are no more options.