home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Source Code 1994 March
/
Source_Code_CD-ROM_Walnut_Creek_March_1994.iso
/
compsrcs
/
games
/
vmsnet
/
funadv
/
part07
< prev
next >
Wrap
Internet Message Format
|
1992-03-07
|
48KB
Path: uunet!zaphod.mps.ohio-state.edu!think.com!yale.edu!heifetz!emory!dragon.com!cts
From: cts@dragon.com
Newsgroups: vmsnet.sources.games
Subject: funadv Part 07/08
Message-ID: <1992Mar7.222320.830@dragon.com>
Date: 8 Mar 92 03:23:20 GMT
Organization: Computer Projects Unlimited
Lines: 1588
-+-+-+-+-+-+-+-+ START OF PART 7 -+-+-+-+-+-+-+-+
X***LOCK, UNLOCK, NO OBJECT GIVEN. ASSUME VARIOUS THINGS IF PRESENT.
X `20
X 8040 SPK=28
X IF(HERE(SACK)) OBJ=SACK`20
X IF(HERE(CLAM))OBJ=CLAM
X IF(HERE(OYSTER))OBJ=OYSTER
X IF(AT(DOOR))OBJ=DOOR
X IF(AT(GRATE))OBJ=GRATE
X IF(OBJ.NE.0.AND.HERE(CHAIN))GOTO 8000`20
X IF(HERE(CHAIN))OBJ=CHAIN
X IF(OBJ.EQ.0)GOTO 2011`20
X `20
X***LOCK, UNLOCK OBJECT. SPECIAL STUFF FOR OPENING CLAM/OYSTER AND FOR C
X `20
X 9040 IF(OBJ.EQ.CLAM.OR.OBJ.EQ.OYSTER)GOTO 9046`20
X IF(OBJ.EQ.SACK) GOTO 9041`20
X IF(OBJ.EQ.DOOR)SPK=111
X IF(OBJ.EQ.DOOR.AND.PROP(DOOR).EQ.1)SPK=54`20
X IF(OBJ.EQ.SACK)SPK=32`20
X IF(OBJ.EQ.KEYS)SPK=55`20
X IF(OBJ.EQ.GRATE.OR.OBJ.EQ.CHAIN)SPK=31
X IF(SPK.NE.31.OR..NOT.HERE(KEYS))GOTO 2011`20
X IF(OBJ.EQ.CHAIN)GOTO 9048`20
X IF(.NOT.CLOSNG)GOTO 9043
X K=130`20
X IF(.NOT.PANIC)CLOCK2=15`20
X PANIC=.TRUE.
X GOTO 2010`20
X `20
X***SACK.
X `20
X 9041 IF(VERB.EQ.LOCK) GOTO 9042
X OBJ=MONGOOS`20
X GOTO 9020`20
X 9042 SPK=225`20
X GOTO 2011`20
X `20
X***GRATE.`20
X `20
X 9043 K=34+PROP(GRATE)
X PROP(GRATE)=1`20
X IF(VERB.EQ.LOCK)PROP(GRATE)=0`20
X K=K+2*PROP(GRATE)`20
X GOTO 2010`20
X `20
X***CLAM/OYSTER.`20
X `20
X 9046 K=0`20
X IF(OBJ.EQ.OYSTER)K=1
X SPK=124+K`20
X IF(TOTING(OBJ))SPK=120+K
X IF(.NOT.TOTING(TRIDNT))SPK=122+K
X IF(VERB.EQ.LOCK)SPK=61
X IF(SPK.NE.124)GOTO 2011`20
X CALL MOVE(CLAM,0)`20
X CALL DROP(OYSTER,LOC)`20
X CALL DROP(PEARL,PLAC(CLAM)+2)`20
X GOTO 2011`20
X `20
X***CHAIN.`20
X `20
X 9048 IF(VERB.EQ.LOCK)GOTO 9049`20
X SPK=171`20
X IF(PROP(BEAR).EQ.0)SPK=41`20
X IF(PROP(CHAIN).EQ.0)SPK=37
X IF(SPK.NE.171)GOTO 2011`20
X PROP(CHAIN)=0`20
X FIXED(CHAIN)=0
X IF(PROP(BEAR).NE.3)PROP(BEAR)=2`20
X FIXED(BEAR)=2-PROP(BEAR)
X GOTO 2011`20
X `20
X 9049 SPK=172`20
X IF(PROP(CHAIN).NE.0)SPK=34
X IF(LOC.NE.PLAC(CHAIN))SPK=173`20
X IF(SPK.NE.172)GOTO 2011`20
X PROP(CHAIN)=2`20
X IF(TOTING(CHAIN))CALL DROP(CHAIN,LOC)`20
X FIXED(CHAIN)=-1`20
X GOTO 2011`20
X `20
X***LIGHT LAMP`20
X `20
X 9070 IF(.NOT.HERE(LAMP))GOTO 2011
X SPK=184`20
X IF(LIMIT.LT.0)GOTO 2011`20
X PROP(LAMP)=1
X CALL RSPEAK(39)`20
X IF(WZDARK)GOTO 2000`20
X GOTO 2012`20
X `20
X***LAMP OFF`20
X `20
X 9080 IF(.NOT.HERE(LAMP))GOTO 2011
X PROP(LAMP)=0
X CALL RSPEAK(40)`20
X IF(DARK(0))CALL RSPEAK(16)
X GOTO 2012`20
X `20
X***WAVE. NO EFFECT UNLESS WAVING ROD AT FISSURE.`20
X `20
X 9090 IF((.NOT.TOTING(OBJ)).AND.(OBJ.NE.ROD.OR..NOT.TOTING(ROD2)))
X $SPK=29
X IF(OBJ.NE.ROD.OR..NOT.AT(FISSUR).OR..NOT.TOTING(OBJ)) GOTO 9091`20
X SPK=205`20
X CALL MOVE(ROD,125)
X GOTO 2011`20
X 9091 IF(OBJ.NE.ROD.OR..NOT.AT(ROPE).OR..NOT.`20
X $TOTING(OBJ).OR.CLOSNG) GOTO 2011
X IF(PROP(ROPE).GT.0) GOTO 9092`20
X PROP(ROPE)=1
X CALL PSPEAK(ROPE,PROP(ROPE))
X GOTO 2011`20
X 9092 PROP(ROPE)=1-PROP(ROPE)`20
X CALL PSPEAK(ROPE,PROP(ROPE))
X GOTO 2012`20
X `20
X***ATTACK. ASSUME TARGET IF UNAMBIGUOUS. 'THROW' ALSO LINKS HERE. ATT
X*`20
X* OBJECTS FALL INTO TWO CATEGORIES: ENEMIES (SNAKE, DWARF, ETC.) AND O
X* (MONGOOS, CLAM). AMBIGUOUS IF TWO ENEMIES, OR IF NO ENEMIES BUT TWO OTH`
V20
X `20
X 9120 DO 9121 LOOP=1,7
X I=LOOP
X IF(DLOC(LOOP).EQ.LOC.AND.DFLAG.GE.2)GOTO 9122`20
X 9121 CONTINUE
X I=0`20
X 9122 IF(OBJ.NE.0)GOTO 9124`20
X IF(I.NE.0)OBJ=DWARF`20
X IF(HERE(SNAKE))OBJ=OBJ*100+SNAKE
X IF(AT(DRAGON).AND.PROP(DRAGON).EQ.0)OBJ=OBJ*100+DRAGON
X IF(AT(TROLL))OBJ=OBJ*100+TROLL
X IF(HERE(BEAR).AND.PROP(BEAR).EQ.0)OBJ=OBJ*100+BEAR
X IF(OBJ.GT.100)GOTO 8000`20
X IF(OBJ.NE.0)GOTO 9124`20
X `20
X***CAN'T ATTACK MONGOOS BY THROWING AXE.
X `20
X IF(HERE(MONGOOS).AND.VERB.NE.THROW)OBJ=MONGOOS
X `20
X***CLAM AND OYSTER BOTH TREATED AS CLAM FOR INTRANSITIVE CASE; NO HARM D
X `20
X IF(HERE(CLAM).OR.HERE(OYSTER))OBJ=100*OBJ+CLAM
X IF(OBJ.GT.100)GOTO 8000`20
X 9124 IF(OBJ.NE.MONGOOS)GOTO 9125`20
X SPK=137`20
X IF(CLOSED)GOTO 2011`20
X CALL MOVE(MONGOOS,0)
X PROP(MONGOOS)=0`20
X IF(PLACE(SNAKE).EQ.PLAC(SNAKE))TALLY2=TALLY2+1
X SPK=45
X 9125 IF(OBJ.EQ.0)SPK=44
X IF(OBJ.EQ.CLAM.OR.OBJ.EQ.OYSTER)SPK=150`20
X IF(OBJ.EQ.SNAKE)SPK=46
X IF(OBJ.EQ.DWARF)SPK=48
X IF(OBJ.EQ.DWARF.AND.CLOSED)GOTO 19000`20
X IF(OBJ.EQ.DRAGON)SPK=167
X IF(OBJ.EQ.TROLL)SPK=157`20
X IF(OBJ.EQ.BEAR)SPK=165+(PROP(BEAR)+1)/2`20
X IF(OBJ.NE.DRAGON.OR.PROP(DRAGON).NE.0)GOTO 2011`20
X `20
X***FUN STUFF FOR DRAGON. IF HE INSISTS ON ATTACKING IT, WIN! SET PROP`20
X* MOVE DRAGON TO CENTRAL LOC (STILL FIXED), MOVE RUG THERE (NOT FIXED),
X* MOVE HIM THERE, TOO. THEN DO A NULL MOTION TO GET NEW DESCRIPTION.
X `20
X CALL RSPEAK(49)`20
X VERB=0
X OBJ=0`20
X READ(5,9127) WD1
X 9127 FORMAT(1A5)`20
X call str$upcase (wd1,wd1)
X IF(WD1.NE.'Y' .AND.WD1.NE.'YES')GOTO 2608
X CALL PSPEAK(DRAGON,1)`20
X PROP(DRAGON)=2
X PROP(RUG)=0`20
X K=(PLAC(DRAGON)+FIXD(DRAGON))/2`20
X CALL MOVE(DRAGON+100,-1)
X CALL MOVE(RUG+100,0)
X CALL MOVE(DRAGON,K)`20
X CALL MOVE(RUG,K)
X* MOVE OBJECTS TO THE 'NEW' ROOM.
X DO 9126 LOOP=1,100
X IF(PLACE(LOOP).EQ.PLAC(DRAGON).OR.PLACE(LOOP).EQ.FIXD(DRAGON))
X $CALL MOVE(LOOP,K)`20
X 9126 CONTINUE
X LOC=K`20
X K=NULL
X GOTO 3000`20
X `20
X***POUR. IF NO OBJECT, OR OBJECT IS BOTTLE, ASSUME CONTENTS OF BOTTLE.`20
X* SPECIAL TESTS FOR POURING WATER OR OIL ON PLANT OR RUSTY DOOR.`20
X `20
X 9130 IF(OBJ.EQ.BOTTLE.OR.OBJ.EQ.0)OBJ=LIQ(0)`20
X IF(OBJ.EQ.0)GOTO 8000`20
X IF(.NOT.TOTING(OBJ))GOTO 2011`20
X SPK=78
X IF(OBJ.NE.OIL.AND.OBJ.NE.WATER)GOTO 2011
X PROP(BOTTLE)=1
X PLACE(OBJ)=0
X SPK=77
X IF(.NOT.(AT(PLANT).OR.AT(DOOR)))GOTO 2011`20
X `20
X IF(AT(DOOR))GOTO 9132`20
X SPK=112`20
X IF(OBJ.NE.WATER)GOTO 2011`20
X 9131 CALL PSPEAK(PLANT,PROP(PLANT)+1)
X PROP(PLANT)=MOD(PROP(PLANT)+2,6)
X PROP(PLANT2)=PROP(PLANT)/2
X K=NULL
X GOTO 3000`20
X `20
X 9132 PROP(DOOR)=0
X IF(OBJ.EQ.OIL)PROP(DOOR)=1
X SPK=113+PROP(DOOR)
X GOTO 2011`20
X `20
X***EAT. INTRANSITIVE: ASSUME FOOD IF PRESENT, ELSE ASK WHAT. TRANSITIV
X* OK, SOME THINGS LOSE APPETITE, REST ARE RIDICULOUS.
X `20
X 8140 IF(.NOT.HERE(FOOD))GOTO 8000
X 8142 CALL MOVE(FOOD,0)`20
X SPK=72
X GOTO 2011`20
X `20
X 9140 IF(OBJ.EQ.FOOD)GOTO 8142
X IF(OBJ.EQ.SHIT) GOTO 9145`20
X IF(OBJ.EQ.COAL) GOTO 9148`20
X IF(OBJ.EQ.MONGOOS.OR.OBJ.EQ.SNAKE.OR.OBJ.EQ.CLAM.OR.OBJ.EQ.OYSTER`20
X $.OR.OBJ.EQ.DWARF.OR.OBJ.EQ.DRAGON.OR.OBJ.EQ.TROLL`20
X $.OR.OBJ.EQ.BEAR)SPK=71
X GOTO 2011`20
X `20
X 9145 IF(PROP(SHIT).EQ.0) GOTO 9146`20
X PROP(SHIT)=0
X SPK=225`20
X GOTO 2011`20
X 9146 PROP(SHIT)=1
X SPK=226`20
X GOTO 2011`20
X `20
X 9148 CALL MOVE(COAL,0)`20
X SPK=227`20
X GOTO 2011`20
X `20
X***DRINK. IF NO OBJECT, ASSUME WATER AND LOOK FOR IT HERE. IF WATER IS
X* THE BOTTLE, DRINK THAT, ELSE MUST BE AT A WATER LOC, SO DRINK STREAM.
X `20
X 9150 IF(OBJ.EQ.0.AND.LIQLOC(LOC).NE.WATER.AND.(LIQ(0).NE.WATER`20
X $.OR..NOT.HERE(BOTTLE)))GOTO 8000
X IF(OBJ.EQ.OIL) GOTO 9155
X IF(BFULL) SPK=209`20
X IF(BFULL) GOTO 2011`20
X IF(.NOT.HERE(FOUNTN)) GOTO 9155`20
X IF(OBJ.EQ.POTION) GOTO 9151`20
X BFULL=.TRUE.
X HLDMAX=7
X SPK=206`20
X IF(PCT(50)) GOTO 2011`20
X 9151 HLDMAX=14`20
X SPK=207`20
X IF(PCT(40).OR.WIZKID) GOTO 2011`20
X DO 9152 LOOP=1,100
X 9152 IF(TOTING(LOOP)) CALL DROP(LOOP,LOC)
X HLDMAX=4
X SPK=208`20
X IF(PCT(95)) GOTO 2011`20
X GOTO 2011`20
X `20
X***OOPS... HE DRANK THE POTION OF INSTANT DEATH.
X
X! WARNING - Following is dead code.
X `20
X 9154 CALL RSPEAK(215)
X GOTO 99`20
X 9155 IF(OBJ.EQ.OIL)SPK=110`20
X IF(OBJ.EQ.OIL) GOTO 2011
X IF(.NOT.(HERE(BOTTLE)).OR.PROP(BOTTLE).NE.0) GOTO 9157
X PROP(BOTTLE)=1
X SPK=74
X 9157 BFULL=.TRUE.
X WAITNG=TURNS+25`20
X OOPS=WAITNG+3`20
X PLACE(WATER)=0
X GOTO 2011`20
X `20
X***RUB. YIELDS VARIOUS SNIDE REMARKS.
X `20
X 9160 IF(OBJ.NE.LAMP)SPK=76`20
X GOTO 2011`20
X `20
X***THROW. SAME AS DISCARD UNLESS AXE. THEN SAME AS ATTACK EXCEPT IGNOR
X* AND IF DWARF IS PRESENT THEN ONE MIGHT BE KILLED. (ONLY WAY TO DO SO
X* AXE ALSO SPECIAL FOR DRAGON, BEAR, AND TROLL. TREASURES SPECIAL FOR`20
X `20
X 9170 IF(TOTING(ROD2).AND.OBJ.EQ.ROD.AND..NOT.TOTING(ROD))OBJ=ROD2
X IF(.NOT.TOTING(OBJ))GOTO 2011`20
X IF(OBJ.GE.TRSURE.AND.OBJ.LE.MAXTRS.AND.AT(TROLL))GOTO 9178
X IF(OBJ.EQ.FOOD.AND.HERE(BEAR))GOTO 9177`20
X IF(OBJ.NE.AXE)GOTO 9020`20
X DO 9171 LOOP=1,7
X `20
X* NEEDN'T CHECK DFLAG IF AXE IS HERE.
X `20
X IF(DLOC(LOOP).EQ.LOC)GOTO 9172
X 9171 CONTINUE
X SPK=152`20
X IF(AT(DRAGON).AND.PROP(DRAGON).EQ.0)GOTO 9175`20
X SPK=158`20
X IF(AT(TROLL))GOTO 9175
X IF(HERE(BEAR).AND.PROP(BEAR).EQ.0)GOTO 9176`20
X OBJ=0`20
X GOTO 9120`20
X `20
X 9172 SPK=48
X `20
X* IF SAVED NOT = -1, HE BYPASSED THE 'START' CALL.`20
X `20
X IF(random(2).EQ.0.OR.SAVED.NE.-1)GOTO 9175`20
X DSEEN(I)=.FALSE.
X DLOC(I)=0`20
X SPK=47
X DKILL=DKILL+1`20
X IF(DKILL.EQ.1)SPK=149`20
X 9175 CALL RSPEAK(SPK)
X CALL DROP(AXE,LOC)
X K=NULL
X GOTO 3000`20
X `20
X* THIS'LL TEACH HIM TO THROW THE AXE AT THE BEAR!
X `20
X 9176 SPK=164`20
X CALL DROP(AXE,LOC)
X FIXED(AXE)=-1`20
X PROP(AXE)=1`20
X CALL JUGGLE(BEAR)`20
X GOTO 2011`20
X `20
X* BUT THROWING FOOD IS ANOTHER STORY.
X `20
X 9177 OBJ=BEAR
X GOTO 9210`20
X `20
X 9178 SPK=159`20
X `20
X* SNARF A TREASURE FOR THE TROLL.
X `20
X CALL DROP(OBJ,0)
X CALL MOVE(TROLL,0)
X CALL MOVE(TROLL+100,0)
X CALL DROP(TROLL2,PLAC(TROLL))`20
X CALL DROP(TROLL2+100,FIXD(TROLL))`20
X CALL JUGGLE(CHASM)
X GOTO 2011`20
X `20
X***QUIT. INTRANSITIVE ONLY. VERIFY INTENT AND EXIT IF THAT'S WHAT HE W
X `20
X 8180 GAVEUP=YES(22,54,54,WCOUNT)`20
X 8185 IF(GAVEUP)GOTO 20000
X GOTO 2012`20
X `20
X***FIND. MIGHT BE CARRYING IT, OR IT MIGHT BE HERE. ELSE GIVE CAVEAT.`20
X `20
X 9190 IF(AT(OBJ).OR.(LIQ(0).EQ.OBJ.AND.AT(BOTTLE))
X $.OR.K.EQ.LIQLOC(LOC))SPK=94`20
X IF(WIZKID.AND.OBJ.EQ.DWARF) GOTO 9195`20
X DO 9192 LOOP=1,7
X 9192 IF(DLOC(LOOP).EQ.LOC.AND.DFLAG.GE.2.AND.OBJ.EQ.DWARF)SPK=94`20
X IF(CLOSED)SPK=138`20
X IF(TOTING(OBJ))SPK=24`20
X GOTO 2011`20
X `20
X 9195 WRITE(6,9197) (DLOC(LOOP), LOOP=1,8)
X 9197 FORMAT(' DWARF 1 2 3 4 5 6 7 PIRATE',/,`20
X $' ROOM ',7I4,I7)
X GOTO 2012`20
X `20
X***INVENTORY. IF OBJECT, TREAT SAME AS FIND. ELSE REPORT ON CURRENT BU
X `20
X 8200 SPK=98
X DO 8201 LOOP=1,100
X IF(LOOP.EQ.BEAR.OR..NOT.TOTING(LOOP))GOTO 8201
X IF(SPK.EQ.98)CALL RSPEAK(99)
X TEM=-1
X IF((LOOP.EQ.RING.AND.WEARING(1)).OR.(LOOP.EQ.MAIL.AND.WEARING(2)))
X $TEM=1`20
X CALL PSPEAK(LOOP,TEM)`20
X SPK=0`20
X 8201 CONTINUE
X IF(TOTING(BEAR))SPK=141`20
X GOTO 2011`20
X `20
X***FEED. IF MONGOOS, NOT HUNGRY. SNAKE, DRAGON, TROLL: QUIP. IF DWARF, MA
VKE
X* MAD. BEAR, SPECIAL.`20
X `20
X 9210 IF(OBJ.NE.MONGOOS)GOTO 9212`20
X SPK=100`20
X GOTO 2011`20
X `20
X 9212 IF(OBJ.NE.SNAKE.AND.OBJ.NE.DRAGON.AND.OBJ.NE.TROLL)GOTO 9213
X SPK=102`20
X IF(OBJ.EQ.DRAGON.AND.PROP(DRAGON).NE.0)SPK=110
X IF(OBJ.EQ.TROLL)SPK=182`20
X IF(OBJ.NE.SNAKE.OR.CLOSED.OR..NOT.HERE(MONGOOS))GOTO 2011`20
X SPK=101`20
X CALL MOVE(MONGOOS,0)
X PROP(MONGOOS)=0`20
X TALLY2=TALLY2+1`20
X GOTO 2011`20
X `20
X 9213 IF(OBJ.NE.DWARF)GOTO 9214`20
X IF(.NOT.HERE(COAL)) GOTO 8213`20
X ONCE=.FALSE.
X DO 8212 LOOP=1,7
X IF(DLOC(LOOP).NE.LOC.OR.ONCE) GOTO 8212`20
X ONCE=.TRUE.`20
X CALL MOVE(COAL,0)`20
X DLOC(LOOP)=0
X 8212 CONTINUE
X SPK=117`20
X IF(ONCE) SPK=116
X GOTO 2011`20
X 8213 IF(.NOT.HERE(FOOD))GOTO 2011
X SPK=103`20
X DFLAG=DFLAG+1`20
X GOTO 2011`20
X `20
X 9214 IF(OBJ.NE.BEAR)GOTO 9215
X IF(PROP(BEAR).EQ.0)SPK=102
X IF(PROP(BEAR).EQ.3)SPK=110
X IF(.NOT.HERE(FOOD))GOTO 2011
X CALL MOVE(FOOD,0)`20
X PROP(BEAR)=1
X FIXED(AXE)=0
X PROP(AXE)=0`20
X SPK=168`20
X GOTO 2011`20
X `20
X 9215 SPK=14
X GOTO 2011`20
X `20
X***FILL. BOTTLE MUST BE EMPTY, AND SOME LIQUID AVAILABLE. (VASE IS NAS
X `20
X 9220 IF(OBJ.EQ.VASE)GOTO 9222
X IF(OBJ.NE.0.AND.OBJ.NE.BOTTLE)GOTO 2011`20
X IF(OBJ.EQ.0.AND..NOT.HERE(BOTTLE))GOTO 8000`20
X SPK=107`20
X IF(LIQLOC(LOC).EQ.0)SPK=106`20
X IF(LIQ(0).NE.0)SPK=105
X IF(SPK.NE.107)GOTO 2011`20
X PROP(BOTTLE)=MOD(COND(LOC),4)/2*2`20
X K=LIQ(0)
X IF(TOTING(BOTTLE))PLACE(K)=-1`20
X IF(K.EQ.OIL)SPK=108`20
X GOTO 2011`20
X `20
X 9222 SPK=29
X IF(LIQLOC(LOC).EQ.0)SPK=144`20
X IF(LIQLOC(LOC).EQ.0.OR..NOT.TOTING(VASE))GOTO 2011
X CALL RSPEAK(145)
X PROP(VASE)=2
X FIXED(VASE)=-1
X GOTO 9024`20
X `20
X***BLAST. NO EFFECT UNLESS YOU'VE GOT DYNAMITE, WHICH IS A NEAT TRICK!`20
X `20
X 9230 IF(PROP(ROD2).LT.0.OR..NOT.CLOSED)GOTO 2011`20
X BONUS=133`20
X IF(LOC.EQ.115)BONUS=134`20
X IF(HERE(ROD2))BONUS=135`20
X CALL RSPEAK(BONUS)
X GOTO 20000
X `20
X***SCORE. GO TO SCORING SECTION, WHICH WILL RETURN TO 8241 IF SCORNG IS
X `20
X 8240 SCORNG=.TRUE.`20
X GOTO 20000
X `20
X 8241 SCORNG=.FALSE.
X WRITE(6,8243)SCORE,MXSCOR`20
X 8243 FORMAT(/,' If you were to quit now, you would score',I4`20
X $,' out of a possible',I4,'.')`20
X* GAVEUP=YES(143,54,54,WCOUNT)
X GOTO 8185`20
X `20
X***FEE FIE FOE FOO (AND FUM). ADVANCE TO NEXT STATE IF GIVEN IN PROPER`20
X* LOOK UP WD1 IN SECTION 3 OF VOCAB TO DETERMINE WHICH WORD WE'VE GOT.`20
X* WORD ZIPS THE EGGS BACK TO THE GIANT ROOM (UNLESS ALREADY THERE).
X `20
X 8250 K=VOCAB(WD1,3)
X SPK=42
X IF(FOOBAR.EQ.1-K)GOTO 8252
X IF(FOOBAR.NE.0)SPK=151
X GOTO 2011`20
X `20
X 8252 FOOBAR=K
X IF(K.NE.4)GOTO 2009`20
X FOOBAR=0
X IF(PLACE(EGGS).EQ.PLAC(EGGS)
X $.OR.(TOTING(EGGS).AND.LOC.EQ.PLAC(EGGS)))GOTO 2011
X `20
X***BRING BACK TROLL IF WE STEAL THE EGGS BACK FROM HIM BEFORE CROSSING.`20
X `20
X IF(PLACE(EGGS).EQ.0.AND.PLACE(TROLL).EQ.0.AND.PROP(TROLL).EQ.0)`20
X $PROP(TROLL)=1`20
X K=2`20
X IF(HERE(EGGS))K=1`20
X IF(LOC.EQ.PLAC(EGGS))K=0
X CALL MOVE(EGGS,PLAC(EGGS))
X CALL PSPEAK(EGGS,K)`20
X GOTO 2012`20
X `20
X***BRIEF. INTRANSITIVE ONLY. SUPPRESS LONG DESCRIPTIONS AFTER FIRST TI
X `20
X 8260 SPK=156`20
X ABBNUM=10000
X DETAIL=3
X GOTO 2011`20
X `20
X***READ. MAGAZINES IN DWARVISH, MESSAGE WE'VE SEEN, AND . . . OYSTER?
X `20
X 8270 IF(HERE(MAGZIN)) OBJ=MAGZIN`20
X IF(HERE(TABLET)) OBJ=OBJ*100+TABLET`20
X IF(HERE(MESSAG)) OBJ=OBJ*100+MESSAG`20
X IF(HERE(RUNES)) OBJ=RUNES`20
X IF(HERE(BOOK)) OBJ=BOOK`20
X IF(HERE(LISTING)) OBJ=LISTING`20
X IF(CLOSED.AND.TOTING(OYSTER)) OBJ=OYSTER
X IF(OBJ.GT.100.OR.OBJ.EQ.0.OR.DARK(0))GOTO 8000
X `20
X 9270 IF(DARK(0))GOTO 5190
X IF(OBJ.EQ.BOOK) SPK=231`20
X IF(OBJ.EQ.LISTING) SPK=230
X IF(OBJ.EQ.MAGZIN) SPK=190`20
X IF(OBJ.EQ.TABLET) SPK=196`20
X IF(OBJ.EQ.MESSAG) SPK=191`20
X IF(OBJ.EQ.RUNES) SPK=43`20
X IF(OBJ.EQ.OYSTER.AND.HINTED(2).AND.TOTING(OYSTER)) SPK=194
X IF(OBJ.NE.OYSTER.OR.HINTED(2).OR..NOT.TOTING(OYSTER)
X $.OR..NOT.CLOSED)GOTO 2011`20
X HINTED(2)=YES(192,193,54,WCOUNT)
X GOTO 2012`20
X `20
X***BREAK. ONLY WORKS FOR MIRROR IN REPOSITORY AND, OF COURSE, THE VASE.
X `20
X 9280 IF(OBJ.EQ.MIRROR)SPK=148
X IF(OBJ.EQ.VASE.AND.PROP(VASE).EQ.0)GOTO 9282
X IF(OBJ.NE.MIRROR.OR..NOT.CLOSED)GOTO 2011`20
X CALL RSPEAK(197)
X GOTO 19000
X `20
X 9282 SPK=198`20
X IF(TOTING(VASE))CALL DROP(VASE,LOC)`20
X PROP(VASE)=2
X FIXED(VASE)=-1
X GOTO 2011`20
X `20
X***WAKE. ONLY USE IS TO DISTURB THE DWARVES.`20
X `20
X 9290 IF(OBJ.NE.DWARF.OR..NOT.CLOSED)GOTO 2011
X CALL RSPEAK(199)
X GOTO 19000
X `20
X***SUSPEND.`20
X `20
X8300 WRITE (6,8302)
X8302 FORMAT(//,' Saving game...',//)
X call svcomn (.FALSE.,' ')
X!!!!! STOP
X call sys$exit(%val(1))
X
X***WEAR. ONLY WORKS FOR RING AND MAIL... AND FOOD!
X `20
X 9310 IF(OBJ.NE.RING.AND.OBJ.NE.MAIL) GOTO 9315`20
X IF(OBJ.EQ.RING) GOTO 9314`20
X IF(OBJ.EQ.MAIL.AND.WEARING(2)) GOTO 9312
X WEARING(2)=.TRUE.`20
X CALL CARRY(OBJ,LOC)`20
X PROP(MAIL)=1
X CALL PSPEAK(MAIL,PROP(MAIL))
X GOTO 2012`20
X 9312 WRITE(6,9313)`20
X 9313 FORMAT(' You are already wearing it!')
X GOTO 2012`20
X 9314 IF(WEARING(1)) GOTO 9312
X WEARING(1)=.TRUE.`20
X CALL CARRY(OBJ,LOC)`20
X PROP(RING)=1
X CALL PSPEAK(RING,PROP(RING))
X GOTO 2012`20
X 9315 IF(OBJ.EQ.FOOD) GOTO 9318`20
X WRITE(6,9316)`20
X 9316 FORMAT(' You can''t wear that!')`20
X GOTO 2012`20
X 9318 WRITE(6,9319)`20
X 9319 FORMAT(' Ugh-- What a mess!')`20
X CALL MOVE(FOOD,0)`20
X GOTO 2012`20
X 8310 WRITE(6,8318)`20
X 8318 FORMAT(/' What are you trying to wear?')
X GOTO 2600`20
X `20
X***PISS. AHHHH.... ... .. . . RELIEF.
X `20
X***HE CANNOT PISS AN OBJECT, OR HAVE AN OBJECT PISS.
X `20
X 9320 SPK=223`20
X GOTO 2011`20
X `20
X 8320 IF(BFULL) GOTO 8325`20
X SPK=222`20
X GOTO 2011`20
X `20
X 8325 BFULL=.FALSE.`20
X WAITNG=9999999
X OOPS= 9999999
X CALL RSPEAK(210)
X IF(HERE(PLANT).OR.HERE(PLANT2)) GOTO 9131`20
X GOTO 2012`20
X `20
X***SWIM. HE CAN ONLY SWIM IN THE RIVER, IF HE CAN FIND IT!`20
X `20
X 9330 IF(OBJ.EQ.FOUNTN.OR.OBJ.EQ.WATER) GOTO 8330`20
X GOTO 2011`20
X 8330 IF(LIQLOC(LOC).NE.WATER) GOTO 2011
X IF ( .NOT. TOTING(NUGGET) ) GOTO 9331`20
X CALL RSPEAK (228)`20
X GOTO 99`20
X 9331 CONTINUE
X TEM=LOC-PLAC(BOAT)+2
X IF(TEM.LT.1.OR.TEM.GT.3) GOTO 8332
X NEWLOC=LOC+1
X 8331 OLDLOC=LOC
X OLDLC2=OLDLOC`20
X CALL RSPEAK(227)
X GOTO 2
X 8332 IF(TEM.NE.5) GOTO 8334
X NEWLOC=PLAC(RUNES)
X GOTO 8331`20
X 8334 IF(LOC.NE.PLAC(RUNES)) GOTO 8336
X NEWLOC=RINGLOC
X GOTO 8331`20
X 8336 IF(LOC.NE.RINGLOC) GOTO 8338
X*** SPK=YOU ARE NOW WET...
X SPK=70
X IF(PLACE(RING).NE.0) GOTO 2011
X*** SPK=YOU HAVE JUMPED INTO... (AND FOUND THE RING!)`20
X CALL MOVE(RING,RINGLOC)`20
X SPK=219`20
X GOTO 2011`20
X 8338 CONTINUE
X*** SPK=YOU NOW ARE WET...
X SPK=70
X GOTO 2011`20
X
X* Restore.
X
X 8400 WRITE (6,8402)
X 8402 FORMAT(//,' Restoring game...',//)
X call ldcomn (.FALSE.,FLNAME)
X goto 2606 `20
X
X
X*** *******************
X* ***** OBJECTS *****
X* *******************
X* ANALYSE AN OBJECT WORD. SEE IF THE THING IS HERE, WHETHER WE'VE GOT`20
X* YET, AND SO ON. OBJECT MUST BE HERE UNLESS VERB IS 'FIND' OR 'INVENT
X* (AND NO NEW VERB YET TO BE ANALYSED). WATER AND OIL ARE ALSO FUNNY,`20
X* THEY ARE NEVER ACTUALLY DROPPED AT ANY LOCATION, BUT MIGHT BE HERE IN
X* THE BOTTLE OR AS A FEATURE OF THE LOCATION.
X `20
X 5000 OBJ=K`20
X IF(WIZKID) GOTO 5010
X IF(FIXED(OBJ).NE.LOC.AND..NOT.HERE(OBJ))GOTO 5100`20
X IF(DARK(0)) GOTO 5100`20
X 5010 IF(WD2.NE.' ')GOTO 2800`20
X IF(OBJ.EQ.SWITCH) GOTO 5150`20
X IF(VERB.NE.0)GOTO 4090
X WRITE(6,5015) WD1
X 5015 FORMAT(/,' What do you want to do with the ',A10,'?')
X GOTO 2600`20
X `20
X 5100 IF(OBJ.NE.GRATE)GOTO 5110`20
X IF(LOC.EQ.1.OR.LOC.EQ.4.OR.LOC.EQ.7)OBJ=DPRSSN
X IF(LOC.GT.9.AND.LOC.LT.15)K=ENTRNC
X IF(OBJ.NE.GRATE)GOTO 3000`20
X 5110 IF(OBJ.NE.DWARF)GOTO 5120`20
X DO 5112 LOOP=1,7
X IF(DLOC(LOOP).EQ.LOC.AND.DFLAG.GE.2)GOTO 5010`20
X 5112 CONTINUE
X 5120 IF((LIQ(0).EQ.OBJ.AND.HERE(BOTTLE)).OR.OBJ.EQ.LIQLOC(LOC))
X $GOTO 5010`20
X IF(OBJ.NE.PLANT.OR..NOT.AT(PLANT2).OR.PROP(PLANT2).EQ.0)GOTO 5130`20
X OBJ=PLANT2
X GOTO 5010`20
X 5130 IF(OBJ.NE.KNIFE.OR.KNFLOC.NE.LOC)GOTO 5140
X KNFLOC=-1`20
X SPK=116`20
X GOTO 2011`20
X 5140 IF(OBJ.NE.ROD.OR..NOT.HERE(ROD2))GOTO 5190
X OBJ=ROD2
X GOTO 5010`20
X `20
X***FLIP SWITCH. THIS WILL LIGHT UP THE WHOLE CAVE AND UP THE MOVE LIMIT`20
X* TO 600..... OR IT WILL KILL YOU.`20
X `20
X 5150 IF(LIT.AND.VERB.NE.ON) GOTO 5152
X IF(VERB.EQ.OFF) GOTO 5152`20
X IF(WIZKID) GOTO 5151
X IF(HERE(SWITCH).AND.WEARING(1)) GOTO 5151`20
X CALL RSPEAK(211)
X `20
X***OH-OH! HE DIED.
X `20
X GOTO 99`20
X 5151 LIT=.TRUE.
X LIMIT=600`20
X CALL RSPEAK(212)
X GOTO 2
X 5152 LIT=.FALSE.`20
X SPK=213`20
X GOTO 2011`20
X `20
X 5190 IF((VERB.EQ.FIND.OR.VERB.EQ.INVENT).AND.WD2.EQ.' ')GOTO 5010
X IF(WIZKID.AND.PLAC(OBJ).NE.0.AND.PLACE(OBJ).EQ.0) GOTO 5010`20
X WRITE(6,5199) WD1`20
X 5199 FORMAT(/,' I see no ',A10,' here.')`20
X GOTO 2012`20
X `20
X*** *******************
X* ****** HINTS ******
X* *******************
X*`20
X* COME HERE IF HE'S BEEN LONG ENOUGH AT REQUIRED LOC(S) FOR SOME UNUSED
X* HINT NUMBER IS IN VARIABLE 'HINT'. BRANCH TO QUICK TEST FOR ADDITION
X* CONDITIONS, THEN COME BACK TO DO NEAT STUFF. GOTO 40010 IF CONDITION
X* MET AND WE WANT TO OFFER THE HINT. GOTO 40020 TO CLEAR HINTLC BACK T
X* 40030 TO TAKE NO ACTION YET.`20
X `20
X40000 HINTM3=HINT-3`20
X GOTO (40400,40500,40600,40700,40800,40900),HINTM3`20
X* CAVE MONGOOS SNAKE MAZE DARK WITT`20
X CALL BUG(27)
X `20
X40010 HINTLC(HINT)=0
X IF(.NOT.YES(HINTS(HINT,3),0,54,WCOUNT))GOTO 2602
X WRITE(6,40012)HINTS(HINT,2)`20
X40012 FORMAT(/,' I am prepared to give you a hint, but it will cost you'
X $,I2,' points.')`20
X HINTED(HINT)=YES(175,HINTS(HINT,4),54,WCOUNT)`20
X IF(HINTED(HINT).AND.LIMIT.GT.30)LIMIT=LIMIT+30*HINTS(HINT,2)
X40020 HINTLC(HINT)=0
X40030 GOTO 2602`20
X `20
X***NOW FOR THE QUICK TESTS. SEE DATABASE DESCRIPTION FOR ONE-LINE NOTES
X `20
X40400 IF(PROP(GRATE).EQ.0.AND..NOT.HERE(KEYS))GOTO 40010
X GOTO 40020
X `20
X40500 IF(LOOSE.AND.OBJ.EQ.MONGOOS)GOTO 40010
X GOTO 40030
X `20
X40600 IF(HERE(SNAKE).AND..NOT.HERE(MONGOOS))GOTO 40010
X GOTO 40020
X `20
X40700 IF(ATLOC(LOC).EQ.0.AND.ATLOC(OLDLOC).EQ.0`20
X $.AND.ATLOC(OLDLC2).EQ.0.AND.HOLDNG.GT.1)GOTO 40010
X GOTO 40020
X `20
X40800 IF(PROP(EMRALD).NE.-1.AND.PROP(PYRAM).EQ.-1)GOTO 40010
X GOTO 40020
X `20
X40900 GOTO 40010
X***`20
X* CAVE CLOSING AND SCORING`20
X `20
X `20
X***THESE SECTIONS HANDLE THE CLOSING OF THE CAVE. THE CAVE CLOSES 'CLOC
X* TURNS AFTER THE LAST TREASURE HAS BEEN LOCATED (INCLUDING THE PIRATE'
X* CHEST, WHICH MAY OF COURSE NEVER SHOW UP). NOTE THAT THE TREASURES N
X* HAVE BEEN TAKEN YET, JUST LOCATED. HENCE CLOCK1 MUST BE LARGE ENOUGH
X* OUT OF THE CAVE (IT ONLY TICKS WHILE INSIDE THE CAVE). WHEN IT HITS`20
X* WE BRANCH TO 10000 TO START CLOSING THE CAVE, AND THEN SIT BACK AND W
X* HIM TO TRY TO GET OUT. IF HE DOESN'T WITHIN CLOCK2 TURNS, WE CLOSE T
X* CAVE; IF HE DOES TRY, WE ASSUME HE PANICS, AND GIVE HIM A FEW ADDITIO
X* TURNS TO GET FRANTIC BEFORE WE CLOSE. WHEN CLOCK2 HITS ZERO, WE BRAN
X* 11000 TO TRANSPORT HIM INTO THE FINAL PUZZLE. NOTE THAT THE PUZZLE D
X* UPON ALL SORTS OF RANDOM THINGS. FOR INSTANCE, THERE MUST BE NO WATE
X* OIL, SINCE THERE ARE BEANSTALKS WHICH WE DON'T WANT TO BE ABLE TO WAT
X* SINCE THE CODE CAN'T HANDLE IT. ALSO, WE CAN HAVE NO KEYS, SINCE THE
X* GRATE (HAVING MOVED THE FIXED OBJECT!) THERE SEPARATING HIM FROM ALL`20
X* TREASURES. MOST OF THESE PROBLEMS ARISE FROM THE USE OF NEGATIVE PRO
X* NUMBERS TO SUPPRESS THE OBJECT DESCRIPTIONS UNTIL HE'S ACTUALLY MOVED
X* OBJECTS.`20
X `20
X* WHEN THE FIRST WARNING COMES, WE LOCK THE GRATE, DESTROY THE BRIDGE,`20
X* ALL THE DWARVES (AND THE PIRATE), REMOVE THE TROLL AND BEAR (UNLESS D
X* AND SET 'CLOSNG' TO TRUE. LEAVE THE DRAGON; TOO MUCH TROUBLE TO MOVE
X* FROM NOW UNTIL CLOCK2 RUNS OUT, HE CANNOT UNLOCK THE GRATE, MOVE TO A
X* LOCATION OUTSIDE THE CAVE (LOC<9), OR CREATE THE BRIDGE. NOR CAN HE`20
X* RESURRECTED IF HE DIES. NOTE THAT THE SNAKE IS ALREADY GONE, SINCE H
X* TO THE TREASURE ACCESSIBLE ONLY VIA THE HALL OF THE MT. KING. ALSO,`20
X* BEEN IN GIANT ROOM (TO GET EGGS), SO WE CAN REFER TO IT. ALSO ALSO,`20
X* GOTTEN THE PEARL, SO WE KNOW THE BIVALVE IS AN OYSTER. *AND*, THE DW
X* MUST HAVE BEEN ACTIVATED, SINCE WE'VE FOUND CHEST.`20
X `20
X10000 PROP(GRATE)=0`20
X PROP(FISSUR)=0
X DO 10010 LOOP=1,8`20
X DSEEN(LOOP)=.FALSE.`20
X10010 DLOC(LOOP)=0
X CALL MOVE(TROLL,0)
X CALL MOVE(TROLL+100,0)
X CALL MOVE(TROLL2,PLAC(TROLL))`20
X CALL MOVE(TROLL2+100,FIXD(TROLL))`20
X CALL JUGGLE(CHASM)
X CALL MOVE(BEAR,0)`20
X PROP(CHAIN)=0`20
X FIXED(CHAIN)=0
X PROP(AXE)=0`20
X FIXED(AXE)=0
X CALL RSPEAK(129)
X CLOCK1=-1`20
X CLOSNG=.TRUE.`20
X GOTO 19999
X `20
X***ONCE HE'S PANICKED, AND CLOCK2 HAS RUN OUT, WE COME HERE TO SET UP TH
X* STORAGE ROOM. THE ROOM HAS TWO LOCS, HARDWIRED AS 115 (NE) AND 116 (
X* AT THE NE END, WE PLACE EMPTY BOTTLES, A NURSERY OF PLANTS, A BED OF`20
X* OYSTERS, A PILE OF LAMPS, RODS WITH STARS, SLEEPING DWARVES, AND HIM.
X* THE SW END WE PLACE GRATE OVER TREASURES, SNAKE PIT, COVEY OF SACKED B`20
X* MORE RODS, AND PILLOWS. A MIRROR STRETCHES ACROSS ONE WALL. MANY OF
X* OBJECTS COME FROM KNOWN LOCATIONS AND/OR STATES (E.G. THE SNAKE IS KN
X* HAVE BEEN DESTROYED AND NEEDN'T BE CARRIED AWAY FROM ITS OLD 'PLACE')
X* MAKING THE VARIOUS OBJECTS BE HANDLED DIFFERENTLY. WE ALSO DROP ALL`20
X* OBJECTS HE MIGHT BE CARRYING (LEST HE HAVE SOME WHICH COULD CAUSE TRO
X* SUCH AS THE KEYS). WE DESCRIBE THE FLASH OF LIGHT AND TRUNDLE BACK.`20
X `20
X11000 PROP(BOTTLE)=PUT(BOTTLE,115,1)
X PROP(PLANT)=PUT(PLANT,115,0)
X PROP(OYSTER)=PUT(OYSTER,115,0)
X PROP(LAMP)=PUT(LAMP,115,0)
X PROP(ROD)=PUT(ROD,115,0)
X PROP(DWARF)=PUT(DWARF,115,0)
X LOC=115`20
X OLDLOC=115
X NEWLOC=115
X `20
X* LEAVE THE GRATE WITH NORMAL (NON-NEGATIVE PROPERTY).`20
X `20
X PROP(GRATE)=PUT(GRATE,116,-1)`20
X PROP(SNAKE)=PUT(SNAKE,116,1)
X PROP(MONGOOS)=PUT(MONGOOS,116,1)
X PROP(SACK)=PUT(SACK,116,0)
X PROP(ROD2)=PUT(ROD2,116,0)
X PROP(PILLOW)=PUT(PILLOW,116,0)
X PROP(MIRROR)=PUT(MIRROR,115,0)
X FIXED(MIRROR)=116`20
X `20
X* DISTROY THE OBJECTS THAT HE IS TOTING.`20
X `20
X DO 11010 LOOP=1,100`20
X11010 IF(TOTING(LOOP))CALL MOVE(LOOP,0)`20
X `20
X CALL RSPEAK(132)
X CLOSED=.TRUE.`20
X GOTO 2
X `20
X***ANOTHER WAY WE CAN FORCE AN END TO THINGS IS BY HAVING THE LAMP GIVE`20
X* WHEN IT GETS CLOSE, WE COME HERE TO WARN HIM. WE GO TO 12000 IF THE`20
X* AND FRESH BATTERIES ARE HERE, IN WHICH CASE WE REPLACE THE BATTERIES`20
X* CONTINUE. 12200 IS FOR OTHER CASES OF LAMP DYING. 12400 IS WHEN IT`20
X* OUT, AND 12600 IS IF HE'S WANDERED OUTSIDE AND THE LAMP IS USED UP, I
X* CASE WE FORCE HIM TO GIVE UP.
X `20
X12000 CALL RSPEAK(188)
X PROP(BATTER)=1
X IF(TOTING(BATTER))CALL DROP(BATTER,LOC)`20
X LIMIT=LIMIT+2500
X LMWARN=.FALSE.
X GOTO 19999
X `20
X12200 IF(LMWARN.OR..NOT.HERE(LAMP))GOTO 19999`20
X LMWARN=.TRUE.`20
X SPK=187`20
X IF(PLACE(BATTER).EQ.0)SPK=183`20
X IF(PROP(BATTER).EQ.1)SPK=189
X CALL RSPEAK(SPK)
X GOTO 19999
X `20
X12400 LIMIT=-1
X PROP(LAMP)=0
X IF(HERE(LAMP))CALL RSPEAK(184)
X GOTO 19999
X `20
X12600 CALL RSPEAK(185)
X GAVEUP=.TRUE.`20
X GOTO 20000
X `20
X***OH DEAR, HE'S DISTURBED THE DWARVES.`20
X `20
X19000 CALL RSPEAK(136)
X `20
X***EXIT CODE. WILL EVENTUALLY INCLUDE SCORING. FOR NOW, HOWEVER, ...
X `20
X* THE PRESENT SCORING ALGORITHM IS AS FOLLOWS:`20
X* OBJECTIVE: POINTS: PRESENT TOTAL POSSIBLE: `20
X* EACH TREASURE < CHEST 12 60
X* TREASURE CHEST ITSELF 14 14
X* EACH TREASURE > CHEST 16 192
X* DYING -10 0
X* GETTING WELL INTO CAVE 25 25
X* NOT QUITTING 4 4
X* REACHING 'CLOSNG' 25 25
X* 'CLOSED': QUIT/KILLED 10 10
X* KLUTZED 25 25
X* WRONG WAY 30 30
X* SUCCESS 45 45
X* CAME TO WITT'S END 2 2
X* ROUND OUT THE TOTAL 3 3
X* TOTAL: 360
X* (POINTS CAN ALSO BE DEDUCTED FOR USING HINTS.)`20
X `20
X20000 SCORE=0`20
X MXSCOR=0
X `20
X***FIRST TALLY UP THE TREASURES. MUST BE IN BUILDING AND NOT BROKEN.`20
X* GIVE THE POOR GUY 2 POINTS JUST FOR FINDING EACH TREASURE.`20
X `20
X DO 20010 LOOP=TRSURE,MAXTRS`20
X IF(PTEXT(LOOP).EQ.0)GOTO 20010
X K=12
X IF(LOOP.EQ.CHEST)K=14`20
X IF(LOOP.GT.CHEST)K=16`20
X IF(PROP(LOOP).GE.0)SCORE=SCORE+2
X IF(PLACE(LOOP).EQ.3.AND.PROP(LOOP).EQ.0)SCORE=SCORE+K-2`20
X MXSCOR=MXSCOR+K`20
X20010 CONTINUE
X `20
X***NOW LOOK AT HOW HE FINISHED AND HOW FAR HE GOT. MAXDIE AND NUMDIE TE
X* HOW WELL HE SURVIVED. GAVEUP SAYS WHETHER HE EXITED VIA QUIT. DFLAG
X* TELL US IF HE EVER GOT SUITABLY DEEP INTO THE CAVE. CLOSNG STILL IND
X* WHETHER HE REACHED THE ENDGAME. AND IF HE GOT AS FAR AS 'CAVE CLOSED
X* (INDICATED BY 'CLOSED'), THEN BONUS IS ZERO FOR MUNDANE EXITS OR 133,
X* 135 IF HE BLEW IT (SO TO SPEAK).`20
X `20
X SCORE=SCORE-NUMDIE*10`20
X IF(DFLAG.NE.0)SCORE=SCORE+25
X MXSCOR=MXSCOR+25
X IF(.NOT.(SCORNG.OR.GAVEUP))SCORE=SCORE+4
X MXSCOR=MXSCOR+4`20
X IF(CLOSNG)SCORE=SCORE+25
X MXSCOR=MXSCOR+25
X IF(.NOT.CLOSED)GOTO 20020`20
X IF(BONUS.EQ.0)SCORE=SCORE+10
X IF(BONUS.EQ.135)SCORE=SCORE+25
X IF(BONUS.EQ.134)SCORE=SCORE+30
X IF(BONUS.EQ.133)SCORE=SCORE+45
X20020 MXSCOR=MXSCOR+45
X `20
X***DID HE COME TO WITT'S END AS HE SHOULD?
X `20
X IF(PLACE(MAGZIN).EQ.108)SCORE=SCORE+2`20
X MXSCOR=MXSCOR+2`20
X `20
X***ROUND IT OFF.
X `20
X SCORE=SCORE+3`20
X MXSCOR=MXSCOR+3`20
X `20
X***DEDUCT POINTS FOR HINTS. HINTS < 4 ARE SPECIAL; SEE DATABASE DESCRIP
X `20
X DO 20030 LOOP=1,HNTMAX
X20030 IF(HINTED(LOOP))SCORE=SCORE-HINTS(LOOP,2)`20
X `20
X***RETURN TO SCORE COMMAND IF THAT'S WHERE WE CAME FROM.
X `20
X IF(SCORNG)GOTO 8241`20
X `20
X*`20
X***THAT SHOULD BE GOOD ENOUGH. LET'S TELL HIM ALL ABOUT IT.
X `20
X WRITE(6,20100)SCORE,MXSCOR,TURNS
X20100 FORMAT(///,' You scored',I4,' out of a possible',I4,
X $', using',I5,' turns.')`20
X `20
X IF(WIZKID) GOTO 25000`20
X DO 20200 LOOP=1,CLSSES
X I=LOOP
X IF(CVAL(LOOP).GE.SCORE)GOTO 20210`20
X20200 CONTINUE
X WRITE(6,20202)
X20202 FORMAT(/,' You just went off my scale!!',/)`20
X GOTO 25000
X `20
X20210 CALL SPEAK(CTEXT(I))
X IF(I.EQ.CLSSES-1)GOTO 20220`20
X K=CVAL(I)+1-SCORE`20
X KK='s.'`20
X IF(K.EQ.1)KK='. '`20
X WRITE(6,20212)K,KK
X20212 FORMAT(/,' To achieve the next higher rating, you need',I3,`20
X $' more point',A2/)
X GOTO 25000
X `20
X20220 WRITE(6,20222)
X20222 FORMAT(/,' To achieve the next higher rating ',`20
X $'would be a neat trick!',//,' Congratulations!!',/)`20
X `20
X25000 CONTINUE
X!!!!! STOP
X call sys$exit(%val(1))
X END`20
$ CALL UNPACK [.SRC]FUNADV.FOR;7 1025282667
$ create 'f'
X SUBROUTINE GETIN(W1,W2,WCOUNT)
X*`20
X* GET A COMMAND FROM THE ADVENTURER.`20
X*`20
X* W1 IS SET TO THE FIRST WORD OF HIS COMMAND. W2 IS SET TO THE
X* SECOND WORD. WCOUNT HOLDS THE POINTER POSITION FOR THE LINE.
X*`20
X IMPLICIT INTEGER(A-Z)`20
X LOGICAL BLKLIN,YESCALL
X Character*10 Blank, W1, W2, WORD
X Character*80 Line
X COMMON /IOSCOM/ BLKLIN,YESCALL
X DIMENSION T(22)
X DATA BLANK/' '/`20
X
X W1=' '
X W2=' '
X IF(BLKLIN)WRITE(6,1)
X 1 FORMAT(1X)
X WRITES=WCOUNT`20
X IF(YESCALL) WRITES=0
X IF(WCOUNT.NE.0) GOTO 20`20
X 5 READ(5,10,end=5) LINE
X 10 FORMAT(80A)
X CALL STR$UPCASE(LINE,LINE)
X 20 WCOUNT=WCOUNT+1`20
X IF(WCOUNT.GT.80) GOTO 90
X IF(LINE(WCOUNT:WCOUNT).EQ.BLANK) GOTO 20`20
X WORD=' '
X WSTART=WCOUNT`20
X 30 IF(LINE(WCOUNT:WCOUNT).EQ.' ') GOTO 100
X IF(WCOUNT.GT.80) GOTO 100`20
X ptr = wcount-wstart+1
X IF(WCOUNT-WSTART.LE.10) WORD(ptr:ptr)=LINE(WCOUNT:WCOUNT)`20
X WCOUNT=WCOUNT+1`20
X GOTO 30`20
X 90 WCOUNT=0
X IF(W1.NE.' ') GOTO 200
X WRITES=0
X GOTO 5
X `20
X 100 IF(WORD.EQ.' '.AND.W1.EQ.' ') GOTO 20`20
X IF(WORD.EQ.' ') GOTO 200
X IF(WCOUNT-WSTART.GE.10) GOTO 120
X TEMP=WCOUNT-WSTART+1
X DO 110 LOOP=TEMP,10`20
X 110 WORD(loop:loop) = BLANK
X 120 IF(W1.NE.' ') W2=WORD`20
X IF(W2.EQ.' ') W1=WORD`20
X IF(LINE(WCOUNT:WCOUNT).NE.BLANK) GOTO 200
X IF(W2.EQ.' ') GOTO 20`20
X WCOUNT=WCOUNT+1`20
X 130 IF(WCOUNT.GT.80) GOTO 200`20
X IF(LINE(WCOUNT:WCOUNT).EQ.BLANK) GOTO 140
X 140 WCOUNT=WCOUNT+1`20
X GOTO 130
X `20
X 200 IF(WRITES.EQ.0) RETURN
X IF(BLKLIN) WRITE(6,1)`20
X WRITE(6,220) WD1,WD2
X 220 FORMAT(A10,x,A10)`20
X RETURN
X END`20
$ CALL UNPACK [.SRC]GETIN.FOR;1 1581651471
$ create 'f'
X subroutine image_dir (dir)
X
X implicit none
X
X external jpi$_imagname
X integer*4 sys$getjpi
X integer*2 len
X integer*4 status
X integer*4 i
X structure /itmlist/`20
X union
X map
X integer*2 buflen
X integer*2 code
X integer*4 bufadr
X integer*4 retlenadr
X end map
X map
X integer*4 end_list
X end map
X end union
X end structure
X
X record /itmlist/ itmlst
X character*128 imagname
X character*128 dir
X itmlst.buflen=80
X itmlst.code = %loc(jpi$_imagname)
X itmlst.bufadr = %loc(imagname)
X itmlst.retlenadr = %loc(len)
X
X status = sys$getjpi (%val(1),,,itmlst,,,)`09! Get myself
X
X do 10,i=len,1,-1
X if (imagname (i:i) .eq. '`5D') goto 20
X 10 continue
X
X 20 dir = imagname(1:i)
X
X return`20
X end
$ CALL UNPACK [.SRC]IMAGE_DIR.FOR;1 1916815225
$ create 'f'
X SUBROUTINE JUGGLE(OBJECT)`20
X `20
X* JUGGLE AN OBJECT BY PICKING IT UP AND PUTTING IT DOWN AGAIN, THE PURP
X* BEING TO GET THE OBJECT TO THE FRONT OF THE CHAIN OF THINGS AT ITS LO
X `20
X IMPLICIT INTEGER(A-Z)`20
X COMMON /PLACOM/ ATLOC,LINK,PLACE,FIXED,COND,PROP,LOC,LAMP,HOLDNG
X DIMENSION PROP(100), LINK(200), PLACE(100), FIXED(100)
X DIMENSION ATLOC(220), COND(220)`20
X `20
X I=PLACE(OBJECT)`20
X J=FIXED(OBJECT)`20
X CALL MOVE(OBJECT,I)`20
X CALL MOVE(OBJECT+100,J)`20
X RETURN
X END`20
$ CALL UNPACK [.SRC]JUGGLE.FOR;1 319691190
$ create 'f'
X SUBROUTINE LDCOMN(QNAME,NAME)`20
X*`20
X* ADVENTURE SUBROUTINE TO LOAD ALL COMMON BLOCKS FROM EITHER
X* THE SYSTEM FILE (QNAME=.TRUE.) OR A PREVIOUSLY SAVED FILE`20
X* (QNAME=.FALSE.)`20
X*`20
X* IF THE SYSTEM FILE IS NOT FOUND, ZERO ARRAYS.`20
X*`20
X* IF THE NAMED FILE IS NOT FOUND, DIE`20
X `20
X IMPLICIT INTEGER (A-Z)
X CHARACTER*148 FILENAME
X Character*128 filedir
X COMMON /AAAAAA/ CORE(1)
X COMMON /ZZZZZZ/ THEEND
X
X LOGICAL QNAME`20
X `20
X call image_dir (filedir)
X
X if (qname) then
X filename = filedir//'funadv.common'
X else
X filename = 'sys$login:funadv.adv'
X endif `20
X
X open (unit=2,file=filename,status='old',err=1000,
X 1form='unformatted',carriagecontrol='none')
X BEGIN=1`20
X END=((%LOC(THEEND)-%LOC(CORE(1))+1)/4)+1
X READ(2,err=9999) (CORE(I1),I1=BEGIN,END)`20
X `20
X CLOSE(2)
X RETURN
X
X 1000 if (qname) RETURN
X type*,'Saved game can not be opened...'
X RETURN
X
X 9999 type*,' '
X type*,'Fatal error loading saved game - ABORT.'
X STOP
X END`20
$ CALL UNPACK [.SRC]LDCOMN.FOR;2 53837312
$ create 'f'
X Integer Function MINPMID (sub)
X
X real secnds
X
X minpmid = (ifix(secnds(0.0)) / 60) - sub
X return
X end
$ CALL UNPACK [.SRC]MINPMID.FOR;1 990196778
$ create 'f'
X SUBROUTINE MOVE(OBJECT,WHERE)`20
X `20
X* PLACE ANY OBJECT ANYWHERE BY PICKING IT UP AND DROPPING IT. MAY ALREADY`
V20
X* TOTING, IN WHICH CASE THE CARRY IS A NO-OP. MUSTN'T PICK UP OBJECTS THAT
X* ARE NOT AT ANY LOC, SINCE CARRY WANTS TO REMOVE OBJECTS FROM ATLOC CH
X `20
X IMPLICIT INTEGER(A-Z)`20
X COMMON /PLACOM/ ATLOC,LINK,PLACE,FIXED,COND,PROP,LOC,LAMP,HOLDNG
X DIMENSION PROP(100), LINK(200), PLACE(100), FIXED(100)
X DIMENSION ATLOC(220), COND(220)`20
X `20
X IF(OBJECT.GT.100)GOTO 1`20
X FROM=PLACE(OBJECT)
X GOTO 2
X 1 FROM=FIXED(OBJECT-100)
X 2 IF(FROM.GT.0.AND.FROM.LE.300)CALL CARRY(OBJECT,FROM)
X CALL DROP(OBJECT,WHERE)`20
X RETURN
X END`20
$ CALL UNPACK [.SRC]MOVE.FOR;1 404384361
$ create 'f'
X SUBROUTINE PSPEAK(MSG,SKIP)`20
X `20
X* FIND THE SKIP+1ST MESSAGE FROM MSG AND PRINT IT. MSG SHOULD BE THE I
X* THE INVENTORY MESSAGE FOR OBJECT. (INVEN+N+1 MESSAGE IS PROP=N MESSA
X
X IMPLICIT INTEGER(A-Z)`20
X
X STRUCTURE /TEXTYPE/
X Integer*4 count
X Character*80 string
X end structure
X
X record /textype/ lines`20
X
X COMMON /TXTCOM/ RTEXT,LINES,LINUSE
X COMMON /PTXCOM/ PTEXT`20
X
X DIMENSION RTEXT(250), LINES(2000), PTEXT(100)
X `20
X M=PTEXT(MSG)
X IF(SKIP.LT.0)GOTO 9`20
X SKIP1=SKIP+1
X DO 3 I=1,SKIP1
X 1 M=IABS(LINES(M).COUNT)
X IF(LINES(M).COUNT.GE.0) GOTO 1
X 3 CONTINUE
X 9 CALL SPEAK(M)`20
X RETURN
X END`20
$ CALL UNPACK [.SRC]PSPEAK.FOR;1 492851518
$ create 'f'
X INTEGER FUNCTION PUT(OBJECT,WHERE,PVAL)`20
X `20
X* PUT IS THE SAME AS MOVE, EXCEPT IT RETURNS A VALUE USED TO SET UP THE
X* NEGATED PROP VALUES FOR THE REPOSITORY OBJECTS.
X `20
X IMPLICIT INTEGER(A-Z)`20
X `20
X CALL MOVE(OBJECT,WHERE)`20
X PUT=(-1)-PVAL`20
X RETURN
X END`20
$ CALL UNPACK [.SRC]PUT.FOR;1 1330259878
$ create 'f'
X INTEGER FUNCTION RANDOM(RANGE)`20
X `20
X* RETURN RANDOM UNIFORMLY DISTRIBUTED VALUE IN CLOSED INTERVAL(0,RANGE).`20
X*`20
X* COURTESY MICHAEL GRUBIN@PRIME COMPUTER INC., FRAMINGHAM MASS.
X
X `20
X IMPLICIT INTEGER (A-Z)
X COMMON /SEED/ SEED
X
X RANDOM = (RANGE-1.)*RAN(SEED)
X RETURN
X END`20
$ CALL UNPACK [.SRC]RANDOM.FOR;1 908817846
$ create 'f'
X SUBROUTINE RSPEAK(N)
X `20
X* PRINT THE N-TH 'RANDOM' MESSAGE (SECTION 6 OF DATABASE).`20
X `20
X IMPLICIT INTEGER(A-Z)`20
X COMMON /TXTCOM/ RTEXT,LINES,LINUSE
X DIMENSION RTEXT(250), LINES(2000)
X IF(N.NE.0)CALL SPEAK(RTEXT(N))
X RETURN
X END`20
$ CALL UNPACK [.SRC]RSPEAK.FOR;1 539841814
$ create 'f'
X INTEGER FUNCTION SCRMBL(IVAL)`20
X `20
X* RETURN 'SCRAMBLED' VAL. SCRAMBLING IS DONE BY 'NOT'ING IVAL`20
X* (INITIAL ATTEMPT, ALGORITHM MAY BE MODIFIED LATER)`20
X `20
X SCRMBL=.NOT. IVAL`20
X RETURN
X END`20
$ CALL UNPACK [.SRC]SCRMBL.OLD;1 876562136
$ create 'f'
Xmodule shift$main (input,output);
X
X(***************************************************************************
V***)
X(*
V `20
V *)
X(* Shift - emulate CDC FORTRAN shift function.
V *)
X(*
V `20
V *)
X(* Restrictions: Cannot shift greater than 32, the VAX longword length.
V *)
X(*
V `20
V *)
X(***************************************************************************
V***)
X
Xtype bit32 = packed array `5B1..32`5D of 0..1;
X
X`5Bglobal`5D function shift ( val : bit32; cnt : integer ): bit32;
X
Xvar loop : integer;
X temp : bit32;
X
Xbegin
X if cnt > 32 then
X begin
X writeln ('Error in shift argument - shift count greater than word leng
Vth');
X halt;
X end;
X if cnt > 0 then
X begin
X for loop := 1 to 32 - cnt do
X begin
X temp `5Bloop + cnt`5D := val `5Bloop`5D;
X end;
X for loop := 1 to cnt do
X begin
X temp `5Bloop`5D := val `5B32 - cnt + loop`5D;
X end;
X end
X else if cnt = 0 then
X begin
X temp := val;
X end
X else
X begin
X for loop := -cnt + 1 to 31 do
X begin
X temp `5Bloop + cnt`5D := val `5Bloop`5D;
X end;
X for loop := 31 downto 32 + cnt do
X begin
X temp `5Bloop`5D := 0;
X end;
X end;
X shift := temp;
Xend;
X
Xend.
$ CALL UNPACK [.SRC]SHIFT.PAS;21 1298335372
$ create 'f'
X SUBROUTINE SPEAK(N)`20
X `20
X* PRINT THE MESSAGE WHICH STARTS AT LINES(N). PRECEDE IT WITH A BLANK`20
X* UNLESS BLKLIN IS FALSE.
X `20
X IMPLICIT INTEGER(A-Z)`20
X
X STRUCTURE /TEXTYPE/
X Integer*4 count
X Character*80 string
X end structure
X
X LOGICAL BLKLIN
X
X record /textype/ lines`20
X
X Character*80 text
X
X COMMON /TXTCOM/ RTEXT,LINES,LINUSE
X COMMON /STXCOM/ TEXT
X COMMON /IOSCOM/ BLKLIN
X DIMENSION RTEXT(250), LINES(2000), TEXT(80)
X
X IF(N.EQ.0)RETURN
X IF (LINES(N).string .EQ. '>$<') RETURN
X IF(BLKLIN)WRITE(6,1)
X 1 FORMAT(1X)
X I = N
X 10 CONTINUE`20
X WRITE(6,20)lines(I).string
X 20 FORMAT(1x,80A)
X 30 I = I + 1
X IF (LINES(I).COUNT .GE. 0) GO TO 10`20
X RETURN
X `20
X END`20
$ CALL UNPACK [.SRC]SPEAK.FOR;1 440817370
$ create 'f'
X SUBROUTINE SVCOMN(QNAME,NAME)`20
X*`20
X* ADVENTURE SUBROUTINE TO SAVE ALL COMMON BLOCKS. (SEE LDCOMN)
X `20
X IMPLICIT INTEGER (A-Z)
X CHARACTER*148 FILENAME
X Character*128 filedir
X COMMON /AAAAAA/ CORE(1)
X COMMON /ZZZZZZ/ THEEND`20
X
X LOGICAL QNAME`20
X
X if (qname) then
X filename = filedir//'funadv.common'
X else
X filename = 'sys$login:funadv.adv'
X endif `20
X `20
X open (unit=2,file=filename,status='new',err=9999,
X 1form='unformatted',carriagecontrol='none')
X BEGIN=1`20
X END=(%LOC(THEEND)-%LOC(CORE(1))+4)/4 ! Account for wordsize
X WRITE(2,err=9998) (CORE(I1),I1=BEGIN,END)
X close(2)
X RETURN
X 9998 close (2)
X 9999 write (6,10)
X 10 Format (' Error creating save file.')
X return
X END`20
$ CALL UNPACK [.SRC]SVCOMN.FOR;2 538577936
$ create 'f'
X`5Binherit('sys$library:starlet')`5D
Xmodule getuser;
X
Xtype
X word_integer = `5Bword`5D 0..65535;
X long_integer = `5Blong`5D integer;
X char12 = packed array `5B1..12`5D of char;
X jpi_rec = packed record
X len : word_integer;
X oper : word_integer;
X adr : long_integer;
X adrl : long_integer;
X zero : long_integer;
X end;
X
Xvar rts,i : integer;
X jrec : jpi_rec;
X
X`5Bglobal`5D procedure user( var name: char12);
X
Xbegin
X jrec.len := 12;
X jrec.zero := 0;
X jrec.adr := iaddress(name);
X jrec.adrl := iaddress(i);
X jrec.oper := jpi$_username;
X rts := $getjpi(itmlst := jrec);
Xend;
X
Xend.
$ CALL UNPACK [.SRC]USER.PAS;3 1985376514
$ create 'f'
X INTEGER FUNCTION VOCAB(ID,INIT)`20
X `20
X* LOOK UP ID IN THE VOCABULARY (ATAB) AND RETURN ITS 'DEFINITION' (KTAB
X* -1 IF NOT FOUND. IF INIT IS POSITIVE, THIS IS AN INITIALIZATION CALL
X* UP A KEYWORD VARIABLE, AND NOT FINDING IT CONSTITUTES A BUG. IT ALSO
X* THAT ONLY KTAB VALUES WHICH TAKEN OVER 1000 EQUAL INIT MAY BE CONSIDE
X* (THUS 'STEPS', WHICH IS A MOTION VERB AS WELL AS AN OBJECT, MAY BE LO
X* AS AN OBJECT.) AND IT ALSO MEANS THE KTAB VALUE IS TAKEN MOD 1000.
X `20
X IMPLICIT INTEGER(A-Z)`20
X COMMON /VOCCOM/ TABSIZ,KTAB,ATAB
X Character*10 ID, HASH, ATAB
X DIMENSION KTAB(400), ATAB(400)
X `20
X!!!!! HASH=SCRMBL(ID)`20
X HASH = ID
X DO 1 I=1,TABSIZ`20
X IF(KTAB(I).EQ.-1)GOTO 2`20
X IF(INIT.GE.0.AND.KTAB(I)/1000.NE.INIT)GOTO 1
X IF(ATAB(I).EQ.HASH)GOTO 3`20
X 1 CONTINUE
X CALL BUG(21)
X `20
X 2 VOCAB=-1
X IF(INIT.LT.0)RETURN`20
X PRINT*,HASH`20
X CALL BUG(5)`20
X `20
X 3 VOCAB=KTAB(I)`20
X IF(INIT.GE.0)VOCAB=MOD(VOCAB,1000)
X RETURN
X END`20
$ CALL UNPACK [.SRC]VOCAB.FOR;2 724852254
$ create 'f'
X LOGICAL FUNCTION WIZARD(DUMMY)
X IMPLICIT INTEGER (A-Z)
X LOGICAL BIGWIZ
X CHARACTER*12 BIGWIZS (4)
X Character*12 Usernum
X Character*10 Junk,Junk2
X COMMON /USER/ USERNUM`20
X DATA BIGWIZS / 'CTS' , ' ', ' ', ' ' /
X `20
X WIZARD=.FALSE.
X WRITE(6,10)`20
X 10 FORMAT(' Are you The Wizard ? ',$)
X READ(5,20,end=25)JUNK
X 20 FORMAT(2A10)
X call str$upcase(JUNK,JUNK)
X IF(JUNK.EQ.'Y'.OR.JUNK.EQ.'YES') GOTO 40
X if(junk.eq.'MAYBE') goto 47
X IF(JUNK.EQ.'SAVE') GOTO 35
X 25 WRITE(6,30)`20
X 30 FORMAT(' Very well.')`20
X RETURN
X 35 CALL SVCOMN(.TRUE.,0)`20
X 40 BIGWIZ=.FALSE.
X CALL USER(%ref(USERNUM))
X DO 45 LOOP = 1,4`20
X IF ( USERNUM .NE. BIGWIZS(LOOP) ) GOTO 45
X BIGWIZ = .TRUE.
X GOTO 100`20
X 45 CONTINUE
X 47 WRITE(6,50)`20
X 50 FORMAT(' Prove it! Say the magic word!')
X READ(5,20,end=200)JUNK,JUNK2
X call str$upcase(junk,junk)
X call str$upcase(junk2,junk2)
X IF(JUNK.EQ.'ORCS ARE S'.AND.JUNK2.EQ.'CUM ') GOTO 60
X IF(JUNK.NE.'DWARF'.AND.JUNK.NE.'DWARVES') GOTO 200
X IF(JUNK.EQ.'DWARF') MSG=1`20
X IF(JUNK.EQ.'DWARVES') MSG=2`20
X 60 WRITE(6,70)`20
X 70 FORMAT(' That is not what I thought it was. Do you know what',`20
X $' I thought it was?')`20
X READ(5,20,end=200)JUNK
X call str$upcase(junk,junk)
X IF(JUNK.NE.'NO'.AND.JUNK.NE.'N') GOTO 200`20
X WRITE(6,80)`20
X 80 FORMAT(/,' Wazu')`20
X READ(5,20,end=200)JUNK
X call str$upcase(junk,junk)
X IF(JUNK.NE.'WAZU') GOTO 200`20
X IF(MSG.NE.0) GOTO 190`20
X WRITE(6,90)`20
X 90 FORMAT(' Oh dear, you really *are* a Wizard! Sorry to have ',`20
X $'bothered you. . .')
X WIZARD=.TRUE.`20
X RETURN
X 100 WRITE(6,110)
X 110 FORMAT(/,' Oh my!!! I''ve been detaining a *true* wizard! ! !'
X $,//)`20
X WIZARD=.TRUE.`20
X RETURN
X 190 IF(MSG.EQ.1) WRITE(6,191)`20
X 191 FORMAT(' There are now several threatening little Dwarves'
X $,' in the room with you!',/,' Most of them throw knives'
X $,' at you!',/,' All of them get you!')
X IF(MSG.EQ.2) WRITE(6,195)`20
X 195 FORMAT(' There is a threatening little dwarf in the room with'`20
X $,' you!',/,' One sharp nasty knife is thrown at you!'`20
X $,/,' It gets you!')`20
X WRITE(6,199)
X 199 FORMAT(/,/,/,' Just kidding.... You are not a Wizard, though.'`20
X $,/,' ....in this game, anyway.')
X RETURN
X 200 WRITE(6,210)
X 210 FORMAT(' Foo, you are nothing but a charlatan!')
X RETURN
X END`20
$ CALL UNPACK [.SRC]WIZARD.FOR;4 1968196168
$ create 'f'
X LOGICAL FUNCTION YES(X,Y,Z,WCOUNT)
X `20
X* PRINT MESSAGE X, WAIT FOR YES/NO ANSWER. IF YES, PRINT Y AND LEAVE Y
X* TRUE; IF NO, PRINT Z AND LEAVE YEA FALSE. SPK IS RSPEAK.
X `20
X IMPLICIT INTEGER(A-Z)`20
+-+-+-+-+-+-+-+- END OF PART 7 +-+-+-+-+-+-+-+-