These are some collected snippets of code that are used in the Last Outpost Project that we've chosen to release publicly. Feel free to use any code examples that you find here in your own mud. If you use any of this stuff, a shout out to RahjIII and The Last Outpost on your credits page would be appropriate.
A TCL script that sets up a listening socket on the port defined in the script. Sends the greeting file, waits two seconds, then sends the message file line by line. Useful for a downtime or dns name change sign.
These are the super-simple fail2ban config scripts that we use to limit password guessing attempts. Check out the README for how to set it up.
A dikumud C code module to find a path from one room in the world[] array to another. Uses all-points-shortest-path for the calculation, and caches the paths it finds for efficiency. Compiles and runs under the original dikumud gamma release.
MUDitM is a telnet proxy that provides an IPv6 and telnet-ssl frontend to standard IPv4/telnet Multi-User Dungeon type games that have not implemented those networking features yet, whatever the reason. The implementation differs from other secure proxy implementations in that it tries to report the proxied client address up to the game server via the NEW-ENVIRON / MNES standard.
An implementation of scnprintf() taken from the linux kernel tree.
Code to list stacks of dikumud-like short item descriptions in a more natural way. Turns a phrase like "a short sword" into "six short swords". Requires glib 2.0 hash table for an irregualr noun lookup, and scnprintf to keep printing in bound. Also provides code to add a verb $v() operator to act(), that changes the pluraliztion of the verb to match the gender of the the subject.
LOciTerm is the char-at-a-time mode mud web client and backend proxy written for The Last Outpost. Version 1.x is discontinued, but version 2.x is coming soon!
Archive contains C code for a function
char *shrink_to_ascii(char *raw)
that in-place transforms a utf-8
encoded, null terminated string into an ascii version. All utf-8 sequences are
reduced to a single ascii character, so if you are looking for something to
translate '😊' into ':smile:', this is NOT what you want.
Archive contains C code for an ANSI terminal color and style library (locolor.c). Also contains a generic variable parser (gvp.c) for substituting "$var(val)" type strings, and a MUD compatible act() type function (loact.c). Example code for using the library is in locolor-demo.c.
Archive contains C code for sending image data to an IIP compatible terminal.
Saladshooter is a simple "mad-libs" style random string generator function. It comes with a JSON format fantasy name generator database, but can be used to make all kinds of semi-random strings.
Archive contains C code for liblomoji, a library that translates Emoji and other UTF-8 sequences into readable ASCII. If you are looking for something more complex than shrinktoascii or iconv, that can translate ':smile:' into '😃', this is what you are looking for. Code is also available on GitHub under RahjIII/Lomoji.
Disclaimer- We hope you find this code useful or interesting, but there's no warranty implied, and clearly there's no intent of fitness for any purpose here whatsoever. While the code archived on this page is open source, The Last Outpost Project itself is not. You won't be able to download the full game here, or anywhere else. Sorry!