TinTin++ Mud Client Scripts
This script works with TinTin++ 2.1.8. This is a debugging script to debug an MSSP capable MUD server.

This script is written for v2.01.97 and higher

#EVENT {SESSION CONNECTED}
{
     #variable TELNET[IAC]  \xFF;
     #variable TELNET[DO]   \xFD;
     #variable TELNET[MSSP] \x46;
     #config {packet patch} {1};
     #config {connect retry} {0};
     #variable HOST {%1};
     #variable IP {%2};
     #variable MSSP_PORT {%3};
     #loop {1} {&vars[]} {cnt}
     {
          #variable {$vars[$cnt]} {}
     }
}

#VARIABLE {vars}
{
     {1} {PLAYERS}
     {2} {UPTIME}
     {3} {HOSTNAME}
     {4} {PORT}
     {5} {CRAWL DELAY}
     {6} {CODEBASE}
     {7} {CONTACT}
     {8} {CREATED}
     {9} {ICON}
     {10} {IP}
     {11} {LANGUAGE}
     {12} {LOCATION}
     {13} {MINIMUM AGE}
     {14} {NAME}
     {15} {WEBSITE}
     {16} {FAMILY}
     {17} {GENRE}
     {18} {GAMEPLAY}
     {19} {GAMESYSTEM}
     {20} {INTERMUD}
     {21} {STATUS}
     {22} {SUBGENRE}
     {23} {AREAS}
     {24} {HELPFILES}
     {25} {MOBILES}
     {26} {OBJECTS}
     {27} {ROOMS}
     {28} {CLASSES}
     {29} {LEVELS}
     {30} {RACES}
     {31} {SKILLS}
     {32} {ANSI}
     {33} {GMCP}
     {34} {MCCP}
     {35} {MCP}
     {36} {MSDP}
     {37} {MSP}
     {38} {MXP}
     {39} {PUEBLO}
     {40} {UTF-8}
     {41} {VT100}
     {42} {XTERM 256 COLORS}
     {43} {PAY TO PLAY}
     {44} {PAY FOR PERKS}
     {45} {HIRING BUILDERS}
     {46} {HIRING CODERS}
}
#VARIABLE {nums}
{
     {ANSI} {}
     {AREAS} {}
     {CLASSES} {}
     {CRAWL DELAY} {}
     {CREATED} {}
     {GMCP} {}
     {HELPFILES} {}
     {HIRING BUILDERS} {}
     {HIRING CODERS} {}
     {LEVELS} {}
     {MCCP} {}
     {MCP} {}
     {MINIMUM AGE} {}
     {MOBILES} {}
     {MSDP} {}
     {MSP} {}
     {MXP} {}
     {OBJECTS} {}
     {PAY FOR PERKS} {}
     {PAY TO PLAY} {}
     {PUEBLO} {}
     {RACES} {}
     {ROOMS} {}
     {SKILLS} {}
     {UTF-8} {VT100}
     {XTERM 256 COLORS} {}
}
#EVENT {IAC WILL MSSP}
{
     #send {$TELNET[IAC]$TELNET[DO]$TELNET[MSSP]\}
}

#EVENT {IAC SB MSSP}
{
     mssp_var {%0} {%1}
}

#EVENT {IAC SB MSSP IAC SE}
{
     #delay {0.5}{#showme {<178>Legend: <118>## <178>Incorrect data  <138>## <178>Incorrect capitalization  <168>## <178>Unknown data (possibly correct)};display}
}

