Files
nethack/sys/vms/nethack.com
PatR 9c6e5a0563 dat/keyhelp for vms
Update vms/install.com (rather than Makefile.top) to install the new
data file for the 'whatdoes' command.

Also, the 3.6.0 distribution puts version number 3.5.0 into vms
binaries (all the programs, not just nethack itself).  It's something
observable with native tools without running the program, nothing to
do with nethack's 'v' command which gets its version number from
patchlevel.h via makedefs.
2016-06-05 06:33:42 -07:00

56 lines
2.4 KiB
Plaintext
Executable File

$! NetHack.Com -- sample command procedure for invoking NetHack 9-JAN-1993
$ v = 'f$verify(0)'
$!
$! $NHDT-Date: 1465133392 2016/06/05 13:29:52 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.4 $
$!
$! Possible command line arguments include
$! "-uConan-B" !play a barbarian named Conan
$! "-u" "Merlin-W" !play a wizard named Merlin (slight variant of above)
$! "-e" or "-E" !play an elf with default name (from environment
$! ! [ie, NETHACKOPTIONS logical name] or VMS username)
$! "-a" or "-A", "-b" or "-B", "-c" or "-C", ... !specify character type
$! !note: "-s" is ambiguous between "play as a samurai"
$! ! vs "show scoreboard", so use "-S" for the former
$! "-x" or "-X" !play in 'explore' mode (practice for beginners)
$! "-D" !play in 'wizard' mode (for debugging, available only
$! ! to the username compiled into nethack.exe as WIZARD)
$! "-dec" !turn on DECgraphics mode (VT100 line drawing, done
$! ! automatically below if appropriate term attribs set)
$! "-d" dir-path !specify an alternate playground directory (not
$! ! recommended; define HACKDIR instead)
$!
$
$!
$! assume this command procedure has been placed in the playground directory;
$! get its device:[directory]
$ hackdir = f$parse("_._;0",f$environ("PROCEDURE")) - "_._;0"
$!
$! hackdir should point to the 'playground' directory
$ if f$trnlnm("HACKDIR").eqs."" then define hackdir 'hackdir'
$!
$! termcap is a text file defining terminal capabilities and escape sequences
$ if f$trnlnm("TERMCAP").eqs."" then define termcap hackdir:termcap
$!
! [ obsolete: now handled within nethack itself ]
! $! prior to VMS v6, the C Run-Time Library doesn't understand vt420 :-(
! $ TT$_VT400_Series = 113
! $ if f$getdvi("TT:","DEVTYPE").eq.TT$_VT400_Series -
! .and. f$trnlnm("NETHACK_TERM").eqs."" then define nethack_term "vt400"
$!
$! use the VT100 line drawing character set if possible
$ graphics = ""
$ usropt = f$trnlnm("NETHACKOPTIONS")
$ if usropt.eqs."" then usropt = f$trnlnm("HACKOPTIONS")
$ if f$locate("DECG",f$edit(usropt,"UPCASE")) .ge. f$length(usropt) then -
if f$getdvi("TT:","TT_DECCRT") .and. f$getdvi("TT:","TT_ANSICRT") then -
$ graphics = " -dec" !select DECgraphics mode by default
$!
$! get input from the terminal, not from this .com file
$ deassign sys$input
$!
$ nethack := $hackdir:nethack
$ if p1.nes."-s" .and. p1.nes."-s all" then -
nethack = nethack + graphics
$ nethack "''p1'" "''p2'" "''p3'" "''p4'" "''p5'" "''p6'" "''p7'" "''p8'"
$!