Created
January 28, 2012 05:29
-
-
Save jeremy-w/1692854 to your computer and use it in GitHub Desktop.
tintin++ script for ifMUD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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