#VARIABLE {families}
{
     {AberMUD} {}
     {CoffeeMUD} {}
     {Custom} {}
     {DikuMUD} {}
     {LPMud} {}
     {MOO} {}
     {MajorMUD} {}
     {Mordor} {}
     {Rapture} {}
     {SocketMUD} {}
     {TinyMUD} {}
}
#VARIABLE {genres}
{
     {Adult} {}
     {Fantasy} {}
     {Historical} {}
     {Horror} {}
     {Modern} {}
     {None} {}
     {Science Fiction} {}
}
#VARIABLE {gameplay}
{
     {Adventure} {}
     {Educational} {}
     {Hack and Slash} {}
     {None} {}
     {Player versus Player} {}
     {Roleplaying} {}
     {Simulation} {}
     {Social} {}
     {Strategy} {}
}
#VARIABLE {locations}
{
     {Australia} {}
     {Belgium} {}
     {Canada} {}
     {China} {}
     {Denmark} {}
     {Estonia} {}
     {Finland} {}
     {France} {}
     {Germany} {}
     {Ireland} {}
     {Japan} {}
     {Mexico} {}
     {Netherlands} {}
     {New Zealand} {}
     {Norway} {}
     {Portugal} {}
     {South Africa} {}
     {Spain} {}
     {Sweden} {}
     {United Kingdom} {}
     {United States} {}
}
#VARIABLE {languages}
{
     {Belgian} {}
     {Chinese} {}
     {Danish} {}
     {Dutch} {}
     {English} {}
     {Finnish} {}
     {French} {}
     {German} {}
     {Japanese} {}
     {Norwegian} {}
     {Spanish} {}
     {Swedish} {}
}
#VARIABLE {networks}
{
     {I3} {}
     {IMC2} {}
}
#VARIABLE {status}
{
     {Alpha} {}
     {Closed Beta} {}
     {Live} {}
     {Open Beta} {}
}
#VARIABLE {subgenres}
{
     {Adventure} {}
     {Ancient Rome} {}
     {Anime} {}
     {Dark Fantasy} {}
     {Discworld} {}
     {High Fantasy} {}
     {Medieval Fantasy} {}
     {Medieval Mythical} {}
     {Multiverse} {}
     {Mythical Fantasy} {}
     {Naruto} {}
     {None} {}
     {Pokemon} {}
     {Post-Apocalyptic} {}
     {Pulp} {}
     {Space Opera} {}
     {Star Wars} {}
     {Time Travel} {}
     {World of Darkness} {}
}
#VARIABLE {UPTIME_ORIGINAL} {}

#FUNCTION {chainlink}
{
     #variable result {};
     #loop {1} {&%0[]} {cnt}
     {
          #if {$cnt == 1}
          {
               #variable result $%0[$cnt]
          };
          #else
          {
               #variable result $result, $%0[$cnt]
          }
     }
}

