Ok everything is great now with this script, no crash bugs.
However two things that I think should be fixed:
1. When you come out a challenge you're apparently still flagged to your opponent, so he can attack you straight after and loot/whatever, this could be abused ?
2. If you challenge in town near lots of NPCs, i.e. Brit West Bank, when you come out the challenge for a brief few ms your still red and you get guard whacked, you don't lose anything but it makes the bank quite ugly with red corpses everywhere