home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
c64.rulez.org
/
2014.05.c64.rulez.org.tar
/
c64.rulez.org
/
pub
/
plus4
/
Games
/
c
/
Castle_Adventure.prg
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2002-08-11
|
19KB
|
476 lines
100 poke59468,12:printchr$(142)
102 print"[147] welcome to castle adventure"
104 print" by david malmberg"
106 print" based on the ideas, data structure"
108 print" and driver program of scott adams"
110 print"reading data tables -- just a moment"
112 rem
114 rem
115 rem
116 rem
118 rem
140 x=y=z:k=r=v:n=ll=f:tp$=k$:w=ip=p:gosub 2102:tq=0:td=0
141 forx=1tonl:ifnv$(x,0)="get"thentq=x
142 ifnv$(x,0)="dro"thentd=x
143 nextx
144 dim l1%(nl),u1%(nl)
145 forx=0tonl:l1%(x)=cl:u1%(x)=0:nextx
146 forx=0tocl:v=int(c0%(x)/150)
150 ifx>u1%(v)thenu1%(v)=x
152 ifx<l1%(v)thenl1%(v)=x
155 nextx
156 forx=0tonl:ifl1%(x)=clandu1%(x)=0thenu1%(x)=cl
157 nextx
170 print"[147]"
300 r=ar:lx=lt:df=0:sf=0
370 gosub550:goto440
380 print:print"what do you want to do? ";:ul=20
385 ul=20:us$="":print
386 gosub60000:tp$=ur$:if tp$="save game" thentp$="":goto388
387 if tp$="load game" or tp$="load"thentp$="":goto388
388 gosub450
390 if f thenprint"you[160]use[160]word(s) i don't[160]know!":goto380
400 gosub710:ifia(9)=-1thenlx=lx-1:goto420
410 goto440
420 iflx<0then print"light[160]has[160]run[160]out!":ia(9)=0:goto440
430 iflx<25thenprint"light[160]runs[160]out in";lx;"turns!"
440 nv(0)=0:gosub710:goto380
450 iflen(tp$)>1then469
451 iftp$="u"thentp$="go up":goto469
452 iftp$="d"thentp$="go down":goto469
453 iftp$="e"thentp$="go east":goto469
454 iftp$="w"thentp$="go west":goto469
455 iftp$="n"thentp$="go north":goto469
456 iftp$="s"thentp$="go south":goto469
457 iftp$="i"thentp$="inventory":goto469
458 iftp$="l"thentp$="look":goto469
459 iftp$="h"thentp$="help"
469 k=0:nt$(0)="":nt$(1)="":aa=0
470 forx=1tolen(tp$):k$=mid$(tp$,x,1):ifk$=" "thenk=1:goto480
475 nt$(k)=left$(nt$(k)+k$,ln)
480 nextx:forx=0to1:nv(x)=0:ifnt$(x)=""then540
490 fory=0tonl:k$=nv$(y,x):ifleft$(k$,1)="*"thenk$=mid$(k$,2)
500 ifx=1andy<7thenk$=left$(k$,ln)
510 ifnt$(x)=k$thennv(x)=y:goto530
520 nexty:goto540
530 ifleft$(nv$(nv(x),x),1)="*"thennv(x)=nv(x)-1:goto530
540 nextx:if(nv(0)=tqornv(0)=td)andnv(1)<1thenaa=1:f=0:return
545 f=nv(0)<1orlen(nt$(1))>0andnv(1)<1:return
550 ifdfthenifia(9)<>-1andia(9)<>rthenprint"it is too dark to see!":return
560 k=-1:ifleft$(rs$(r),1)="*"thenprintmid$(rs$(r),2);:goto580
570 print"you are[160]in[160]";rs$(r);
580 forz=0toil:ifkthenifia(z)=rthenprint:print"visible[160]items[160]here:":k=0
590 goto640
600 tp$=ia$(z):ifright$(tp$,1)<>"/"thenreturn
610 forw=len(tp$)-1to1step-1:ifmid$(tp$,w,1)="/"thentp$=left$(tp$,w-1):return
620 nextw
630 return
640 ifia(z)<>rthen670
650 gosub600:ifpos(0)+len(tp$)+3>39thenprint
660 printtp$;". ";
670 next:print
680 k=-1:forz=0to5:ifkthenifrm(r,z)<>0thenprint:print"obvious[160]exits: ":k=0
690 ifrm(r,z)<>0thenprintnv$(z+1,1);" ";
700 next:print:print:return
710 f2=-1:f=-1:f3=0:ifnv(0)=1andnv(1)<7then1190
711 l2=l1%(nv(0)):u2=u1%(nv(0))
720 ifnv(0)<>0then750
722 v=int(rnd(1)*100+1)
725 forx=l2tou2
730 ifv<=c0%(x)then800
740 nextx:return
750 ifaa=1thengosub1810:return
755 n=nv(1)+150*nv(0):v=150*nv(0):f4=0
757 ifnv(0)=tqornv(0)=tdthenf2=0
760 forx=l2tou2
765 ifn=c0%(x)orv=c0%(x)then800
770 nextx:goto1650
800 f4=1:f2=-1:f=0:f3=-1:fory=1to5:on y goto 810,820,830,840,850
810 w=c1%(x):goto860
820 w=c2%(x):goto860
830 w=c3%(x):goto860
840 w=c4%(x):goto860
850 w=c5%(x):goto860
860 ll=int(w/20):k=w-ll*20:f1=-1
870 onk+1goto1060,940,960,980,1000,1010,1020,1030,1040,1050,900,920
880 ifk<12then900
890 onk-11goto950,970,990
900 f1=-1:forz=0toil:ifia(z)=-1then1060
910 next:f1=0:goto1060
920 f1=0:forz=0toil:ifia(z)=-1then1060
930 next:f1=-1:goto1060
940 f1=ia(ll)=-1:goto1060
950 f1=ia(ll)<>-1andia(ll)<>r:goto1060
960 f1=ia(ll)=r:goto1060
970 f1=ia(ll)<>0:goto1060
980 f1=ia(ll)=r oria(ll)=-1:goto1060
990 f1=ia(ll)=0:goto1060
1000 f1=r=ll:goto1060
1010 f1=ia(ll)<>r:goto1060
1020 f1=ia(ll)<>-1:goto1060
1030 f1=r<>ll:goto1060
1040 f1=sfandint(2^ll+.5):f1=f1<>0:goto1060
1050 f1=sfandint(2^ll+.5):f1=f1=0
1060 f2=f2andf1:iff2thennexty:goto1080
1070 nextx:goto1650
1080 ip=0:fory=1to4:k=int((y-1)/2+6):onygoto1090,1100,1110,1120
1090 ac=int(c6%(x)/150):goto1130
1100 ac=c6%(x)-int(c6%(x)/150)*150:goto1130
1110 ac=int(c7%(x)/150):goto1130
1120 ac=c7%(x)-int(c7%(x)/150)*150
1130 ifac>101then1180
1140 ifac=0then1610
1150 ifac<52thenprintms$(ac):goto1610
1160 onac-51goto1290,1330,1340,1360,1370,1380,1390,1360,1410,1430,1440
1170 onac-62goto1450,1470,1480,1530,1570,1580,1590,1600,2021,1350
1180 printms$(ac-50):goto1610
1190 l=df:iflthenl=dfandia(9)<>r andia(9)<>-1:goto1210
1200 goto1220
1210 iflthenprint"dangerous[160]in[160]the[160]dark!"
1220 ifnv(1)<1thenprint"give[160]me[160]a[160]direction[160]too.":goto1690
1230 k=rm(r,nv(1)-1)
1240 ifk>=1then1270
1250 iflthenprint"you fell[160]down[160]and[160]broke[160]your[160]neck.":k=rl:df=0:goto1270
1260 print"you can't[160]go[160]in[160]that[160]direction!!":goto1690
1270 if not l thenprint"[147]"
1280 r=k:gosub550:goto1690
1290 l=0:forz=1toil:ifia(z)=-1thenl=l+1
1300 nextz
1310 ifl>=mxthenprint"you've[160]too[160]much[160]already!":goto1620
1320 gosub1700:ia(p)=-1:goto1610
1330 gosub1700:ia(p)=r:goto1610
1340 gosub1700:r=p:goto1610
1350 gosub1700:l=p:gosub1700:z=ia(p):ia(p)=ia(l):ia(l)=z:goto1610
1360 gosub1700:ia(p)=0:goto1610
1370 df=-1:goto1610
1380 df=0:goto1610
1390 gosub1700
1400 sf=int(.5+2^p)or sf:goto1610
1410 gosub1700
1420 sf=sf andnot int(.5+2^p):goto1610
1430 print"you're[160]dead...":r=rl:df=0:goto1470
1440 gosub1700:l=p:gosub1700:ia(l)=p:goto1610
1450 print"this[160]game[160]is[160]now[160]over. another[160]game";:ul=1:us$="yn":gosub60000
1451 ifur$="n"then print:print:print:print"ok, have a nice day!":end
1460 forx=0toil:ia(x)=i2(x):next:print"[147]":goto300
1470 gosub550:goto1610
1480 l=0:forz=1toil:ifia(z)=tr thenifleft$(ia$(z),1)="*"thenl=l+1
1490 nextz:print"you've stored";l;"treasures. on[160]a[160]scale"
1500 print"of 0 to 100 that[160]rates[160]a";int(l/tt*100)
1510 ifl=ttthenprint"well[160]done. ":goto1450
1520 goto1610
1530 print"you have:":k$="nothing":forz=0toil:ifia(z)<>-1then1560
1540 gosub600:iflen(tp$)+pos(0)>39thenprint
1550 print tp$;".",;:k$=""
1560 next:printk$:goto1610
1570 p=0:goto1400
1580 p=0:goto1420
1590 lx=lt:ia(9)=-1:goto1610
1600 print"[147]"
1610 nexty
1620 ifnv(0)<>0then1650
1630 nextx
1650 ifnv(0)=0then1690
1652 ifnv(0)<>tqandnv(0)<>tdandf4=0thenprint"i don't understand your command"
1655 iff2then1690
1656 ifnv(0)<>tqandnv(0)<>tdandnotf2thenprint"nothing happened":return
1660 ifnv(0)=tqthengosub1790
1665 ifnv(0)=tdthengosub1790
1675 iff=0then1690
1680 if not f2thenprint"you can't[160]do[160]that[160]yet."
1690 return
1700 ip=ip+1
1710 onipgoto1720,1730,1740,1750,1760
1720 w=c1%(x):goto1770
1730 w=c2%(x):goto1770
1740 w=c3%(x):goto1770
1750 w=c4%(x):goto1770
1760 w=c5%(x):goto1770
1770 p=int(w/20):m=w-p*20:ifm<>0then1700
1780 return
1790 ifnv(0)=0then2010
1800 ifnv(1)=0thenprint"what?":goto1950
1810 ifnv(0)<>tqthen1840
1820 l=0:forz=0toil:ifia(z)=-1thenl=l+1
1830 next:ifl>=mxthenprint"you've[160]too[160]much[160]already!":goto1950
1840 k=0:forx=0toil:ifright$(ia$(x),1)<>"/"then1960
1850 ll=len(ia$(x))-3:tp$=mid$(ia$(x),ll,3)
1880 iftp$<>nt$(1)then1960
1890 ifnv(0)=tqthen1920
1900 ifia(x)<>-1thenk=1:goto1960
1910 ia(x)=r:k=3:goto1940
1920 ifia(x)<>rthenk=2:goto1960
1930 ia(x)=-1:k=3
1940 print"ok, ":print
1950 f=0:return
1960 nextx
1970 ifk=1thenprint"you do not have it!"
1980 ifk=2thenprint"i don't[160]see[160]it[160]here."
1990 ifk=0andnv(1)=0thenprint"it's beyond your power to do that.":f=0
1995 ifk=0andnv(1)<>0thenf=1
2000 ifk<>0thenf=0
2010 return
2021 remprint"[147]"
2022 rem print"t[146]ape or d[146]isk d[157]";:ul=1:us$="td":gosub60000:k$=ur$
2023 remifk$<>"t"andk$<>"d"then2022
2024 remifk$="t"then2030
2025 remprint"drive 0[146] or 1[146] 1[157]";:ul=1:us$="01":gosub60000:k$=ur$
2026 remifk$<>"0"andk$<>"1"then2025
2027 remdn$=chr$(34)+k$+":"
2028 remprint"title *[157]";:ul=10:us$="abcdefghijklmnopqrstuvwxyz ":gosub60000
2029 remlt$=ur$:open1,8,1,dn$+lt$+",s,w":goto2050
2030 remprint"output tape ready to save game";:ul=1:us$="yn":gosub60000:k$=ur$
2035 remif k$ <>"y"then2030
2040 remopen1,1,1,"adventure game"
2050 remc$=chr$(13):print#1,sf;c$;lx;c$;df;c$;r;c$;
2060 remforw=0toil:print#1,ia(w);c$;
2070 rempoke59411,53:forz9=1to10:nextz9:poke59411,61
2080 remnextw:close1
2081 goto1610
2102 readtl$
2108 readil,cl,nl,rl,mx,ar,tt,ln,lt,ml,tr
2109 cc=cl+3:nn=nl+12
2110 dimnv(1),c0%(cc),c1%(cc),c2%(cc),c3%(cc),c4%(cc),c5%(cc),c6%(cc),c7%(cc)
2120 dim nv$(nn,1),ia$(il),ia(il),rs$(rl),rm(rl,5),ms$(ml),nt$(1),i2(il)
2130 forx=0toclstep2:y=x+1
2140 readc0%(x),c1%(x),c2%(x),c3%(x),c4%(x),c5%(x),c6%(x),c7%(x)
2150 readc0%(y),c1%(y),c2%(y),c3%(y),c4%(y),c5%(y),c6%(y),c7%(y)
2155 nextx
2160 forx=0tonlstep5
2170 readnv$(x+0,0),nv$(x+0,1)
2171 readnv$(x+1,0),nv$(x+1,1)
2172 readnv$(x+2,0),nv$(x+2,1)
2173 readnv$(x+3,0),nv$(x+3,1)
2174 readnv$(x+4,0),nv$(x+4,1)
2180 nextx
2190 forx=0torl:readrm(x,0),rm(x,1),rm(x,2),rm(x,3),rm(x,4),rm(x,5),rs$(x)
2195 nextx
2200 forx=0toml:readms$(x):nextx
2210 forx=0toil:readia$(x),ia(x):i2(x)=ia(x)
2220 nextx:ms$(69)=ms$(69)+" with your head!":return
3000 datacastle,65,171,55,42,5,1,11,3,100,73,12
3010 data5,281,280,0,0,0,6655,0,8,883,0,0,0,0,16076,0
3020 data20,883,564,0,0,0,16108,16200,25,484,265,260,0,0,7983,0
3030 data25,344,265,260,0,0,7983,0,40,902,1032,0,0,0,10613,9150
3040 data40,224,262,280,20,200,6352,8754,50,784,265,1165,260,0,7983,0
3050 data50,584,905,900,0,0,8065,0,50,1183,0,0,0,0,17400,0
3060 data50,264,322,0,0,0,10501,5761,100,264,134,120,140,0,10800,0
3070 data100,124,0,0,0,0,8550,0,100,264,121,120,140,0,10800,0
3080 data100,883,324,0,0,0,16162,0,100,28,660,200,20,0,9364,9960
3090 data100,664,0,0,0,0,9813,0,100,264,181,180,40,0,10800,0
3100 data100,883,624,0,0,0,16159,0,100,883,804,0,0,0,16160,0
3110 data100,262,581,260,220,0,6812,0,150,281,0,0,0,0,1243,0
3120 data161,224,722,620,0,0,8170,9600,161,824,1222,780,0,0,8170,9600
3130 data161,1062,800,0,0,0,8170,9600,168,682,440,0,0,0,8170,9600
3140 data170,44,60,0,0,0,8170,9600,170,24,60,0,0,0,8170,9600
3150 data171,104,240,0,0,0,8170,9600,172,104,120,0,0,0,8170,9600
3160 data172,124,140,0,0,0,8454,10564,173,284,260,0,0,0,8170,9600
3170 data173,84,260,0,0,0,8170,9600,174,562,300,0,0,0,8170,9600
3180 data174,662,304,280,660,280,8162,10564,174,662,284,300,660,300,8162,10564
3190 data174,662,224,200,660,200,8162,10564,174,761,0,0,0,0,1200,0
3200 data174,662,204,220,660,220,8162,10564,174,63,0,0,0,0,4500,0
3210 data176,462,800,0,0,0,8170,9600,177,204,0,0,0,0,5100,0
3220 data179,204,0,0,0,0,5100,0,179,284,0,0,0,0,5100,0
3230 data185,302,84,300,380,380,9354,10564,185,302,384,300,80,80,9354,10564
3240 data185,222,0,0,0,0,1200,0,193,842,560,0,0,0,8170,9600
3250 data201,0,0,0,0,0,1200,0,1050,604,0,0,0,0,900,0
3260 data1050,724,0,0,0,0,900,0,1050,280,0,0,0,0,7806,9900
3270 data1200,262,0,0,0,0,3750,0,1200,281,0,0,0,0,1243,0
3280 data1213,1162,1054,1040,0,0,7815,0,1215,0,0,0,0,0,9900,0
3290 data1216,0,0,0,0,0,3323,0,1223,84,0,0,0,0,1211,0
3300 data1224,662,660,60,0,0,8302,2250,1230,462,634,620,0,0,2452,0
3310 data1230,484,442,440,460,600,10852,150,1242,704,963,960,520,0,9402,0
3320 data1246,544,880,0,0,0,7907,16200,1248,1062,1060,1080,1000,0,10852,17100
3330 data1249,0,0,0,0,0,10618,9150,1818,682,141,0,0,0,4650,0
3340 data1808,43,141,0,0,0,1231,0,1808,43,132,0,0,0,1246,0
3350 data1808,43,123,40,180,0,4872,10350,1810,183,40,180,0,0,2322,0
3360 data1818,682,132,0,0,0,1246,0,1818,682,121,680,700,0,10870,9620
3370 data1800,0,0,0,0,0,3600,0,2428,84,381,400,320,380,10855,2250
3380 data2437,281,0,0,0,0,3324,3450,2439,503,500,0,0,0,8373,1800
3390 data3174,204,61,60,660,0,4405,7950,3174,63,724,60,0,0,8352,15450
3400 data3174,284,61,60,660,0,4405,7950,3174,63,604,60,0,0,8352,15450
3410 data3174,63,60,0,0,0,2303,0,3178,84,381,400,320,380,10855,2250
3420 data3181,526,0,0,0,0,1350,0,3181,521,265,520,0,0,2303,0
3430 data3181,521,262,520,0,0,18053,0,3191,983,724,980,0,0,8352,15450
3440 data3191,604,920,0,0,0,8352,15450,3300,0,0,0,0,0,9813,0
3450 data3499,0,0,0,0,0,17550,0,3462,0,0,0,0,0,9750,0
3460 data3468,0,0,0,0,0,764,0,3469,0,0,0,0,0,763,0
3470 data3471,0,0,0,0,0,764,0,3472,0,0,0,0,0,764,0
3480 data3476,0,0,0,0,0,764,0,3480,0,0,0,0,0,871,0
3490 data3484,0,0,0,0,0,871,0,3492,0,0,0,0,0,763,0
3500 data3450,0,0,0,0,0,10564,0,3900,0,0,0,0,0,9750,0
3510 data4050,0,0,0,0,0,9900,0,4207,0,0,0,0,0,10650,0
3520 data4350,262,0,0,0,0,3750,0,4361,1082,1052,0,0,0,1203,0
3530 data4361,224,265,641,720,240,10815,600,4361,224,265,646,0,0,450,0
3540 data4361,1082,1043,1060,1080,0,10815,600,4361,1041,1220,1100,820,0,10854
3560 data10564,4361,824,1046,0,0,0,1203,0,4369,161,134,120,0,0,7985,0
3570 data4369,161,133,0,0,0,1500,0,4369,161,154,140,0,0,7985,0
3580 data4380,0,0,0,0,0,2250,0,4392,0,0,0,0,0,10619,9150
3590 data4393,822,820,840,0,0,10815,600,4525,784,1160,260,0,0,10849,7650
3600 data4525,262,820,0,0,0,8149,7500,4500,0,0,0,0,0,3600,0
3610 data4963,1162,1040,0,0,0,2302,0,4962,0,0,0,0,0,9750,0
3620 data4963,1174,0,0,0,0,5400,0,4950,0,0,0,0,0,2700,0
3630 data5111,1062,1043,1060,1080,0,10815,450,5111,824,1041,1220,1100,0,10815
3650 data450,5250,84,0,0,0,0,5850,0,5250,404,0,0,0,0,5400,0
3660 data5250,724,49,40,0,0,8805,0,5250,764,0,0,0,0,1050,0
3670 data5250,604,49,40,0,0,8805,0,5250,484,0,0,0,0,6150,0
3680 data5250,464,0,0,0,0,6150,0,5250,262,0,0,0,0,15600,0
3690 data5250,744,0,0,0,0,1050,0,5250,281,0,0,0,0,7050,0
3700 data5250,48,40,0,0,0,9106,0,5250,0,0,0,0,0,5550,0
3710 data5400,0,0,0,0,0,2850,0,5550,0,0,0,0,0,3150,0
3720 data5708,183,40,180,0,0,2322,0,5711,1082,1052,0,0,0,1246,0
3730 data5711,1082,1043,1060,1080,0,10815,600,5711,224,265,646,0,0,450,0
3740 data5711,824,1046,0,0,0,1246,0,5711,1041,1220,1100,820,0,10854,10564
3750 data5718,702,0,0,0,0,1322,0,5850,483,480,0,0,0,3055,0
3760 data5888,483,480,0,0,0,8265,3000,6000,503,500,0,0,0,3055,0
3770 data6023,0,0,0,0,0,900,0,6039,503,500,0,0,0,2270,0
3780 data6161,824,521,1100,1220,0,10815,6064,6161,824,526,0,0,0,1246,0
3790 data6450,84,260,0,0,0,8170,9600,6450,284,260,0,0,0,8170,9600
3800 data6632,422,654,640,0,0,7965,150,6770,521,24,0,0,0,6000,0
3810 data6770,521,44,0,0,0,6000,0,6770,526,0,0,0,0,1246,0
3820 data6774,562,521,560,300,220,10840,8250,7080,621,0,0,0,0,4200,0
3830 data7080,601,753,0,0,0,7200,0,7080,601,754,740,0,0,5303,0
3840 data7084,464,0,0,0,0,3927,0,7236,763,760,0,0,0,7815,0
3850 data7536,761,760,0,0,0,7965,0,7650,824,780,0,0,0,8170,9600
3860 data7650,744,760,0,0,0,8170,9600,7650,764,740,0,0,0,8170,9600
3870 data7845,1183,1180,1200,0,0,10820,9666,7840,1203,0,0,0,0,3000,0
3880 data7800,0,0,0,0,0,3600,0,8260,702,0,0,0,0,1322,0
3890 dataaut,any,go,north,*ent,south,*run,east,*wal,west
3900 data*cli,up,*cra,down,jum,gam,get,tor,*tak,*on
3910 data*pic,off,*cat,doo,lig,sco,*tur,key,*tor,hel
3920 data*bur,inv,dro,sig,*rel,aro,*spi,fir,*lea,kna
3930 data*giv,tre,thr,hil,qui,cav,loo,wat,*sho,rop
3940 data*see,gua,sco,pas,inv,ope,sav,pil,ope,wal
3950 dataatt,boo,*kil,axe,*fig,pia,fin,*mus,loc,gra
3960 datahel,dra,say,hor,sto,arm,unl,foo,eat,win
3970 datadri,pri,bre,lad,*sma,che,swi,cof,pla,*sta
3980 datacut,toa,*cho,sku,rea,bat,rid,bar,*mou,cob
3990 datadis,*web,iva,led,kis,"",*lov,"",*fuc,""
4000 datafir,"","","","","","","","",""
4010 data0,0,0,0,0,0,""
4020 data1,4,1,2,0,0,a thick woods
4030 data2,4,1,5,0,0,a dark forest
4040 data0,0,0,0,0,1,*you are on a branch near the top of a tree
4050 data1,0,0,0,0,0,*you are by the water's edge of the moat
4060 data0,0,2,0,0,0,a clearing by the side of a small hill
4070 data0,0,5,0,0,0,*you are by the entrance to a cave
4080 data0,7,6,8,7,0,a large cavern with tunnels going off in all directions
4090 data8,8,7,8,9,8,a small cavern with many openings leading from it
4100 data8,8,8,10,9,8,a low passage-way
4110 data0,0,9,0,0,0,a large cavern with high sheer walls
4120 data0,0,0,0,0,0,a small room carved into the cave wall
4130 data2,1,0,0,0,5
4140 data*you are on the top of a small hill--the castle is south
4150 data4,14,0,0,0,0,the water--it is icy cold
4160 data13,0,0,0,0,0,*you are by the outer castle walls
4170 data0,0,18,0,16,0,*you are on a catwalk near the west tower
4180 data0,0,0,17,0,15,a small chamber in the west tower
4190 data0,0,16,0,0,0,the guards' quarters
4200 data0,0,20,15,0,19,the west end of a great hall
4210 data23,0,0,0,18,0,the castle courtyard
4220 data21,0,0,18,24,0,the east end of the great hall
4230 data0,20,0,19,0,0,the kitchen
4240 data18,0,0,0,0,25,a secret passage behind the fireplace
4250 data0,19,0,0,0,0,the castle's stables
4260 data0,0,0,0,26,20,the baron's private chambers
4270 data0,0,0,0,22,27,a long low tunnel sloping downward
4280 data0,0,0,0,0,24,the turret room of the east tower
4290 data0,0,0,0,25,0,the baron's family crypt
4300 data0,0,29,0,27,0,a cavern with iridescent glowing walls
4310 data0,30,0,28,0,0,an odd-shaped room with a strange smell
4320 data29,0,0,0,0,0
4330 data*you are on a ledge on the north side of a deep and wide chasm
4340 data32,11,0,34,0,0,the east end of a large cavern
4350 data33,31,0,0,0,35,*you are at a cross-roads in a long tunnel
4360 data0,0,0,0,0,0,*you are lost in the pet roms
4370 data35,0,31,0,0,0,the west end of a large cavern
4380 data0,34,36,0,32,0,the baron's secret stronghold
4390 data0,0,0,35,0,0
4400 data*you are on a ledge on the south side of a deep and wide chasm
4410 data0,0,0,0,0,0,the baron's treasure room
4420 data38,39,0,0,38,39,a twisting tunnel in the dungeon
4430 data38,39,0,0,38,39,a long passage-way with rows of cells
4440 data0,0,37,24,0,0,a secret passageway
4450 data0,0,0,0,0,0,a dungeon cell
4460 data33,3,33,33,33,12,*pick a direction and you might return tolife
4470 data"",there's a strange sound,nothing happens,it's locked,it's open
4480 datathere's something there-maybe you should
4500 datathat's not very safe,you may need magic here,sorry...you can't
4510 datayou don't have it,it's empty,you have no container
4530 datawhat a waste...,open it?,go there?,ok...,you found something!
4540 datayou didn't find anything
4560 datayou don't see it here,use one word,oh...that feels good!
4570 datato stop game say quit,a voice booms out...,leave it alone!
4590 datadon't be silly!,the guard won't let you!,the baron sucks eggs!
4600 dataread scott for magic word,ivanhoe!
4610 datathe hook catches and the rope hangs down
4630 datayou have to throw it first!,the matches are too wet,it is blazing
4640 dataan angry-looking guard appears,it's too high and steep
4650 datasomething fell out
4660 datatry the piano,be adventerous!,you made a tasty meal!
4670 datayou need some exercise,crash...it's down!,reading improves the mind
4690 datathe guard throws you over the edge,with a broken arm
4700 datayour arm has healed,the guard mistakes you for the baron andleaves
4710 datayou don't have the necessary resources,time heals all things
4730 datatry another book,it was a fierce fight,but you lost
4740 databut you finally won,it disappears,into the chasm
4760 dataleave peacefully!,throw something,sorry about that
4770 datathe skull speaks---,beware the vampire,beware the chest
4790 databeware the gold bars,you just lost your cursor and the game is over
4800 dataleave the guard in his quarters,the bat just bite you
4810 datathe door slams shut!,you hear the flap of wings
4830 datathe toad says--rib-bit!
4840 datayou see a poisonous spider crawling toward you
4850 datayou were just bitten by a poisonous spider
4860 datathe baron suddenly appears with a large sword and it's off
4870 datait missed!,read it?,you have no water,the bottle shatters!
4900 datatrees,1,trees,2,unlite torch/tor/,6
4910 datarope with grappling hook on end/rop/,9,cave in the side of the hill,5
4920 datasign saying--no swimming--danger!,4,matches/mat/,0,soggy matches/mat/
4930 data18,knapsack/kna/,-1,blazing torch/tor/,0,the castle across the water,4
4940 datathe drawbridge is up,4,a heavy oak door,11,an angry-looking guard,11
4950 dataa broken arm,0,the drawbridge is down,0
4960 dataa school of man-eating piranha,13
4970 datasign -- leave treasure here--say 'score',12
4980 dataopening in the wall--high up near the top of the cavern,10
4990 data*magic sleeping pills*/pil/,12,a school of sleepy piranha,0
5000 dataa grand piano,20,a bookcase filled with classics,24
5010 dataa secret passage behind the bookcase,0,food/foo/,21,wine/win/,21
5020 dataa battle axe/axe/,17,graffiti on the walls,23
5030 dataa thick rope holding the drawbridge up,19,*silver suit of armor*/arm/
5040 data24,a book of horror stories/boo/,0,*rare 1st edition of scott*/boo/,0
5050 datasome piano keys/key/,0,a rope hanging down,0,a fireplace,18
5060 dataa fireplace with a blazing fire,0,an open door,0
5070 data*a large diamond*/dia/,0,*the baron's best horse*/hor/,23,muddy water
5080 data4,*jeweled urn*/urn/,27,coffin,27,an open coffin with stairs inside,0
5090 databones/bon/,27,skull/sku/,27,a vampire bat,0,*bag of rubies*/rub/,29
5100 datasign--danger--go back!,32,*treasure chest*/che/,35,a long ladder/lad/
5110 data36,*gold bars*/bar/,37,*silver cross*/cro/,37,guard's keys/key/,0
5120 dataan open doorway,37,a locked steel door,0,a locked oak door,41
5130 dataanother ledge on the north side,36,a narrow ledge on the other side
5140 data30,an unconscious guard,0,a horny toad/toa/,41
5150 data*beautiful princess*/pri/,0,an open doorway,0,the castle to the south
5160 data3,cobwebs,27,cobwebs,35,cobwebs,38
60000 rem input string
60005 ur$="":ui$="":poke204,0:print"?";
60010 getui$
60011 if ui$="_" and rm = 1 then ur$ = "_":print" ":rm=0:poke204,1:return
60012 if ui$=chr$(13) and len(ur$)>0 then print" ":poke204,1:return
60013 if ui$= chr$(20) and len(ur$)>0 then 60100
60015 if len(ur$) = ul then 60010
60016 if us$ = "" then60020
60017 for us = 1 to len (us$)
60018 ifui$=mid$(us$,us,1)then60060
60019 next us:goto60010
60020 if ui$=chr$(32)then 60060
60030 if ui$>chr$(32) and ui$ < chr$(91)then 60060
60055 goto60010
60060 ur$ = ur$ + ui$
60080 print ui$;
60090 goto60010
60100 print" [157][157] [157]";
60112 if len (ur$) = 1 then ur$ = "" : goto 60010
60115 ur$ = left$(ur$,len(ur$)-1)
60120 goto60010
60160 rem