10REM >:0.$.OLD`DREAMS.OldDreams
20REM
30REM New Start, Old Dreams.
40REM An adventure game for the Acor
n Archimedes computer.
50REM Currently only tested on a A31
0 machine.
60REM Thanks to Terje Sletteboe and
Georgis Delaveris so that I could
70REM make my old dreams a reality.
80REM
90REM Created by Tor O. Houghton in
1989 Anno Domini.
95REM Made Beeb compatible and debug
ged by C.J.Richardson.
100REM
110REM For last update, see file stri
ng for details
120MODE7
121A%=0:X%=&FF:F%=USR&FFF4 DIV&100 AND
7:IF F%>2 MODE3+128
130PROCsetvar
140FOR I%=1 TO locs%
150READ name$(I%):A=INKEY(W): IF W>1 P
ROCcheck(name$(I%)):PRINT I%
160NEXT
170FOR I%=1 TO locs%
180FOR J%=1 TO 6
190READ pdir%(I%,J%):A=INKEY(W): IF W>
1 PRINT pdir%(I%,J%),I%,J%
200NEXT
210NEXT
220FOR I%=1 TO numobj%
230READ obj$(I%):A=INKEY(W):IF W>1 PRI
NT obj$(I%),I%
240NEXT
250FOR I%=1 TO numobj%
260READ object$(I%):A=INKEY(W):IF W>1
PRINTobject$(I%),I%
270NEXT
280FOR I%=1 TO numcom%
290READ com$(I%):A=INKEY(W):IF W>1 PRI
NT com$(I%),I%
300NEXT
310FOR I%=1 TO numobj%
320READ objp%(I%):A=INKEY(W):IF W>1 PR
INT objp%(I%),I%
330NEXT
340FOR I%=1 TO 6
350READ dir$(I%):A=INKEY(W):IF W>1 PRI
NT dir$(I%),I%
360NEXT
370PROClk
380REPEAT
390REPEAT
410IF cpos%=3 s%=FALSE
420IF cpos%=2 AND gf3%=FALSE AND wf1%=
1 s%=TRUE
430IF wf1%=0 AND objp%(8)=0 AND oxf%=1
s%=FALSE
440PROCcd
450INPUT '"What now? "a$
451REM IF a$="CHEAT" INPUT cpos%
460ON ERROR REPORT:PRINTERL:END:PRINT"
That's beyond my knowledge."
470IF a$="" THEN 450
480a$=FNcase(a$)
490S%=INSTR(a$," ")
500IF S%=0 THEN comno%=FNcomno(a$):obj
no%=0:GOTO 530
510comno%=FNcomno(LEFT$(a$,INSTR(a$,"
")-1))
520objno%=FNobjno(MID$(a$,INSTR(a$," "
)+1))
530IF comno%=0 THEN PRINT FNhuh
540UNTIL comno%<>0
550PRINT
560IF comno%<7 PROCmove:GOTO 390
570c%=comno%-6
571IF c%=1 OR c%=2 PROCg
572IF c%=3 PROCdr
573IF c%=4PROCop
574IFc%=5PROCcl
575IFc%=6 OR c%=7 PROCht
576IFc%=8PROCpsh
577IFc%=9PROCins
578IFc%=10PROCpl
579IFc%=11PROCdg
580IFc%=12PROClt
581IFc%=13PROCtrn
582IFc%=14PROCet
583IFc%=15 OR c%=16 PROCdrnk
584IFc%=17PROCenter
585IFc%=18PROCgo
586IFc%=19PROCinv
587IFc%=20PROClk
588IFc%=21PROChlp
589IFc%=22PROChnt
590IFc%=23PROCq
591IFc%=24PROCexa
592IFc%=25PROCrd
593IFc%=26PROCcb
594IFc%=27PROCuse
595IFc%=28PROCjmp
596IFc%=29PROCld
597IFc%=30PROCld
598IFc%>30 AND c%<35 PROCdst
599IFc%=35PROCwer
600IFc%=36PROCscre
601UNTILFALSE
602END
610
620DEFPROCht
630PRINT"You seem very violent."
640ENDPROC
650
660DEFPROClt
670PRINT "Where and with what??"
680ENDPROC
690
700DEFPROCtime
710m%=m%+1
720IF wf1%=0 helm$=" (through the helm
et)." ELSE helm$="."
730IF m%=99 PRINT '"An explosion can b
e heard";helm$;"Then you see a bright fl
ash."'"Oh dear, it seems to me that you
have blown it."'"You are dead.":PROCscre
:END
740IF m%>75 AND m%<99 PRINT '"WaRnINg:
SysTEM FAiLurE. MeLTdown iS CerTAin";he
lm$:ENDPROC
750IF m%>44 AND m%<76 PRINT '"WaRNing:
sYSteM FaIluRE. MAinFrameEe CCcomPutER
CAn'T cOMpenSAte";helm$:ENDPROC
760IF m%>39 AND m%<45 PRINT '"WARNING:
THE REACTOR IS HAVING A MELT-DOWN";helm
$:ENDPROC
770IF m%>24 AND m%<40 PRINT '"WARNING:
THE REACTOR IS OVERHEATING";helm$:ENDPR
OC
780IF m%>19 AND m%<25 PRINT '"It sound
s as if there's an overload somewhere";h
elm$:ENDPROC
790IF m%>4 AND m%<20 PRINT '"A loud be
eping sound can be heard";helm$:ENDPROC
800IF m%<5 PRINT '"A faint beeping sou
nd can be heard";helm$:ENDPROC
810ENDPROC
820
830DEFPROCscre
840PRINT"You have scored ";score%;" ou
t of 50 possible points."
850ENDPROC
860
870DEFPROCins
880IF INSTR(a$,"disk")=0 GOTO 960
890IF cpos%<>16 AND cpos%<>10 AND cpos
%<>13 PRINT "Into what?":ENDPROC
900IF cpos%=16 AND objp%(5)=0 GOTO 950
910IF cpos%=10 AND objp%(1)=0 PRINT"Sw
ish. The door opens...":gf1%=FALSE:PRINT
"..but unfortunately the mechanism jamme
d, so it ate the card.":objp%(1)=-1:ENDP
ROC
920IF cpos%=13 AND objp%(1)=0 PRINT"Sw
ish. The door opens...":gf1%=FALSE:A=INK
EY(70):PRINT"but unfortunately the mecha
nism jammed, so it ate the card.":objp%(
1)=-1:ENDPROC
930IF cpos%=16 AND objp%(objno%)=0 PRI
NT"That sounds stupid.":ENDPROC
940GOTO 960
950PRINT"You insert the disc into the
mainframe computer. Almost instaneously"
'"the computer lights up (it has most li
kely parallell RISC processors).":cf%=0:
objp%(5)=-1:invno%=-1:ENDPROC
960PRINT"I can't do that...YET."
970ENDPROC
980
990DEFPROCtrn
1000IF objp%(8)=0 AND INSTR(a$,"oxygen"
)>0 AND INSTR(a$,"on")>0 PRINT FNok:oxf%
=1:ENDPROC
1010IF objp%(8)=0 AND INSTR(a$,"oxygen"
)>0 AND INSTR(a$,"off")>0 PRINT FNok:oxf
%=0:ENDPROC
1020PRINT"Eh?"
1030ENDPROC
1040
1050DEFPROCdg
1060IF cpos%<22 PRINT"Not here.":ENDPRO
C
1070ENDPROC
1080
1090DEFPROCet
1100IF wf1%=0 PRINT "You're wearing a s
pacesuit.":ENDPROC
1110IF objp%(6)=cpos% AND INSTR(a$,"foo
d")>0 THEN objp%(6)=-1:invno%=-1:PRINT"G
reat! That was delicious.":ENDPROC
1120IF objp%(6)=0 AND INSTR(a$,"food")>
0 THEN objp%(6)=-1:invno%=-1:PRINT"Great
! That was delicious.":ENDPROC
1130PRINT"That sounds silly to me."
1140ENDPROC
1150
1160DEFPROCdrnk
1170IF wf1%=0 PRINT "You're wearing a s
pacesuit.":ENDPROC
1180IF objp%(10)=cpos% AND waf%=0 AND I
NSTR(a$,"water")>0 PRINT ics$:ENDPROC
1190IF objp%(10)=0 AND waf%=0 AND INSTR
(a$,"water")>0 PRINT ics$:ENDPROC
1200IF objp%(10)=cpos% AND waf%=1 AND I
NSTR(a$,"water")>0 THEN obj$(10)="An emp
ty bottle":waf%=0:PRINT"That was refresh
ening.":ENDPROC
1210IF objp%(10)=0 AND waf%=1 AND INSTR
(a$,"water")>0 THEN obj$(10)="An empty b
ottle":waf%=0:PRINT"That was refreshenin
g.":ENDPROC
1220PRINT"Eh??"
1230ENDPROC
1240
1250DEFPROCgo
1260IF INSTR(a$,"hell")>0 PRINT"Not blo
ody likely.":ENDPROC
1270PRINT"Go where?"
1280ENDPROC
1290
1300DEFPROCenter
1310IF cpos%=1 AND INSTR(a$,"airlock")>
0 AND gf3%=TRUE THEN PRINT"It's locked."
:ENDPROC
1320IF cpos%=1 AND INSTR(a$,"airlock")>
0 AND gf3%=FALSE PRINTFNok:cpos%=2:PROCl
k:ENDPROC
1330IF cpos%=2 AND INSTR(a$,"pod")>0 AN
D gf2%=TRUE THEN PRINT"There's a non-fun
ctional door blocking your movement that
way.":ENDPROC
1340IF cpos%=2 AND INSTR(a$,"pod")>0 AN
D gf2%=FALSE PRINTFNok:cpos%=9:PROClk:EN
DPROC
1350IF cpos%=9 AND INSTR(a$,"airlock")
THEN cpos%=2:PROClk:ENDPROC
1360IF cpos%=3 AND INSTR(a$,"airlock")
THEN cpos%=2:PROClk:ENDPROC
1370IF cpos%=10 AND INSTR(a$,"lift") TH
EN cpos%=11:PROClk:ENDPROC
1380IF cpos%=15 AND INSTR(a$,"lift") TH
EN cpos%=14:PROClk:ENDPROC
1390PRINT"What??"
1400ENDPROC
1410
1420DEFPROChnt
1430m%=m%+1
1440IF cpos%=3 PRINT"You gotta get outt
a here.":ENDPROC
1450IF cpos%=10 PRINT"There's an access
card somewhere.":ENDPROC
1460IF cpos%=15 PRINT"The controls are
not your ticket out of here.":ENDPROC
1470IF cpos%=16 AND objp%(5)=cpos% PRIN
T"This room may be of some help.":ENDPRO
C
1480IF cpos%=16 AND objp%(5)=0 PRINT"Th
is room may be of some help.":ENDPROC
1490IF cpos%=16 PRINT"This room may be
of some help...but not yet.":ENDPROC
1500PRINT FNreply
1510ENDPROC
1520
1530DEFPROCld
1540PRINT"Sorry not available!"
1560
1590ENDPROC
1600
1610DEFPROCcb
1620PRINT"Ahem."
1630ENDPROC
1640
1650DEFPROCuse
1660PRINT"Uh?"
1670ENDPROC
1680
1690DEFPROCjmp
1700PRINT"Whee!!"
1710ENDPROC
1720
1730DEF PROCmove
1740IF cpos%=17 gf3%=TRUE
1750IF pdir%(cpos%,comno%)=0 THEN PRINT
nw$:ENDPROC
1760IF cpos%=13 AND comno%=4 AND gf1%=T
RUE PRINT lock$(1):ENDPROC
1770IF cpos%=10 AND comno%=1 AND gf1%=T
RUE PRINT lock$(1):ENDPROC
1780IF cpos%=2 AND comno%=3 AND gf2%=T
RUE PRINT lock$(2):ENDPROC
1790IF cpos%=2 AND comno%=1 AND gf3%=F
ALSE PRINT "You have to close the outer
door first.":ENDPROC
1800IF cpos%=2 AND comno%=2 AND gf3%=T
RUE PRINT "The outer airlock door is clo
sed.":ENDPROC
1810IF cpos%=1 AND comno%=3 AND gf3%=T
RUE PRINT "The outer airlock door is clo
sed.":ENDPROC
1820cpos%=pdir%(cpos%,comno%)
1830PROClk
1840ENDPROC
1850
1860DEF PROCdst
1870b$=FNcase(com$(comno%))
1880a$=FNcase(a$)
1890IF INSTR(a$,"the")>0 the%=4 ELSE th
e%=0
1900IF objp%(2)<>0 PRINT "With what?":E
NDPROC
1910IF objp%(2)=0 AND pt%=0 PRINT"Click
.":ENDPROC
1920IF cpos%=2 AND objp%(2)=0 THEN GOTO
1990
1930IF cpos%<>2 AND objp%(2)=0 THEN
1940PRINT"You ";b$;" the ";RIGHT$(a$,-I
NSTR(a$," ")+LEN(a$)-the%);"."
1950PRINT"Nothing special happened, but
you had a lot of fun."
1960REM pt%=0
1970ENDPROC
1980:
1990IF INSTR(a$,"pod door")<>0 THEN 205
0
2000PRINT"You ";b$;" the ";RIGHT$(a$,-I
NSTR(a$," ")+LEN(a$));"."
2010PRINT"Great fun. Now what are you g
oing to use it for?"
2020pt%=0
2030ENDPROC
2040:
2050door$(5)="a free passage to the esc
ape pod."
2060PRINT"You ";b$;" the ";RIGHT$(a$,-I
NSTR(a$," ")+LEN(a$));"."
2070PRINT"This leaves you ";door$(5)
2080score%=score%+2
2090pt%=0
2100gf2%=FALSE
2110:
2120ENDPROC
2130
2140DEF PROCpl
2150IF INSTR(a$,"handle")=0 PRINT"Pull
what?":ENDPROC
2160IF cpos%<>7 PRINT "I see nothing to
pull.":ENDPROC
2170IF cpos%=7 AND hf1%=TRUE PRINT"Wher
e? What??":ENDPROC
2180IF cpos%=7 AND hf1%=FALSE AND hf2%=
1 PRINT"Oh, something rolled out!":hf2%=
0:ENDPROC
2190PRINT"Whee!!"
2200ENDPROC
2210
2220DEFPROCpsh
2230IF objp%(3)=cpos% THEN 2260
2240IF objp%(objno%)<>cpos% AND objp%(o
bjno%)>numobj% PRINT ics$:ENDPROC
2250IF objp%(objno%)=cpos% AND INSTR(a$
,"but")=0 PRINT "What a strange idea.":E
NDPROC
2260IF cpos%=9 AND cf%=0 PROCfinish:END
PROC
2270IF cpos%=9 AND cf%=1 PRINT "Strange
ly enough, nothing happens.":ENDPROC
2280PRINT"What a strange idea."
2290ENDPROC
2300
2310DEF PROClk
2320CLS
2330PROCcd
2340PRINT "You are ";
2350PROCcheck(name$(cpos%))
2360IF c1%=0 PROCtime
2370PRINT'"Evident exits are: ";
2380FOR I%=1 TO 6
2390IF pdir%(cpos%,I%)<>0 PRINT dir$(I%
);" ";
2400NEXT
2410PRINT ''"You can see:"
2420no%=0
2430IF hf2%=1 obj$(6)=CHR$(11)
2440FOR I%=1 TO numobj%
2450IF objp%(I%)<>cpos% THEN 2480
2460PRINT obj$(I%)
2470no%=no%+1
2480NEXT
2490IF cpos%>=17 AND cpos%<20 OR cpos%=
21 THEN PRINT"Lots of stars.":ENDPROC
2500IF cpos%<>10 AND cpos%<>13 AND cpos
%<>2 AND cpos%<>3 AND cpos%<>9 AND cpos%
<>1 THEN 2570
2510IF cpos%=10 PRINT door$(1);" north.
":ENDPROC
2520IF cpos%=13 PRINT door$(1);" south.
":ENDPROC
2530IF cpos%=2 PRINT door$(5):PRINT do
or$(3);" north":PRINT door$(2);" east.":
PRINT"a sign.":ENDPROC
2540IF cpos%=9 PRINT "a free passage t
o the airlock.":ENDPROC
2550IF cpos%=1 PRINT door$(2);" west."
:ENDPROC
2560IF cpos%=3 PRINT door$(3);" south.
":ENDPROC
2570IF no%=0 THEN PRINT "Nothing specia
l."
2580ENDPROC
2590
2600DEFPROCfinish
2610PRINT"You firmly depress the button
.":A=INKEY(50)
2620PRINT".";:A=INKEY(50):PRINT".";:A=I
NKEY(50):PRINT".":A=INKEY(100)
2630PRINT"Click.":A=INKEY(150)
2640PRINT"You feel the force of seven G
's as the escape capsule is"
2650PRINT"jettisoned from the Gullwing.
"
2660PRINT"You have escaped the Gullwing
in one piece."
2670PRINT'"Well done."
2680GOTO 2680
2690c1%=1
2700ENDPROC
2710
2720DEF PROCexa
2730IF INSTR(a$,"sign")>0 AND cpos%=2 T
HEN PRINT"Try 'read'.":ENDPROC
2740IF INSTR(a$,"drive")>0 AND cpos%=16
PRINT"This is where one puts a disc.":E
NDPROC
2750IF INSTR(a$,"door")>0 AND cpos%<>1
AND cpos%<>2 AND cpos%<>3 AND cpos%<>10
AND cpos%<>13 PRINT ics$:ENDPROC
2760IF INSTR(a$,"door")>0 PRINT"There's
nothing special about that door.":ENDPR
OC
2770IF objp%(objno%)=cpos% OR objp%(obj
no%)=0 THEN 2790
2780REMPRINT FNhave:ENDPROC
2790IF objno%=1 PRINT"It has a 'T' mark
ed on it.":ENDPROC
2800IF objno%=2 PRINT"It looks like a V
olt-Varsican hi-tech rad-welder.":ENDPRO
C
2810IF objno%=3 PRINT"It doesn't seem v
ery special to me.":ENDPROC
2820IF objno%=4 PRINT"There's a handle
on it.":hf1%=FALSE:obj$(6)="some food":E
NDPROC
2830IF objno%=5 PRINT"It looks like a 3
.5 inch floppy.":ENDPROC
2840IF objno%=9 PRINT"Complex";:PROCthi
nk:PRINT"BIG";:PROCthink:PRINT"and it ha
s a disc-drive mounted in it.":ENDPROC
2850IF objno%>5 AND objno%<9 PRINT"Hmm.
":ENDPROC
2860IF objno%=10 PRINT"It's a container
.":ENDPROC
2870IF objno%=11 PRINT"Nothing special.
":ENDPROC
2880IF objno%=12 PRINT"Damaged.":ENDPRO
C
2890PRINT"Please rephrase that."
2900ENDPROC
2910
2920DEFPROCrd
2930IF cpos%=2 AND INSTR(a$,"sign")>0 P
RINT"It says 'CAUTION: Do not exit witho
ut proper preparations.'":ENDPROC
2940PRINT "Huh??"
2950ENDPROC
2960
2970DEFPROCdr
2980IF objp%(objno%)<>0 OR objno%=0 THE
N PRINT FNhave:ENDPROC
2990objp%(objno%)=cpos%
3000PRINT"Ok."
3010IF objno%=7 wf1%=1:PROCcd
3020IF objno%=8 s%=TRUE:PROCcd
3030invno%=-1
3040ENDPROC
3050
3060DEFPROCwer
3070IF LEFT$(a$,2)<>"we" comno%=3:PROCm
ove:ENDPROC
3080IF objp%(objno%)<>cpos% AND objp%(o
bjno%)<>0 PRINT ics$:ENDPROC
3090IF objp%(7)=cpos% OR objp%(7)=0 PRI
NT"Ok, it takes a little time, but you m
anage.":wf1%=0:objp%(7)=0:invno%=invno%+
1:ENDPROC
3100IF objp%(objno%)=0 OR objp%(objno%)
=cpos% PRINT "Impossible.":ENDPROC
3110PRINT"Eh??"
3120ENDPROC
3130
3140DEF PROCop
3150IF RIGHT$(a$,4)<>"door" THEN PRINT"
That's impossible.":ENDPROC
3160IF cpos%<>2 AND cpos%<>1 AND cpos%<
>3 AND cpos%<>10 AND cpos%<>13 THEN PRIN
Tics$:ENDPROC
3170IF RIGHT$(a$,-INSTR(a$," ")+LEN(a$)
)="escape pod door" AND gf2%=TRUE PRINT"
It won't budge.":ENDPROC
3180IF cpos%=1 AND INSTR(a$,"outer")>0
AND gf3%=FALSE PRINT"It's open already."
:ENDPROC
3190IF cpos%=2 AND INSTR(a$,"outer")>0
AND gf3%=FALSE PRINT"It's open already."
:ENDPROC
3200IF cpos%=10 AND gf1%=FALSE PRINT"It
's open already.":ENDPROC
3210IF cpos%=13 AND gf1%=FALSE PRINT"It
's open already.":ENDPROC
3220IF cpos%=1 AND INSTR(a$,"outer")>0
PRINT FNok'"You wait until the air is ou
t of the airlock. The outer door then op
ens.":gf3%=FALSE:ENDPROC
3230IF cpos%=2 AND INSTR(a$,"outer")>0
PRINT FNok'"Before the outer door openes
, the inner door closes. You can feel th
e":PRINT"humming as air gets sucked out
of the compartment. It then opens to a":
PRINT"myriad of stars.":gf3%=FALSE:PROCc
d:ENDPROC
3240IF cpos%=2 AND INSTR(a$,"inner")>0
PRINT "No need.":ENDPROC
3250IF cpos%=3 AND INSTR(a$,"inner")>0
PRINT "It's open already.":ENDPROC
3260IF cpos%=10 AND objp%(1)<>0:PRINT "
You need something to open it with.":END
PROC
3270IF cpos%=13 AND objp%(1)<>0:PRINT "
You need something to open it with.":END
PROC
3280IF cpos%=10 AND objp%(1)=0:PRINT "T
he door opens with a swish.":gf1%=FALSE:
ENDPROC
3290IF cpos%=13 AND objp%(1)=0:PRINT "T
he door opens with a swish.":gf1%=FALSE:
ENDPROC
3300PRINT"I can understand the first pa
rt, but I have trouble with the object."
3310ENDPROC
3320
3330DEF PROCcl
3340IF RIGHT$(a$,4)<>"door" THEN PRINT"
That's impossible.":ENDPROC
3350IF cpos%<>2 AND cpos%<>1 AND cpos%<
>3 AND cpos%<>10 AND cpos%<>13 THEN PRIN
Tics$:ENDPROC
3360IF cpos%=10 AND objp%(1)=0 AND gf1%
=TRUE PRINT"It's locked already.":ENDPR
OC
3370IF cpos%=13 AND objp%(1)=0 AND gf1%
=TRUE PRINT"It's locked already.":ENDPR
OC
3380IF (cpos%=2 OR cpos%=3) AND INSTR(a
$,"inner")>0 PRINT"It closes automatical
ly, so there's no need.":ENDPROC
3390IF (cpos%=2 OR cpos%=1) AND INSTR(a
$,"outer")>0 PRINT FNok'"You close the o
uter airlock door.":gf3%=TRUE:ENDPROC
3400IF cpos%=10 AND objp%(1)=0 PRINTFNo
k'"You close the door.":gf1%=TRUE:ENDPRO
C
3410IF cpos%=13 AND objp%(1)=0 PRINTFNo
k'"You close the door.":gf1%=TRUE:ENDPRO
C
3420PRINT"What?"
3430ENDPROC
3440
3450DEF PROCinv
3460PRINT'"You are carrying: ";
3470IF invno%=0 THEN PRINT n$:ENDPROC
3480PRINT
3490FOR I%=1 TO numobj%
3500IF objp%(I%)=0 PRINT obj$(I%);:IF o
bjp%(7)=0 AND wf1%=0 AND I%=7 PRINT" (wh
ich you are wearing)";
3510IF objp%(I%)=0 PRINT
3520NEXT
3530ENDPROC
3540
3550DEF PROChlp
3560PRINT"I am provided with a limited
understanding of certain words,"
3570PRINT"actions, objects and places.
However, most of my vocabulary"
3580PRINT"describes the different parts
of the world you wander in, and"
3590PRINT"is used to move you there. Tr
y words like north, south, east,"
3600PRINT"west, up, down, get and drop.
"
3610PRINT"The directions can be abbrevi
ated to n,s,e,w,u and d respectively."
3620ENDPROC
3630
3640DEF PROCq
3650INPUT"Do you really want to quit al
ready",b$
3660IF LEFT$(b$,1)="y" OR LEFT$(b$,1)="
Y" THEN INPUT'"Really End or Restart",b$
ELSE ENDPROC
3670b$=FNcase(b$)
3680RESTORE
3690IF LEFT$(b$,1)="r" THEN 5120 ELSE E
ND
3700ENDPROC
3710
3720DEFPROCcheck(A$)
3730IF INSTR(A$,"/")=0 PRINTA$: ENDPROC
3740PRINTLEFT$(A$,INSTR(A$,"/")-1)
3750PRINTRIGHT$(A$,-INSTR(A$,"/")+LEN(A
$))
3760ENDPROC
3770
3780DEFPROCthink
3790A=INKEY(70)
3800PRINT".";
3810A=INKEY(70)
3820PRINT".";
3830A=INKEY(70)
3840PRINT".";
3850A=INKEY(70)
3860ENDPROC
3870
3880DEF PROCg
3890IF RIGHT$(a$,4)=" all" PROCquest:EN
DPROC
3900IF INSTR(a$,"sign")>0 AND cpos%=2 P
RINT"It's here to warn people, and shoul
d not be removed.":ENDPROC
3910IF objno%=0 PRINT "What a strange i
dea.":ENDPROC
3920IF objp%(objno%)<>cpos% PRINT ics$:
ENDPROC
3930IF objp%(objno%)=0 PRINT "You have
it already.":ENDPROC
3940IF objno%=9 THEN PRINT "It has a ma
ss equal to 3.6 tons, and is also mounte
d to the floor.":ENDPROC
3950IF objno%=12 THEN PRINT "They're st
uck.":ENDPROC
3960IF objno%=3 THEN PRINT "Funny.":END
PROC
3970IF objno%=4 THEN PRINT FNss:ENDPROC
3980IF hf2%=1 AND INSTR(a$,"food")>0 PR
INT ics$:ENDPROC
3990IF invno%=invmax% THEN PRINT"You ca
rry too much already.":ENDPROC
4000objp%(objno%)=0
4010PRINT FNget
4020invno%=invno%+1
4030ENDPROC
4040
4050DEF PROCquest
4060PRINT "One at a time, please."
4070ENDPROC
4080
4090DEF PROCcd
4100IF cpos%=1 AND s%=TRUE PRINT '"You
forgot something."'ds$(1)'ds$(2):PROCsc
re:END
4110IF cpos%=2 AND gf3%=FALSE AND s%=T
RUE PRINT '"You forgot something."'ds$(1
)'ds$(2):PROCscre:PROCplayagain
4120IF cpos%>16 AND cpos%<22 AND s%=TR
UE PRINT '"You forgot something."'ds$(1)
'ds$(2):PROCscre:PROCplayagain
4130ENDPROC
4140
4150DEFPROCplayagain
4160INPUT'"Do you want to play again?"q
$
4170IF LEFT$(q$,1)="Y" OR LEFT$(q$,1)="
y" THEN RUN ELSE END
4180ENDPROC
4190
4200DEF FNcomno(b$)
4210cn%=0
4220FOR I%=1 TO numcom%
4230IF b$=LEFT$(com$(I%),LEN(b$)) THEN
cn%=I%
4240NEXT
4250IF LEFT$(a$,2)="n" THEN cn%=1
4260IF LEFT$(a$,2)="e" THEN cn%=2
4270IF LEFT$(a$,2)="w" THEN cn%=3
4280IF LEFT$(a$,2)="s" THEN cn%=4
4290IF LEFT$(a$,2)="u" THEN cn%=5
4300IF LEFT$(a$,2)="d" THEN cn%=6
4310=cn%
4320
4330DEF FNobjno(b$)
4340on%=0
4350FOR I%=1 TO numobj%
4360IF b$=LEFT$(object$(I%),LEN(b$)) on
%=I%
4370NEXT
4380=on%
4390
4400DEF FNcase(b$)
4410c$=""
4420FOR I%=1 TO LEN(b$)
4430B%=ASC(MID$(b$,I%,1))
4440IF B%>64 AND B%<91 THEN B%=B%+32
4450c$=c$+CHR$(B%)
4460NEXT
4470=c$
4480
4490DEF FNok
4500ON RND(3) GOTO 4510,4520,4530
4510="Ok."
4520="Everything you say."
4530="Right."
4540
4550DEF FNhuh
4560ON RND(5) GOTO 4570,4580,4590,4600,
4610
4570="What?"
4580="Rephrase that, please."
4590="I don't understand that word."
4600="Huh??"
4610="That word isn't in my vocabulary.
Try something else."
4620
4630DEF FNss
4640ON RND(3) GOTO 4650,4660,4670
4650="You can't be serious."
4660="Loonatic."
4670="Don't try to be funny. I mean, a
160 pound object??"
4680
4690DEF FNss1
4700="Don't be ridiculous."
4710
4720DEF FNget
4730ON RND(2) GOTO 4740,4750
4740="I have it now."
4750="Got it."
4760
4770DEF FNreply
4780ON RND(3) GOTO 4790,4800,4810
4790="Think for yourself."
4800="Do something useful."
4810="Not bloody likely."
4820
4830DEF FNhave
4840ON RND(3) GOTO 4850,4860,4870
4850="I can't see that here, or on your
person."
4860="I think there's some misunderstan
ding here."
4870="Where? What?"
4880
4890DEFPROCsetvar
4900REM IF M%<>9 THEN *SLOAD <Obey$Dir
>.Oldsprt
4910REM MODE 12
4920REM VDU 23,0,10,%1100000|
4930VDU 28,0,30,79,16
4940VDU 24,0;512;1279;1023;
4950REM *SCHOOSE TITLESPRITE
4960PLOT &ED,0,522
5020CLS
5030W=0
5040m%=0
5050locs%=21
5060numobj%=12
5070numcom%=42
5080DIM name$(locs%),pdir%(locs%,6)
5090DIM obj$(numobj%),object$(numobj%)
5100DIM com$(numcom%),objp%(numobj%)
5110DIM dir$(6),door$(5),lock$(2),ds$(2
)
5120invno%=0
5130score%=0
5140invmax%=6
5150cpos%=3
5160cf%=1
5170c1%=0
5180gf1%=TRUE
5190gf2%=TRUE
5200gf3%=TRUE
5210hf1%=TRUE
5220s%=TRUE
5230oxf%=0
5240hf2%=1
5250wf1%=1
5260waf%=1
5270pt%=1
5280ds$(1)="You try to breathe, but onl
y vacuum enters your lungs."
5290ds$(2)="It seems to me that you are
dead."
5300door$(1)="an electric door with a c
ard slot, to the"
5310door$(2)="the outer airlock door, t
o the"
5320door$(3)="the inner airlock door, t
o the"
5330door$(5)="a non-fuctional escape po
d door, to the west."
5340lock$(1)="The door is locked."
5350lock$(2)="The door to the escape po
d is barred somehow."
5360nw$="You can't go that way."
5370ics$="I can't see that here."
5380n$="Nothing."
5390M%=9
5400ENDPROC
5410
5420DATA "on the outside of Gullwing. T
his used to be a lifeboat bay,/though th
ere is no lifeboat here now."
5430DATA "in the only airlock the Gullw
ing has."
5440DATA "standing in the entrance hall
way of the Gullwing./To the south you se
e an airlock, and to the north there is
a junction."
5450DATA "at a junction in the middle o
f the ship."
5460DATA "in a small hall east of the j
unction. The crew's quarters are/to the
south, and you can also see an all-to fa
miliar locker to the east."
5470DATA "in the crew's recreation room
. Scarcly decorated as it is, it does no
t/appeal to you. However, through a port
hole, you can see a planet."
5480DATA "in the galley. This looks lik
e the most cramped place in the whole/sh
ip."
5490DATA "in an emormous locker. It loo
ks strangely familiar."
5500DATA "sitting inside an escape pod.
You have a great view at the stars/from
here."
5510DATA "in the forward-most part of a
long hallway. Further north there is/a
door marked 'Toolshop'. To the east ther
e is a lift."
5520DATA "inside a lift. It looks like
it has been used quite a few times."
5530DATA "in a small, dirty, and foul-s
melling chamber which looks like it/has
been used by four crew members."
5540DATA "standing in a toolshop. Like
the other places on the Gullwing, it is/
small, and contains little."
5550DATA "standing in a lift which show
s you the bridge to the west."
5560DATA "on the bridge. It looks like
hell here. The controls are all bent/or
otherwise damaged."
5570DATA "in the mainframe computer roo
m. A small humming escapes from/the mach
inery placed around the premises."
5580DATA "drifting aimlessly in space."
5590DATA "drifting aimlessly in space."
5600DATA "drifting aimlessly in space."
5610DATA "at the external emergency poi
nt, which actually is nothing more than/
a spot on the outside of the ship where
there is a hook."
5620DATA "drifting aimlessly in space."
5630DATA 0,17,2,0,0,0, 3,1,9,0,0,0, 4,0
,0,2,0,0, 10,5,6,3,0,0, 0,8,4,12,0,0
5640DATA 0,4,0,7,0,0, 6,0,0,0,0,0, 0,0,
5,0,0,0, 0,2,0,0,0,0, 13,11,0,4,0,0
5650DATA 0,0,10,0,14,0, 5,0,0,0,0,0, 0,
0,0,10,0,0, 0,0,15,0,0,11, 16,14,0,0,0,0
5660DATA 0,0,0,15,0,0, 18,17,1,17,17,17
, 18,19,18,18,18,18, 20,19,19,21,19,19
5670DATA 0,0,0,19,0,0, 21,21,17,21,21,2
1
5680DATA an access card,a laser powerto
rch,a red button,a food dispenser,a disk
ette,some food,a spacesuit,an oxygen tan
k,a big mainframe computer,a bottle of f
resh water,water,some damaged controls
5690DATA card,powertorch,button,dispens
er,diskette,food,spacesuit,oxygen,comput
er,bottle,water,controls
5700DATA north,east,west,south,up,down,
get,take,drop,open,close,hit,kill,push,i
nsert,pull,dig,light,turn,eat,drink,swal
low,enter,go,inventory,look,help,hint,qu
it,examine,read,climb,use,jump,load,save
,destroy,burn,incinerate,blast,wear,scor
e
5710DATA 20,13,9,7,6,7,8,12,16,7,-1,15
5720DATA north,east,west,south,up,down