-
Notifications
You must be signed in to change notification settings - Fork 2
tt_msdp
CodeAndLoathing edited this page Jul 19, 2025
·
1 revision
this is a sample script showing how to subscribe to msdp variables CHARACTER_HEALTH and CHARACTER_LOCATION on logon
modify REPORT_VARIABLES to change what msdp variables are subscribed to.
see help msdp in game to see list of available MSDP vars
#EVENT {SESSION CONNECTED}
{
#variable TELNET[IAC] \xFF;
#variable TELNET[DONT] \xFE;
#variable TELNET[DO] \xFD;
#variable TELNET[WONT] \xFC;
#variable TELNET[WILL] \xFB;
#variable TELNET[SB] \xFA;
#variable TELNET[SE] \xF0;
#variable TELNET[MSDP] \x45;
#variable MSDP[VAR] \x01;
#variable MSDP[VAL] \x02;
#variable MSDP[TABLE_OPEN] \x03;
#variable MSDP[TABLE_CLOSE] \x04;
#variable MSDP[ARRAY_OPEN] \x05;
#variable MSDP[ARRAY_CLOSE] \x06;
#variable REPORTABLE_VARIABLES {{CHARACTER_HEALTH};{CHARACTER_LOCATION}};
#nop
#config {debug telnet} {off}
}
#EVENT {IAC WILL MSDP}
{
#send {$TELNET[IAC]$TELNET[DO]$TELNET[MSDP]\}
}
#EVENT {IAC SB MSDP}
{
#nop Save all variables with an MSDP_ prefix.;
#variable {MSDP_%0} {%1}
}
#ALIAS {msdp_report}
{
#nop Ask the server to report all keys inside REPORTABLE_VARIABLES;
#variable result {$TELNET[IAC]$TELNET[SB]$TELNET[MSDP]$MSDP[VAR]REPORT};
#foreach {*REPORTABLE_VARIABLES[]} {tmp}
{
#variable result {$result$MSDP[VAL]$tmp}
};
#send {$result$TELNET[IAC]$TELNET[SE]\}
}
#ALIAS {msdp_list}
{
#send {$TELNET[IAC]$TELNET[SB]$TELNET[MSDP]$MSDP[VAR]LIST$MSDP[VAL]%0$TELNET[IAC]$TELNET[SE]\}
}
#ALIAS {msdp_send}
{
#send {$TELNET[IAC]$TELNET[SB]$TELNET[MSDP]$MSDP[VAR]SEND$MSDP[VAL]%0$TELNET[IAC]$TELNET[SE]\}
}
#ALIAS {example}
{
msdp_list COMMANDS;
msdp_list REPORTABLE_VARIABLES;
msdp_report
}
#ACTION {^{Welcome to the land of SlothMUD. May your visit here be... Interesting.|Reconnecting.|Previous connection terminated, press return to reconnect...Reconnecting.}}
{
msdp_report
}