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 2.1 is out now! The LociTerm server at last-outpost.com is configured for open suggestions, so you can try it with your favorite mud without having to install any software.
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.
A simple C file that lets you print a little bar graph like βββββββββ β ββββββinto a string buffer, given a width and a fullness level.
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!