home *** CD-ROM | disk | FTP | other *** search
- 1 rem cybermine adventure
- 2 rem by alan poole
- 3 gosub60000
- 10 gosub8000
- 97 rem
- 98 rem *** main loop ***
- 99 rem
- 100 gosub1000:gosub3000:gosub4000:gosub2000
- 110 goto100
- 997 rem
- 998 rem *** print description ***
- 999 rem
- 1000 print:print"[144]"
- 1010 m$="you are "+r$(r)+".":gosub2000
- 1020 ifrc>0thengosub1200
- 1030 print"";
- 1040 lm=4:f=0
- 1050 forl=1to29
- 1060 ifabs(n%(l))<>rthen1080
- 1070 iff=0thenm$="things you see:":gosub2000:f=1
- 1075 m$=n$(l):gosub2000
- 1080 next:lm=0
- 1090 return
- 1200 print
- 1210 ifrc=1thenm$="the robot is looking at you!":gosub2000
- 1220 ifrc=2thenm$="the robot is coming this way!":gosub2000
- 1230 ifrc=3thenm$="the robot is chasing you!":gosub2000
- 1240 ifrc=4thenm$="the robot got you!":gosub2000:goto4600
- 1250 return
- 1997 rem
- 1998 rem *** output subroutine ***
- 1999 rem
- 2000 ifm$=""thenreturn
- 2010 tt=lm:ifct=1thentt=tt+((ln-len(m$))/2)
- 2020 printspc(tt);:forll=1tolen(m$):tt$=mid$(m$,ll,1)
- 2030 iftt$=" "andll<len(m$)andpos(0)>ln-10thengosub2100
- 2040 printtt$;:next:ifcn=0thenprint
- 2050 return
- 2100 ff=0:tt=pos(0):iftt>lnthentt=tt-ln
- 2110 forlt=ll+1tolen(m$):ifmid$(m$,lt,1)=" "then2130
- 2120 iflt<len(m$)then2150
- 2130 iftt+lt-ll<lnthenff=1
- 2140 lt=255
- 2150 next:ifff=0thenprint:tt$=""
- 2160 return
- 2997 rem
- 2998 rem *** input command ***
- 2999 rem
- 3000 print""
- 3010 input"what now";c$
- 3020 ifc$=""then3010
- 3030 nw=1:forl=1to10:w$(l)="":next
- 3040 forl=1tolen(c$)
- 3050 ifmid$(c$,l,1)=" "andnw<10thennw=nw+1:goto3070
- 3060 w$(nw)=w$(nw)+mid$(c$,l,1)
- 3070 next
- 3080 v=0:v$="":n1=0:n1$="":n2=0:n2$=""
- 3090 forl=1tonw:sl=l:forl2=1to46
- 3100 ifv$(l2)=left$(w$(l),4)thenv=l2:v$=v$(l2):l=10:l2=46
- 3110 next:next
- 3120 ifv=0orsl=nwthenreturn
- 3130 forl=sl+1tonw:sl=l:forl2=1to29
- 3140 ifa$(l2)=left$(w$(l),4)thenn1=l2:n1$=a$(l2):l=10:l2=29
- 3150 next:next
- 3160 ifn1=0orsl=nwthenreturn
- 3170 forl=sl+1tonw:forl2=1to29
- 3180 ifa$(l2)=left$(w$(l),4)thenn2=l2:n2$=a$(l2):l=10:l2=29
- 3190 next:next
- 3200 return
- 3997 rem
- 3998 rem *** execute command ***
- 3999 rem
- 4000 print"";
- 4010 ifr>12andr<21andrnd(1)<.4andrc=0thenn%(11)=-r
- 4020 ifv=0thenm$=m1$:return
- 4030 ifv>12then4050
- 4040 onvgosub4100,4100,4100,4100,4100,4100,4100,4100,4100,4300,4400,4400
- 4045 goto4091
- 4050 ifv>24then4070
- 4060 onv-12gosub4400,4600,4700,4800,4900,5000,5100,5900,5300,5400,5500,5600
- 4065 goto4091
- 4070 ifv>36then4090
- 4080 onv-24gosub5700,5800,4100,4100,5900,5800,6200,6200,6300,4800,6500,6600
- 4085 goto4091
- 4090 onv-36gosub6700,6800,6900,4700,4100,5100,5800,4400,7000,5900
- 4091 ifrc>0orabs(n%(11))=rthenrc=rc+1:n%(11)=-r
- 4092 ifr=1thenn%(5)=-1
- 4093 ifr=2thenn%(5)=-2
- 4094 ifr=10thenn%(13)=-10
- 4095 ifr=9thenn%(13)=-9
- 4097 return
- 4098 rem
- 4099 rem go,run,enter,move
- 4100 ifv=27andr=20then6900
- 4105 d$=left$(n1$,1):ifv<9thend$=left$(v$,1)
- 4110 d=-1
- 4120 ifd$="n"thend=0
- 4130 ifd$="s"thend=1
- 4140 ifd$="e"thend=2
- 4150 ifd$="w"thend=3
- 4160 ifd=-1or(n1<26andn1>0)then4200
- 4170 ifc%(r,d)=0then4250
- 4180 r=c%(r,d):m$=m3$
- 4190 return
- 4200 ifr=2andn1=6thend=1:goto4170
- 4205 ifr=1andn1=1then6700
- 4210 ifr=3andn1=7then6300
- 4220 ifr=5andn1=9thend=2:goto4170
- 4230 ifr=7andn1=10thend=0:goto4170
- 4235 if(r=2orr=1)andn1=5then5000
- 4240 m$="i don't understand where you want to go.":return
- 4250 ifr=2andd=1thenm$="i don't see a door to enter the building.":return
- 4260 ifr=3andd=2thenm$="the water is in that direction.":return
- 4270 ifr=10andd=3thenm$="the wall is too high.":return
- 4280 m$="your path is blocked in that direction.":return
- 4298 rem
- 4299 rem inventory
- 4300 m$="you are carrying:":gosub2000
- 4310 f=0:lm=4:forl=1to29
- 4320 ifn%(l)=99thenm$=n$(l):gosub2000:f=1
- 4330 next:iff=0thenm$="nothing":gosub2000
- 4340 m$="":lm=0:return
- 4398 rem
- 4399 rem look,examine,see,search
- 4400 ifabs(n%(n1))<>randabs(n%(n1))<>99then4490
- 4410 ifn1<>1orn%(2)<>0then4420
- 4415 m$="there is a pillow and a blanket.":n%(2)=1:n%(25)=1:return
- 4420 ifn1=23andn%(4)=0thenm$="there's a slightly burned book.":n%(4)=22:return
- 4425 ifn1=3andn%(24)=0thenm$="a clock is here.":n%(24)=1:return
- 4428 ifn1=24thenm$="it's broken.":return
- 4430 ifn1=4thenm$="it's a journal with writing in it.":return
- 4440 ifn1=4then4900
- 4450 ifn1=6thenm$="there doesn't seem to be an entrance.":return
- 4460 ifn1<>14then4470
- 4465 ifps=0thenm$="there is an empty slot in the laser.":gosub2000
- 4468 m$="there's a switch on top of it":return
- 4470 ifn1=20thenm$="on the screen is the message 'enter password.'":return
- 4480 ifn1=5andr=2thenm$="there's a bedroom inside.":return
- 4482 ifn1=21andn%(22)=0thenm$="there's a sheet of paper.":n%(22)=11:return
- 4484 ifn1=22thenm$="there's writing on it.":return
- 4490 m$="you don't see anything special.":return
- 4598 rem
- 4599 rem quit
- 4600 print:print"[156]"
- 4610 m$="time you have been playing: "
- 4620 m$=m$+left$(ti$,2)+":"+mid$(ti$,3,2)+":"+right$(ti$,2)
- 4630 gosub2000:print
- 4640 m$="do you want to play again? (y or n)":gosub2000
- 4650 gett$:ift$="y"thenrun
- 4660 ift$="n"then63000
- 4670 goto4650
- 4698 rem
- 4699 rem get,take
- 4700 f=0:forl=1tonw:ifw$(l)="all"orleft$(w$(l),4)="ever"thenf=1
- 4710 next:iffthen4780
- 4715 ifn1=0thenm$=m1$:return
- 4720 ifabs(n%(n1))=99thenm$="you already have it!":return
- 4730 ifabs(n%(n1))<>rthenm$=m2$:return
- 4735 ifn1=11thenrc=4:goto1240
- 4740 ifn%(n1)>-1then4750
- 4742 t=rnd(1):ift<.33thenm$="you can't lift it!":return
- 4743 ift<.66thenm$="i don't think so.":return
- 4744 m$="don't be absurd!":return
- 4750 m$=m3$:n%(n1)=99
- 4760 return
- 4780 forl=1to27:ifabs(n%(l))<>rthen4790
- 4785 n1=l:gosub4720:m$=n$(l)+": "+m$:gosub2000
- 4790 next:m$="":return
- 4798 rem
- 4799 rem drop,lean
- 4800 ifn%(n1)<>99thenm$="you're not carrying it.":return
- 4810 m$=m3$:n%(n1)=r
- 4820 return
- 4898 rem
- 4899 rem read
- 4900 ifabs(n%(n1))<>randn%(n1)<>99thenm$=m2$:return
- 4910 ifn1=22thenm$="it says: the password is firmare.":return
- 4915 ifn1=20then4470
- 4920 ifn1=24then4428
- 4930 ifn1<>4thenm$="there's nothing to read.":return
- 4940 m$="journal of commander matthew s. haller":gosub2000
- 4950 print
- 4960 m$="65.073.21":gosub2000:cn=1
- 4970 m$="the robots have taken over the mine. they have already killed"
- 4980 m$=m$+" several of my men. the only way to stop them is by getting to the"
- 4985 m$=m$+" power generator, which is deep within the mine, and giving the"
- 4990 gosub2000:m$=" computer the password. the password is":gosub2000
- 4995 print:print:m$="the journal ends here.":cn=0:return
- 4998 rem
- 4999 rem climb
- 5000 ifabs(n%(n1))<>randn%(n1)<>99thenm$=m2$:return
- 5005 ifn1=12andn%(12)=99thenm$="you drop the ladder first.":gosub2000:n%(12)=r
- 5010 ifn1=12andr<>9andr<>10thenm$="ok, but you didn't get anywhere.":return
- 5020 ifn1=5andwb=0thenm$="it's shut.":return
- 5030 ifn1=5andr=2thenm$=m3$:r=1:return
- 5040 ifn1=5andr=1thenm$=m3$:r=2:return
- 5050 if(r<>9andr<>10)or(n1<>12andn1<>13)thenm$=m2$:return
- 5060 ifn%(12)<>rthenm$=m4$:return
- 5070 m$=m3$+" you climb on top of the wall, put the ladder on the other"
- 5080 m$=m$+" side and climb down."
- 5090 ifr=9thenr=10:n%(12)=10:return
- 5095 r=9:n%(12)=9:return
- 5098 rem
- 5099 rem kill
- 5100 ifn1=11andrc>0thenrc=4:goto1240
- 5110 m$="it's not alive!":return
- 5298 rem
- 5299 rem throw
- 5300 ifn%(n1)<>99thenm$="you don't have it.":return
- 5305 n%(n1)=r
- 5310 ifn1<>8orn2<>5orwb=1orr<>2then5320
- 5315 m$="smash! the window shatters.":n$(5)="broken window":wb=1:return
- 5320 ifn2=11andrc>0thenm$="it didn't hurt the robot.":return
- 5330 if(n2=18andr=20)or(n2=20andr=20)thenm$="it is unharmed.":return
- 5340 ifn2=19andr=9thenm$="the machines cannot be damaged.":return
- 5350 m$=m3$+" it drops to the ground.":return
- 5398 rem
- 5399 rem eat
- 5400 m$="don't be ridiculous!":return
- 5498 rem
- 5499 rem drink
- 5500 ifr=3orr=4thenm$="it's very refreshing!":return
- 5510 m$="i don't see how!":return
- 5598 rem
- 5599 rem open
- 5600 ifn1<>4thenm$="it won't open.":return
- 5610 m$=m3$:return
- 5698 rem
- 5699 rem close
- 5700 ifn1=4thenm$=m3$:return
- 5710 m$=m4$:return
- 5798 rem
- 5799 rem put,place,insert
- 5800 ifn1<>16or(n2<>14andn2<>17)then4800
- 5810 if(n%(16)<>99andn%(16)<>r)or(n%(14)<>99andn%(14)<>r)thenm$=m4$:return
- 5820 m$="the power pak is now in the laser.":ps=1:n%(16)=0:return
- 5898 rem
- 5899 rem break,smash,hit
- 5900 ifn1=5andn2=8andwb=0andr=2andn%(8)=99then5315
- 5910 ifabs(n%(n1))<>randn%(n1)<>99thenm$=m2$:return
- 5915 ifn1=11andrc>0andn2>0thenn2=n1:goto5320
- 5920 m$="ouch! you hurt your hand, but it didn't break."
- 5930 ifn1=11andrc>0thenrc=4:gosub2000:goto1240
- 5940 return
- 6198 rem
- 6199 rem shoot,fire
- 6200 ifn%(14)<>99thenm$="you don't have a gun.":return
- 6210 ifn1=14thent=n1:n1=n2:n2=t
- 6220 ifps=0orsf=0thenm$=m5$:return
- 6225 ifn1=0thenm$="you have to specify at what you want to shoot.":return
- 6230 ifrc=0orn1<>11thenm$="you fire the laser, but no damage is done.":return
- 6240 t=rnd(1):ift<.55thenm$="you destroyed the robot!":rc=0:n%(11)=0:return
- 6250 ift<.7thenm$="you missed!":return
- 6260 ift<.85thenm$="you just barely missed!":return
- 6270 m$="you only damaged the robot a little.":return
- 6298 rem
- 6299 rem swim
- 6300 ifr<>3then6310
- 6301 f=0:forl=1to29:ifn%(l)=99thenn%(l)=r:f=1
- 6302 next:iffthenm$="you drop everything you are carrying.":gosub2000
- 6304 m$=m3$:r=4:ifrc=0thenreturn
- 6305 m$=m$+" the robot follows you and is electrocuted."
- 6306 m$=m$+" it sinks to the bottom."
- 6307 rc=0:n%(11)=0:return
- 6310 ifr=4then4100
- 6320 m$="you're strange!":return
- 6498 rem
- 6499 rem flip
- 6500 ifn1<>15or(n%(14)<>99andn%(14)<>r)thenm$=m2$:return
- 6510 m$=m3$:ifsf=0thensf=1:return
- 6520 sf=0:return
- 6598 rem
- 6599 rem jump
- 6600 ifr=3then6300
- 6610 m$=m5$:return
- 6698 rem
- 6699 rem sleep
- 6700 m$="i'm not tired.":return
- 6798 rem
- 6799 rem pick
- 6800 f=0:forl=1tonw:ifw$(l)="up"thenf=1:l=nw
- 6810 next:iff=0thenm$=m2$:return
- 6820 goto4700
- 6898 rem
- 6899 rem type
- 6900 ifr<>20thenm$=m2$:return
- 6910 f=0:forl=1tonw:ifw$(l)="firmare"thenf=1:l=nw
- 6920 next
- 6930 iff=0thenm$="the computer responds: wrong password.":return
- 6950 print"[159]"
- 6960 m$="congratulations!":ct=1:gosub2000:ct=0:print
- 6970 m$="all power has been cut off and the killer robots have been stopped."
- 6980 gosub2000:m$="you win the game!":gosub2000
- 6990 goto4600
- 6998 rem
- 6999 rem follow
- 7000 ifr=6thenm$=m3$:r=7:return
- 7010 ifr=8thenm$=m3$:r=11:return
- 7020 m$=m2$:return
- 7997 rem
- 7998 rem *** initialization ***
- 7999 rem
- 8000 sys65517:ln=peek(781):ifln=22thenpoke36879,27
- 8010 ifln=40thenpoke53280,3:poke53281,1
- 8020 print"[147][156]";
- 8030 forl=1toln:print"[195]";:next
- 8040 m$="cybermine adventure":ct=1:gosub2000
- 8050 print:m$="by alan poole":gosub2000:ct=0
- 8060 forl=1toln:print"[195]";:next
- 8070 dimr$(22),n$(29),a$(29),v$(46),n%(29),c%(22,3)
- 8080 m1$="i don't understand.":m2$="you can't."
- 8090 m3$="ok.":m4$="how?"
- 8100 m5$="nothing happens."
- 8110 forl=1to22:readr$(l)
- 8120 forl2=0to3:readc%(l,l2)
- 8130 next:next
- 8135 r$(14)=r$(13):r$(15)=r$(13):r$(16)=r$(13):r$(17)=r$(13):r$(18)=r$(13)
- 8136 r$(19)=r$(13)
- 8140 forl=1to29:readn$(l),a$(l),n%(l)
- 8150 next
- 8160 forl=1to46:readv$(l)
- 8170 next
- 8180 ti$="000000"
- 8190 r=5
- 8200 print:print:return
- 8997 rem
- 8998 rem *** data ***
- 8999 rem
- 9000 datain the commander's apartment,0,0,0,0
- 9010 datain front of a building. to the west are some ruins,5,0,0,22
- 9020 dataon the west shore of a small lake,6,0,0,0
- 9030 dataswimming in the lake,4,4,4,3
- 9040 dataon top of a small hill. to the east is a trail. a path goes south
- 9045 data0,2,6,21
- 9050 dataon a north/south trail,7,3,0,5
- 9060 datanext to the entrance to a tunnel,8,6,0,0
- 9070 datain the tunnel,11,7,0,0
- 9080 datain the robot factory. there are large machines that make the robots
- 9090 data0,0,0,0
- 9100 datain front of a large wall built by the robots,0,0,11,0
- 9110 datain the main office,15,8,12,10
- 9120 datain the storage room,0,0,0,11
- 9130 datain the twisted tunnels of the mine,16,15,14,13
- 9140 data,17,18,17,13
- 9150 data,18,11,19,15
- 9160 data,18,13,20,15
- 9170 data,17,14,18,19
- 9180 data,17,15,19,17
- 9190 data,18,19,19,18
- 9200 datain the control room of the power generator,17,19,13,16
- 9204 dataat a dead end in the middle of some huge boulders,0,0,5,0
- 9206 dataat the ruins of a building,0,0,2,0
- 9210 databed,bed,-1,pillow,pill,0,table,tabl,-1
- 9220 dataslightly burned book,book,0,window,wind,-2,building,buil,-2
- 9230 datalake,lake,-3,rock,rock,21,trail,trai,-5
- 9240 datatunnel,tunn,-7,robot,robo,-7,ladder,ladd,12
- 9250 datawall,wall,-10,laser gun,lase,9,switch,swit,0
- 9260 datapower pak for laser,powe,15,slot,slot,0,power generator,gene,-20
- 9265 datalarge machines,mach,-9,computer terminal,comp,-20,desk,desk,-11
- 9270 datasheet of paper,pape,0,ruins,ruin,-22,clock,cloc,0,blanket,blan,0
- 9275 data,nort,0,,sout,0,,east,0,,west,0
- 9280 datanort,sout,east,west,n,s,e,w,go,inve,look,exam,see,quit,get,drop
- 9290 dataread,clim,kill,hit,thro,eat,drin,open,clos,put,ente,run,brea
- 9300 datainse,fire,shoo,swim,lean,flip,jump,slee,pick,type,take,move,atta
- 9310 dataplac,sear,foll,smas
- 60000 nm$="[193]lan [208]oole":pr$="[195]ybermine"
- 60005 deffncn(n)=int(19-n/2)
- 60010 t$=" ":c=0:c$="":print"[147]":poke53281,0
- 60015 printspc(7)""t$:printspc(7)" [146]"
- 60020 printtab(fncn(len(pr$)))"[145]"pr$
- 60025 printspc(7)""t$:print:printtab(18)"by"
- 60030 print:printspc(fncn(len(nm$)))"[158]"nm$""
- 60035 print:printspc(12)"[195]opyright 1986"
- 60040 print:print:print:print" [204][207][193][196][211][212][193][210] is not public domain."
- 60045 print:print" [208]lease respect the author's rights."
- 60050 print:print" [208]ress space bar to continue."
- 60055 forcc=1to48:getk$:ifk$=" "then60070
- 60060 ifcc=1thenprintmid$(c$,c+2,1)"[145][145]";:c=not(c)
- 60065 next:goto60050
- 60070 printc$chr$(142):return
- 63000 rem connect to l.s.
- 63010 load"hello connect",8
-