home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / nethack-3.1 / sys / vms / nethack.com < prev    next >
Encoding:
Text File  |  1993-01-10  |  2.3 KB  |  54 lines

  1. $! NetHack.Com -- sample command procedure for invoking NetHack  9-JAN-1993
  2. $ v = 'f$verify(0)'
  3. $!
  4. $!    Possible command line arguments include
  5. $!    "-uConan-B"    !play a barbarian named Conan
  6. $!    "-u" "Merlin-W" !play a wizard named Merlin (slight variant of above)
  7. $!    "-e" or "-E"    !play an elf with default name (from environment
  8. $!            ! [ie, NETHACKOPTIONS logical name] or VMS username)
  9. $!    "-a" or "-A", "-b" or "-B", "-c" or "-C", ... !specify character type
  10. $!            !note: "-s" is ambiguous between "play as a samurai"
  11. $!            !   vs "show scoreboard", so use "-S" for the former
  12. $!    "-x" or "-X"    !play in 'explore' mode (practice for beginners)
  13. $!    "-D"        !play in 'wizard' mode (for debugging, available only
  14. $!            ! to the username compiled into nethack.exe as WIZARD)
  15. $!    "-dec"        !turn on DECgraphics mode (VT100 line drawing, done
  16. $!            ! automatically below if appropriate term attribs set)
  17. $!    "-d" dir-path    !specify an alternate playground directory (not
  18. $!            ! recommended; define HACKDIR instead)
  19. $!
  20. $
  21. $!
  22. $! assume this command procedure has been placed in the playground directory;
  23. $!     get its device:[directory]
  24. $    hackdir = f$parse("_._;0",f$environ("PROCEDURE")) - "_._;0"
  25. $!
  26. $! hackdir should point to the 'playground' directory
  27. $ if f$trnlnm("HACKDIR").eqs."" then  define hackdir 'hackdir'
  28. $!
  29. $! termcap is a text file defining terminal capabilities and escape sequences
  30. $ if f$trnlnm("TERMCAP").eqs."" then  define termcap hackdir:termcap
  31. $!
  32. ! [ obsolete:  now handled within nethack itself ]
  33. ! $! prior to VMS v6, the C Run-Time Library doesn't understand vt420 :-(
  34. ! $      TT$_VT400_Series = 113
  35. ! $ if f$getdvi("TT:","DEVTYPE").eq.TT$_VT400_Series -
  36. !  .and. f$trnlnm("NETHACK_TERM").eqs."" then  define nethack_term "vt400"
  37. $!
  38. $! use the VT100 line drawing character set if possible
  39. $ graphics = ""
  40. $    usropt = f$trnlnm("NETHACKOPTIONS")
  41. $    if usropt.eqs."" then  usropt = f$trnlnm("HACKOPTIONS")
  42. $ if f$locate("DECG",f$edit(usropt,"UPCASE")) .ge. f$length(usropt) then -
  43.     if f$getdvi("TT:","TT_DECCRT") .and. f$getdvi("TT:","TT_ANSICRT") then -
  44. $    graphics = " -dec"    !select DECgraphics mode by default
  45. $!
  46. $! get input from the terminal, not from this .com file
  47. $ deassign sys$input
  48. $!
  49. $    nethack := $hackdir:nethack
  50. $    if p1.nes."-s" .and. p1.nes."-s all" then -
  51.         nethack = nethack + graphics
  52. $ nethack "''p1'" "''p2'" "''p3'" "''p4'" "''p5'" "''p6'" "''p7'" "''p8'"
  53. $!
  54.