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 >
Commodore BASIC  |  2002-08-11  |  19KB  |  476 lines

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