1*41205SbosticHack is a display oriented dungeons & dragons - like game. 2*41205SbosticBoth display and command structure resemble rogue. 3*41205Sbostic(For a game with the same structure but entirely different display - 4*41205Sbostica real cave instead of dull rectangles - try Quest) 5*41205Sbostic 6*41205SbosticHack was originally written by Jay Fenlason (at lincolnsudbury: 7*41205Sbostic 29 East St., Sudbury Mass., 01776) with help from 8*41205Sbostic Kenny Woodland, Mike Thome and Jon Payne. 9*41205SbosticBasically it was an implementation of Rogue, however, with 52+ instead of 26 10*41205Sbostic monster types. 11*41205SbosticThe current version is more than thrice as large (with such new features as 12*41205Sbostic the dog, the long worms, the shops, etc.) and almost entirely rewritten 13*41205Sbostic (only the display routines are the original ones - I must rewrite these 14*41205Sbostic too one day; especially when you are blind strange things still happen). 15*41205Sbostic 16*41205SbosticFiles for hack: 17*41205Sbostic hack The actual game 18*41205Sbostic record Top 100 list (just start with an empty file) 19*41205Sbostic news Tells about recent changes in hack, or bugs found ... 20*41205Sbostic (Just start with no news file.) 21*41205Sbostic data Auxiliary file used by hack to give you the names 22*41205Sbostic and sometimes some more information on the 23*41205Sbostic objects and monsters. 24*41205Sbostic help Introductory information (no doubt outdated). 25*41205Sbostic hh Compactified version of help. 26*41205Sbostic perm An empty file used for locking purposes. 27*41205Sbostic rumors Texts for fortune cookies. 28*41205Sbostic (Some of these contain information on the game, 29*41205Sbostic others are just plain stupid. Additional rumors 30*41205Sbostic are appreciated.) 31*41205Sbostic hack.sh A shell script. 32*41205Sbostic (We have hack.sh in /usr/games/hack and 33*41205Sbostic hack in /usr/games/lib/hackdir/hack and all the other 34*41205Sbostic hack stuff in /usr/games/lib/hackdir - perhaps this 35*41205Sbostic will make the script clear. 36*41205Sbostic There is no need for you to use it.) 37*41205Sbostic READ_ME This file. 38*41205Sbostic Original_READ_ME Jay Fenlason's READ_ME 39*41205Sbostic 40*41205SbosticSystem files used: 41*41205Sbostic /etc/termcap Used in conjunction with the environment variable 42*41205Sbostic $TERM. 43*41205Sbostic /bin/cat 44*41205Sbostic /usr/ucb/more 45*41205Sbostic /bin/sh Used when $SHELL is undefined. 46*41205Sbostic 47*41205SbosticHow to install hack: 48*41205Sbostic0. Compile the sources. Perhaps you should first look at the file config.h 49*41205Sbostic and define BSD if you are on a BSDtype system, 50*41205Sbostic define STUPID if your C-compiler chokes on complicated expressions. 51*41205Sbostic Make sure schar and uchar represent signed and unsigned types. 52*41205Sbostic If your C compiler doesnt allow initialization of bit fields 53*41205Sbostic change Bitfield. When config.h looks reasonable, say 'make'. 54*41205Sbostic (Perhaps you have to change TERMLIB in the makefile.) 55*41205Sbostic1. If it didnt exist already, introduce a loginname `play' . 56*41205Sbostic2. The program hack resides in a directory so that it is executable 57*41205Sbostic for everybody and is suid play: 58*41205Sbostic ---s--s--x 1 play 206848 Apr 3 00:17 hack 59*41205Sbostic Perhaps you wish to restrict playing to certain hours, or have games 60*41205Sbostic running under nice; in that case you might write a program play.c 61*41205Sbostic such that the program play is suid play and executable for everybody 62*41205Sbostic while all the games in /usr/games are readable or executable for 63*41205Sbostic play only; all the program play does is asking for the name of a game, 64*41205Sbostic checking that time-of-day and system load do not forbid playing, 65*41205Sbostic and then executing the game. Thus: 66*41205Sbostic -r-sr-sr-x 1 play 13312 May 24 12:52 play 67*41205Sbostic ---x------ 1 play 206848 Apr 3 00:17 hack 68*41205Sbostic If you are worried about security you might let play do 69*41205Sbostic chroot("/usr/games") so that no player can get access to the rest 70*41205Sbostic of the system via shell escapes and the likes. 71*41205Sbostic If you #define SECURE in config.h then hack will not setuid(getuid()) 72*41205Sbostic before executing a chdir(). Hack will always do setuid(getuid()) with 73*41205Sbostic a fork. If you do not define UNIX then hack will not fork. 74*41205Sbostic3. The rest of the stuff belonging to hack sits in a subdirectory hackdir 75*41205Sbostic (on our system /usr/games/lib/hackdir) with modes 76*41205Sbostic drwx------ 3 play 1024 Aug 9 09:03 hackdir 77*41205Sbostic Here all the temporary files will be created (with names like xlock.17 78*41205Sbostic or user.5). 79*41205Sbostic4. If you are not really short on file space, creating a subdirectory 80*41205Sbostic hackdir/save (modes again drwx------) will enable users to save their 81*41205Sbostic unfinished games. 82*41205Sbostic 83*41205SbosticThe program hack is called 84*41205Sbostic$ hack [-d hackdir] [maxnrofplayers] 85*41205Sbostic(for playing) or 86*41205Sbostic$ hack [-d hackdir] -s [listofusers | limit | all] 87*41205Sbostic(for seeing part of the scorelist). 88*41205SbosticThe shell file hack (in this kit called hack.sh) takes care of 89*41205Sbosticcalling hack with the right arguments. 90*41205Sbostic 91*41205SbosticSend complaints, bug reports, suggestions for improvements to 92*41205Sbosticmcvax!aeb - in real life Andries Brouwer. 93