Instantly share code, notes, and snippets.

Embed
What would you like to do?
tintin++ script for ifMUD
#! /usr/local/bin/tt++
/* Who wants to write out "inventory" in full? */
#alias {i} {inventory}
#alias {inv} {inventory}
/* Simpler AFK handling.
* ifMUD has a 2-step AFK process.
* This turns it into a one-step "afk MSG" process. */
#alias {afk} {@away me=%0}
#alias {away} {afk}
#action {^Away set.} {@set me=zoned}
#highlight {^Away set.$} {bold yellow}
/* Highlight new messages. */
#highlight {^There %1 %2 new %3 on #%4.} {bold cyan}
#highlight {#%1 [%2] %3 From: %4 %5 Date: %6} {cyan}
#sub {^Subject: %1} {<169>Subject:<099> <179>%1<099>}
/* Highlight directions.
* Couldn't work out how to only sub on lines beginning with Visible Exits:,
* but the space-paren combo mostly avoids spurious highlights. */
#foreach {northeast;southeast;northwest;southwest;up;down;north;south;east;west;in;out} {dir} {
#sub {{ ($dir) \(}} { <120>%2<099> \(}
}
/* Highlight dis/connects. */
#highlight {^<%1> %2 connected %3.$} {bold green}
#highlight {^</%1> %2 disconnected %3.} {bold red}
#highlight {^%1 has disconnected %2.} {bold red}
/* Call out parts of room descriptions */
#highlight {^You can see:} {light yellow}
#highlight {^Players:} {light yellow}
#highlight {^Visible Exits:} {light yellow}
/* Establish session on launch
* Event definition must precede #session. */
#event {SESSION CONNECTED} {
#showme {CONNECTED: %0};
#regex {%0} {^ifmud$} {connect guest guest} {0};
}
#session ifmud ifmud.port4000.com 4000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment