Revision 58 (Original Source)

This commit is contained in:
historicalsource 2019-04-14 02:17:21 -04:00
commit c55088a7df
12 changed files with 14670 additions and 0 deletions

1
README.md Normal file
View file

@ -0,0 +1 @@
# hitchhikersguide

2454
earth.zil Normal file

File diff suppressed because it is too large Load diff

2187
globals.zil Normal file

File diff suppressed because it is too large Load diff

1978
heart.zil Normal file

File diff suppressed because it is too large Load diff

616
misc.zil Normal file
View file

@ -0,0 +1,616 @@
"MISC for
THE HITCHHIKER'S GUIDE TO THE GALAXY
(c) 1984 by Infocom, Inc. All Rights Reserved."
;"former MACROS.ZIL stuff"
<ZSTR-OFF>
<SETG C-ENABLED? 0>
<SETG C-ENABLED 1>
<SETG C-DISABLED 0>
;<ROUTINE ENABLED? (RTN "AUX" C E)
<SET E <REST ,C-TABLE ,C-TABLELEN>>
<SET C <REST ,C-TABLE ,C-INTS>>
<REPEAT ()
<COND (<==? .C .E> <RFALSE>)
(<EQUAL? <GET .C ,C-RTN> .RTN>
<COND (<0? <GET .C ,C-ENABLED?>>
<RFALSE>)
(T
<RTRUE>)>)>
<SET C <REST .C ,C-INTLEN>>>>
;<ROUTINE QUEUED? (RTN "AUX" C E)
<SET E <REST ,C-TABLE ,C-TABLELEN>>
<SET C <REST ,C-TABLE ,C-INTS>>
<REPEAT ()
<COND (<==? .C .E> <RFALSE>)
(<EQUAL? <GET .C ,C-RTN> .RTN>
<COND (<OR <0? <GET .C ,C-ENABLED?>>
<0? <GET .C ,C-TICK>>>
<RFALSE>)
(T <RTRUE>)>)>
<SET C <REST .C ,C-INTLEN>>>>
<ROUTINE RUNNING? (RTN "AUX" C E TICK)
<SET E <REST ,C-TABLE ,C-TABLELEN>>
<SET C <REST ,C-TABLE ,C-INTS>>
<REPEAT ()
<COND (<==? .C .E> <RFALSE>)
(<EQUAL? <GET .C ,C-RTN> .RTN>
<COND (<OR <0? <GET .C ,C-ENABLED?>>
<0? <SET TICK <GET .C ,C-TICK>>>
<G? .TICK 1>>
<RFALSE>)
(T <RTRUE>)>)>
<SET C <REST .C ,C-INTLEN>>>>
<DEFMAC TELL ("ARGS" A)
<FORM PROG ()
!<MAPF ,LIST
<FUNCTION ("AUX" E P O)
<COND (<EMPTY? .A> <MAPSTOP>)
(<SET E <NTH .A 1>>
<SET A <REST .A>>)>
<COND (<TYPE? .E ATOM>
<COND (<OR <=? <SET P <SPNAME .E>>
"CRLF">
<=? .P "CR">>
<MAPRET '<CRLF>>)
(<EMPTY? .A>
<ERROR INDICATOR-AT-END? .E>)
(ELSE
<SET O <NTH .A 1>>
<SET A <REST .A>>
<COND (<OR <=? <SET P <SPNAME .E>>
"DESC">
<=? .P "D">
<=? .P "OBJ">
<=? .P "O">>
<MAPRET <FORM PRINTD .O>>)
(<OR <=? .P "NUM">
<=? .P "N">>
<MAPRET <FORM PRINTN .O>>)
(<OR <=? .P "CHAR">
<=? .P "CHR">
<=? .P "C">>
<MAPRET <FORM PRINTC .O>>)
(ELSE
<MAPRET
<FORM PRINT
<FORM GETP .O .E>>>)>)>)
(<TYPE? .E STRING ZSTRING>
<MAPRET <FORM PRINTI .E>>)
(<TYPE? .E FORM LVAL GVAL>
<MAPRET <FORM PRINT .E>>)
(ELSE <ERROR UNKNOWN-TYPE .E>)>>>>>
<DEFMAC VERB? ("ARGS" ATMS)
<MULTIFROB PRSA .ATMS>>
<DEFMAC PRSO? ("ARGS" ATMS)
<MULTIFROB PRSO .ATMS>>
<DEFMAC PRSI? ("ARGS" ATMS)
<MULTIFROB PRSI .ATMS>>
<DEFMAC ROOM? ("ARGS" ATMS)
<MULTIFROB HERE .ATMS>>
<DEFINE MULTIFROB (X ATMS "AUX" (OO (OR)) (O .OO) (L ()) ATM)
<REPEAT ()
<COND (<EMPTY? .ATMS>
<RETURN!- <COND (<LENGTH? .OO 1> <ERROR .X>)
(<LENGTH? .OO 2> <NTH .OO 2>)
(ELSE <CHTYPE .OO FORM>)>>)>
<REPEAT ()
<COND (<EMPTY? .ATMS> <RETURN!->)>
<SET ATM <NTH .ATMS 1>>
<SET L
(<COND (<TYPE? .ATM ATOM>
<FORM GVAL
<COND (<==? .X PRSA>
<PARSE
<STRING "V?"
<SPNAME .ATM>>>)
(ELSE .ATM)>>)
(ELSE .ATM)>
!.L)>
<SET ATMS <REST .ATMS>>
<COND (<==? <LENGTH .L> 3> <RETURN!->)>>
<SET O <REST <PUTREST .O (<FORM EQUAL? <FORM GVAL .X> !.L>)>>>
<SET L ()>>>
<DEFMAC BSET ('OBJ "ARGS" BITS)
<MULTIBITS FSET .OBJ .BITS>>
<DEFMAC BCLEAR ('OBJ "ARGS" BITS)
<MULTIBITS FCLEAR .OBJ .BITS>>
<DEFMAC BSET? ('OBJ "ARGS" BITS)
<MULTIBITS FSET? .OBJ .BITS>>
<DEFINE MULTIBITS (X OBJ ATMS "AUX" (O ()) ATM)
<REPEAT ()
<COND (<EMPTY? .ATMS>
<RETURN!- <COND (<LENGTH? .O 1> <NTH .O 1>)
(<EQUAL? .X FSET?> <FORM OR !.O>)
(ELSE <FORM PROG () !.O>)>>)>
<SET ATM <NTH .ATMS 1>>
<SET ATMS <REST .ATMS>>
<SET O
(<FORM .X
.OBJ
<COND (<TYPE? .ATM FORM> .ATM)
(ELSE <FORM GVAL .ATM>)>>
!.O)>>>
<DEFMAC RFATAL ()
'<PROG () <PUSH 2> <RSTACK>>>
<DEFMAC PROB ('BASE?)
<FORM NOT <FORM L? .BASE? '<RANDOM 100>>>>
<ROUTINE PICK-ONE (FROB)
<GET .FROB <RANDOM <GET .FROB 0>>>>
<DEFMAC ENABLE ('INT)
<FORM PUT .INT ,C-ENABLED? 1>>
<DEFMAC DISABLE ('INT)
<FORM PUT .INT ,C-ENABLED? 0>>
<ZSTR-ON>
;"former MAIN.ZIL stuff"
<GLOBAL PLAYER <>>
<GLOBAL P-WON <>>
<CONSTANT M-FATAL 2>
<CONSTANT M-BEG 1>
<CONSTANT M-END 6>
<CONSTANT M-ENTER 2>
<CONSTANT M-LOOK 3>
<CONSTANT M-FLASH 4>
<CONSTANT M-OBJDESC 5>
<ROUTINE GO ()
<PUTB ,P-LEXV 0 59>
;"put interrupts on clock chain"
<ENABLE <QUEUE I-HOUSEWRECK 20>>
<ENABLE <QUEUE I-THING 21>>
<ENABLE <QUEUE I-VOGONS 50>>
;"set up and go"
<SETG WINNER ,PROTAGONIST>
<SETG PLAYER ,PROTAGONIST>
<SETG HERE ,BEDROOM>
<SETG IDENTITY-FLAG ,ARTHUR>
<MOVE ,ARTHUR ,GLOBAL-OBJECTS>
<SETG LYING-DOWN T>
<MOVE ,PROTAGONIST ,BED>
<V-VERSION>
<CRLF>
<TELL
"You wake up. The room is spinning very gently round your head. Or at least
it would be if you could see it which you can't." CR CR>
<V-LOOK>
<MAIN-LOOP>
<AGAIN>>
<ROUTINE MAIN-LOOP ("AUX" ICNT OCNT NUM CNT OBJ TBL V PTBL OBJ1 TMP)
<REPEAT ()
<SET CNT 0>
<SET OBJ <>>
<SET PTBL T>
<COND (<SETG P-WON <PARSER>>
<SET ICNT <GET ,P-PRSI ,P-MATCHLEN>>
<SET OCNT <GET ,P-PRSO ,P-MATCHLEN>>
<COND (<AND ,P-IT-OBJECT <ACCESSIBLE? ,P-IT-OBJECT>>
<SET TMP <>>
<REPEAT ()
<COND (<G? <SET CNT <+ .CNT 1>> .ICNT>
<RETURN>)
(T
<COND (<EQUAL? <GET ,P-PRSI .CNT> ,IT>
<PUT ,P-PRSI .CNT ,P-IT-OBJECT>
<SET TMP T>
<RETURN>)>)>>
<COND (<NOT .TMP>
<SET CNT 0>
<REPEAT ()
<COND (<G? <SET CNT <+ .CNT 1>> .OCNT>
<RETURN>)
(T
<COND (<EQUAL? <GET ,P-PRSO .CNT> ,IT>
<PUT ,P-PRSO .CNT ,P-IT-OBJECT>
<RETURN>)>)>>)>
<SET CNT 0>)>
<SET NUM
<COND (<0? .OCNT> .OCNT)
(<G? .OCNT 1>
<SET TBL ,P-PRSO>
<COND (<0? .ICNT> <SET OBJ <>>)
(T <SET OBJ <GET ,P-PRSI 1>>)>
.OCNT)
(<G? .ICNT 1>
<SET PTBL <>>
<SET TBL ,P-PRSI>
<SET OBJ <GET ,P-PRSO 1>>
.ICNT)
(T 1)>>
<COND (<AND <NOT .OBJ>
<1? .ICNT>>
<SET OBJ <GET ,P-PRSI 1>>)>
<COND (<EQUAL? ,PRSA ,V?WALK> <SET V <PERFORM ,PRSA ,PRSO>>)
(<0? .NUM>
<COND (<0? <BAND <GETB ,P-SYNTAX ,P-SBITS> ,P-SONUMS>>
<SET V <PERFORM ,PRSA>>
<SETG PRSO <>>)
(<NOT ,LIT>
<TELL ,TOO-DARK CR>
<FUCKING-CLEAR>)
(T
<TELL "There isn't anything to ">
<SET TMP <GET ,P-ITBL ,P-VERBN>>
<COND (<VERB? TELL>
<TELL "talk to">)
(<OR ,P-OFLAG ,P-MERGED>
<PRINTB <GET .TMP 0>>)
(T
<WORD-PRINT <GETB .TMP 2>
<GETB .TMP 3>>)>
<TELL "!" CR>
<SET V <>>
<FUCKING-CLEAR>)>)
(T
<SETG P-NOT-HERE 0>
<SETG P-MULT <>>
<COND (<G? .NUM 1> <SETG P-MULT T>)>
<SET TMP <>>
<REPEAT ()
<COND (<G? <SET CNT <+ .CNT 1>> .NUM>
<COND (<G? ,P-NOT-HERE 0>
<TELL "The ">
<COND (<NOT <EQUAL? ,P-NOT-HERE .NUM>>
<TELL "other ">)>
<TELL "object">
<COND (<NOT <EQUAL? ,P-NOT-HERE 1>>
<TELL "s">)>
<TELL " that you mentioned ">
<COND (<NOT <EQUAL? ,P-NOT-HERE 1>>
<TELL "are">)
(T <TELL "is">)>
<TELL "n't here." CR>)
(<NOT .TMP>
<TELL ,REFERRING CR>)>
<RETURN>)
(T
<COND (.PTBL <SET OBJ1 <GET ,P-PRSO .CNT>>)
(T <SET OBJ1 <GET ,P-PRSI .CNT>>)>
<SETG PRSO <COND (.PTBL .OBJ1) (T .OBJ)>>
<SETG PRSI <COND (.PTBL .OBJ) (T .OBJ1)>>
<COND (<OR <G? .NUM 1>
<EQUAL? <GET <GET ,P-ITBL ,P-NC1>
0>
,W?ALL>>
<COND (<EQUAL? .OBJ1
,NOT-HERE-OBJECT>
<SETG P-NOT-HERE
<+ ,P-NOT-HERE 1>>
<AGAIN>)
(<AND <EQUAL? ,P-GETFLAGS
,P-ALL>
<VERB? TAKE PICK-UP>
<OR <AND <NOT <EQUAL?
<LOC .OBJ1>
,WINNER
,HERE
,PRSI>>
<NOT <FSET?
<LOC .OBJ1>
,SURFACEBIT>>>
<AND <NOT <FSET? .OBJ1
,TAKEBIT>>
<NOT <FSET? .OBJ1
,TRYTAKEBIT>>>>>
<AGAIN>)
(<AND <VERB? TAKE PICK-UP>
,PRSI
<NOT <IN? ,PRSO ,PRSI>>>
<AGAIN>)
(<AND <EQUAL? ,P-GETFLAGS
,P-ALL>
<VERB? DROP>
<NOT <IN? .OBJ1 ,WINNER>>
;"next frob semied by JW"
;<NOT <IN? ,P-IT-OBJECT
,WINNER>>>
<AGAIN>)
(<AND <EQUAL? ,P-GETFLAGS
,P-ALL>
,PRSI
<==? ,PRSO ,PRSI>>
<AGAIN>)
(<AND <EQUAL? ,P-GETFLAGS
,P-ALL>
<VERB? PUT>
<HELD? ,PRSO ,PRSI>>
<AGAIN>)
(<NOT <ACCESSIBLE? .OBJ1>>
<AGAIN>)
(T
<COND (<EQUAL? .OBJ1 ,IT>
<PRINTD ,P-IT-OBJECT>)
(<TEA-PRINT .OBJ1>
<PRINTD .OBJ1>)>
<COND (<TEA-PRINT .OBJ1>
<TELL ": ">)>)>)>
<SET TMP T>
<SET V <PERFORM ,PRSA ,PRSO ,PRSI>>
<COND (<EQUAL? .V ,M-FATAL> <RETURN>)>)>>)>
<COND (<NOT <EQUAL? .V ,M-FATAL>>
<COND (<VERB? TELL BRIEF SUPER-BRIEF VERBOSE
SAVE VERSION RESTORE SCRIPT UNSCRIPT>
T)
(T
<SET V <APPLY <GETP <LOC ,WINNER> ,P?ACTION>
,M-END>>)>)>
<COND (<VERB? AGAIN SAVE RESTORE SCRIPT UNSCRIPT
VERBOSE BRIEF SUPER-BRIEF>
T)
(,P-OFLAG T)
(T
<SETG L-PRSA ,PRSA>
<SETG L-PRSO ,PRSO>
<SETG L-PRSI ,PRSI>)>
<COND (,DONT-FLAG
<SETG L-DONT-FLAG T>)
(T
<SETG L-DONT-FLAG <>>)>
<COND (,IN-FRONT-FLAG
<SETG L-FRONT-FLAG T>)
(T
<SETG L-FRONT-FLAG <>>)>
<COND (<EQUAL? .V ,M-FATAL>
<SETG P-CONT <>>)>)
(T
<SETG P-CONT <>>)>
<COND (,P-WON
<COND (<VERB? TELL BRIEF SUPER-BRIEF VERBOSE VERSION QUIT SCORE
SAVE RESTORE SCRIPT UNSCRIPT FOOTNOTE HELP RESTART>
T)
(<AND <VERB? AGAIN>
<OR <EQUAL? ,L-PRSA ,V?FIND ,V?FOLLOW ,V?CALL>
<EQUAL? ,L-PRSA ,V?WHAT ,V?WHERE ,V?WAIT-FOR>
<EQUAL? ,L-PRSA ,V?WHO ,V?WALK-TO ,V?WHAT-ABOUT>
<EQUAL? ,L-PRSA ,V?ASK-ABOUT ,V?ASK-FOR ,V?I-AM>
<EQUAL? ,L-PRSA ,V?MY-NAME ,V?CARVE ,V?SCORE>
<EQUAL? ,L-PRSA ,V?VERSION ,V?FOOTNOTE ,V?HELP>>>
T)
(<AND <VERB? WAIT>
,DONT-FLAG>
T)
(<AND <VERB? AGAIN>
<EQUAL? ,L-PRSA ,V?WAIT>
,L-DONT-FLAG>
T)
(T
<SET V <CLOCKER>>)>
<SETG PRSA <>>
<SETG PRSO <>>
<SETG PRSI <>>)
(<AND <G? <GETB ,P-LEXV ,P-LEXWORDS> 3>
<NOT ,CARELESS-WORDS-FLAG>
,EARTH-DEMOLISHED
<SAVE-INPUT ,FIRST-BUFFER>>
<SETG CARELESS-WORDS-FLAG T>
<ENABLE <QUEUE I-CARELESS-WORDS 3>>)>>>
<GLOBAL FIRST-BUFFER <ITABLE BYTE 100>>
<ROUTINE SAVE-INPUT (TBL "AUX" (OFFS 0) CNT TMP)
<SET CNT <+ <GETB ,P-LEXV <SET TMP <* 4 ,P-INPUT-WORDS>>>
<GETB ,P-LEXV <+ .TMP 1>>>>
<COND (<EQUAL? .CNT 0> ;"failed"
<RFALSE>)>
<SET CNT <- .CNT 1>>
<REPEAT ()
<COND (<EQUAL? .OFFS .CNT>
<PUTB .TBL .OFFS 0>
<RETURN>)
(T
<PUTB .TBL .OFFS <GETB ,P-INBUF <+ .OFFS 1>>>)>
<SET OFFS <+ .OFFS 1>>>
<RTRUE>>
<ROUTINE RESTORE-INPUT (TBL "AUX" CHR)
<REPEAT ()
<COND (<EQUAL? <SET CHR <GETB .TBL 0>> 0>
<RETURN>)
(T
<PRINTC .CHR>
<SET TBL <REST .TBL>>)>>>
<GLOBAL L-PRSA <>>
<GLOBAL L-PRSO <>>
<GLOBAL L-PRSI <>>
<GLOBAL L-DONT-FLAG <>>
<GLOBAL L-FRONT-FLAG <>>
<GLOBAL P-MULT <>>
<GLOBAL P-NOT-HERE 0>
<ROUTINE FAKE-ORPHAN ("AUX" TMP)
<ORPHAN ,P-SYNTAX <>>
<TELL "Be specific: what object do">
<COND (,DONT-FLAG
<TELL "n't">)>
<TELL " you want to ">
<SET TMP <GET ,P-OTBL ,P-VERBN>>
<COND (<EQUAL? .TMP 0>
<TELL "tell">)
(<0? <GETB ,P-VTBL 2>>
<PRINTB <GET .TMP 0>>)
(T
<WORD-PRINT <GETB .TMP 2> <GETB .TMP 3>>
<PUTB ,P-VTBL 2 0>)>
<SETG P-OFLAG T>
<SETG P-WON <>>
<PREP-PRINT
<GETB ,P-SYNTAX ,P-SPREP1>>
<TELL "?" CR>>
<ROUTINE PERFORM (A "OPTIONAL" (O <>) (I <>) "AUX" V OA OO OI)
;<COND (,DEBUG
<TELL "[Perform: ">
%<COND (<GASSIGNED? PREDGEN> '<TELL N .A>)
(T '<PRINC <NTH ,ACTIONS <+ <* .A 2> 1>>>)>
<COND (<AND .O <NOT <EQUAL? .A ,V?WALK>>>
<TELL " / PRSO = " D .O>)>
<COND (.I <TELL " / PRSI = " D .I>)>
<TELL "]" CR>
<COND (,IN-FRONT-FLAG
<TELL "[IN-FRONT-FLAG is set]" CR>)>)>
<SET OA ,PRSA>
<SET OO ,PRSO>
<SET OI ,PRSI>
<SETG PRSA .A>
<COND (<EQUAL? ,IT .I .O>
<COND (<NOT .I>
<FAKE-ORPHAN>)
(T
<TELL ,REFERRING CR>)>
<RFATAL>)>
<SETG PRSO .O>
<COND (<AND ,PRSO
<NOT <VERB? WALK>>
<NOT <PRSO? ,NOT-HERE-OBJECT>>>
<SETG P-IT-OBJECT ,PRSO>)>
<SETG PRSI .I>
;<COND (<NOT <EQUAL? .A ,V?AGAIN>>
<SETG L-PRSA .A>
<COND (<EQUAL? .A ,V?WALK> <SETG L-PRSO <>>)
(T <SETG L-PRSO .O>)>
<SETG L-PRSI .I>)>
<COND (<AND <NOT <EQUAL? .A ,V?WALK>>
<EQUAL? ,NOT-HERE-OBJECT ,PRSO ,PRSI>
<SET V <D-APPLY "Not Here" ,NOT-HERE-OBJECT-F>>>
<SETG P-WON <>>
.V)
(T
<SET O ,PRSO>
<SET I ,PRSI>
<COND (<SET V <D-APPLY "Actor" <GETP ,WINNER ,P?ACTION>>>
.V)
(<AND ,DONT-FLAG <SET V <DONT-F>>>
.V)
(<SET V <D-APPLY "M-Beg" <GETP <LOC ,WINNER> ,P?ACTION>
,M-BEG>>
.V)
(<SET V <D-APPLY "Preaction" <GET ,PREACTIONS .A>>>
.V)
(<AND .I <SET V <D-APPLY "PRSI" <GETP .I ,P?ACTION>>>>
.V)
;(<AND .O
<NOT <EQUAL? .A ,V?WALK>>
<LOC .O>
<GETP <LOC .O> ,P?CONTFCN>
<SET V <D-APPLY "Cont" <GETP <LOC .O> ,P?CONTFCN>>>>
.V)
(<AND .O
<NOT <EQUAL? .A ,V?WALK>>
<SET V <D-APPLY "PRSO" <GETP .O ,P?ACTION>>>>
.V)
(<SET V <D-APPLY <> <GET ,ACTIONS .A>>>
.V)>)>
<SETG PRSA .OA>
<SETG PRSO .OO>
<SETG PRSI .OI>
.V>
<ROUTINE D-APPLY (STR FCN "OPTIONAL" (FOO <>) "AUX" RES)
<COND (<NOT .FCN> <>)
(T
;<COND (,DEBUG
<COND (<NOT .STR>
<TELL CR " Default ->" CR>)
(T <TELL CR " " .STR " -> ">)>)>
<SET RES
<COND (.FOO <APPLY .FCN .FOO>)
(T <APPLY .FCN>)>>
;<COND (<AND ,DEBUG .STR>
<COND (<EQUAL? .RES ,M-FATAL>
<TELL "Fatal" CR>)
(<NOT .RES>
<TELL "Not handled">)
(T <TELL "Handled" CR>)>)>
.RES)>>
;"former CLOCK.ZIL stuff"
<GLOBAL CLOCK-WAIT <>>
<GLOBAL C-TABLE %<COND (<GASSIGNED? PREDGEN>
'<ITABLE NONE 105>)
(T
'<ITABLE NONE 210>)>>
<CONSTANT C-TABLELEN 210>
<GLOBAL C-INTS 210>
<CONSTANT C-INTLEN 6>
<CONSTANT C-ENABLED? 0>
<CONSTANT C-TICK 1>
<CONSTANT C-RTN 2>
<ROUTINE QUEUE (RTN TICK "AUX" CINT)
<PUT <SET CINT <INT .RTN>> ,C-TICK .TICK>
.CINT>
<ROUTINE INT (RTN "OPTIONAL" E C INT)
<SET E <REST ,C-TABLE ,C-TABLELEN>>
<SET C <REST ,C-TABLE ,C-INTS>>
<REPEAT ()
<COND (<EQUAL? .C .E>
<SETG C-INTS <- ,C-INTS ,C-INTLEN>>
<SET INT <REST ,C-TABLE ,C-INTS>>
<PUT .INT ,C-RTN .RTN>
<RETURN .INT>)
(<EQUAL? <GET .C ,C-RTN> .RTN> <RETURN .C>)>
<SET C <REST .C ,C-INTLEN>>>>
<ROUTINE CLOCKER ("AUX" C E TICK (FLG <>))
<COND (,CLOCK-WAIT <SETG CLOCK-WAIT <>> <RFALSE>)>
<SET C <REST ,C-TABLE <COND (,P-WON ,C-INTS)>>>
<SET E <REST ,C-TABLE ,C-TABLELEN>>
<REPEAT ()
<COND (<EQUAL? .C .E>
<SETG MOVES <+ ,MOVES 1>>
<RETURN .FLG>)
(<NOT <0? <GET .C ,C-ENABLED?>>>
<SET TICK <GET .C ,C-TICK>>
<COND (<0? .TICK>)
(T
<PUT .C ,C-TICK <- .TICK 1>>
<COND (<AND <NOT <G? .TICK 1>>
<APPLY <GET .C ,C-RTN>>>
<SET FLG T>)>)>)>
<SET C <REST .C ,C-INTLEN>>>>

1393
parser.zil Normal file

File diff suppressed because it is too large Load diff

39
s4.zil Normal file
View file

@ -0,0 +1,39 @@
"S4 for
THE HITCHHIKER'S GUIDE TO THE GALAXY
(c) Copyright 1984 Infocom, Inc. All Rights Reserved."
<PRINC "
*** THE HITCHHIKER'S GUIDE TO THE GALAXY: Interactive Science Fiction ***
">
<BLOAT 90000 0 0 3300 0 0 0 0 0 256>
<SNAME "S4">
<SET REDEFINE T>
<OR <GASSIGNED? ZILCH>
<SETG WBREAKS <STRING !\" !,WBREAKS>>>
<OR <GASSIGNED? INSERT-CRUFTY>
<DEFINE INSERT-CRUFTY (STR) <INSERT-FILE .STR T>>>
<COND (<GASSIGNED? PREDGEN>
<ID 0>)>
<COND (<GASSIGNED? PREDGEN>
<SETG ZSTR-ON <SETG ZSTR-OFF ,TIME>>)>
<INSERT-FILE "MISC" T>
<INSERT-FILE "HEART" T>
<INSERT-FILE "PARSER" T>
<INSERT-FILE "SYNTAX" T>
<INSERT-FILE "VERBS" T>
<INSERT-FILE "EARTH" T>
<INSERT-FILE "VOGON" T>
<INSERT-FILE "UNEARTH" T>
<INSERT-FILE "GLOBALS" T>
<PROPDEF SIZE 5>
<PROPDEF CAPACITY 0>

BIN
s4.zip Normal file

Binary file not shown.

622
syntax.zil Normal file
View file

@ -0,0 +1,622 @@
"SYNTAX for
THE HITCHHIKER'S GUIDE TO THE GALAXY
(c) Copyright 1984 Infocom, Inc. All Rights Reserved."
<BUZZ A AN THE IS ARE AM AND OF THEN ALL ONE BUT EXCEPT \. \, \"
DON\'T DONT PRY PLEASE HERE SOME MORE FRONT>
<SYNONYM TO TOWARD>
<SYNONYM WITH USING>
<SYNONYM THROUGH THRU>
<SYNONYM ON ONTO>
<SYNONYM OUT OUTSIDE>
<SYNONYM IN INSIDE INTO>
<SYNONYM UNDER BELOW BENEATH UNDERNEATH>
<SYNONYM AROUND ALONG>
<SYNONYM BEFORE NEAR NEXT AGAINST>
<SYNONYM ALL BOTH>
<SYNONYM DRUNK BOMBED SMASHE PLASTE>
<SYNONYM NORTH N FORE F FOREWA>
<SYNONYM SOUTH S AFT>
<SYNONYM EAST E STARBO SB>
<SYNONYM WEST W PORT P>
<SYNONYM DOWN D>
<SYNONYM UP U>
<SYNONYM NW NORTHWEST>
<SYNONYM NE NORTHE>
<SYNONYM SW SOUTHWEST>
<SYNONYM SE SOUTHE>
;"game commands"
<SYNTAX VERBOSE = V-VERBOSE>
<SYNTAX BRIEF = V-BRIEF>
<SYNTAX SUPER = V-SUPER-BRIEF>
<SYNONYM SUPER SUPERBRIEF>
<SYNTAX DIAGNOSE = V-DIAGNOSE>
<SYNTAX INVENT = V-INVENTORY>
<SYNTAX I = V-INVENTORY>
<SYNTAX I OBJECT = V-I-AM>
<SYNONYM I I\'M IM>
<SYNTAX QUIT = V-QUIT>
<SYNONYM QUIT Q>
<SYNTAX RESTAR = V-RESTART>
<SYNTAX RESTOR = V-RESTORE>
<SYNTAX SAVE = V-SAVE>
<SYNTAX SCORE = V-SCORE>
<SYNTAX SCRIPT = V-SCRIPT>
<SYNTAX UNSCRIPT = V-UNSCRIPT>
<SYNTAX VERSION = V-VERSION>
<SYNTAX $VERIFY = V-$VERIFY>
<SYNTAX $VERIFY OBJECT = V-$VERIFY>
;<SYNTAX $DEBUG = V-$DEBUG>
;<SYNTAX $CHEAT OBJECT = V-$CHEAT>
;<SYNTAX $PROB = V-$PROB>
;"subtitle real verbs"
<SYNTAX ADDRES OBJECT (FIND ACTORBIT) (IN-ROOM) = V-TELL>
<SYNTAX AGAIN = V-AGAIN>
<SYNONYM AGAIN G>
<SYNTAX ANSWER = V-ANSWER>
<SYNTAX ANSWER OBJECT = V-REPLY>
<SYNTAX ANSWER TO OBJECT = V-REPLY>
<SYNONYM ANSWER REPLY>
<SYNTAX APPLAU = V-APPLAUD>
<SYNONYM APPLAU CLAP CHEER>
<SYNTAX APPREC OBJECT = V-APPRECIATE>
<SYNTAX APPROA OBJECT = V-WALK-TO>
<SYNTAX ASK OBJECT (FIND ACTORBIT) ABOUT OBJECT = V-ASK-ABOUT>
<SYNTAX ASK OBJECT (FIND ACTORBIT) ON OBJECT = V-ASK-ABOUT>
<SYNTAX ASK OBJECT (FIND ACTORBIT) FOR OBJECT = V-ASK-FOR>
<SYNONYM ASK CONSUL QUERY>
<SYNTAX ATTACK OBJECT (FIND ACTORBIT) (ON-GROUND IN-ROOM) = V-KILL>
<SYNTAX ATTACK OBJECT (FIND ACTORBIT) (ON-GROUND IN-ROOM)
WITH OBJECT (HELD CARRIED HAVE) = V-KILL>
<SYNONYM ATTACK ASSAULT FIGHT HIT SLAP KILL MURDER STRIKE PUNCH>
<SYNTAX BITE OBJECT = V-BITE>
<SYNTAX BLOCK OBJECT = V-BLOCK>
<SYNTAX BLOCK OBJECT WITH OBJECT = V-BLOCK-WITH>
<SYNONYM BLOCK STOP>
<SYNTAX BOARD OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-BOARD PRE-BOARD>
<SYNONYM BOARD EMBARK>
<SYNTAX BRUSH OBJECT = V-BRUSH>
<SYNTAX BRUSH OBJECT WITH OBJECT (HAVE) = V-BRUSH>
<SYNONYM BRUSH>
<SYNTAX ORDER OBJECT = V-BUY>
<SYNONYM ORDER BUY PURCHASE>
<SYNTAX CARVE OBJECT ON OBJECT = V-CARVE PRE-CARVE>
<SYNTAX CARVE OBJECT IN OBJECT = V-CARVE PRE-CARVE>
<SYNTAX CARVE OBJECT WITH OBJECT (HAVE) = V-CARVE-WITH>
<SYNONYM CARVE INSCRI SCRATC WRITE>
<SYNTAX CLIMB OBJECT (ON-GROUND IN-ROOM) = V-CLIMB-FOO>
<SYNTAX CLIMB ON OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-CLIMB-ON>
<SYNTAX CLIMB UP OBJECT (FIND RLANDBIT) (ON-GROUND IN-ROOM) = V-CLIMB-UP>
<SYNTAX CLIMB DOWN OBJECT (FIND RLANDBIT) (ON-GROUND IN-ROOM) = V-CLIMB-DOWN>
<SYNTAX CLIMB OVER OBJECT (ON-GROUND IN-ROOM) = V-CLIMB-OVER>
<SYNTAX CLIMB IN OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-BOARD PRE-BOARD>
<SYNTAX CLIMB THROUGH OBJECT = V-THROUGH>
<SYNONYM CLIMB SCALE>
<SYNTAX CLOSE OBJECT (FIND DOORBIT) (HELD CARRIED ON-GROUND IN-ROOM) = V-CLOSE>
<SYNTAX CLOSE OFF OBJECT (FIND LIGHTBIT) (HELD CARRIED ON-GROUND IN-ROOM TAKE)
= V-LAMP-OFF>
<SYNONYM CLOSE SHUT>
<SYNTAX CONNECT OBJECT TO OBJECT = V-PLUG>
<SYNTAX COVER OBJECT WITH OBJECT (HELD MANY) = V-SPUT-ON>
<SYNTAX COUNT OBJECT = V-COUNT>
<SYNTAX CUT OBJECT WITH OBJECT (CARRIED HELD) = V-CUT>
<SYNTAX CUT THROUGH OBJECT WITH OBJECT (CARRIED HELD) = V-CUT>
<SYNONYM CUT SLICE>
<SYNTAX DEMOLI OBJECT (ON-GROUND IN-ROOM) = V-MUNG>
<SYNTAX DEMOLI OBJECT WITH OBJECT (HELD CARRIED TAKE) = V-MUNG>
<SYNTAX DEMOLI DOWN OBJECT = V-KILL>
<SYNONYM DEMOLI CRACK DESTRO DAMAGE BREAK SMASH WRECK>
<SYNTAX DANGLE OBJECT (HELD MANY) IN OBJECT = V-PUT PRE-PUT>
<SYNTAX DESCEN OBJECT (ON-GROUND IN-ROOM) = V-CLIMB-DOWN>
<SYNTAX DIG IN OBJECT = V-DIG>
<SYNTAX DIG WITH OBJECT = V-DIG>
<SYNTAX DIG THROUGH OBJECT = V-DIG>
<SYNTAX DISEMBARK OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-DISEMBARK>
<SYNONYM DISEMBARK DEBARK>
<SYNTAX DISROBE = V-GET-UNDRESSED>
<SYNTAX DOZE = V-DOZE>
<SYNONYM DOZE NAP SNOOZE>
<SYNTAX DRINK OBJECT (FIND DRINKBIT) (HELD CARRIED ON-GROUND IN-ROOM)
= V-DRINK>
<SYNTAX DRINK FROM OBJECT (HELD CARRIED) = V-DRINK-FROM>
<SYNONYM DRINK SIP SWALLOW IMBIBE QUAFF GUZZLE SWILL>
<SYNTAX DROP OBJECT (HELD MANY HAVE) = V-DROP PRE-DROP>
<SYNTAX DROP OBJECT (HELD MANY) BEFORE OBJECT = V-PUT-IN-FRONT PRE-GIVE>
<SYNTAX DROP OBJECT (HELD MANY) DOWN OBJECT = V-PUT PRE-PUT>
<SYNTAX DROP OBJECT (HELD MANY) IN OBJECT = V-PUT PRE-PUT>
<SYNTAX DROP OBJECT (HELD MANY) ON OBJECT = V-PUT-ON PRE-PUT>
<SYNTAX EAT OBJECT (FIND EATBIT) (HELD CARRIED ON-GROUND IN-ROOM) = V-EAT>
<SYNONYM EAT DEVOUR INGEST GOBBLE>
<SYNTAX ENJOY OBJECT = V-ENJOY>
<SYNTAX ENTER = V-ENTER>
<SYNTAX ENTER OBJECT = V-THROUGH>
<SYNTAX EXIT = V-EXIT>
<SYNTAX EXIT OBJECT = V-EXIT>
<SYNONYM EXIT DEPART WITHDR>
<SYNTAX ESCAPE = V-ESCAPE>
<SYNTAX ESCAPE OBJECT = V-ESCAPE>
<SYNTAX ESCAPE FROM OBJECT = V-ESCAPE>
<SYNONYM ESCAPE FLEE>
<SYNTAX EXAMINE OBJECT (HELD CARRIED ON-GROUND IN-ROOM) (FIND DARKBIT)
= V-EXAMINE PRE-READ>
<SYNTAX EXAMINE OBJECT THROUGH OBJECT = V-EXAMINE-THROUGH PRE-READ>
<SYNTAX EXAMINE IN OBJECT (HELD CARRIED IN-ROOM ON-GROUND)
= V-LOOK-INSIDE>
<SYNTAX EXAMINE ON OBJECT (HELD CARRIED IN-ROOM ON-GROUND)
= V-LOOK-INSIDE>
<SYNTAX EXAMINE FOR OBJECT = V-FIND>
<SYNONYM EXAMINE INSPECT DESCRIBE STUDY OBSERVE SEE SCOUR>
<SYNTAX EXTINGUISH OBJECT (FIND ONBIT) = V-LAMP-OFF>
<SYNTAX FEED OBJECT (FIND ACTORBIT) = V-FEED>
<SYNTAX FEED OBJECT (MANY HELD HAVE) TO OBJECT (FIND ACTORBIT) (ON-GROUND)
= V-GIVE PRE-GIVE>
<SYNTAX FEED OBJECT (FIND ACTORBIT) (ON-GROUND) OBJECT (MANY HELD HAVE)
= V-SGIVE>
<SYNTAX FILL OBJECT = V-FILL>
<SYNTAX FIND OBJECT = V-FIND>
<SYNONYM FIND SEEK>
<SYNTAX FOLLOW OBJECT = V-FOLLOW>
<SYNONYM FOLLOW PURSUE CHASE>
<SYNTAX FOOTNOTE = V-FOOTNOTE>
<SYNTAX FOOTNOTE OBJECT = V-FOOTNOTE>
<SYNTAX FRIPPI = V-FRIPPI>
<SYNONYM FRIPPI LYSHUS GASHEE MORPHO THOU BLEEM MISERA VENCHI WIMBGU>
<SYNTAX HAND OBJECT (MANY HELD HAVE) TO OBJECT (FIND ACTORBIT) (ON-GROUND)
= V-GIVE PRE-GIVE>
<SYNTAX HAND OBJECT (FIND ACTORBIT) (ON-GROUND) OBJECT (MANY HELD HAVE)
= V-SGIVE>
<SYNTAX HAND UP OBJECT (FIND RLANDBIT) = V-GIVE-UP>
<SYNONYM HAND GIVE SELL DONATE OFFER>
<SYNTAX HANG OBJECT ON OBJECT = V-HANG>
<SYNTAX HANG OBJECT FROM OBJECT = V-HANG>
<SYNTAX HANG OBJECT (HELD MANY) IN OBJECT = V-PUT PRE-PUT>
<SYNTAX HEAR OBJECT (FIND DARKBIT) = V-LISTEN>
<SYNTAX HELLO = V-HELLO>
<SYNTAX HELLO OBJECT = V-HELLO>
<SYNONYM HELLO HI>
<SYNTAX HELP = V-HELP>
<SYNTAX HELP OBJECT = V-SAVE-SOMETHING>
<SYNONYM HELP HINT HINTS>
<SYNTAX HIDE = V-HIDE>
<SYNTAX HIDE UNDER OBJECT = V-HIDE>
<SYNTAX HIDE BEHIND OBJECT = V-HIDE>
<SYNTAX HITCHH = V-HITCHHIKE>
<SYNONYM HITCHH HITCH>
<SYNTAX IDIOT = V-IDIOT>
<SYNONYM IDIOT>
<SYNTAX JUMP = V-LEAP>
<SYNTAX JUMP OVER OBJECT = V-LEAP>
<SYNTAX JUMP ACROSS OBJECT = V-LEAP>
<SYNTAX JUMP IN OBJECT = V-THROUGH>
<SYNTAX JUMP FROM OBJECT = V-LEAP>
<SYNTAX JUMP OFF OBJECT = V-LEAP>
<SYNTAX JUMP OUT OBJECT = V-THROUGH>
<SYNTAX JUMP THROUGH OBJECT = V-THROUGH>
<SYNONYM JUMP LEAP DIVE>
<SYNTAX KICK OBJECT = V-KICK>
<SYNTAX KISS OBJECT (FIND ACTORBIT) (ON-GROUND IN-ROOM) = V-KISS>
<SYNTAX KNEEL = V-KNEEL>
<SYNONYM KNEEL CRAWL PEEK>
<SYNTAX KNOCK AT OBJECT = V-KNOCK>
<SYNTAX KNOCK ON OBJECT = V-KNOCK>
<SYNTAX KNOCK DOWN OBJECT (FIND ACTORBIT) (ON-GROUND IN-ROOM) = V-KILL>
<SYNONYM KNOCK RAP>
<SYNTAX LEAVE = V-LEAVE>
<SYNTAX LEAVE OBJECT = V-LEAVE>
<SYNTAX LIE ON OBJECT (FIND VEHBIT) = V-LIE-DOWN>
<SYNTAX LIE IN OBJECT (FIND VEHBIT) = V-LIE-DOWN>
<SYNTAX LIE DOWN OBJECT (FIND RLANDBIT) = V-LIE-DOWN>
<SYNTAX LIE BEFORE OBJECT = V-BLOCK>
<SYNONYM LIE RECLIN>
<SYNTAX LIGHT OBJECT (FIND LIGHTBIT) (HELD CARRIED ON-GROUND IN-ROOM)
= V-LAMP-ON>
<SYNTAX LISTEN TO OBJECT (FIND DARKBIT) = V-LISTEN>
<SYNTAX LOCK OBJECT (ON-GROUND IN-ROOM) = V-LOCK>
<SYNTAX LOCK OBJECT (ON-GROUND IN-ROOM) WITH OBJECT (TAKE) = V-LOCK>
<SYNTAX LOOK = V-LOOK>
<SYNTAX LOOK AROUND OBJECT (FIND RLANDBIT) = V-LOOK>
<SYNTAX LOOK DOWN OBJECT (FIND RLANDBIT) = V-LOOK-DOWN>
<SYNTAX LOOK UP OBJECT (FIND RLANDBIT) = V-LOOK-UP>
<SYNTAX LOOK AT OBJECT (HELD CARRIED ON-GROUND IN-ROOM) (FIND DARKBIT)
= V-EXAMINE PRE-READ>
<SYNTAX LOOK AT OBJECT THROUGH OBJECT = V-EXAMINE-THROUGH PRE-READ>
<SYNTAX LOOK THROUGH OBJECT = V-LOOK-INSIDE>
<SYNTAX LOOK OUT OBJECT = V-LOOK-INSIDE>
<SYNTAX LOOK UNDER OBJECT = V-LOOK-UNDER PRE-READ>
<SYNTAX LOOK BEHIND OBJECT = V-LOOK-BEHIND PRE-READ>
<SYNTAX LOOK IN OBJECT (HELD CARRIED ON-GROUND IN-ROOM) = V-LOOK-INSIDE>
<SYNTAX LOOK ON OBJECT = V-EXAMINE PRE-READ>
<SYNTAX LOOK FOR OBJECT = V-FIND>
<SYNTAX LOOK OBJECT = V-CHASTISE>
<SYNONYM LOOK L STARE GAZE>
<SYNTAX LOWER OBJECT = V-LOWER>
<SYNTAX MAKE OBJECT = V-MAKE>
<SYNTAX MOVE OBJECT (ON-GROUND IN-ROOM) = V-MOVE>
<SYNTAX MOVE OBJECT OBJECT = V-FLIPSWITCH>
<SYNTAX MOVE TOGETHER OBJECT = V-PULL-TOGETHER> ;"pull myself together"
<SYNONYM MOVE PULL>
<SYNTAX MY OBJECT OBJECT = V-MY-NAME>
<SYNTAX NO = V-NO>
<SYNTAX OPEN OBJECT (FIND DOORBIT) (HELD CARRIED ON-GROUND IN-ROOM) = V-OPEN>
<SYNTAX OPEN UP OBJECT (FIND DOORBIT) (HELD CARRIED ON-GROUND IN-ROOM)
= V-OPEN>
<SYNTAX OPEN OBJECT (FIND DOORBIT) (HELD CARRIED ON-GROUND IN-ROOM)
WITH OBJECT (ON-GROUND IN-ROOM HELD CARRIED HAVE) = V-OPEN>
<SYNONYM OPEN PART DRAW>
<SYNTAX PANIC = V-PANIC>
<SYNTAX PAY FOR OBJECT = V-BUY>
<SYNTAX PHONE OBJECT = V-CALL>
<SYNTAX PHONE OBJECT WITH OBJECT = V-CALL-WITH>
<SYNTAX PHONE OBJECT ON OBJECT = V-CALL-WITH>
<SYNONYM PHONE CALL>
<SYNTAX PICK OBJECT = V-PICK>
<SYNTAX PICK OBJECT WITH OBJECT = V-PICK>
<SYNTAX PICK UP OBJECT (FIND TAKEBIT) (ON-GROUND MANY) = V-PICK-UP PRE-TAKE>
<SYNTAX PLANT OBJECT (HELD MANY) IN OBJECT = V-PLANT>
<SYNONYM PLANT BURY>
<SYNTAX PLUG OBJECT IN OBJECT = V-PLUG>
<SYNTAX PLUG OBJECT TO OBJECT = V-PLUG>
<SYNTAX PLUG IN OBJECT IN OBJECT = V-PLUG>
<SYNTAX PLUG IN OBJECT TO OBJECT = V-PLUG>
<SYNTAX POINT AT OBJECT = V-POINT>
<SYNTAX POINT TO OBJECT = V-POINT>
<SYNTAX POINT OBJECT AT OBJECT = V-STEER>
<SYNTAX POINT OBJECT TO OBJECT = V-STEER>
<SYNONYM POINT STEER>
<SYNTAX POUR OBJECT (HELD CARRIED) = V-POUR>
<SYNTAX POUR OBJECT (HELD CARRIED) IN OBJECT = V-POUR>
<SYNTAX POUR OBJECT (HELD CARRIED) ON OBJECT = V-POUR>
<SYNTAX POUR OBJECT (HELD CARRIED) OVER OBJECT = V-POUR>
<SYNONYM POUR SPILL SPRINK>
<SYNTAX PROTEST = V-PROTEST>
<SYNONYM PROTEST ARGUE>
<SYNTAX PUSH OBJECT = V-PUSH>
<SYNTAX PUSH OBJECT OBJECT = V-FLIPSWITCH>
<SYNTAX PUSH ON OBJECT (IN-ROOM ON-GROUND) = V-PUSH>
<SYNTAX PUSH OBJECT UNDER OBJECT = V-PUT-UNDER>
<SYNONYM PUSH PRESS>
<SYNTAX PUT OBJECT (HELD MANY) IN OBJECT = V-PUT PRE-PUT>
<SYNTAX PUT OBJECT (HELD MANY) AT OBJECT = V-PUT-IN-FRONT PRE-GIVE>
<SYNTAX PUT OBJECT (HELD MANY) BEFORE OBJECT = V-PUT-IN-FRONT PRE-GIVE>
<SYNTAX PUT OBJECT (HELD MANY) DOWN OBJECT = V-PUT-ON PRE-PUT>
<SYNTAX PUT OBJECT (HELD MANY) ON OBJECT = V-PUT-ON PRE-PUT>
<SYNTAX PUT OBJECT (HELD MANY) AROUND OBJECT = V-PUT-ON PRE-PUT>
<SYNTAX PUT OBJECT (HELD MANY) OVER OBJECT = V-PUT-ON PRE-PUT>
<SYNTAX PUT OBJECT (HELD MANY) ACROSS OBJECT = V-PUT-ON PRE-PUT>
<SYNTAX PUT DOWN OBJECT (HELD MANY HAVE) = V-DROP PRE-DROP>
<SYNTAX PUT OBJECT UNDER OBJECT = V-PUT-UNDER>
<SYNTAX PUT ON OBJECT (FIND WEARBIT) (HAVE) = V-WEAR>
<SYNTAX PUT OBJECT BEHIND OBJECT = V-PUT-BEHIND>
<SYNONYM PUT STUFF INSERT PLACE LAY>
<SYNTAX RAISE OBJECT = V-RAISE>
<SYNTAX RAISE UP OBJECT = V-RAISE>
<SYNONYM RAISE LIFT>
<SYNTAX RAPE OBJECT (FIND ACTORBIT) = V-RAPE>
;<SYNTAX REACH IN OBJECT (ON-GROUND IN-ROOM) = V-REACH-IN>
<SYNTAX READ OBJECT (FIND READBIT) (HELD CARRIED ON-GROUND IN-ROOM TAKE)
= V-READ PRE-READ>
<SYNTAX READ OBJECT (FIND READBIT) (HELD CARRIED ON-GROUND IN-ROOM TAKE)
THROUGH OBJECT = V-READ PRE-READ>
<SYNTAX READ OBJECT (FIND READBIT) (HELD CARRIED ON-GROUND IN-ROOM TAKE)
WITH OBJECT = V-READ PRE-READ>
<SYNONYM READ SKIM>
<SYNTAX REFUSE OBJECT (IN-ROOM) = V-REFUSE>
<SYNTAX RELAX = V-RELAX>
<SYNTAX REMOVE OBJECT (FIND WORNBIT) = V-REMOVE>
<SYNTAX REMOVE OBJECT (FIND TAKEBIT) (IN-ROOM CARRIED MANY)
FROM OBJECT = V-TAKE PRE-TAKE>
<SYNONYM REMOVE DOFF SHED>
<SYNTAX REPAIR OBJECT = V-REPAIR>
<SYNONYM REPAIR FIX UNJAM>
<SYNTAX REPLACE OBJECT = V-REPLACE>
<SYNTAX SAVE OBJECT = V-SAVE-SOMETHING>
<SYNTAX SAY TO OBJECT (FIND ACTORBIT) (IN-ROOM) = V-TELL>
<SYNTAX SAY OBJECT = V-SAY-NAME>
<SYNTAX SAY = V-SAY>
<SYNONYM SAY TALK SPEAK>
<SYNTAX SEARCH OBJECT = V-SEARCH>
<SYNTAX SEARCH IN OBJECT = V-SEARCH>
<SYNTAX SEARCH FOR OBJECT = V-FIND>
<SYNONYM SEARCH RUMMAG FRISK>
<SYNTAX SHAKE OBJECT = V-SHAKE>
<SYNTAX SHAKE OBJECT WITH OBJECT = V-SHAKE-WITH>
<SYNTAX SHOOT = V-SHOOT>
<SYNTAX SHOOT OBJECT = V-SHOOT>
<SYNTAX SHOOT OBJECT WITH OBJECT (HAVE) = V-SHOOT>
<SYNTAX SHOOT OBJECT (HAVE) AT OBJECT = V-SSHOOT>
<SYNONYM SHOOT FIRE BLAST>
<SYNTAX SHOW OBJECT (HELD MANY HAVE) TO OBJECT (FIND ACTORBIT) = V-SHOW>
<SYNTAX SHOW OBJECT (FIND ACTORBIT) OBJECT (HELD MANY HAVE) = V-SSHOW>
<SYNTAX SIT ON OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-CLIMB-ON>
<SYNTAX SIT DOWN OBJECT (FIND RLANDBIT) (ON-GROUND IN-ROOM) = V-SIT>
<SYNTAX SIT IN OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-BOARD PRE-BOARD>
<SYNONYM SIT REST SQUAT>
<SYNTAX SKIP = V-SKIP>
<SYNONYM SKIP HOP>
<SYNTAX SLEEP = V-SLEEP>
<SYNTAX SLEEP IN OBJECT (IN-ROOM ON-GROUND) = V-BOARD>
<SYNTAX SLEEP ON OBJECT (IN-ROOM ON-GROUND) = V-BOARD>
<SYNTAX SLIDE OBJECT = V-PUSH>
<SYNTAX SLIDE OBJECT UNDER OBJECT = V-PUT-UNDER>
<SYNTAX SMELL OBJECT (FIND DARKBIT) = V-SMELL>
<SYNONYM SMELL SNIFF WHIFF>
<SYNTAX SMILE = V-SMILE>
<SYNTAX SMILE AT OBJECT = V-SMILE>
<SYNTAX SPIN OBJECT = V-SPIN>
<SYNONYM SPIN WHIRL ROTATE>
<SYNTAX STAND = V-STAND>
<SYNTAX STAND UP OBJECT (FIND RLANDBIT) = V-STAND>
<SYNTAX STAND ON OBJECT = V-STAND-ON>
<SYNTAX STAND BEFORE OBJECT = V-STAND-BEFORE>
<SYNTAX STAND IN OBJECT = V-STAND-ON>
<SYNONYM STAND RISE>
<SYNTAX START OBJECT = V-LAMP-ON>
<SYNONYM START ACTIVA>
<SYNTAX SWITCH OBJECT = V-TURN>
<SYNTAX SWITCH OBJECT OBJECT = V-FLIPSWITCH>
<SYNTAX SWITCH AROUND OBJECT (FIND RLANDBIT) = V-TURN>
<SYNTAX SWITCH OBJECT TO OBJECT = V-TURN>
<SYNTAX SWITCH OBJECT WITH OBJECT (HAVE) = V-TURN>
<SYNTAX SWITCH ON OBJECT (FIND LIGHTBIT) = V-LAMP-ON>
<SYNTAX SWITCH ON OBJECT OBJECT = V-FLIPSWITCH>
<SYNTAX SWITCH OFF OBJECT (FIND LIGHTBIT) (TAKE) = V-LAMP-OFF>
<SYNTAX SWITCH OFF OBJECT OBJECT = V-FLIPSWITCH>
<SYNONYM SWITCH TURN FLIP FLICK TOGGLE>
<SYNTAX TAKE OBJECT (FIND TAKEBIT) (ON-GROUND IN-ROOM MANY) = V-TAKE PRE-TAKE>
<SYNTAX TAKE IN OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-BOARD PRE-BOARD>
<SYNTAX TAKE OUT OBJECT (FIND VEHBIT) (ON-GROUND) = V-DISEMBARK>
<SYNTAX TAKE ON OBJECT (FIND VEHBIT) (ON-GROUND IN-ROOM) = V-CLIMB-ON>
<SYNTAX TAKE UP OBJECT (FIND RLANDBIT) = V-STAND>
<SYNTAX TAKE DRESSE OBJECT (FIND RLANDBIT) = V-GET-DRESSED>
<SYNTAX TAKE UNDRES OBJECT (FIND RLANDBIT) = V-GET-UNDRESSED>
<SYNTAX TAKE DRUNK OBJECT (FIND RLANDBIT) = V-GET-DRUNK>
<SYNTAX TAKE OBJECT (FIND TAKEBIT) (CARRIED IN-ROOM MANY)
OUT OBJECT = V-TAKE PRE-TAKE>
<SYNTAX TAKE OBJECT (FIND TAKEBIT) (CARRIED IN-ROOM MANY)
OFF OBJECT = V-TAKE PRE-TAKE>
<SYNTAX TAKE OBJECT (FIND TAKEBIT) (IN-ROOM CARRIED MANY)
FROM OBJECT = V-TAKE PRE-TAKE>
<SYNTAX TAKE OBJECT (FIND TAKEBIT) (IN-ROOM CARRIED MANY)
IN OBJECT = V-TAKE PRE-TAKE>
<SYNTAX TAKE OFF OBJECT (FIND WORNBIT) (HAVE) = V-TAKE-OFF>
<SYNONYM TAKE GRAB CATCH GET HOLD CARRY>
<SYNTAX TASTE OBJECT (FIND DARKBIT) = V-TASTE>
<SYNONYM TASTE LICK>
<SYNTAX TELL OBJECT (FIND ACTORBIT) (IN-ROOM) = V-TELL>
<SYNTAX TELL OBJECT (FIND ACTORBIT) ABOUT OBJECT = V-TELL-ABOUT>
<SYNTAX TELL OBJECT OBJECT = V-TELL-TIME>
<SYNTAX TELL OBJECT TO OBJECT = V-TELL-NAME>
<SYNTAX THANK OBJECT = V-THANK>
<SYNONYM THANK THANKS>
<SYNTAX THROW OBJECT (HELD CARRIED) = V-THROW PRE-THROW>
<SYNTAX THROW OBJECT OBJECT = V-FLIPSWITCH>
<SYNTAX THROW OBJECT (HELD CARRIED) UP OBJECT (FIND RLANDBIT)
= V-THROW PRE-THROW>
<SYNTAX THROW OBJECT (HELD CARRIED) AT OBJECT (ON-GROUND IN-ROOM)
= V-THROW PRE-THROW>
<SYNTAX THROW OBJECT (HELD CARRIED) TO OBJECT (ON-GROUND IN-ROOM)
= V-THROW PRE-THROW>
<SYNTAX THROW OBJECT (HELD CARRIED) OFF OBJECT = V-THROW-OFF>
<SYNTAX THROW OBJECT (HELD CARRIED) OVER OBJECT = V-THROW-OFF>
<SYNTAX THROW OBJECT (HELD CARRIED) THROUGH OBJECT (ON-GROUND IN-ROOM)
= V-THROW PRE-THROW>
<SYNTAX THROW OBJECT (HELD CARRIED) IN OBJECT = V-THROW PRE-THROW>
<SYNTAX THROW IN OBJECT = V-THROW-IN-TOWEL>
<SYNONYM THROW HURL TOSS>
<SYNTAX TIE OBJECT = V-TIE>
<SYNTAX TIE TOGETHER OBJECT = V-TIE-TOGETHER>
<SYNTAX TIE OBJECT (HELD MANY) AROUND OBJECT = V-PUT-ON PRE-PUT>
<SYNTAX TIE OBJECT TO OBJECT = V-PLUG>
<SYNONYM TIE FASTEN SECURE ATTACH>
<SYNTAX TOUCH OBJECT (FIND DARKBIT) = V-RUB>
<SYNTAX TOUCH OBJECT WITH OBJECT = V-RUB>
<SYNONYM TOUCH FEEL PAT PET RUB>
<SYNTAX TYPE = V-TYPE>
<SYNTAX TYPE ON OBJECT = V-TYPE-ON>
<SYNTAX UNLOCK OBJECT = V-UNLOCK>
<SYNTAX UNLOCK OBJECT WITH OBJECT (HAVE) = V-UNLOCK>
<SYNTAX UNPLUG OBJECT = V-UNPLUG>
<SYNONYM UNPLUG DISCON>
<SYNTAX UNTIE OBJECT (ON-GROUND IN-ROOM HELD CARRIED) = V-UNTIE>
<SYNONYM UNTIE FREE UNFAST UNATTA UNKNOT>
<SYNTAX WAIT = V-WAIT>
<SYNTAX WAIT FOR OBJECT = V-WAIT-FOR>
<SYNONYM WAIT Z STAY>
<SYNTAX WAKE OBJECT (FIND RLANDBIT) = V-ALARM>
<SYNTAX WAKE UP OBJECT (FIND RLANDBIT) = V-ALARM>
<SYNONYM WAKE AWAKE ROUSE>
<SYNTAX WALK = V-WALK-AROUND>
<SYNTAX WALK OBJECT = V-WALK>
<SYNTAX WALK IN OBJECT = V-THROUGH>
<SYNTAX WALK OUT OBJECT = V-THROUGH>
<SYNTAX WALK ON OBJECT = V-WALK-AROUND>
<SYNTAX WALK OVER OBJECT = V-LEAP>
<SYNTAX WALK THROUGH OBJECT = V-THROUGH>
<SYNTAX WALK AROUND OBJECT = V-WALK-AROUND>
<SYNTAX WALK BEHIND OBJECT = V-WALK-AROUND>
<SYNTAX WALK UP OBJECT (ON-GROUND IN-ROOM) = V-CLIMB-UP>
<SYNTAX WALK DOWN OBJECT (ON-GROUND IN-ROOM) = V-CLIMB-DOWN>
<SYNTAX WALK TO OBJECT = V-WALK-TO>
<SYNTAX WALK AWAY OBJECT (FIND RLANDBIT) = V-LEAVE>
<SYNONYM WALK GO RUN PROCEE STEP>
<SYNTAX WASH OBJECT = V-CLEAN>
<SYNTAX WASH UP OBJECT (FIND RLANDBIT) = V-CLEAN>
<SYNONYM WASH CLEAN TIDY>
<SYNTAX WATER OBJECT WITH OBJECT (HAVE) = V-WATER>
<SYNTAX WAVE OBJECT (HELD CARRIED) = V-WAVE>
<SYNTAX WAVE = V-WAVE-AT>
<SYNTAX WAVE AT OBJECT = V-WAVE-AT>
<SYNTAX WAVE TO OBJECT = V-WAVE-AT>
<SYNTAX WEAR OBJECT (FIND WEARBIT) (HAVE) = V-WEAR>
<SYNONYM WEAR DON>
<SYNTAX WHAT OBJECT = V-WHAT>
<SYNTAX WHAT ABOUT OBJECT = V-WHAT-ABOUT>
<SYNTAX WHAT OBJECT OBJECT = V-WHAT-TIME>
<SYNONYM WHAT WHATS WHAT\'>
<SYNTAX WHERE OBJECT = V-WHERE>
<SYNONYM WHERE WHERES>
<SYNTAX WHO OBJECT = V-WHO>
<SYNONYM WHO WHOS>
<SYNTAX WHY = V-WHY>
<SYNTAX DRAPE OBJECT IN OBJECT (HELD MANY) = V-SPUT-ON>
<SYNTAX DRAPE OBJECT (HELD MANY) ON OBJECT = V-PUT-ON PRE-PUT>
<SYNTAX DRAPE OBJECT (HELD MANY) AROUND OBJECT = V-PUT-ON PRE-PUT>
<SYNTAX DRAPE OBJECT (HELD MANY) OVER OBJECT = V-PUT-ON PRE-PUT>
<SYNONYM DRAPE WRAP>
<SYNTAX YELL = V-YELL>
<SYNTAX YELL AT OBJECT = V-YELL>
<SYNTAX YELL TO OBJECT = V-YELL>
<SYNONYM YELL SCREAM SHOUT HOWL>
<SYNTAX YES = V-YES>
<SYNONYM YES Y OK OKAY SURE>

1566
unearth.zil Normal file

File diff suppressed because it is too large Load diff

2930
verbs.zil Normal file

File diff suppressed because it is too large Load diff

884
vogon.zil Normal file
View file

@ -0,0 +1,884 @@
"VOGON for
THE HITCHHIKER'S GUIDE TO THE GALAXY
(c) Copyright 1984 Infocom, Inc. All Rights Reserved."
<OBJECT MINERAL-WATER
(IN SATCHEL)
(DESC "Santraginean Mineral Water")
(LDESC "There is a bottle of mineral water here.")
(SYNONYM BOTTLE WATER)
(ADJECTIVE SANTRA MINERA)
(FLAGS NARTICLEBIT DRINKBIT TAKEBIT)
(GENERIC MINERAL-WATER)
(ACTION MINERAL-WATER-F)>
<ROUTINE MINERAL-WATER-F ()
<COND (<VERB? DRINK DRINK-FROM>
<TELL
"Bad idea. Even Santraginus Five seawater is illegal on most planets. (You can
imagine what kind of beach communities they have.)" CR>)
(<VERB? LOOK-INSIDE>
<PERFORM ,V?EXAMINE ,PRSO>
<RTRUE>)
(<VERB? OPEN CLOSE>
<TELL
"This is one of those clever new always-open always-closed bottles." CR>)
(<VERB? POUR THROW>
<LIQUID-SPILL>)>>
<ROOM HOLD
(IN ROOMS)
(SYNONYM PROTEI)
(DESC "Vogon Hold")
(WEST "The door to the corridor is locked (from the outside).")
(EAST TO AIRLOCK IF VOGON-INNER-DOOR IS OPEN) ;"shouldn't happen"
(FLAGS RLANDBIT ONBIT)
(GLOBAL VOGON-INNER-DOOR AIRLOCK-OBJECT FLEET HOLD-FURNISHINGS)
(PSEUDO "WEAPON" WEAPON-PSEUDO)
(ACTION HOLD-F)>
<ROUTINE HOLD-F (RARG)
<COND (<AND <EQUAL? .RARG ,M-END>
<NOT <FSET? ,HOLD ,NDESCBIT>>>
<FSET ,HOLD ,NDESCBIT>
<FSET ,PEANUTS ,TAKEBIT>
<FCLEAR ,PEANUTS ,NDESCBIT>
<FCLEAR ,PEANUTS ,TRYTAKEBIT>
<MOVE ,PEANUTS ,PROTAGONIST>
<MOVE ,FORD ,HERE>
<MOVE ,MINERAL-WATER ,FORD>
<SETG GROGGY T>
<ENABLE <QUEUE I-GROGGY 3>>
<ENABLE <QUEUE I-FORD 6>>
<ENABLE <QUEUE I-ANNOUNCEMENT 18>>
<ENABLE <QUEUE I-GUARDS 36>>
<SETG LINE-NUMBER <RANDOM 6>>
<SETG WORD-NUMBER <RANDOM 3>>
<SETG SCORE <+ ,SCORE 8>>
<SETG P-IT-OBJECT ,PEANUTS>
<CRLF>
<TELL
"Ford removes the bottle of " D ,MINERAL-WATER " which he's been waving under
your nose. He tells you that you are aboard a Vogon spaceship, and gives you
some peanuts." CR>)
(<AND <EQUAL? .RARG ,M-END>
<FSET? ,HOLD ,REVISITBIT>>
<SETG DREAMING T>
<JIGS-UP
"A pair of Vogon guards stand nearby, waving acrid-smelling stun guns an inch
away from your face. Simultaneously, they fire.">
<RTRUE>)
(<EQUAL? .RARG ,M-LOOK>
<TELL
"This is a squalid room filled with grubby mattresses, unwashed cups, and
unidentifiable bits of smelly alien underwear. A door lies to port, and an
airlock lies to starboard.">
<COND (,GOWN-HUNG
<TELL " Your gown is hanging from a hook">
<COND (<NOT <FSET? ,TOWEL ,SURFACEBIT>>
<TELL ".">)>)>
<COND (<FSET? ,TOWEL ,SURFACEBIT>
<COND (,GOWN-HUNG
<TELL " and a ">)
(T
<TELL " A ">)>
<TELL "towel is draped over a drain on the floor.">)>
<COND (<AND ,PANEL-BLOCKER
<NOT <EQUAL? ,PANEL-BLOCKER ,SATCHEL>>>
<TELL
" Resting in front of a " D ,ROBOT-PANEL " at the base of one wall is">
<ARTICLE ,PANEL-BLOCKER>
<TELL ".">)>
<CRLF>)>>
<OBJECT HOLD-FURNISHINGS
(IN LOCAL-GLOBALS)
(DESC "it")
(SYNONYM MATTRE CUPS CUP UNDERW)
(ADJECTIVE GRUBBY UNWASH UNIDEN SMELLY ALIEN)
(FLAGS NDESCBIT NARTICLEBIT)
(ACTION UNIMPORTANT-THING-F)>
<ROUTINE I-GROGGY ()
<ENABLE <QUEUE I-GROGGY -1>>
<SETG GROGGY-COUNTER <+ ,GROGGY-COUNTER 1>>
<COND (<NOT ,GROGGY>
<DISABLE <INT I-GROGGY>>
<SETG GROGGY-COUNTER 0>
<RFALSE>)>
<CRLF>
<COND (<EQUAL? ,GROGGY-COUNTER 1 2>
<TELL "You begin to feel ">
<COND (<EQUAL? ,GROGGY-COUNTER 2>
<TELL "in">)>
<TELL "distinctly groggy." CR>)
(<EQUAL? ,GROGGY-COUNTER 3>
<TELL "You begin to feel very indistinct." CR>)
(T
<TELL
"Your serious allergic reaction to protein loss from" ,BEAM "s becomes a cause
celebre amongst various holistic pressure groups in the Galaxy and leads to a
total ban on dematerialisation. Within fifty years, space travel is replaced by
a keen interest in old furniture restoration and market gardening. In this new,
quieter Galaxy, the art of telepathy flourishes as never before, creating a new
universal harmony which brings all life together, converts all matter into
thought and brings about the rebirth of the entire Universe on a higher and
better plane of existence.|
|
However, none of this affects you, because you are dead." CR>
<FINISH>)>>
<GLOBAL GROGGY-COUNTER 0>
<GLOBAL GOWN-HUNG <>>
<GLOBAL PANEL-BLOCKER <>>
<GLOBAL ITEM-ON-SATCHEL <>>
<GLOBAL FISH-COUNTER 5>
<OBJECT DISPENSER
(IN HOLD)
(DESC "babel fish dispenser")
(LDESC "Along one wall is a tall dispensing machine.")
(SYNONYM DISPEN MACHIN SLOT)
(ADJECTIVE DISPEN BABEL FISH TALL VENDIN)
(ACTION DISPENSER-F)>
<ROUTINE DISPENSER-F ()
<COND (<VERB? EXAMINE>
<TELL
"The dispenser is tall, has a button at around eye-level, and says \"Babel
Fish\" in large letters. Anything dispensed would probably come out the slot
at around knee-level.">
<FINE-PRODUCT>
<CRLF>)
(<AND <VERB? PUT-IN-FRONT>
<PRSO? ,HEAD ,EARS>>
<SETG LYING-DOWN T>
<TELL
"You are now lying down with your ear near the " D ,DISPENSER " slot." CR>)
(<AND <VERB? LIE-DOWN>
,IN-FRONT-FLAG>
<PERFORM ,V?PUT-IN-FRONT ,HEAD ,DISPENSER>
<RTRUE>)>>
<OBJECT DISPENSER-BUTTON
(IN HOLD)
(DESC "dispenser button")
(SYNONYM BUTTON)
(ADJECTIVE DISPEN SINGLE BABEL FISH)
(FLAGS NDESCBIT)
(ACTION DISPENSER-BUTTON-F)>
<ROUTINE DISPENSER-BUTTON-F ()
<COND (<VERB? PUSH>
<COND (,LYING-DOWN
<TELL "You can't reach it from down here." CR>
<RTRUE>)
(<EQUAL? ,FISH-COUNTER 0>
<TELL "Click." CR>
<RTRUE>)>
<SETG FISH-COUNTER <- ,FISH-COUNTER 1>>
<TELL
"A single " D ,BABEL-FISH " shoots out of the slot. It sails across the
room and ">
<COND (<NOT ,GOWN-HUNG>
<TELL
"through a " D ,FISH-HOLE " in the wall, just under a " D ,HOOK "." CR>)
(T
<TELL "hits the dressing gown. The fish slides down the ">
<COND (,SLEEVE-TIED
<TELL "inside (nice try, though)">)
(T
<TELL "sleeve">)>
<TELL " of the gown and falls to the floor, ">
<COND (<NOT <FSET? ,TOWEL ,SURFACEBIT>>
<TELL
"vanishing through the grating of a hitherto unnoticed drain." CR>)
(T
<TELL
"landing on the towel. A split-second later, a tiny cleaning robot whizzes
across the floor, grabs the fish, and continues its breakneck pace toward
a " D ,ROBOT-PANEL " at the base of the wall. ">
<COND (<NOT ,PANEL-BLOCKER>
<TELL
"The robot zips through the panel, and is gone." CR>)
(<NOT <EQUAL? ,PANEL-BLOCKER ,SATCHEL>>
<TELL "The robot zips around">
<ARTICLE ,PANEL-BLOCKER>
<TELL ", through the panel, and is gone." CR>)
(T
<TELL
"The robot plows into the satchel, sending the " D ,BABEL-FISH>
<COND
(<AND <NOT <EQUAL? ,ITEM-ON-SATCHEL ,MAIL>>
,ITEM-ON-SATCHEL>
<TELL " and">
<ARTICLE ,ITEM-ON-SATCHEL T>)>
<TELL
" flying through the air in a graceful arc">
<COND
(<NOT <EQUAL? ,ITEM-ON-SATCHEL ,MAIL>>
<TELL
". " ,ROBOT-FLIES-IN "catches the " D ,BABEL-FISH " ">
<COND (,ITEM-ON-SATCHEL
<MOVE ,ITEM-ON-SATCHEL ,LOCAL-GLOBALS>
<TELL "and also manages to catch">
<ARTICLE ,ITEM-ON-SATCHEL T>
<SETG ITEM-ON-SATCHEL <>>)
(T
<TELL
"(which is all the flying junk it can find)">)>
<TELL ", and exits." CR>)
(<EQUAL? ,ITEM-ON-SATCHEL ,MAIL>
<MOVE ,MAIL ,LOCAL-GLOBALS>
<SETG SCORE <+ ,SCORE 12>>
<MOVE ,BABEL-FISH ,PROTAGONIST>
<COND (<RUNNING? ,I-ANNOUNCEMENT>
<ENABLE <QUEUE I-GUARDS 4>>)
(T
<ENABLE <QUEUE I-ANNOUNCEMENT 4>>
<ENABLE <QUEUE I-GUARDS 7>>)>
<SETG FISH-COUNTER 0>
<SETG ITEM-ON-SATCHEL <>>
<TELL
" surrounded by a cloud of junk mail. Another robot flies in and begins madly
collecting the cluttered plume of mail. The " D ,BABEL-FISH " continues its
flight, landing with a loud \"squish\" in your ear." CR>)>)>)>)>)>>
<OBJECT FISH-HOLE
(IN HOLD)
(DESC "small hole")
(SYNONYM HOLE)
(ADJECTIVE SMALL)
(FLAGS NDESCBIT)
(ACTION FISH-HOLE-F)>
<ROUTINE FISH-HOLE-F ()
<COND (<VERB? LOOK-INSIDE>
<TELL "You see only " D ,DARK-OBJECT "." CR>)
(<AND <VERB? PUT>
<PRSI? ,FISH-HOLE>>
<COND (<FSET? ,PRSO ,INTEGRALBIT>
<PART-OF>)
(<L? <GETP ,PRSO ,P?SIZE> 5>
<MOVE ,PRSO ,LOCAL-GLOBALS>
<TELL "It falls through the hole and vanishes." CR>)
(T
<TELL "It doesn't fit through the hole." CR>)>)
(<AND <VERB? PUT-ON PUT-IN-FRONT>
<PRSI? ,FISH-HOLE>>
<COND (<PRSO? ,HANDS ,EARS ,ME ,HEAD>
<PERFORM ,V?STAND-BEFORE ,FISH-HOLE>
<RTRUE>)>
<PERFORM ,V?HANG ,PRSO ,HOOK>
<RTRUE>)
(<AND <VERB? BLOCK-WITH SPUT-ON>
<PRSO? ,FISH-HOLE>>
<PERFORM ,V?HANG ,PRSI ,HOOK>
<RTRUE>)
(<VERB? BLOCK>
<PERFORM ,V?STAND-BEFORE ,FISH-HOLE>
<RTRUE>)
(<AND <VERB? LIE-DOWN>
,IN-FRONT-FLAG>
<PERFORM ,V?STAND-BEFORE ,FISH-HOLE>
<RTRUE>)>>
<OBJECT HOOK
(IN HOLD)
(DESC "metal hook")
(SYNONYM HOOK)
(ADJECTIVE METAL)
(FLAGS NDESCBIT)
(ACTION HOOK-F)>
<ROUTINE HOOK-F ()
<COND (<VERB? EXAMINE>
<COND (,GOWN-HUNG
<TELL "Your gown is hanging from it." CR>)
(T
<TELL
"The hook is attached to the wall, inches above a tiny hole." CR>)>)
(<VERB? HANG PUT-ON>
<COND (,LYING-DOWN
<TELL ,WHILE-LYING CR>)
(<PRSO?,GOWN>
<COND (<FSET? ,GOWN ,WORNBIT>
<IDROP>
<RTRUE>)>
<SETG GOWN-HUNG T>
<MOVE ,GOWN ,HERE>
<FSET ,GOWN ,NDESCBIT>
<FSET ,GOWN ,TRYTAKEBIT>
<FCLEAR ,GOWN ,OPENBIT>
<TELL
"The gown is now hanging from the hook, covering a tiny hole." CR>)
(<PRSO? ,HANDS ,EARS ,HEAD>
<PERFORM ,V?STAND-BEFORE ,HOOK>
<RTRUE>)
(<FSET? ,PRSO ,TAKEBIT>
<COND (<FSET? ,PRSO ,TRYTAKEBIT>
<TELL ,NOT-HOLDING>
<ARTICLE ,PRSO T>
<TELL "." CR>)
(T
<MOVE ,PRSO ,HERE>
<TELL "It slips off the hook." CR>)>)
(T
<V-COUNT>)>)>>
<OBJECT DRAIN
(IN HOLD)
(DESC "drain")
(SYNONYM DRAIN GRATING GRATE)
(FLAGS NDESCBIT)
(ACTION DRAIN-F)>
<ROUTINE DRAIN-F ()
<COND (<VERB? PUT-ON>
<COND (<FSET? ,TOWEL ,SURFACEBIT>
<TELL "The drain is already covered by the towel." CR>)
(,LYING-DOWN
<TELL ,WHILE-LYING CR>)
(<PRSO?,TOWEL>
<FSET ,TOWEL ,CONTBIT>
<FSET ,TOWEL ,SURFACEBIT>
<FSET ,TOWEL ,OPENBIT>
<FSET ,TOWEL ,NDESCBIT>
<FSET ,TOWEL ,TRYTAKEBIT>
<MOVE ,TOWEL ,HERE>
<PERFORM ,V?EXAMINE ,DRAIN>
<RTRUE>)
(T
<TELL "The drain is too large to be covered by">
<ARTICLE ,PRSO T>
<TELL "." CR>)>)
(<VERB? LOOK-INSIDE>
<PERFORM ,V?LOOK-INSIDE ,FISH-HOLE>
<RTRUE>)
(<AND <VERB? EXAMINE>
<FSET? ,TOWEL ,SURFACEBIT>>
<TELL "The towel completely covers the drain." CR>)>>
<OBJECT ROBOT-PANEL
(IN HOLD)
(DESC "tiny robot panel")
(SYNONYM PANEL)
(ADJECTIVE ROBOT TINY)
(FLAGS NDESCBIT)
(ACTION ROBOT-PANEL-F)>
<ROUTINE ROBOT-PANEL-F ()
<COND (<VERB? EXAMINE CLOSE>
<TELL
"The panel, only a few inches high, is currently closed." CR>)
(<VERB? OPEN>
<TELL ,BUDGE CR>)
(<VERB? BLOCK>
<SETG AWAITING-REPLY 6>
<ENABLE <QUEUE I-REPLY 2>>
<TELL "With " D ,HANDS "s? By force of will?" CR>)
(<AND <VERB? LIE-DOWN>
,IN-FRONT-FLAG>
<PERFORM ,V?STAND-BEFORE ,ROBOT-PANEL>
<RTRUE>)
(<AND <VERB? PUT-IN-FRONT PUT-IN-FRONT PUT-ON>
<PRSI? ,ROBOT-PANEL>>
<PERFORM ,V?BLOCK-WITH ,ROBOT-PANEL ,PRSO>
<RTRUE>)
(<AND <VERB? BLOCK-WITH SPUT-ON>
<PRSO? ,ROBOT-PANEL>>
<COND (<PRSI? ,HEAD ,HANDS ,EARS ,EYES>
<V-COUNT>)
(<NOT <HELD? ,PRSI>>
<TELL ,NOT-HOLDING>
<ARTICLE ,PRSI T>
<TELL "." CR>)
(,PANEL-BLOCKER
<TELL "But">
<ARTICLE ,PANEL-BLOCKER T>
<TELL
" is already in front of the " D ,ROBOT-PANEL "." CR>)
(,LYING-DOWN
<TELL ,WHILE-LYING CR>)
(T
<MOVE ,PRSI ,HERE>
<SETG PANEL-BLOCKER ,PRSI>
<FSET ,PRSI ,TRYTAKEBIT>
<TELL "Okay,">
<COND (<PRSI? ,SATCHEL>
<TELL " the satchel is lying on its side">)
(T
<FSET ,PRSI ,NDESCBIT>
<ARTICLE ,PRSI T>
<TELL " is sitting">)>
<TELL " in front of the " D ,ROBOT-PANEL "." CR>)>)>>
<OBJECT BABEL-FISH
(IN LOCAL-GLOBALS) ;"just for the purpose of MOBY-FIND"
(DESC "babel fish")
(SYNONYM FISH)
(ADJECTIVE BABEL)
(FLAGS TAKEBIT)
(ACTION BABEL-FISH-F)>
<ROUTINE BABEL-FISH-F ()
<COND (<VERB? TAKE REMOVE>
<TELL
"That would be foolish. Having a " D ,BABEL-FISH " in your ear is terribly
useful." CR>)>>
<OBJECT GLASS-CASE
(IN HOLD)
(DESC "glass case")
(LDESC "In the corner is a glass case with a switch and a keyboard.")
(SYNONYM CASE LID GLASS)
(ADJECTIVE GLASS)
(SIZE 40)
(FLAGS CONTBIT TRANSBIT SEARCHBIT)
(ACTION GLASS-CASE-F)>
<GLOBAL GLASS-CASE-SCORE <>>
<ROUTINE GLASS-CASE-F ()
<COND (<VERB? EXAMINE>
<TELL "The " D ,GLASS-CASE " is ">
<COND (<FSET? ,GLASS-CASE ,OPENBIT>
<TELL "open">)
(T
<TELL "closed">)>
<TELL
". Attached to it are a " D ,KEYBOARD " and a switch." CR>)
(<AND <VERB? OPEN>
<NOT <FSET? ,GLASS-CASE ,OPENBIT>>>
<TELL ,BUDGE CR>)
(<VERB? MUNG>
<TELL
"The hold of the Vogon ship is virtually undamaged by the explosion
of the " D ,GLASS-CASE>
<JIGS-UP
". You, however, are blasted into tiny bits and smeared all over the room.
Several cleaning robots fly in and wipe you neatly off the walls.">
<RTRUE>)>>
<ROUTINE GLASS-CASE-OPENS () ;"see V-TYPE"
<COND (<FSET? ,GLASS-CASE ,OPENBIT>
<TELL "Nothing happens." CR>
<FUCKING-CLEAR>)
(T
<FSET ,GLASS-CASE ,OPENBIT>
<TELL "The " D ,GLASS-CASE " opens." CR>
<FCLEAR ,PLOTTER ,TRYTAKEBIT>
<COND (<NOT ,GLASS-CASE-SCORE>
<SETG GLASS-CASE-SCORE T>
<SETG SCORE <+ ,SCORE 25>>)>
<FUCKING-CLEAR>)>>
<OBJECT KEYBOARD
(IN HOLD)
(DESC "keyboard")
(SYNONYM KEYBOA)
(FLAGS NDESCBIT TRYTAKEBIT)>
<OBJECT CASE-SWITCH
(IN HOLD)
(DESC "switch")
(SYNONYM SWITCH)
(FLAGS NDESCBIT SWITCHBIT)
(ACTION CASE-SWITCH-F)>
<ROUTINE CASE-SWITCH-F ()
<COND (<VERB? LAMP-ON TURN PUSH MOVE THROW>
<COND (<HELD? ,BABEL-FISH>
<TELL
"A recording plays: \"To open the case, type in the ">
<COND (<EQUAL? ,WORD-NUMBER 1>
<TELL "first">)
(<EQUAL? ,WORD-NUMBER 2>
<TELL "second">)
(<EQUAL? ,WORD-NUMBER 3>
<TELL "third">)>
<TELL
" word from the second verse of the Captain's current favourite poem.
WARNING: An incorrect input will cause the case to explode.\"" CR>)
(T
<TELL "A recording plays: \"A">
<PRODUCE-GIBBERISH 5>
<CRLF>)>)>>
<ROUTINE PRODUCE-GIBBERISH (N "AUX" GIBBERISH-COUNTER SUPER-COUNTER)
<SET SUPER-COUNTER 0>
<REPEAT ()
<SET SUPER-COUNTER <+ .SUPER-COUNTER 1>>
<SET GIBBERISH-COUNTER 0>
<REPEAT ()
<SET GIBBERISH-COUNTER <+ .GIBBERISH-COUNTER 1>>
<TELL <PICK-ONE ,GIBBERISH>>
<COND (<EQUAL? .GIBBERISH-COUNTER 10>
<COND (<NOT <EQUAL? .SUPER-COUNTER .N>>
<TELL " o">)>
<RETURN>)>>
<COND (<EQUAL? .SUPER-COUNTER .N>