#ALIAS {display}
{
     #variable index 0;
     #if {"$INTERMUD" != ""}
     {
          #variable INTERMUD @chainlink{INTERMUD}
     };
     #if {"$PORT" != ""}
     {
          #variable PORT @chainlink{PORT}
     };
     #else
     {
          #variable PORT $MSSP_PORT
     };
     #variable cnt 0;
     #showme {\n\};
     #showme {<088>};
     #variable temp {};
     #loop {1} {&vars[]} {cnt}
     {
          #variable var $vars[$cnt];
          #variable color <178>;
          #if {&nums[$var]}
          {
               #regexp {${$var}} {^%s{-|}%d%s$}
               {
                    #nop
               };
               #else
               {
                    #variable color <118>
               }
          };
          #elseif {"$var" == "FAMILY"}
          {
               #if {&families[$FAMILY] == 0}
               {
                    #if {&families[%i$FAMILY] == 0}
                    {
                         #variable color <118>
                    };
                    #else
                    {
                         #variable color <138>
                    }
               }
          };
          #elseif {"$var" == "GAMEPLAY"}
          {
               #if {&gameplay[$GAMEPLAY] == 0}
               {
                    #if {&gameplay[%i$GAMEPLAY] == 0}
                    {
                         #variable color <118>
                    };
                    #else
                    {
                         #variable color <138>
                    }
               }
          };
          #elseif {"$var" == "GENRE"}
          {
               #if {&genres[$GENRE] == 0}
               {
                    #if {&genres[%i$GENRE] == 0}
                    {
                         #variable color <118>
                    };
                    #else
                    {
                         #variable color <138>
                    }
               }
          };
          #elseif {"$var" == "HOSTNAME"}
          {
               #if {"$HOST" != "%*$HOSTNAME%*" && "$HOST" != "%*localhost%*"}
               {
                    #if {"$HOST" != "%i%*$HOSTNAME%*"}
                    {
                         #variable color <118>
                    };
                    #else
                    {
                         #variable color <138>
                    }
               }
          };
          #elseif {"$var" == "IP"}
          {
               #if {"$IP" == "127.0.0.1"}
               {
                    #variable color <118>
               }
          };
          #elseif {"$var" == "LANGUAGE"}
          {
               #if {&languages[$LANGUAGE] == 0}
               {
                    #if {&languages[%i$LANGUAGE] == 0}
                    {
                         #variable color <118>
                    };
                    #else
                    {
                         #variable color <138>
                    }
               }
          };
          #elseif {"$var" == "LOCATION"}
          {
               #if {&locations[$LOCATION] == 0}
               {
                    #if {&locations[%i$LOCATION] == 0}
                    {
                         #variable color <118>
                    };
                    #else
                    {
                         #variable color <138>
                    }
               }
          };
          #elseif {"$var" == "STATUS"}
          {
               #if {&status[$STATUS] == 0}
               {
                    #if {&status[%i$STATUS] == 0}
                    {
                         #variable color <118>
                    };
                    #else
                    {
                         #variable color <138>
                    }
               }
          };
          #elseif {"$var" == "SUBGENRE"}
          {
               #if {&subgenres[$SUBGENRE] == 0}
               {
                    #if {&subgenres[%i$SUBGENRE] == 0}
                    {
                         #variable color <168>
                    };
                    #else
                    {
                         #variable color <168>
                    }
               }
          };
          #elseif {"$var" == "UPTIME"}
          {
               #if {"$UPTIME" == ""}
               {
                    #variable color <118>;
                    #variable {UPTIME} {$UPTIME_ORIGINAL}
               }
          };
          #elseif {"$var" == "PLAYERS"}
          {
               #if {"$PLAYERS" == ""}
               {
                    #variable color <118>;
                    #variable {PLAYERS} {0}
               }
          };
          #elseif {"$var" == "ICON"}
          {
               #if {"$ICON" != "http%*"}
               {
                    #variable color <118>
               }
          };
          #elseif {"$var" == "WEBSITE"}
          {
               #if {"$WEBSITE" != "http%*"}
               {
                    #variable color <118>
               }
          };
          #format {temp} {<128>%+17s%s%+61s } {$var} {$color} {${$var}};
          #showme {$temp}
     }
}

#ALIAS {mssp_var}
{
     #if {"%1" == "UPTIME"}
     {
          #variable UPTIME_ORIGINAL {%2};
          #if {"%2" != "%d"}
          {
               #variable {UPTIME} {}
          };
          #elseif {%2 < 1234567890 || %2 > 2345678901}
          {
               #variable {UPTIME} {}
          };
          #else
          {
               #format TIME %T;
               #math TIME $TIME - %2;
               #format {%1} {%m} {0.0 + $TIME / (60 * 60 * 24)}
          }
     };
     #else
     {
          #if {"%2" == ""}
          {
               #nop
          };
          #else
          {
               #if {"%1" == "PORT"}
               {
                    #list {%1} {ins} {1} {%2}
               };
               #else
               {
                    #if {"%1" == "INTERMUD" || "%1" == "PORT"}
                    {
                         #if {&networks[%2] == 0}
                         {
                              #list {%1} {ins} {1} {<168>%2<178>}
                         };
                         #else
                         {
                              #list {%1} {ins} {1} {%2}
                         }
                    };
                    #else
                    {
                         #format {%1} {%p} {%2}
                    }
               }
          }
     }
}