SourceForge Logo

The New Adventure Shell

The New Adventure Shell is a shell script that will make your Un*x shell act like a text adventure game. It is similar to the mud-shell (available on which has been written in perl. This script however is written in ksh/bash/zsh.

The script is intended to pose as little restrictions on the normal use of the shell as possible, while allowing as many adventure commands as possible, and is written for maximum portability to other Unices.

Running the script

No libraries or modules are needed to run the script; start it with:

	. nadvsh
For more documentation, see the manual page.


Tested on:

  • Linux 2.4.19-pre6 / pdksh-5.2.14-13
  • Linux 2.4.19-pre6 / bash-2.05a-13
  • Linux 2.4.19-pre6 / zsh-4.0.2-2
  • AIX 4.3 / ksh
  • AIX 4.3 / bash-2.01.0(1)-release
  • HP-UX 11.11 / ksh
  • HP-UX 11.11 / bash-2.05.0(2)-release
  • SunOS 5.6 / ksh
  • SunOS 5.8 / ksh
I am still looking for testers on OSF/1, IRIX and *BSD.

Sourceforge is also where the project summary is located.

New features until 1.85.3:

  • Added 'stow away', 'wear' and 'wield' commands
  • Added 'emote', 'cal' and 'put' commands
  • Added unique colors for teleporter objects
  • Added npc descriptions
  • Implemented faint from exhaustion
  • Implemented money objects (take, drop, examine and sell)
  • Implemented displaying of chargecount in descriptions
  • Fixed handling of cardinal numbers in item names
  • Fixed problematic bugs in d_buy concerning armor and clothing
  • Fixed 'Usage:' lines
  • Fixed singular/plural currency form
  • Fixed several small bugs
  • Code cleanup and optimizations
  • Moved manual page to section 6

New features until 1.80.5:

  • Added buy/sell and currency commands
  • Fixed major bugs in backpack setup procedure

New features until 1.79.4:

  • Added theme support
  • Added several NPC-independent-action routines (examine, eat/drink, fight, drop)
  • Implemented dark, obscured and airless/underwater locations
  • Rebalanced fight routines and scoring system
  • Fixed currency handling
  • Fixed numerous bugs and compatibility issues

New features until 1.74.1:

  • Added implementation of object classes
  • Added object repository
  • Added routine to fill backpack initially
  • Added 'repetitive exec' functionality
  • Added location flags functionality
  • Fixed kill/fight routine
  • Fixed listing of items
  • Updated manual for directions (ne, west, etc.), object classes
  • Restructured manual

New features until 1.71.9:

  • Backpacks are now fully operational for both users and NPC's
  • Added functionality to rename objects
  • Added 'look into location'
  • Added 'look at person' (partially)
  • Added 'inventory user'
  • Added functionality for charm and dexterity (to be used later)
  • Added strength checking (it is possible to die now)
  • Fixed 'describe' and 'wrap'
  • Fixed behavior of play/replay/noplay/quit
  • Fixed several small bugs
  • Code cleanup
  • Updated manual

The inspiration for this script has come from some of the original adventure/mud-shells:

/home/rene$ . nadvsh

Welcome to the new adventure shell. Use the commands 'play' and 'noplay' to start/stop playing.

You are in a nice room with a green carpet and a bed on one side of the room. There is a desk with a computer at one wall, and across the room, there is a cupboard with linguistic books and fantasy games.
Anson the hobbit enters.
Anson the hobbit asks: "You don't happen to have anything to eat?"

You are in in Rene's room. (/home/rene)
What now? cd ..
This is the home of the lesser gurus and the neophytes. You see pasty people sleeping. Some have a keyboard pattern imprinted on one side of their faces. These people need to get out more.
Edrion the illusionist is here.

You are in the Unix users' home. (/home)
What now? wait
Edrion the illusionist walks to webuser.

You are in the Unix users' home. (/home)
What now? cd webuser
There is an orc here.
Edrion the illusionist is here.
Edrion the illusionist sneezes.

You are in /home/webuser
What now? inv
You are carrying Gandalf's magic staff, a backpack, a crystal ring, a diamond, a longbow, and a staff.
Edrion the illusionist whispers: "It is rumored that every man who enters this place, becomes infected with disease within a few days time!" He nods enthusiastically.

You are in /home/webuser
What now? inv bsp
Baan application owner is not carrying anything.
The orc looks interested at your backpack.
Edrion the illusionist scratches his head.

You are in /home/webuser
What now? examine 'crystal ring'
The ring is made of amber crystal.
The orc leaves.

You are in /home/webuser
What now? give 'crystal ring' to bsp
Okay. You give the crystal ring to bsp.

You are in /home/webuser
What now? inv bsp
Baan application owner is carrying a crystal ring.

You are in /home/webuser
What now? cd ~/nadvsh
You are in a laboratory with many erlenmeyers, round-bottom flasks and a destillation apparatus.

You are in a laboratory. (/home/rene/nadvsh)
What now? cd ~michel
Michel Plasmeijer is here.

You are in /home/michel
What now? say to michel "Hey, how are you?"
Okay. You say "Hey, how are you?" to michel.

You are in /home/michel
What now?

Send comments to René Uittenbogaard. Feedback appreciated!