<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><BLOCKQUOTE type="cite"></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Thanks for all the great reponses.</DIV><BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">On Mon, 12 Mar 2007, Narcis wrote:</DIV> <BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">i'm trying to create RCD and have implemented most as a distress</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">which gets converted to a message string and then send as macro. This</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">seems to work, but the other side is not interpreting it as a RCD but</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">as a general macro. So what makes a RCD a RCD?</DIV> </BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">When you send an RCD, it sends a special message with with the RCD flag</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">set.<SPAN class="Apple-converted-space">  </SPAN>The message is just a few bytes that encode the RCD number (distress,</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">carry, take, etc.) and things like the sender's wtemp and etemp, armies</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">carried, ship nearest their mouse cursor, etc.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">The format of these bytes is documented in the client source somewhere.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> </BLOCKQUOTE></DIV><BR><DIV>Yes i finally tracked down where in the code, and see it is building a message</DIV><DIV>string (bytes) which the client or server handles differently. I believe it is using hte</DIV><DIV>first byte to discover it is an RCD and not a normal message: </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">buffer[</SPAN></FONT><FONT class="Apple-style-span" color="#0000FF" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">0</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">] = (</SPAN></FONT><FONT class="Apple-style-span" color="#760F50" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">char</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">)((macro_flag ? </SPAN></FONT><FONT class="Apple-style-span" color="#0000FF" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">1</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;"> : </SPAN></FONT><FONT class="Apple-style-span" color="#0000FF" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">0</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">) &lt;&lt; </SPAN></FONT><FONT class="Apple-style-span" color="#0000FF" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">5</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;"> | distress_type);</SPAN></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Since Normal messages are sent in the same way (CP_MESSAGE)</DIV><DIV>on the receive side i see it is handled through short packages SP_S_WARNING</DIV><DIV>similar to other messages but using the second byte to switch over the message type.</DIV><DIV>prefix is DM&lt;something&gt; so i guess it was called dynamic messaging ?</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>anyway, receiving is straightforward but sending confuses me, what if the first </DIV><DIV>character of a message would fit in that catagory (don't have an ascii map </DIV><DIV>handy to see if that is possible) i would expect a CP_RCD message not an</DIV><DIV>(ab)use of the CP_MESSAGE but i may know too little about netreks early</DIV><DIV>development days.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>regards</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Chris</DIV><DIV><BR class="khtml-block-placeholder"></DIV></BODY></HTML>