From 5c9c90c99061e28059dc8634e8fdcde5f2377fbf Mon Sep 17 00:00:00 2001 From: Jared Miller Date: Thu, 12 Feb 2026 00:12:44 -0500 Subject: [PATCH] Add MSDP status bar and protocol negotiation to mud.tin --- mud.tin | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/mud.tin b/mud.tin index a27239e..e318afc 100644 --- a/mud.tin +++ b/mud.tin @@ -2,6 +2,22 @@ #NOP usage: tt++ mud.tin #split 0 1 +#NOP initialize MSDP variables for status bar (before connection) +#variable {MSDP_HEALTH} {-} +#variable {MSDP_HEALTH_MAX} {-} +#variable {MSDP_STAMINA} {-} +#variable {MSDP_STAMINA_MAX} {-} + +#NOP protocol negotiation - respond to server's WILL offers +#EVENT {IAC WILL GMCP} {#send {\xFF\xFD\xC9}} +#EVENT {IAC WILL MSDP} {#send {\xFF\xFD\x45}} + +#NOP store incoming MSDP variables +#EVENT {IAC SB MSDP} {#variable {MSDP_%0} {%1}} + +#NOP status bar: HP and stamina from MSDP +#status {[HP: $MSDP_HEALTH/$MSDP_HEALTH_MAX] [ST: $MSDP_STAMINA/$MSDP_STAMINA_MAX]} + #NOP reconnect after disconnect. defined before #session so it #NOP persists in the startup session when the mud session dies. #alias {reconnect} {#session mud localhost 6789}