$! ------------------ CUT HERE ----------------------- $ v='f$verify(f$trnlnm("SHARE_VERIFY"))' $! $! This archive created by VMS_SHARE Version 7.2-007 22-FEB-1990 $! On 3-JUL-1993 18:19:45.47 By user MASMUMMY $! $! This VMS_SHARE Written by: $! Andy Harper, Kings College London UK $! $! Acknowledgements to: $! James Gray - Original VMS_SHARE $! Michael Bednarek - Original Concept and implementation $! $!+ THIS PACKAGE DISTRIBUTED IN 72 PARTS, TO KEEP EACH PART $! BELOW 30 BLOCKS $! $! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER $! AND EXECUTE AS A COMMAND PROCEDURE ( @name ) $! $! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING: $! 1. AAAREADME.1ST;1 $! 2. BUILD.COM;1 $! 3. VMS4.TXT;1 $! 4. [.DOC]INSTALL.DOC;1 $! 5. [.DOC]MORIA.DOC;1 $! 6. [.EXECUTE]MORIAHLP.HLP;1 $! 7. [.SOURCE]MORIA.PAS;1 $! 8. [.SOURCE]TERMDEF.PAS;1 $! 9. [.SOURCE.INCLUDE]CONSTANTS.INC;1 $! 10. [.SOURCE.INCLUDE]CREATE.INC;1 $! 11. [.SOURCE.INCLUDE]CREATURE.INC;1 $! 12. [.SOURCE.INCLUDE]DEATH.INC;1 $! 13. [.SOURCE.INCLUDE]DESC.INC;1 $! 14. [.SOURCE.INCLUDE]EAT.INC;1 $! 15. [.SOURCE.INCLUDE]FILES.INC;1 $! 16. [.SOURCE.INCLUDE]GENERATE.INC;1 $! 17. [.SOURCE.INCLUDE]HELP.INC;1 $! 18. [.SOURCE.INCLUDE]IO.INC;1 $! 19. [.SOURCE.INCLUDE]MAGIC.INC;1 $! 20. [.SOURCE.INCLUDE]MISC.INC;1 $! 21. [.SOURCE.INCLUDE]MORIA.INC;1 $! 22. [.SOURCE.INCLUDE]POTIONS.INC;1 $! 23. [.SOURCE.INCLUDE]PRAYER.INC;1 $! 24. [.SOURCE.INCLUDE]SAVE.INC;1 $! 25. [.SOURCE.INCLUDE]SCROLLS.INC;1 $! 26. [.SOURCE.INCLUDE]SPELLS.INC;1 $! 27. [.SOURCE.INCLUDE]STAFFS.INC;1 $! 28. [.SOURCE.INCLUDE]STORE1.INC;1 $! 29. [.SOURCE.INCLUDE]STORE2.INC;1 $! 30. [.SOURCE.INCLUDE]TYPES.INC;1 $! 31. [.SOURCE.INCLUDE]VALUES.INC;1 $! 32. [.SOURCE.INCLUDE]VARIABLES.INC;1 $! 33. [.SOURCE.INCLUDE]WANDS.INC;1 $! 34. [.SOURCE.INCLUDE]WIZARD.INC;1 $! 35. [.SOURCE.MACRO]BITPOS.MAR;1 $! 36. [.SOURCE.MACRO]DISTANCE.MAR;1 $! 37. [.SOURCE.MACRO]INSERT.MAR;1 $! 38. [.SOURCE.MACRO]MAXMIN.MAR;1 $! 39. [.SOURCE.MACRO]MINMAX.MAR;1 $! 40. [.SOURCE.MACRO]PUTQIO.MAR;1 $! 41. [.SOURCE.MACRO]RANDINT.MAR;1 $! 42. [.SOURCE.MACRO]RANDREP.MAR;1 $! $set="set" $set symbol/scope=(nolocal,noglobal) $f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID")) $e="write sys$error ""%UNPACK"", " $w="write sys$output ""%UNPACK"", " $ if f$trnlnm("SHARE_LOG") then $ w = "!" $ ve=f$getsyi("version") $ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto START $ e "-E-OLDVER, Must run at least VMS 4.4" $ v=f$verify(v) $ exit 44 $UNPACK: SUBROUTINE ! P1=filename, P2=checksum $ if f$search(P1) .eqs. "" then $ goto file_absent $ e "-W-EXISTS, File ''P1' exists. Skipped." $ delete 'f'* $ exit $file_absent: $ if f$parse(P1) .nes. "" then $ goto dirok $ dn=f$parse(P1,,,"DIRECTORY") $ w "-I-CREDIR, Creating directory ''dn'." $ create/dir 'dn' $ if $status then $ goto dirok $ e "-E-CREDIRFAIL, Unable to create ''dn'. File skipped." $ delete 'f'* $ exit $dirok: $ w "-I-PROCESS, Processing file ''P1'." $ if .not. f$verify() then $ define/user sys$output nl: $ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1' PROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET( SUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");b:= CREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(b)); LOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION( BEGINNING_OF(b));g:=0;LOOP EXITIF MARK(NONE)=END_OF(b);x:=ERASE_CHARACTER(1); IF g=0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x="V" THEN APPEND_LINE; MOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;IF x="+" THEN g:=1; ERASE_LINE;ENDIF;ELSE IF x="-" THEN IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+")= 1 THEN g:=0;ENDIF;ENDIF;ERASE_LINE;ENDIF;ENDLOOP;t:="0123456789ABCDEF"; POSITION(BEGINNING_OF(b));LOOP r:=SEARCH("`",FORWARD);EXITIF r=0;POSITION(r); ERASE(r);x1:=INDEX(t,ERASE_CHARACTER(1))-1;x2:=INDEX(t,ERASE_CHARACTER(1))-1; COPY_TEXT(ASCII(16*x1+x2));ENDLOOP;WRITE_FILE(b,GET_INFO(COMMAND_LINE, "output_file"));ENDPROCEDURE;Unpacker;QUIT; $ delete/nolog 'f'* $ CHECKSUM 'P1' $ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT $ e "-E-CHKSMFAIL, Checksum of ''P1' failed." $ ENDSUBROUTINE $START: $ create 'f' X The Dungeons of Moria - COPYRIGHT (c) Robert Alan Koeneke`0D V The Dungeons of Moria - COPYRIGHT (c) Robert Alan Koeneke`0D X`0D X`0D X 1.0 DISCLAIMER`0D __________`0D X`0D X Moria is intended for Public Domain, and may not be sold or` V0D X marketed IN ANY FORM without the permision and written consent` V0D X from the author Robert Alan Koeneke. I retain all copyrights to` V0D X this program, in either the original or modified forms, and no` V0D X violation, deletion, or change of the copyright notice is` V0D X allowed. Futhermore, I will have no liability or responsibilty` V0D X to any user with respect to loss or damage caused directly or` V0D X indirectly by this program.`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X 1`0D X`0C The Dungeons of Moria - COPYRIGHT (c) Robert Alan Koeneke`0D V The Dungeons of Moria - COPYRIGHT (c) Robert Alan Koeneke`0D X`0D X`0D X 2.0 INTRODUCTION`0D ____________`0D X`0D X MORIA is a huge dungeon simulation game written mainly in` V0D X VAX-11 PASCAL, encompasing about 22,000 lines of code. A single` V0D X executable file is all that is needed to bring up MORIA for the` V0D X first time, although a MORIA help library must be present in` V0D X order to use the internal help options.`0D X`0D X In addition to the PASCAL source code, several macro` V0D X functions and procedures are present which must be linked into` V0D X the moria object library. These macro routines are primarily` V0D X used for greatly improved speed on IO and execution.`0D X`0D X`0D X`0D X 3.0 THE DISTRIBUTION PACKAGE`0D ___ ____________ __ V_____`0D X`0D X This distribution package contains many files organized into` V0D X certain directories. The directory structure is as follows:`0D X`0D X +--------------------+`0D X `7CMain MORIA directory`7C`0D X `7C Build.com `7C`0D X +--------------------+`0D X / `7C \`0D X / `7C \`0D X +--------------------+ +--------------------+ +------------------ V--+`0D X `7C DOC - Documentation`7C `7C SOURCE - .PAS files`7C `7C EXECUTE V - Binaries `7C`0D X `7C source `7C `7C `7C `7C V and data `7C`0D X +--------------------+ +--------------------+ +------------------ V--+`0D X / \`0D X / \`0D X +--------------------+ +--------------------+`0 VD X `7C MACRO - source & `7C `7C INCLUDE - Pascal V `7C`0D X `7C library `7C `7C include fi Vles`7C`0D X +--------------------+ +--------------------+`0 VD X`0D X`0D X A ready to run Moria is found in EXECUTE.DIR, along with all` V0D X needed data files and the Moria help library. You may execute` V0D X BUILD.COM to rebuild Moria if needed. Examine BUILD.COM closely` V0D X and you will notice that it will allow you to rebuild certain` V0D X sections of Moria or re-link it, if the proper parameter is used.` V0D X`0D X Documentation source can be found in the directory DOC.DIR.` V0D X MORIA.HLP is used to build the help library. MORIA.RNO is used` V0D X for the manual which can be printed off.`0D X`0D X The source directory, SOURCE.DIR, contains only MORIA.PAS` V0D X and TERMDEF.PAS. Most of the guts to Moria can be found in the` V0D X directory INCLUDE.DIR, which contains all of the include files` V0D X used by MORIA.PAS. MACRO.DIR contains several macro routines,` V0D X whose objects are stored in MORIALIB.OLB, an object module` V0D X library.`0D X`0D X`0D X 2`0D X`0C The Dungeons of Moria - COPYRIGHT (c) Robert Alan Koeneke`0D V The Dungeons of Moria - COPYRIGHT (c) Robert Alan Koeneke`0D X`0D X`0D X 4.0 INSTALLATION`0D ____________`0D X`0D X Because of the size of MORIA when running, it is suggested` V0D X that it be installed shared. MORIA can be installed with SYSPRV` V0D X so that all data files can be kept locked up to all but system.` V0D X MORIA turns off SYSPRV automatically unless accessing it's own` V0D X data files, so that no breach in system security is possible.` V0D X Also, the game itself should be read protected, allowing only` V0D X EXECUTE access, so that it can not propagate within a system.`0D X`0D X`0D X Installed without SYSPRV /open/shared `0D X Executable protection MORIA.EXE (s:re,o:re,g:re,w:re)`0D X`0D X Installed with SYSPRV /priv=sysprv/open/shared`0D X Executable protection MORIA.EXE (s:re,o:e,g:e,w:e)`0D X`0D X`0D X`0D X When MORIA is first executed, it looks for certain data` V0D X files in the same directory as the executable. If they are not` V0D X found, they are created with default values and the game exits.` V0D X The local MORIA WIZARD should edit these files for site specific` V0D X information and running hours.`0D X`0D X Four data files are created and maintained by MORIA.` V0D X MORIA.DAT contains a startup message and MORIA news, and can be` V0D X used to tell MORIAvites about changes in playing times and such.` V0D X HOURS.DAT contains a reject message and the normal operating` V0D X hours for the game. Note that the only part of this file` V0D X important to the game is the lines containing hours, and that` V0D X text may be added before and/or after these lines. MORIATOP.DAT` V0D X will contain the top twenty scores. MORIACHR.DAT contains an` V0D X entry for each living, saved character, thus disallowing players` V0D X to bring back dead characters.`0D X`0D X A fifth file is needed if you want to use the internal help` V0D X command within MORIA. This is the MORIAHLP.HLB help library,` V0D X which must be located in the same directory as the other data` V0D X files.`0D X`0D X The suggested protection for these files is as follows:`0D X`0D X With SYSPRV Without SYSPRV`0D X MORIA.DAT (s:rw,o,g,w) (s:rw,o:r,g:r,w:r)`0 VD X HOURS.DAT (s:rw,o,g,w) (s:rw,o:r,g:r,w:r)`0 VD X MORIATOP.DAT (s:rw,o:r,g:r,w:r) (s:rw,o:rw,g:rw,w:rw V)`0D X MORIACHR.DAT (s:rw,o,g,w) (s:rw,o:rw,g:rw,w:rw V)`0D X MORIAHLP.HLB (s:r,o:r,g:r,w:r) (s:r,o:r,g:r,w:r)`0D X`0D X It is suggested that a special directory be set aside for MORIA` V0D X game and data files, so that they may be easily protected and` V0D X maintained. Note that the data files must be in the same` V0D X directory as the executable.`0D X`0D X`0D X 3`0D X`0C The Dungeons of Moria - COPYRIGHT (c) Robert Alan Koeneke`0D V The Dungeons of Moria - COPYRIGHT (c) Robert Alan Koeneke`0D X`0D X`0D X Characters may be saved in MORIA, and later restored. To` V0D X save a character use -Z and supply a filename. The` V0D X character will be encrypted so that no tampering will be allowed.` V0D X To restore a character, set up a moria foreign command and supply` V0D X the saved-character filename as an argument.`0D X`0D X Set up a MORIA foreign run command : $ moria :== $user1:`5Bmoria` V5Dmoria`0D X Restore character : $ moria save_filename`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X`0D X 4`0D X`0C The Dungeons of Moria - COPYRIGHT (c) Robert Alan Koeneke`0D V The Dungeons of Moria - COPYRIGHT (c) Robert Alan Koeneke`0D X`0D X`0D X 5.0 NOTES`0D _____`0D X`0D X 5.1 The IO Bug...`0D X`0D X When Moria was run at high baud rates (9600 and above), the` V0D X game would come to a screeching halt and the process would have` V0D X to be killed. I suspected that I had screwed up on my use of` V0D X QIO. But after tromping through the code and writing several` V0D X test programs, I have come to the conclusion that a problem` V0D X exists in the device driver. In order to "get around" this bug,` V0D X I pause the process a small amount of time before issuing a QIO` V0D +-+-+-+-+-+-+-+- END OF PART 1 +-+-+-+-+-+-+-+-