DSC Scripting - Somewhat Realistic Radio Comms

Don’t want to type this all again but, if any of you programming/scripting guru’s can look at this (linked below to an ED forum | Mission Editing thread) I’d appreciate it. This is my second attempt at getting it something to work reasonably well. It does, but I’m hoping someone brighter than I can point out my ignorance.

Link to question in the ED forum