diff --git a/CWSST.pas b/CWSST.pas index 51bb077..4109441 100644 --- a/CWSST.pas +++ b/CWSST.pas @@ -183,6 +183,8 @@ procedure TCWSST.GetExchange(id : integer; out station : TDxStation); Adding a contest: TContest.SendMsg(AMsg): send contest-specfic messages } procedure TCWSST.SendMsg(const AStn: TStation; const AMsg: TStationMessage); +var + prefix : String; begin case AMsg of msgCQ: SendText(AStn, 'CQ SST '); // sent by MyStation @@ -193,27 +195,31 @@ procedure TCWSST.SendMsg(const AStn: TStation; const AMsg: TStationMessage); 3: SendText(AStn, 'ST?'); 4: SendText(AStn, 'AGN?'); end; - msgTU: // sent by MyStation - case Random(20) of - 0..9: SendText(AStn, '73 E E'); // 50% - 10..13: SendText(AStn, 'GL TU'); // 20% - 14: SendText(AStn, 'GL OM 73 E E'); // 5% - 15: SendText(AStn, 'FB 73 E E'); // 5% - 16: SendText(AStn, 'OK FB TU 73'); // 5% - 17: SendText(AStn, 'GL TU SST'); // 5% - 18: SendText(AStn, 'TU E E'); // 5% - 19: SendText(AStn, '73 DE SST'); // 5% - end; - msgR_NR: // sent by calling station (DxStation) + msgTU: // TU message sent by MyStation if Random < 0.9 - then SendText(AStn, ' <#>') - else SendText(AStn, 'R <#>'); - msgR_NR2: // sent by calling station (DxStation) - case Random(20) of - 0..8: SendText(AStn, ' <#> <#>'); - 9..17: SendText(AStn, ' '); - 18: SendText(AStn, 'R <#> <#>'); - 19: SendText(AStn, 'R '); + then SendText(AStn, 'TU') + else SendText(AStn, 'TU '); + msgR_NR: // exchange msg sent by remote station in response to my exchange + begin + // leading 'R ' 10% of the time + prefix := ''; + if Random < 0.10 then prefix := 'R '; + + // include a presentry greeting 20% of the time + if Random < 0.20 then prefix := prefix + ' '; + + SendText(AStn, prefix + '<#>'); + end; + msgR_NR2: // repeated exchange sent by remote station (DxStation) + begin + // leading 'R ' 10% of the time + prefix := ''; + if Random < 0.10 then prefix := 'R '; + + // include a pleasantry greeting 20% of the time + if Random < 0.20 then prefix := prefix + ' '; + + SendText(AStn, prefix + '<#> <#>'); end; msgLongCQ: SendText(AStn, 'CQ CQ SST '); // QrmStation only else