I’ve been playing a lot of Dungeon Crawl Stone Soup lately, which is a roguelike like Nethack only it’s undergoing active development and you tend not to die to the random number generator as often as your own mistakes. (If you don’t know what a roguelike is, it’s a turn-based game with mostly randomly-generated dungeons and items, and with permanent death; you automatically quit after you save, so it’s only useful for taking breaks). I play almost exclusively on crawl.akrasiac.org (or CAO), which is like the nethack.alt.org of Crawl; other people can watch you play, there are bots that announce deaths and other important events in ##crawl on the freenode IRC network, and it has a dgamelaunch frontend for logging in to your character, setting options, etc.
Unfortunately, due to the way that CAO is set up, there’s no built-in method for automatically logging in as your character. This isn’t exactly the most horrible inconvenience in the world, but it can be kind of annoying. So I set up a script:
spawn ssh -C joshua@crawl.akrasiac.org
expect "ssword" {
send "joshua\n"
}
expect "Login" {
send "l"
send "Username\n"
send "Password\n"
send "1p"
}
interact
Obviously, replace Username and Password with your username/password, and if you automatically log in when you ssh manually because you set up the RSA key, remove the ‘expect “ssword” part. To use this, you need to install expect; if you’re playing on Linux, it’s probably in your distribution’s repositories. If you’re playing on OS X, then you need to install MacPorts and sudo port install expect. If you’re playing on Windows via PuTTY, you’re out of luck (but you can still set up the RSA key to at least auto-login as joshua).
Once you’ve installed expect, open up a text file in your home directory or wherever; paste the script in; and chmod 0755 /path/to/the/script. Then you can execute the script from the terminal like any other program, and it’ll automatically drop you into your last savegame (or the race/class choice screen)

Leave a Reply