$! ------------------ CUT HERE ----------------------- $ v='f$verify(f$trnlnm("SHARE_VERIFY"))' $! $! This archive created by VMS_SHARE Version 7.2-007 22-FEB-1990 $! On 28-JUN-1993 08:49:36.88 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 86 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. BOSS.PAS;1 $! 2. BUILD.COM;1 $! 3. INSTALL.DOC;1 $! 4. LOCK.COM;1 $! 5. ORGANIZE.COM;1 $! 6. STARTUP.COM;1 $! 7. [.DAT]BOSSHLP.HLP;1 $! 8. [.DAT]BUS.DAT;1 $! 9. [.DAT]CLEANLOG.COM;1 $! 10. [.DAT]INVENT.DAT;1 $! 11. [.DAT]LOSER.DAT;1 $! 12. [.DAT]MONSTERS.DAT;1 $! 13. [.DAT]NEWUSER.TXT;1 $! 14. [.DAT]OBJECTS.DAT;1 $! 15. [.DAT]PUTZS.DAT;1 $! 16. [.DAT]QUOTES.DAT;1 $! 17. [.DAT]SETACLS.COM;1 $! 18. [.DAT]SKILLS.DAT;1 $! 19. [.DAT]USERS.DAT;1 $! 20. [.DAT]WIZARD.DAT;1 $! 21. [.ETC]BUGS.TXT;1 $! 22. [.ETC]CREATURE.DOC;1 $! 23. [.ETC]ITEMFLAGS.DOC;1 $! 24. [.ETC]OBJECT.DOC;1 $! 25. [.ETC]RESTORE.DOC;1 $! 26. [.ETC]WISH.LIST;1 $! 27. [.INC]CONSTANTS.INC;1 $! 28. [.INC]CREATE.INC;1 $! 29. [.INC]CREATURE.INC;1 $! 30. [.INC]DATAFILES.INC;1 $! 31. [.INC]DEATH.INC;1 $! 32. [.INC]DESC.INC;1 $! 33. [.INC]DEVICE.INC;1 $! 34. [.INC]DISPLAY.INC;1 $! 35. [.INC]EAT.INC;1 $! 36. [.INC]FILES.INC;1 $! 37. [.INC]FLOPPY.INC;1 $! 38. [.INC]GENERATE.INC;1 $! 39. [.INC]HELP.INC;1 $! 40. [.INC]IO.INC;1 $! 41. [.INC]MAIN.INC;1 $! 42. [.INC]MISC.INC;1 $! 43. [.INC]OBJECTS.INC;1 $! 44. [.INC]POTIONS.INC;1 $! 45. [.INC]PRAYER.INC;1 $! 46. [.INC]RAYGUN.INC;1 $! 47. [.INC]SAVE.INC;1 $! 48. [.INC]SKILLS.INC;1 $! 49. [.INC]STORE1.INC;1 $! 50. [.INC]STORE2.INC;1 $! 51. [.INC]TECH.INC;1 $! 52. [.INC]TERMDEF.INC;1 $! 53. [.INC]TRAIN.INC;1 $! 54. [.INC]TREASURE.INC;1 $! 55. [.INC]TRICK.INC;1 $! 56. [.INC]TYPES.INC;1 $! 57. [.INC]VALUES.INC;1 $! 58. [.INC]VARIABLES.INC;1 $! 59. [.INC]WIERD.INC;1 $! 60. [.INC]WIZARD.INC;1 $! 61. [.MAR]BITPOS.MAR;1 $! 62. [.MAR]DISTANCE.MAR;1 $! 63. [.MAR]INSERT.MAR;1 $! 64. [.MAR]MAXMIN.MAR;1 $! 65. [.MAR]MINMAX.MAR;1 $! 66. [.MAR]PUTQIO.MAR;1 $! 67. [.MAR]RANDINT.MAR;1 $! 68. [.MAR]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`7B Moria Version 5.0 COPYRIGHT (c) Robert Alan Koeneke X Public Domain X Modified EXTENSIVELY by: X Matthew W. Koch -MWK X with minor help from: X Kendall R. Sears -Opusii X Russell E. Billings -REB X David G. Strubel -DGS X`20 X I lovingly dedicate this game to hackers and adventurers X everywhere... X`20 X Designer and Programmer : Robert Alan Koeneke X University of Oklahoma X Assitant Programmer : Jimmey Wayne Todd X University of Oklahoma X`20 X Moria may be copied and modified freely as long as the above X credits are retained. No one who-so-ever may sell or market X this software in any form without the expressed written consent X of the author Robert Alan Koeneke. X`20 X_______________________________________________________________________ XBOSS version 1.0 by Robert Gulledge X`09`09 and jason black X`7D X `7B `5Binherit('sys$share:starlet'), environment('BOSS.env')`5D `7D X X program BOSS(input,output);`20 X X `7B Globals `7D X %INCLUDE 'BOSS_INCLUDE:CONSTANTS.INC' X %INCLUDE 'BOSS_INCLUDE:TYPES.INC' X %INCLUDE 'BOSS_INCLUDE:VARIABLES.INC' X X `7BGlobal Values`7D X %INCLUDE 'BOSS_INCLUDE:VALUES.INC' X %INCLUDE 'BOSS_INCLUDE:OBJECTS.INC' X`20 X `7B Libraries of routines `7D X %INCLUDE 'BOSS_INCLUDE:IO.INC' X`09%INCLUDE 'BOSS_INCLUDE:MISC.INC' X`09%INCLUDE 'BOSS_INCLUDE:TREASURE.INC' X %INCLUDE 'BOSS_INCLUDE:HELP.INC' X %INCLUDE 'BOSS_INCLUDE:DESC.INC' X %INCLUDE 'BOSS_INCLUDE:FILES.INC' X %INCLUDE 'BOSS_INCLUDE:DEATH.INC' X %INCLUDE 'BOSS_INCLUDE:STORE1.INC' X %INCLUDE 'BOSS_INCLUDE:DATAFILES.INC' X %INCLUDE 'BOSS_INCLUDE:SAVE.INC' X %INCLUDE 'BOSS_INCLUDE:CREATE.INC' X %INCLUDE 'BOSS_INCLUDE:GENERATE.INC' X %INCLUDE 'BOSS_INCLUDE:MAIN.INC' X %INCLUDE 'BOSS_INCLUDE:TERMDEF.INC' X`20 X `7B Initialize, restore, and get the ball rolling. `7D X`20 X BEGIN X `7B SYSPRV stays off except when needed...`7D X priv_switch(0); X`20 X `7B Check the terminal type and see if it is supported`7D X termdef; X`20 X `7B Get the directory location of the image`7D X get_paths; X`20 X `7B Setup pause time for IO setup_io_pause; `7D X X `7BCheck to see if user is a wiz, scum, or just annoying`7D`20 X look_at_userid; X X `7B Some neccesary initializations `7D X X msg_line := 1; X quart_height := trunc(screen_height/4); X quart_width := trunc(screen_width /4); X dun_level := 0; X turn := 5760; `7B8:00 a.m.`7D X if (putzuser) then X wierd_chance := 2160 `7Bmake it a really wierd game...`7D`20 X else X wierd_chance := 8640; X X`7B Init an IO channel for QIO `7D X init_channel; X`20 X`7B Grab a random seed from the clock `7D X seed := get_seed; X`20 X`7BRead in the monster and object data files.`7D`20 X read_data; X X`7B Sort the objects by level `7D X sort_objects; X`20 X `7B Init monster and treasure levels for allocate `7D X init_m_level; X init_t_level; X`20 X `7B Init the store inventories `7D X store_init; X if (cost_adj <> 1.00) then price_adjust; X`20 X `7B Check operating hours X If not wizard then No_Control_Y `7D X get_foreign(finam); X`20 X `7B Check or create hours.dat, print message `7D X intro(finam); X`20 X `7B Generate a character, or retrieve old one... `7D X if (length(finam) > 0) then X BEGIN `7B Retrieve character `7D X generate := get_char(finam); X change_name; X magic_init(randes_seed) X END X else X BEGIN `7B Create character `7D X create_character; X char_inven_init; X if (py.misc.pskill in `5B1,2,7`5D) then X BEGIN`20 X learn_spell(msg_flag); X gain_mana(int_adj); X END; X if (py.misc.pskill in `5B3,4`5D) then X BEGIN `20 X learn_prayer; X gain_mana(wis_adj); X END; X if (py.misc.pskill in `5B5,6`5D) then X BEGIN X learn_extra(msg_flag); X gain_mana(chr_adj) X END; X py.misc.cmana := py.misc.mana; X randes_seed := seed; `7B Description seed `7D X town_seed := seed; `7B Town generation seed `7D X magic_init(randes_seed); X generate := true X END; X`20 X`7B begin the game `7D X with py.misc do `7B This determines the maximum player experience V `7D X player_max_exp := trunc(player_exp`5Bmax_player_level-1`5D*expfact); X clear(1,1); X prt_stat_block; X`20 X`7B Loop till dead, or exit `7D X repeat X if (generate) then generate_cave; `7B New level `7D X dungeon; `7B Dungeon logic-located in Main.Inc `7D X generate := true; X until (death); X upon_death; `7B Character gets buried `7D X END. X`20 X`20 X $ CALL UNPACK BOSS.PAS;1 610972160 $ create 'f' X$! X$! BOSS build command file: example of how to build a boss executable X$! from the source. Note that in this example boss is built with X$! no error checking on. This greatly increases the efficiency of X$! the program, but should only be used with de-bugged versions. X$! X$! X$ Setup: X$ on warning then continue X$ on error then goto error_trap X$! X$ Build_paths: X$ cur_path := 'f$directory()' X$ path_dist := 'cur_path' X$ cur_len = 'f$length(cur_path)' - 1 X$`09cur_path`09:= 'f$extract(0,cur_len,cur_path)' X$! cur_path :=`20 X$! write sys$output cur_path X$ path_source := 'cur_path`5D' X$ path_include := 'cur_path.inc`5D' X$ path_macro := 'cur_path.mar`5D' X$ path_data := 'cur_path.dat`5D' X$ path_execute := 'cur_path`5D' X$ X$ define_logicals: X$ define/nolog boss_main 'path_dist' X$ define/nolog boss_source 'path_source' X$ define/nolog boss_include 'path_include' X$ define/nolog boss_macro 'path_macro' X$ define/nolog boss_data 'path_data' X$ define/nolog boss_execute 'path_execute' X$! X$ START: X$ if p1.eqs."?" then goto HELP X$`09if p1.eqs."LIBRARY"`09then goto HELP_LIBRARY X$ if p1.eqs."LINK" then goto LINK_STEP X$ if p1.eqs."TERMDEF" then goto COMPILE_TERMDEF X$ if p1.eqs."MACROS" then goto COMPILE_MACROS X$ if p1.eqs."BOSS" then goto COMPILE_BOSS X$ if p1.eqs."" then goto COMPILE_BOSS X$! X$ BAD_PARAM: X$ write sys$output "Unrecognized parameter : ",p1 X$ exit X$! X$ HELP: X$ type sys$input XBUILD.COM : Accepts one optional parameter. By default, all steps are X executed. If parameter is used, only certain steps are X executed. X`20 X Parameters: P1 X ? - display this help X - Compile all source, re-link boss X LINK - re-link boss X MACROS - compile all macro routines, re-link boss X BOSS - compile boss & termdef, re-link boss X`20 X$ exit X$! X$ COMPILE_BOSS: X$ set def boss_source X$ write sys$output "Compiling BOSS.PAS." X$ pascal boss.pas /nocheck/nodebug X$ write sys$output "BOSS.PAS compiled." X$! X$ COMPILE_MACROS: X$ set def boss_macro X$ write sys$output "Compiling MACROS." X$ macro bitpos/nodebug/nolist X$ write sys$output "BITPOS compiled." X$ macro distance/nodebug/nolist X$ write sys$output "DISTANCE compiled." X$ macro insert/nodebug/nolist X$ write sys$output "INSERT compiled." X$ macro maxmin/nodebug/nolist X$ write sys$output "MAXMIN compiled." X$ macro minmax/nodebug/nolist X$ write sys$output "MINMAX compiled." X$ macro putqio/nodebug/nolist X$ write sys$output "PUTQIO compiled." X$ macro randint/nodebug/nolist X$ write sys$output "RANDINT compiled." X$ macro randrep/nodebug/nolist X$ write sys$output "RANDREP compiled." X$ library/create/object bosslib.olb X$ library/ins bosslib bitpos X$ library/ins bosslib distance X$ library/ins bosslib insert X$ library/ins bosslib maxmin X$ library/ins bosslib minmax X$ library/ins bosslib putqio X$ library/ins bosslib randint X$ library/ins bosslib randrep X$ write sys$output "BOSSLIB.OLB built." X$! X$ LINK_STEP: X$ set def boss_source X$ write sys$output "Linking." X$ link/sysshr/notrace/nodebug boss_execute:boss,boss_macro:bosslib/lib Vrary X$ write sys$output "BOSS linked." X$! X$! X$ HELP_LIBRARY: X$ set def boss_data X$`09if (f$search("bosshlp.hlb") .EQS. "")`20 X$ then`20 X$ library/create/help bosshlp bosshlp X$`09 write sys$output "Help Library Created." X$`09endif`09 X$! X$ THE_END: X$ set def boss_main X$ exit X$! X$ ERROR_TRAP: X$ write sys$output "***Error resulted in termination***" X$ set def boss_main X$ exit $ CALL UNPACK BUILD.COM;1 20725650 $ create 'f' +-+-+-+-+-+-+-+- END OF PART 1 +-+-+-+-+-+-+-+-