home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 193 / 193.d81 / 3 (.txt) < prev    next >
Encoding:
Commodore BASIC  |  2000-01-01  |  30.6 KB  |  1,090 lines

  1. 10 poke816,165:poke817,244:dv=peek(186):if gg=1 then22
  2. 11 if gg=2 then24
  3. 12 if gg=3 then26
  4. 13 if gg=4 then28
  5. 14 if gg=5 then30
  6. 16 if gg=6 then60
  7. 20 gg=1:load"mainspr",dv,1
  8. 22 gg=2:load"pbchar4",dv,1
  9. 24 gg=3:load"telscr2",dv,1
  10. 26 gg=4:load"fastcol",dv,1
  11. 28 gg=5:load"spr7",dv,1
  12. 30 gg=6:load"4spr",dv,1
  13. 59 rem
  14. 60 poke53281,0:poke53280,0:xx=110:yy=129:gosub60000:gosub51000:rn=rnd(-ti)
  15. 61 poke774,226:tx=50176+411:v=53248:pokev+16,0:ms=0
  16. 62 gl=250:cl=14:cm=12:hp=250:ws=5:ap=0
  17. 63 cy=0:qs=0:qc=0:qh=0:qr=0:qf=0:qm=0:qt=0:qb=0:kf=0:kb=0:dx=0:dy=0:qp=0:pu=0
  18. 64 tp=0:fd=20:re=0:rw=0:rf=0:ra=0:sz=0:sd=0:tm=800:ox=0:gosub3500:pokev+21,1
  19. 65 poke53270,peek(53270)or16
  20. 66 poke53282,5:poke53283,12:poke53210,14:sys53200
  21. 67 sa=35072:dg=0: ea=sa+999:ns=50176:gosub55010
  22. 68 print"[159]";:goto200
  23. 69 end
  24. 70 poke781,py:poke782,px:poke783,0:sys65520:return
  25. 72 poke53270,peek(53270)and239:end
  26. 74 poke198,0:wait198,1:geta$:return
  27. 75 remgl*
  28. 76 gl=gl-ct:ifgl<0thengl=gl+ct:goto78
  29. 77 print:print:print"ok !":gosub98:ng=0:return
  30. 78 print:print:print"not enough gold !!":gosub98:ng=1:return
  31. 82 sc=50176:k=sc+41:forp=ktok+37:pokep,zb:next
  32. 83 k=sc+81:forp=1to21:pokek,zb:pokek+37,zb:k=k+40:next
  33. 84 k=sc+921:forp=ktok+37:pokep,zb:next:return
  34. 86 rem
  35. 87 poke781,zy:poke782,zx:poke783,0:sys65520
  36. 88 fork=1tozl:printzc$;:next:return
  37. 92 fork=1tozl:poke781,zy:poke782,zx:poke783,0:sys65520
  38. 93 printzc$:zy=zy+1:next:return
  39. 96 rn=int(rnd(1)*rh+1):return
  40. 98 fork=1totm:next:return
  41. 100 poke53265,peek(53265)and239:return   :remoff
  42. 102 poke53265,peek(53265)or16:return:remon
  43. 103 rem*svdng
  44. 200 js=peek(56320):ss=tx-50176
  45. 201 iftp=1thentp=0:goto20800
  46. 204 ifap>20then20000
  47. 206 ifpeek(197)=60thengosub3000:goto20730
  48. 208 ifpeek(197)=17then293
  49. 240 if js=126thenap=ap+1:goto300:remu
  50. 250 if js=125thenap=ap+1:goto400:remd
  51. 260 if js=119thenap=ap+1:goto500:remr
  52. 270 if js=123thenap=ap+1:goto600:reml
  53. 280 if js=111thenap=ap+1:goto700:remf
  54. 290 goto200
  55. 292 rem
  56. 293 ifdg>5then200:remsxt
  57. 294 ifsz=0then200
  58. 295 ss=tx-50176:sy=int(ss/40):sx=ss-(sy*40):py=24:px=2:gosub70:print"[159]";
  59. 296 print"           ";:gosub70:print"x=";:printsx;:print" y=";:printsy;
  60. 297 gosub98:gosub98:gosub70:print"              ";:goto200
  61. 300 ifpeek(tx-40)<64anddg<5then303
  62. 301 ifpeek(tx-40)=80then303
  63. 302 goto200
  64. 303 forp=1to2
  65. 304 au=au+1:ifau=4thenau=0
  66. 305 sa=49408+(au*64):ea=sa+63:ns=49152:gosub55010
  67. 315 poke53249,peek(53249)-4:next:tx=tx-40:ifpeek(53249)=65then1000
  68. 350 goto200
  69. 400 ifpeek(tx+40)<64anddg<5then403
  70. 401 ifpeek(tx+40)=80then403
  71. 402 goto200
  72. 403 forp=1to2
  73. 404 ad=ad+1:ifad=4thenad=0
  74. 405 sa=49664+(ad*64):ea=sa+63:ns=49152:gosub55010
  75. 415 poke53249,peek(53249)+4:next:tx=tx+40:ifpeek(53249)=225then1200
  76. 450 goto200
  77. 500 ifpeek(tx)=80andpeek(tx+41)<>102then200
  78. 502 ifpeek(tx+1)<64then505
  79. 503 ifpeek(tx+1)=80then505
  80. 504 goto200
  81. 505 ifpeek(53248)=254then563
  82. 506 forp=1to2
  83. 507 ar=ar+1:ifar=4thenar=0
  84. 508 sa=49408+(ar*64):ea=sa+63:ns=49152:gosub55010
  85. 515 poke53248,peek(53248)+4:next:tx=tx+1
  86. 550 goto200
  87. 563 ar=ar+1:ifar=4thenar=0
  88. 565 sa=49408+(ar*64):ea=sa+63:ns=49152:gosub55010
  89. 570 pokev+16,1:ms=1:poke53248,2
  90. 573 ar=ar+1:ifar=4thenar=0
  91. 575 sa=49408+(ar*64):ea=sa+63:ns=832:gosub55010
  92. 576 poke53248,6:tx=tx+1
  93. 580 goto200
  94. 600 ifpeek(tx)=80andpeek(tx+41)<>102then200
  95. 602 ifpeek(tx-1)<64then605
  96. 603 ifpeek(tx-1)=80then605
  97. 604 goto200
  98. 605 ifms=1andpeek(53248)=6then670
  99. 606 forp=1to2
  100. 607 al=al+1:ifal=4thenal=0
  101. 608 sa=49664+(al*64):ea=sa+63:ns=49152:gosub55010
  102. 615 poke53248,peek(53248)-4:next:tx=tx-1
  103. 650 goto200
  104. 670 poke53248,2
  105. 673 al=al+1:ifal=4thenal=0
  106. 675 sa=49664+(al*64):ea=sa+63:ns=49152:gosub55010
  107. 676 pokev+16,0:ms=0:poke53248,254:tx=tx-1
  108. 680 goto200
  109. 684 py=24:px=1:gosub70:print"[159]";
  110. 686 ifdg=11thenprint"the rune of air !";:poketx,32:ra=1:goto692
  111. 687 ifdg=21thenprint"a ferry pass & 10 gems !";:poketx,32:gm=gm+10:fp=1:goto692
  112. 688 ifdg=41thenprint"the rune of water !";:poketx,32:rw=1:goto692
  113. 690 ifdg=32thenprint"the rune of fire !";:poketx,32:rf=1:goto692
  114. 692 fork=1to1000:next:gosub70:print"                          ";:goto200
  115. 700 ifpeek(tx)=63then684
  116. 701 rem
  117. 702 rem
  118. 710 py=24:px=1:gosub70:print"[159]";
  119. 711 ifpeek(tx)=62thenrh=60:gosub96:gl=gl+rn+1:printrn+1;:print" gold";:goto728
  120. 712 ifpeek(tx)=60thenrh=9:gosub96:fd=fd+rn+1:printrn+1;:print" food";:goto728
  121. 713 ifpeek(tx)=27thenrh=9:gosub96:cy=cy+rn+1:printrn+1;:print" crystals";:goto728
  122. 714 ifpeek(tx)=28then:hb=hb+1:print" herbs";:goto728
  123. 715 ifpeek(tx)=29thengm=gm+2:print" 2 gems";:goto728
  124. 720 goto730
  125. 728 poketx,32:gosub98:py=24:px=1:gosub70:fork=1to30:print" ";:next:goto200
  126. 730 ifdg=0then740
  127. 731 ifdg=1then760
  128. 732 ifdg=2then780
  129. 733 ifdg=3then800
  130. 734 ifdg=4then820
  131. 736 goto200
  132. 740 iftx=50505then2300
  133. 742 iftx=50367then900
  134. 744 iftx=50866then8100
  135. 750 goto200
  136. 760 iftx=50730then2000
  137. 762 iftx=50862then850
  138. 764 iftx=50383then8300
  139. 770 goto200
  140. 780 rem
  141. 782 iftx=50822then850
  142. 784 iftx=50554then8700
  143. 786 goto200
  144. 800 iftx=50340then2500
  145. 802 iftx=50900then850
  146. 804 iftx=50409then2200
  147. 806 goto200
  148. 820 iftx=50888then850
  149. 822 iftx=50427then8500
  150. 824 iftx=50370then2100
  151. 826 goto200
  152. 850 v=53248:pokev+21,0:print"[147]":print"[159]":printtab(10)"telnyr ferry service"
  153. 852 print:print:print"a  return to telnyr"
  154. 854 print:print"b  exit ferry"
  155. 856 gosub74
  156. 870 ifa$="a"thendg=0:sa=35072:ms=1:xx=14:yy=89:tx=50407:cl=14:cm=12:goto940
  157. 872 ifa$="b"then876
  158. 874 goto856
  159. 876 sa=35072+(dg*1024):ea=sa+999:ns=50176:gosub55010
  160. 878 poke53269,1:poke53210,cl:sys53200:goto200
  161. 900 v=53248:pokev+21,0:ng=0:print"[147][159]":printtab(9)"-telnyr ferry service-"
  162. 901 ng=0:print:print"[158]       price includes return trip"
  163. 902 print:print"":print"a- forest isle    50  gold"
  164. 903 print:print"b- tropicania     50  gold"
  165. 904 print:print"c- lamentia       100 gold"
  166. 905 print:print"d- devils peaks   400 gold"
  167. 906 print:print"[159]":print"x  exit ferry     (space- inventory)":gosub954
  168. 907 gosub74
  169. 908 ifa$="a"thenct=50:gosub952:goto916
  170. 909 ifa$="b"thenct=50:cc=0:gosub952:goto920:remcc=casino
  171. 910 ifa$="c"thenct=100:gosub952:goto922
  172. 911 ifa$="d"thenct=400:gosub952:goto918
  173. 912 ifa$="x"then924
  174. 913 ifa$=" "thengosub3000:goto900
  175. 915 goto909
  176. 916 gosub76:ifng=1then900
  177. 917 dg=1:sa=36096:ms=0:xx=70:yy=201:tx=50942:cl=14:cm=8:goto940
  178. 918 gosub76:ifng=1then900
  179. 919 dg=2:sa=37120:ms=0:xx=70:yy=184:tx=50862:cl=14:cm=12:goto940
  180. 920 gosub76:ifng=1then900
  181. 921 dg=3:sa=38144:ms=0:xx=54:yy=201:tx=50940:cl=14:cm=12:goto940
  182. 922 gosub76:ifng=1then900
  183. 923 dg=4:sa=39168:ms=1:xx=22:yy=193:tx=50928:cl=14:cm=12:goto940
  184. 924 dg=0:sa=35072:ms=1:xx=14:yy=89:tx=50407:cl=14:print"[147]":goto941
  185. 926 goto914
  186. 940 print"[147]":print:print"travelling";:forj=1to4:print".";:gosub98:next
  187. 941 ea=sa+999:ns=50176:gosub55010:pokev,xx:pokev+1,yy
  188. 942 ifms=0thenpokev+16,0
  189. 943 ifms=1thenpokev+16,1
  190. 944 ifdg=3thenpoke50420,32:remadj
  191. 945 poke53210,cl:sys53200:pokev+21,1
  192. 950 poke53283,cm:goto200
  193. 952 iffp=1thenct=0:return
  194. 954 iffp=1thengosub98:print:print:print"a ferry pass ! free travel anywhere !"
  195. 955 return
  196. 960 fd=0:ap=0:hp=hp-10:ifhp<1then37002
  197. 962 py=24:px=1:gosub70:print"";:print"starving !";:gosub98:gosub98
  198. 964 gosub70:print"            ";:goto20001
  199. 1000 dg=dg-1:v=53248:sd=0
  200. 1002 if dg=10thenpokev+21,0:pokev,166:pokev+1,217:tx=51034:goto8107
  201. 1004 if dg=9thendg=0:sa=35072:ms=0:xx=102:yy=185:tx=50866:goto1180
  202. 1008 if dg=20thenpokev+21,0:pokev,166:pokev+1,217:tx=51034:goto8307
  203. 1010 if dg=19thendg=1:sa=36096:ms=0:xx=78:yy=89:tx=50383:goto1180
  204. 1014 if dg=40thenpokev+21,0:pokev,166:pokev+1,217:tx=51034:goto8507
  205. 1016 if dg=39thendg=4:sa=39168:ms=0:xx=110:yy=97:tx=50427:goto1180
  206. 1022 if dg=30thenpokev+21,0:pokev,166:pokev+1,217:tx=51034:goto8707
  207. 1024 if dg=31thenpokev+21,0:pokev,166:pokev+1,217:tx=51034:goto8807
  208. 1026 if dg=29thendg=2:sa=37120:ms=0:xx=166:yy=121:tx=50554:goto1180
  209. 1178 end
  210. 1180 ea=sa+999:ns=50176:gosub55010:pokev,xx:pokev+1,yy
  211. 1182 ifms=0thenpokev+16,0
  212. 1184 ifms=1thenpokev+16,1
  213. 1186 cl=14: poke53210,cl:sys53200:poke53283,cm:pokev+21,1
  214. 1188 goto200
  215. 1200 dg=dg+1:v=53248:sd=0
  216. 1202 if dg=11then8200
  217. 1204 if dg=21then8400
  218. 1206 if dg=41then8600
  219. 1208 if dg=31then8800
  220. 1209 if dg=32then8900
  221. 1210 goto200
  222. 1399 goto200
  223. 2000 print"[147]":poke53269,0: poke53210,11:sys53200
  224. 2001 poke53283,14:gosub100:zb=145:gosub82:rem border
  225. 2004 print"[159]";:printtab(13)"-magic shoppe-"
  226. 2006 print:printtab(3)"learn a spell & cast it forever,as"
  227. 2007 printtab(3)"long as you have enough crystals."
  228. 2009 print:printtab(4)"teleport is used to exit from"
  229. 2010 printtab(4)"a dungeon (not in combat).":print"";
  230. 2012 gosub2045:print"[158]";
  231. 2014 printtab(4)"s-strength     (3)    100 gold"
  232. 2016 printtab(4)"c-confuse      (3)    100 gold"
  233. 2018 printtab(4)"h-heal         (5)    100 gold"
  234. 2019 printtab(4)"t-teleport     (12)   300 gold"
  235. 2021 print"[159]":printtab(4)"choose s,c,h or t to learn a spell"
  236. 2022 gosub2050:gosub102
  237. 2028 gosub74
  238. 2029 ifa$=" "thengosub3000:goto2000
  239. 2030 ifa$="s"thenct=100:print"[147]":gosub76:ifng=0thenqs=1:goto2000
  240. 2032 ifa$="c"thenct=100:print"[147]":gosub76:ifng=0thenqc=1:goto2000
  241. 2034 ifa$="h"thenct=100:print"[147]":gosub76:ifng=0thenqh=1:goto2000
  242. 2036 ifa$="x"thenprint"[147]":gosub98:goto20730
  243. 2037 ifa$="t"thenct=300:print"[147]":gosub76:ifng=0thenqt=1:goto2000
  244. 2038 ifng=1thenng=0:goto2000
  245. 2039 goto2028
  246. 2044 remrout
  247. 2045 print:printtab(3)"spell & crystal use  cost to learn"
  248. 2046 printtab(3)"-------------------  -------------":return
  249. 2050 print:printtab(4)"or x-exit shop   space- inventory"
  250. 2051 print"":printtab(4)"you have ";:printgl;:print" gold":return
  251. 2100 print"[147]":poke53269,0: poke53210,11:sys53200
  252. 2101 poke53283,8:gosub100:zb=145:gosub82
  253. 2104 print"[158]";:printtab(12)" magic shoppe ":print"[159]"
  254. 2106 printtab(3)"welcome ";:printna$;:print"!   our advanced"
  255. 2108 printtab(3)"spells will aid your quest."
  256. 2112 gosub2045:print"";
  257. 2113 print:printtab(3)"n-nutrition (10)        200 gold"
  258. 2114 print:printtab(3)"r-revive    (10)        400 gold"
  259. 2116 print:printtab(3)"f-flee      (25)        400 gold"
  260. 2118 print:printtab(3)"m-missile   (20)        500 gold"
  261. 2120 print"[159]":printtab(4)"choose r,f,m or n to learn"
  262. 2122 gosub2050:gosub102
  263. 2128 gosub74
  264. 2129 ifa$=" "thengosub3000:goto2100
  265. 2130 ifa$="r"thenct=400:print"[147]":gosub76:ifng=0thenqr=1:goto2100
  266. 2132 ifa$="f"thenct=400:print"[147]":gosub76:ifng=0thenqf=1:goto2100
  267. 2134 ifa$="m"thenct=500:print"[147]":gosub76:ifng=0thenqb=1:goto2100
  268. 2135 ifa$="n"thenct=200:print"[147]":gosub76:ifng=0thenqm=1:goto2100
  269. 2136 ifa$="x"thenprint"[147]":gosub98:goto20730
  270. 2137 ifng=1thenng=0:goto2100
  271. 2138 goto2128
  272. 2200 print"[147]":poke53269,0: poke53210,12:sys53200
  273. 2201 poke53283,2:gosub100:zb=141:gosub82
  274. 2204 print"[158]";:printtab(11)" george's potions "
  275. 2206 print"[159]":print:printtab(4)"greetings ";:printna$;:print"!"
  276. 2208 print:printtab(4)"potions increase dexterity in"
  277. 2209 printtab(4)"combat. only 50 gold each."
  278. 2212 print:printtab(4)"we will give free potions for"
  279. 2214 printtab(4)"any herbs you bring us."
  280. 2216 if hb>0then2250
  281. 2217 print"":print:printtab(4)"choose p to buy a potion."
  282. 2222 gosub2050:gosub102
  283. 2228 gosub74
  284. 2229 ifa$=" "thengosub3000:goto2200
  285. 2234 ifa$="p"thenct=50:print"[147]":gosub76:ifng=0thenqp=qp+1:goto2200
  286. 2236 ifa$="x"thenprint"[147]":gosub98:goto20730
  287. 2237 ifng=1thenng=0:goto2200
  288. 2238 goto2228
  289. 2250 print"":qp=qp+hb+1:printtab(4)"you have brought some herbs !"
  290. 2254 print:printtab(4)"here are ";:printhb+1;:print" free potions !"
  291. 2256 hb=0:goto2217
  292. 2300 print"[147]":poke53269,0: poke53210,11:sys53200
  293. 2301 poke53283,8:gosub100:zb=145:gosub82
  294. 2304 print"[158]";:printtab(12)" telnyr castle "
  295. 2306 print"[158]":print: print:printtab(9)"a-  grocer"
  296. 2308 print:printtab(9)"b-  weapons"
  297. 2309 print:printtab(9)"c-  telnyr library"
  298. 2310 print:printtab(9)"d-  talk to the king"
  299. 2311 print:printtab(9)"e-  save/load game"
  300. 2312 print:print:printtab(7)"choose a,b,c,d,e or x to exit"
  301. 2313 print:printtab(7)"spacebar - inventory":gosub102
  302. 2328 gosub74
  303. 2329 ifa$="a"then2340
  304. 2330 ifa$="b"then2360
  305. 2331 ifa$="c"then2600
  306. 2332 ifa$="d"then2400
  307. 2333 ifa$="e"then35000
  308. 2334 ifa$=" "thengosub3000:goto2300
  309. 2336 ifa$="x"thenprint"[147]":gosub98:goto20730
  310. 2337 goto2328
  311. 2340 if gh=1thengosub2900:goto2300
  312. 2341 print"[147]":poke53210,13:sys53200:poke53283,5:gosub100:b=141:gosub82
  313. 2342 print"[159]";:printtab(14)" the grocer "
  314. 2344 print:print:print:printtab(6)"nutritious food packs -"
  315. 2345 print:printtab(6)"only 50 gold per pack (food 1o)"
  316. 2347 print:print:printtab(6)"p- purchase food pack"
  317. 2348 print:print"[159]":printtab(4)"press p to purchase food"
  318. 2350 gosub2050:gosub102:print"[159]"
  319. 2351 gosub74
  320. 2352 ifa$="p"thenct=50:print"[147]":gosub76:ifng=0thenfd=fd+10:goto2340
  321. 2353 ifng=1thenng=0:goto2340
  322. 2354 ifa$="x"then2300
  323. 2355 ifa$=" "thengosub3000:goto2340
  324. 2356 goto2351
  325. 2360 print"[147]":sys53200:poke53283,9:gosub100:zb=102:gosub82
  326. 2362 print"";:printtab(10)" long johns swords "
  327. 2364 print"[156]":printtab(5)"trade in your old sword on"
  328. 2365 printtab(5)"a new one. i can also supply"
  329. 2366 printtab(5)"accurate sextants.":print"":print
  330. 2367 printtab(9)      "a- sword 10+   100 gold"
  331. 2368 print:printtab(9)"b- sword 20+   200 gold"
  332. 2370 print:printtab(9)"c- sword 30+   300 gold"
  333. 2371 print:printtab(9)"d- sextant     100 gold":print
  334. 2372 print"[159]":printtab(4)"choose a,b c or d":gosub2050:gosub102
  335. 2373 gosub74
  336. 2374 ifa$=" "thengosub3000:goto2360
  337. 2375 ifa$="a"thenct=100:print"[147]":gosub76:ifng=0thenws=10:goto2360
  338. 2376 ifa$="b"thenct=200:print"[147]":gosub76:ifng=0thenws=20:goto2360
  339. 2377 ifa$="c"thenct=300:print"[147]":gosub76:ifng=0thenws=30:goto2360
  340. 2378 ifa$="d"thenct=100:print"[147]":gosub76:ifng=0thensz=1:goto2384
  341. 2379 ifng=1thenng=0:goto2360
  342. 2380 ifa$="x"then2300
  343. 2381 goto2373
  344. 2384 print"[147]":print"[159]":print"to read the sextant press r at any"
  345. 2386 print:print"time when travelling outdoors."
  346. 2389 print:print"x- exit"
  347. 2390 gosub74
  348. 2391 ifa$="x"then2360
  349. 2392 goto2390
  350. 2400 print"[147]":sys53200:poke53283,15:gosub100:zb=145:gosub82
  351. 2401 print"[158]";:printtab(11)" the throne room ":ifvm=80thenvm=0:goto2495
  352. 2402 ifre>0andrw>0andra>0andrf>0then38000
  353. 2403 ifre=1then2450
  354. 2404 ifrw=1then2460
  355. 2405 ifra=1then2470
  356. 2406 ifrf=1then2480
  357. 2408 iftr=1then2430
  358. 2410 print"[159]":printtab(3)"hmmm, another fearless adventurer."
  359. 2411 print:printtab(3)"well ";:printna$;:print" many have tried"
  360. 2412 printtab(3)"but all have failed."
  361. 2413 print:printtab(3)"our land is in great peril."
  362. 2414 print:printtab(3)"the four runes of telnyr have been"
  363. 2416 printtab(3)"stolen. if you find a rune bring"
  364. 2417 printtab(3)"it here for a reward !"
  365. 2418 print:printtab(3)"here's 15 crystals for a start."
  366. 2419 print:printtab(3)"visit a magic shop before you"
  367. 2420 printtab(3)"enter those foul dungeons."
  368. 2422 cy=cy+15:tr=1:goto2490
  369. 2430 rem
  370. 2432 print"[159]":printtab(3)"come back when you have found a"
  371. 2434 print:printtab(3)"rune.":goto2490
  372. 2450 rem
  373. 2451 print"[159]":printtab(3)"the rune of earth !!!"
  374. 2452 print:printtab(3)"well done ! here are 2o crystals "
  375. 2453 print:printtab(3)"and 2oo gold.":cy=cy+20:gl=gl+200:re=2:goto2490
  376. 2460 print"[159]":printtab(3)"the rune of water !!!"
  377. 2461 print:printtab(3)"here's 80 crystals & 200 gold."
  378. 2463 cy=cy+80:gl=gl+200:rw=2:goto2490
  379. 2470 print"[159]":printtab(3)"you have the rune of air !!!"
  380. 2472 print:printtab(3)"here's 200 gold & 25 crystals"
  381. 2473 cy=cy+25:gl=gl+400:ra=2:goto2490
  382. 2480 print"[159]":printtab(3)"the rune of fire!!!"
  383. 2482 print:printtab(3)"unbelievable! 100 crystals !!"
  384. 2483 cy=cy+100:rf=2:goto2490
  385. 2490 print:printtab(3)"x- exit":gosub102
  386. 2491 gosub74
  387. 2492 ifa$="x"then2300
  388. 2494 goto2491
  389. 2495 print"[159]":printtab(3)"thanks a million ";:printna$;:print:print:goto2490
  390. 2500 print"[147]":poke53269,0: poke53210,11:sys53200
  391. 2501 poke53283,9:gosub100:zb=102:gosub82
  392. 2504 print"[158]";:printtab(13)" the outpost "
  393. 2506 print"[158]":print: print:printtab(9)"a-  jeweller"
  394. 2508 print:printtab(9)"b-  grocer"
  395. 2509 print:printtab(9)"c-  the casino"
  396. 2512 print:print:printtab(7)"choose a,b or x to exit":gosub102
  397. 2528 gosub74
  398. 2529 ifa$="a"then2539
  399. 2530 ifa$="b"then2560
  400. 2531 ifa$="c"then2700
  401. 2536 ifa$="x"thenprint"[147]":gosub98:goto20730
  402. 2537 ifa$=" "thengosub3000:goto2500
  403. 2538 goto2528
  404. 2539 rem
  405. 2540 print"[147]":sys53200:poke53283,3:zb=102:gosub82
  406. 2541 print"";:printtab(12)" the jeweller "
  407. 2542 print"[159]":print:print:printtab(5)"5 crystals for 100 gold"
  408. 2543 print:printtab(5)"we exchange crystals for gems"
  409. 2544 ifgm<1then2548
  410. 2545 print"":print: printtab(5):print"thanks for the fine gems !"
  411. 2546 print:printtab(5)"here are ";:printgm*5;:print" crystals !"
  412. 2547 cy=cy+(gm*5):gm=0
  413. 2548 print"[159]":print:print:printtab(5)"p- purchase 5 crystals"
  414. 2549 gosub2050
  415. 2550 gosub74
  416. 2551 ifa$="x"then2500
  417. 2552 ifa$=" "thengosub3000:goto2540
  418. 2553 ifa$="p"then2556
  419. 2554 goto2550
  420. 2556 ct=100:print"[147]":gosub76:ifng=0thency=cy+5:goto2540
  421. 2558 ifng=1thenng=0:goto2540
  422. 2560 ifgh=1thengosub2900:goto2500
  423. 2561 print"[147]":sys53200:poke53283,5:gosub100:zb=102:gosub82
  424. 2562 print"";:printtab(14)" the grocer "
  425. 2563 print"[159]":print:print:printtab(6)"food packs 5og"
  426. 2564 print:printtab(6)"p- purchase food"
  427. 2568 print:printtab(6)"x- to exit":gosub102
  428. 2571 gosub74
  429. 2572 ifa$="x"then2500
  430. 2575 ifa$=" "thengosub3000:goto2560
  431. 2578 ifa$="p"then2580
  432. 2579 goto2571
  433. 2580 ct=50:print"[147]":gosub76:ifng=0thenfd=fd+10:goto2560
  434. 2582 ifng=1thenng=0:goto2560
  435. 2600 print"[147]":poke53269,0: poke53210,11:sys53200
  436. 2601 poke53283,2:gosub100:zb=143:gosub82
  437. 2602 print"";:printtab(12)" telnyr library "
  438. 2664 print"":print:printtab(5)"rare books - donation required."
  439. 2667 print"[156]":print:print:printtab(5)"a- calvins chronicle   1oo gold"
  440. 2668 print:printtab(5)"b- the scribes annual  2oo gold"
  441. 2670 print:printtab(5)"c- lennies logbook     25o gold":print
  442. 2672 print"[159]":printtab(4)"choose a,b or c":gosub2050:gosub102
  443. 2673 gosub74
  444. 2674 ifa$=" "thengosub3000:goto2600
  445. 2675 ifa$="a"thenct=100:print"[147]":gosub76:ifng=0thengosub2698:goto2684
  446. 2676 ifa$="b"thenct=200:print"[147]":gosub76:ifng=0thengosub2698:goto2690
  447. 2679 ifa$="c"thenct=250:print"[147]":gosub76:ifng=0thengosub2698:goto2695
  448. 2680 ifng=1thenng=0:goto2600
  449. 2681 ifa$="x"then2300
  450. 2682 goto2673
  451. 2684 print"a dying orc once told me that he"
  452. 2686 print:print"buried an object at forest isle,"
  453. 2687 print:print"sextant reading x=23 y=20":gosub74:goto2600
  454. 2690 print"in al's report he kept mentioning"
  455. 2691 print:print"something at tropicania at "
  456. 2692 print:print"sextant x=13 y=14":gosub74:goto2600
  457. 2695 print"i know there is treasure buried on the"
  458. 2696 print:print"main island of telnyr at x=32 y=19":gosub74:goto2600
  459. 2698 print"[147][159]":print"while perusing the pages you read-":print:print:return
  460. 2699 rem*casino
  461. 2700 print"[147][158]":print"         tropicania casino":ifcc=1then2718
  462. 2701 ifcy>120orgl>1000then2718
  463. 2702 cc=1:print"":print:print"in between - the best game in town !"
  464. 2704 print:print:print"2 numbers from 1-20 are drawn. you must"
  465. 2706 print:print"decide whether the 3rd number will be"
  466. 2708 print:print"in-between the first two. if it is then"
  467. 2710 print:print"you win ! max bet is 50 gold."
  468. 2712 print"[159]":print:print"use joystick up/down to alter amount"
  469. 2714 print:print"of bet and fire to choose."
  470. 2716 print"[156]":print:print"press spacebar to play"
  471. 2717 gosub74:goto2720
  472. 2718 print:print:print:print"":print"   casino closed - come back later."
  473. 2719 fork=1to1250:next:goto2500
  474. 2720 print"[147][156]"
  475. 2721 print"you have ";:printgl;:print" gold":print"[159]":print
  476. 2722 print"first number   second number":print:gosub98:js=56320:be=10
  477. 2723 r1=int(rnd(1)*10+1):printtab(4)r1:gosub98:print"[145][145]"
  478. 2724 r2=int(rnd(1)*10+11):printtab(20)r2:gosub98
  479. 2726 print"":print:print"bet how much ? (joystick)"
  480. 2728 px=1:py=11:gosub70:print"    ":gosub70:printbe
  481. 2730 ifpeek(js)=126thenbe=be+10:goto2735
  482. 2732 ifpeek(js)=125thenbe=be-10:goto2735
  483. 2733 ifpeek(js)=111then2740
  484. 2734 goto2730
  485. 2735 ifbe=60thenbe=50
  486. 2736 ifbe=0thenbe=10
  487. 2738 fork=1to120:next: goto2728
  488. 2740 gl=gl-be:ifgl<0thengl=gl+be:print:print"not enough gold !":gosub98:goto2500
  489. 2742 print"[158]":print:print"ok !   drawing...   ";:gosub98
  490. 2744 r3=int(rnd(1)*20+1):printr3:gosub98
  491. 2750 ifr3>r1andr3<r2thengl=gl+(be*2):ca=ca+be:goto2756
  492. 2752 ifr3=r1orr3=r2thengl=gl+(be*2):ca=ca+be:goto2756
  493. 2754 print:print:print"you lose !":ca=ca-be:goto2760
  494. 2756 print:print:print"you win ";:printbe;:print" gold  !"
  495. 2760 ifca>500then2770
  496. 2761 print"[159]":  print:print"fire to play again or x to exit"
  497. 2762 ifpeek(js)=111then2720
  498. 2764 ifpeek(197)=23thenca=200:goto2500
  499. 2766 goto2762
  500. 2770 print"[147][159]":print"you are too lucky today !":gosub98:gosub98
  501. 2772 print:print"depart !"
  502. 2774 fork=1to1000:next:ca=200:goto2500
  503. 2900 print"[147][159]":print"the grocer saw some ghouls, freaked"
  504. 2902 print:print"out, and has locked himself in."
  505. 2904 print:print:print"press space...":gosub74:return
  506. 2998 end:remsg
  507. 3000 print"[147]":poke53269,0: poke53210,11:sys53200:print"[159]"
  508. 3002 print"hit points ";:printhp
  509. 3004 print"gold       ";:printgl
  510. 3006 print"food       ";:printfd
  511. 3008 print"sword";:printws;:print"+"
  512. 3010 print"":print:printtab(20)"crystals   ";:printcy
  513. 3012 printtab(20)"potions    ";:printqp
  514. 3013 printtab(20)"herbs      ";:printhb
  515. 3014 printtab(20)"gems       ";:printgm
  516. 3021 px=0:py=7:gosub70
  517. 3022 if sz=1 thenprint"[156]sextant (r to read)"
  518. 3023 iffp=1thengosub70:printtab(19)" ferry pass"
  519. 3025 py=9:gosub70:print"[158]spells learnt-":print"":py=11:gosub70
  520. 3026 ifqs=1thenprint"strength"
  521. 3027 ifqc=1thenprint"confuse"
  522. 3028 ifqh=1thenprint"heal"
  523. 3030 ifqt=1thenprint"teleport"
  524. 3031 px=0:py=11:gosub70
  525. 3032 ifqf=1thenprinttab(20)"flee"
  526. 3034 ifqb=1thenprinttab(20)"missile"
  527. 3036 ifqm=1thenprinttab(20)"nutrition"
  528. 3038 ifqr=1thenprinttab(20)"revive"
  529. 3040 print"[158]":py=16:gosub70:print"runes-":print
  530. 3041 rem
  531. 3042 ifre>0thenprint"earth ";:
  532. 3044 ifrw>0thenprint"[159]water ";:
  533. 3046 ifra>0thenprint"air ";:
  534. 3048 ifrf>0thenprint"[156]fire ";:
  535. 3050 print:print"[159]"
  536. 3098 print"c -cast a spell"
  537. 3100 print"s -search for treasure"
  538. 3102 print"g -game speed
  539. 3104 [153]"x -exit inventory screen"
  540. 3120 [141]74
  541. 3121 [139]a$[178]"c"[167]3160
  542. 3122 [139]a$[178]"x"[167] [142]
  543. 3124 [139]a$[178]"s"[167] [153]"load":[137]3200
  544. 3126 [139]a$[178]"g"[167] 3140
  545. 3130 [137]3120
  546. 3140 [153]"loadopen":[153]"adjust message speed":[153]:[153]
  547. 3141 [153]"a- slow"
  548. 3142 [153]"b- medium"
  549. 3144 [153]"c- fast"
  550. 3146 [153]"d- fastest"
  551. 3147 [141]74
  552. 3148 [139]a$[178]"a"[167]tm[178]1200:[137]3157
  553. 3150 [139]a$[178]"b"[167]tm[178]800:[137]3157
  554. 3152 [139]a$[178]"c"[167]tm[178]400:[137]3157
  555. 3154 [139]a$[178]"d"[167]tm[178]200:[137]3157
  556. 3156 [137]3147
  557. 3157 [153]:[153]:[153]"ok":[141]98:[137]3000
  558. 3160 [153]"loadopen"
  559. 3162 [153]"h -heal      (5)
  560. 3164 print"r -revive    (1o)
  561. 3165 [153]"n -nutrition (1o)
  562. 3166 print"t -teleport from dungeon (12)"
  563. 3167 print"x -exit"
  564. 3168 print:print"you have ";:printcy;:print" crystals":print
  565. 3169 gosub74
  566. 3170 ifa$="h"then3180
  567. 3171 ifa$="r"then3183
  568. 3172 ifa$="t"then3186
  569. 3174 ifa$="x"then3000
  570. 3175 ifa$="n"then3177
  571. 3176 goto3169
  572. 3177 ifqm<>1then3196
  573. 3178 cy=cy-10:ifcy<0thency=cy+10:goto3190
  574. 3179 fd=fd+20:print:print"food +2o":gosub98:goto3000
  575. 3180 ifqh<>1then3196
  576. 3181 cy=cy-5:ifcy<0thency=cy+5:goto3190
  577. 3182 hp=hp+50:goto3194
  578. 3183 ifqr<>1then3196
  579. 3184 cy=cy-10:ifcy<0thency=cy+10:goto3190
  580. 3185 hp=hp+120:goto3194
  581. 3186 ifqt<>1then3196
  582. 3187 ifdg<5thenprint:print"not here !":gosub98:goto3160
  583. 3188 cy=cy-12:ifcy<0thency=cy+12:goto3190
  584. 3189 tp=1:print:print"ok....":gosub98:return
  585. 3190 print:print"not enough crystals !":gosub98:goto3160
  586. 3194 print:print"done !":gosub98:goto3000
  587. 3196 print:print"you don't know it yet !":gosub98:goto3000
  588. 3200 ss=tx-50176:sy=int(ss/40):sx=ss-(sy*40)
  589. 3201 ifdg=1andsx=23andsy=20andre=0thenprint"the rune of earth !":re=1:goto3212
  590. 3202 ifdg=3andsx=13andsy=14andox=0thenprint"5o crystals !":cy=cy+50:ox=1:goto3212
  591. 3204 ifdg=0andsx=32andsy=19then3214
  592. 3210 print"you find nothing"
  593. 3212 fork=1to1000:next:gosub98:goto3000
  594. 3214 ifws=40then3210
  595. 3216 print"mystic sword 40+":ws=40:goto3212
  596. 3500 print"[147][159]":print"enter adventurer's name (return)"
  597. 3502 print:print"up to 10 letters"
  598. 3504 print:print:print:inputna$
  599. 3506 iflen(na$)>10thenprint"[147]":print"up to 10 letters only..":gosub98:goto3500
  600. 3510 print"[147]":print"during the game:"
  601. 3512 print:print"- js in port 2"
  602. 3513 print:print"- spacebar for inventory"
  603. 3514 print:print"- fire to enter towns & pick up objects"
  604. 3516 print:print"- save game at telnyr castle only"
  605. 3518 print:print:print:print"press space to start....":gosub74:print"[147]":return
  606. 3599 end
  607. 8000 rem
  608. 8100 rem
  609. 8104 rem*10/0
  610. 8105 dg=10
  611. 8106 v=53248:pokev+21,0:pokev,62:pokev+1,73:tx=50301
  612. 8107 print"[147]":print"[154]":poke53210,5:sys53200:poke53283,12:gosub100
  613. 8108 zb=148:gosub82
  614. 8109 gosub8110:goto8127
  615. 8110 zx=2:zy=4::zl=36:zc$="[166]":gosub87
  616. 8112 forp=1to4:gosub87:zy=zy+6:next
  617. 8113 zx=3:zl=2:zy=2:zc$="[208]":gosub92
  618. 8114 zx=3:zl=7:zy=9:gosub92:zy=zy+2
  619. 8122 zx=36:zl=7:zy=3
  620. 8124 forj=1to2::gosub92:zy=zy+5:next
  621. 8126 zx=18:zy=21:zl=2:zc$="[208]":gosub92:return
  622. 8127 gosub102:pokev+21,1:goto200
  623. 8200 rem11/0
  624. 8205 dg=11
  625. 8206 v=53248:pokev+21,0:pokev,166:pokev+1,73:tx=50314
  626. 8207 print"[147]":print"[154]":poke53210,5:sys53200:poke53283,12:gosub100
  627. 8208 rem
  628. 8209 zb=148:gosub82
  629. 8210 zx=2:zy=4::zl=36:zc$="[166]":gosub87
  630. 8213 zx=18:zl=2:zy=2:zc$="[208]":gosub92
  631. 8222 zx=36:zl=18:zy=3:gosub92
  632. 8224 zx=2:zy=21:zl=36:zc$="[166]":gosub87
  633. 8227 gosub102:pokev+21,1:ifra=0thenpoke50980,63:poke55296+804,3
  634. 8230 goto200
  635. 8300 rem20/1
  636. 8305 dg=20
  637. 8306 v=53248:pokev+21,0:pokev,62:pokev+1,73:tx=50301
  638. 8307 print"[147]":print"[154]":poke53210,5:sys53200:poke53283,13
  639. 8308 rem
  640. 8309 gosub100:zb=148:gosub82:gosub8110
  641. 8327 gosub102:pokev+21,1:goto200
  642. 8400 rem21/1
  643. 8405 dg=21
  644. 8406 v=53248:pokev+21,0:pokev,166:pokev+1,73:tx=50314
  645. 8407 print"[147]":print"[154]":poke53210,5:sys53200:poke53283,13
  646. 8408 rem
  647. 8409 gosub100:zb=148:gosub82
  648. 8410 zx=2:zy=4:zl=36:zc$="[166]":gosub87
  649. 8411 zx=2:zy=12:zl=36:zc$="[166]":gosub87
  650. 8413 zx=18:zl=2:zy=2:zc$="[208]":gosub92
  651. 8422 zx=36:zl=9:zy=3:gosub92
  652. 8423 zx=3:zl=10:zy=11:gosub92
  653. 8424 zx=2:zy=21:zl=36:zc$="[166]":gosub87
  654. 8427 gosub102:pokev+21,1:iffp=0thenpoke50982,63:poke55296+806,3
  655. 8428 goto200
  656. 8500 rem40/4
  657. 8505 dg=40
  658. 8506 v=53248:pokev+21,0:pokev,62:pokev+1,73:tx=50301
  659. 8507 print"[147]":print"[154]":poke53210,6:sys53200:poke53283,14
  660. 8508 rem
  661. 8509 gosub100:zb=147:gosub82:gosub8110
  662. 8527 gosub102:pokev+21,1:goto200
  663. 8600 rem41/4
  664. 8605 dg=41
  665. 8606 v=53248:pokev+21,0:pokev,166:pokev+1,73:tx=50314
  666. 8607 print"[147]":print"[154]":poke53210,6:sys53200:poke53283,14
  667. 8608 rem
  668. 8609 gosub100:zb=147:gosub82
  669. 8610 zx=2:zy=4:zl=36:zc$="[166]":gosub87
  670. 8611 zx=2:zy=12:zl=36:zc$="[166]":gosub87
  671. 8613 zx=18:zl=2:zy=2:zc$="[208]":gosub92
  672. 8622 zx=36:zl=9:zy=3:gosub92
  673. 8623 zx=3:zl=10:zy=11:gosub92
  674. 8624 zx=2:zy=21:zl=36:zc$="[166]":gosub87
  675. 8627 gosub102:pokev+21,1:ifrw=0thenpoke50996,63:poke55296+820,3
  676. 8628 goto200
  677. 8700 rem30/2
  678. 8705 dg=30
  679. 8706 v=53248:pokev+21,0:pokev,62:pokev+1,73:tx=50301
  680. 8707 print"[147]":print"[154]":poke53210,3:sys53200:poke53283,14
  681. 8708 rem
  682. 8709 gosub100:zb=146:gosub82:gosub8110
  683. 8740 gosub102:pokev+21,1:goto200
  684. 8800 rem31/2
  685. 8805 dg=31
  686. 8806 v=53248:pokev+21,0:pokev,166:pokev+1,73:tx=50314
  687. 8807 print"[147]":print"[154]":poke53210,3:sys53200:poke53283,14
  688. 8808 rem
  689. 8809 gosub100:zb=146:gosub82
  690. 8810 zx=2:zy=4:zl=36:zc$="[166]":forp=1to3:gosub87:zy=zy+1:next
  691. 8812 zx=2:zy=12:zl=36:forp=1to3:gosub87:zy=zy+1:next
  692. 8814 zx=5:zy=5:zl=8:gosub92
  693. 8816 zx=9:zy=13:zl=9:gosub92
  694. 8824 zx=2:zy=22:zl=36:gosub87
  695. 8826 zx=18:zy=21:zl=2:zc$="[208]":gosub92
  696. 8827 zx=18:zl=2:zy=2:gosub92
  697. 8828 zx=3:zl=19:zy=3:gosub92
  698. 8830 zx=7:zl=11:zy=11:gosub92
  699. 8832 zx=32:zl=11:zy=11:gosub92
  700. 8840 gosub102:pokev+21,1:goto200
  701. 8900 rem32/2
  702. 8905 dg=32
  703. 8906 v=53248:pokev+21,0:pokev,166:pokev+1,73:tx=50314
  704. 8907 print"[147]":print"[154]":poke53210,3:sys53200:poke53283,14
  705. 8908 rem
  706. 8909 gosub100:zb=146:gosub82
  707. 8910 zx=2:zy=4:zl=36:zc$="[166]":forp=1to3:gosub87:zy=zy+1:next
  708. 8911 zx=2:zy=12:zl=36:zc$="[166]":gosub87
  709. 8913 zx=2:zy=15:zl=36:forp=1to4:gosub87:zy=zy+1:next
  710. 8915 zx=8:zy=19:zl=15:forp=1to2:gosub87:zy=zy+1:next
  711. 8917 zx=2:zy=13:zl=3:forp=1to3:gosub87:zy=zy+1:next
  712. 8918 zx=2:zy=21:zl=36:zc$="[166]":gosub87
  713. 8919 zx=2:zy=22:zl=36:zc$="[166]":gosub87
  714. 8920 zx=18:zl=2:zy=2:zc$="[208]":gosub92
  715. 8922 zx=36:zl=9:zy=3:gosub92
  716. 8923 zx=3:zl=10:zy=11:gosub92
  717. 8925 zx=6:zl=7:zy=14:gosub92
  718. 8926 zx=32:zl=7:zy=14:gosub92
  719. 8940 gosub102:pokev+21,1:ifrf=0thenpoke51000,63:poke55296+824,3
  720. 8942 goto200
  721. 8999 print"[145][145][145][145]":goto8999:rem wait
  722. 19000 ifdg=30ordg=31ordg=32then20006
  723. 19001 gosub19020:ifdg>5then19050
  724. 19002 ifjs=119andpeek(tx+2)=32thenpoketx+2,pu:poketx+5120+2,pc:goto200
  725. 19003 ifjs=123andpeek(tx-2)=32thenpoketx-2,pu:poketx+5120-2,pc:goto200
  726. 19004 ifjs=125andpeek(tx+80)=32thenpoketx+80,pu:poketx+5120+80,pc:goto200
  727. 19006 ifjs=126andpeek(tx-80)=32thenpoketx-80,pu:poketx+5120-80,pc:goto200
  728. 19010 goto200
  729. 19020 rh=7:gosub96
  730. 19022 if rn=1thenpu=62:pc=7:return
  731. 19024 if rn=2thenpu=60:pc=2:return
  732. 19025 if rn=7thenpu=62:pc=7:return
  733. 19026 if rn=3thenpu=27:pc=3:return
  734. 19027 if rn=6thenpu=62:pc=7:return
  735. 19028 if rn=4anddg<5thenpu=28:pc=5:return
  736. 19030 if rn=5anddg>5thenpu=29:pc=5:return
  737. 19031 return
  738. 19050 ifpeek(tx+40)<>102then200:remdng
  739. 19051 ifjs=119andpeek(tx+4)=32andpeek(tx+44)=102then19054
  740. 19052 ifjs=123andpeek(tx-4)=32andpeek(tx+36)=102then19055
  741. 19053 goto200
  742. 19054 poketx+4,pu:poketx+5120+4,pc:goto200
  743. 19055 poketx-4,pu:poketx+5120-4,pc:goto200
  744. 19056 goto200
  745. 20000 fd=fd-1:iffd<1then960
  746. 20001 ap=0:ifdg>5thenrh=9:gosub96
  747. 20002 ifdg<5thenrh=12:gosub96
  748. 20003 ifrn=1then200
  749. 20004 ifrn<7then20006
  750. 20005 ifrn>6then19000
  751. 20006 forp=1to6
  752. 20007 py=24:px=1:gosub70:print"[159]";:print"attacked !";:fork=1to80:next
  753. 20008 gosub70:print"          ";:fork=1to80:next:next
  754. 20009 print"[147]"
  755. 20010 print"[147]":v=53248:pokev+21,0:at=0
  756. 20011 cw=ws:kc=16
  757. 20012 ifdg>5then20040
  758. 20013 goto20020
  759. 20014 remspr
  760. 20015 forp=53288to53294:pokep,m3:next
  761. 20016 ea=sa+63:ns=49216:gosub55010:ifmc=0thenpoke53276,0:return
  762. 20017 poke53285,m1:poke53286,m2:poke53276,254:return
  763. 20020 ifgh=1anddg<6thenrh=6:gosub96:onrngoto20044,20044,20036,20034,20030,20032
  764. 20021 ifdg=5ordg=3ordg=4thenrh=3:gosub96:onrngoto20036,20038,20036
  765. 20022 rh=6:gosub96:on rn goto20030,20032,20032,20034,20034,20036
  766. 20030 mt$="orc":mw=5:mh=14:ml=mh:sa=40386:mc=1:m1=5:m2=3:m3=8:gosub20015
  767. 20031 goto20060
  768. 20032 mt$="thief":mw=8:mh=18:ml=mh:sa=40450:mc=1:m1=7:m2=5 :m3=8 :gosub20015
  769. 20033 goto20060
  770. 20034 mt$="rogue":mw=12:mh=20:ml=mh:sa=40322:mc=1:m1=6:m2=3:m3=14:gosub20015
  771. 20035 goto20060
  772. 20036 mt$="troll":mw=15:mh=40:ml=mh:sa=52800:mc=1:m1=8:m2=3:m3=1:gosub20015
  773. 20037 goto20060
  774. 20038 mt$="spider":mw=15:mh=30:ml=mh:sa=40578:mc=1:m1=7:m2=8:m3=3:gosub20015
  775. 20039 poke40640,0:goto20060:rem adjspiderdata
  776. 20040 rh=4:gosub96
  777. 20041 ifdg>29thenrh=4:gosub96:onrngoto20056,20054,20056,20051
  778. 20042 on rn goto20044,20046,20048,20051
  779. 20044 mt$="ghoul":mw=50:mh=80:ml=mh:sa=52992:mc=1:m1=7:m2=8:m3=3:gosub20015
  780. 20045 goto20060
  781. 20046 mt$="ghost":mw=20:mh=60:ml=mh:sa=40256:mc=1:m1=3:m2=3:m3=3:gosub20015
  782. 20047 goto20060
  783. 20048 mt$="bat":mw=25:mh=50:ml=mh:sa=40192:mc=0:m3=12:gosub20015
  784. 20049 goto20060
  785. 20050 rem
  786. 20051 mt$="skeleton":mw=80:mh=100:ml=mh:sa=52864:mc=1:m1=7:m2=12:m3=3:gosub20015
  787. 20052 goto20060
  788. 20053 rem
  789. 20054 mt$="vampire":mw=80:mh=140:ml=mh:sa=52928:mc=1:m1=7:m2=12:m3=4:gosub20015
  790. 20055 goto20060
  791. 20056 mt$="demon":mw=100:mh=250:ml=mh:sa=40514:mc=1:m1=0:m2=3 :m3=11:gosub20015
  792. 20057 goto20060
  793. 20060 ifdg>5thenrh=6
  794. 20062 ifdg<5thenrh=4
  795. 20064 gosub96:mn=rn
  796. 20100 poke53210,14:sys53200:poke53283,14:print"[129]"
  797. 20102 poke53270,peek(53270)or16
  798. 20104 gosub100
  799. 20106 print" [199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199]"
  800. 20108 forp=1to9:print" [199]               [199]":next
  801. 20110 print" [199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199]"
  802. 20112 print:print:print
  803. 20120 print" [199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199]"
  804. 20122 forp=1to6:print" [199]                                    [199]":next
  805. 20124 print" [199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199]"
  806. 20130 print"":print"[158]":print:printtab(22)"m-manual attack"
  807. 20132 print:printtab(22)"a-auto attack"
  808. 20134 print:printtab(22)"c-cast a spell"
  809. 20136 print:printtab(22)"t-take a potion"
  810. 20138 print:printtab(22)"r-run away"
  811. 20142 print"":py=14:px=20:gosub70:printna$:gosub20520
  812. 20144 print"":py=14:px=1:gosub70:printmt$:gosub20530
  813. 20150 gosub102
  814. 20180 ifmn=1thenpokev+21,2
  815. 20182 ifmn=2thenpokev+21,6
  816. 20184 ifmn=3thenpokev+21,14
  817. 20186 ifmn=4thenpokev+21,30
  818. 20188 ifmn=5thenpokev+21,62
  819. 20190 ifmn=6thenpokev+21,126
  820. 20191 ifmn=0thenpokev+21,0
  821. 20192 if at=1 then 20240
  822. 20200 print"":px=13:py=18:gosub70:print"choose option "
  823. 20201 rem
  824. 20202 gosub74
  825. 20204 ifa$="m"then20240
  826. 20206 ifa$="a"then20270
  827. 20208 ifa$="c"then30280
  828. 20210 ifa$="t"then20310
  829. 20212 ifa$="r"then20320
  830. 20214 ifa$="g"then20340
  831. 20220 goto20202
  832. 20240 rem
  833. 20242 gosub20500:gosub20510:print"[159]"
  834. 20244 rh=20:gosub96:ifrn>16then20258
  835. 20246 rh=4:gosub96:cw=ws+rn+ks:px=10:py=18:gosub70
  836. 20253 printna$;:print" hits for ";:printcw:ifdy>0thendy=dy-1
  837. 20254 ml=ml-cw:ifml<1thenml=0:goto20600:
  838. 20256 gosub20530:goto 20400
  839. 20258 py=18:px=10:gosub70
  840. 20259 printna$;:print" misses":ifdy>0thendy=dy-1
  841. 20260 goto20400
  842. 20269 remauto
  843. 20270 at=1
  844. 20272 py=24:px=1:gosub70:print"[159]";:print"   hold down spacebar to exit auto";
  845. 20274 goto20240
  846. 20309 rem pt
  847. 20310 gosub20500:gosub70:ifqp=0then20314
  848. 20311 qp=qp-1:printna$;:print" takes a potion":gosub98
  849. 20312 gosub20500:rh=3:gosub96:dx=rn:ifdx=1thendx=2
  850. 20313 dy=dx:goto20240
  851. 20314 print"   you have none !":gosub98:gosub20500:goto20240
  852. 20320 px=3:py=17:gosub70
  853. 20321 fork=1to6:gosub70:print"                                   ":py=py+1:next
  854. 20322 ifdg>5thenrh=12
  855. 20323 ifdg<5thenrh=9
  856. 20324 gosub96:ifrn>3then20330
  857. 20326 kf=1:goto20700:remesc
  858. 20330 px=11:py=18:gosub70:print"you didn't escape":gosub98:gosub20500
  859. 20332 goto20240
  860. 20400 gosub98:print"[159]":ifdy>0then20240
  861. 20402 ifdx>0thendy=dx
  862. 20404 rh=20:gosub96:ifrn>kcthen20450
  863. 20408 rh=8:gosub96:mx=mw+rn
  864. 20412 py=21:px=10:gosub70:printmt$;:print" hits for ";:printmx
  865. 20416 hp=hp-mx:ifhp<1then37000
  866. 20418 gosub20520
  867. 20420 ifat=0then20480
  868. 20422 ifpeek(197)<>60then20240
  869. 20424 at=0:fork=1to500:next:gosub20500:gosub20510
  870. 20426 py=24:px=1:gosub70:print"                                  ";:
  871. 20430 print"";:goto20200
  872. 20450 ifkc=16thenpy=21:px=10:gosub70:printmt$;:print" misses":gosub98
  873. 20451 ifkc=10thenpy=21:px=10:gosub70:printmt$;:print" confused":gosub98
  874. 20460 ifat=0then20480
  875. 20462 goto20422
  876. 20480 gosub98:gosub20500:gosub20510:goto20200
  877. 20500 py=18:px=10:gosub70:print"                         ":return
  878. 20510 py=21:px=10:gosub70:print"                         ":return
  879. 20520 print"":py=14:px=31:gosub70:print"     ":gosub98
  880. 20522 py=14:px=31:gosub70:printhp:return
  881. 20530 print"":py=14:px=10:gosub70:print"     "
  882. 20532 py=14:px=10:gosub70:printml:return
  883. 20600 mn=mn-1:ifmn=0then20700
  884. 20602 gosub20530:ml=mh:dy=dx
  885. 20604 gosub98:gosub20500:gosub20510
  886. 20606 ifkb<>1then20612
  887. 20608 kb=0:px=12:py=18:gosub70:printrn+1;:print" dispatched !"
  888. 20610 gosub98:gosub20500:goto20613
  889. 20612 px=12:py=18:gosub70:printmt$;:print" dies !":gosub98:gosub20500
  890. 20613 ifpeek(197)=60thenat=0
  891. 20614 py=24:px=1:gosub70:print"                                  ";:print""
  892. 20615 gosub20530:goto20180
  893. 20700 gosub98:px=3:py=17:gosub70
  894. 20701 fork=1to6:gosub70:print"                                   ":py=py+1:next
  895. 20702 px=11:py=18:gosub70
  896. 20703 if kb=1thenprint"monsters decimated!":gosub98:gosub20500:goto20714
  897. 20704 if kf=1thenprint"you have escaped !":gosub98:gosub20500:goto20728
  898. 20710 print"monsters defeated !"
  899. 20712 gosub98:gosub20500:gosub20510:poke53269,0
  900. 20713 rem
  901. 20714 poke53269,0:py=18:px=8:gosub70:print"you find ";
  902. 20716 rh=3:gosub96:onrngoto20720,20721,20723
  903. 20720 rh=100:gosub96:printrn+mw;:print"gold":gl=gl+rn+mw:goto20728
  904. 20721 rh=4:gosub96:printrn+int(mw/8)+1;:print" crystals":cy=cy+rn+int(mw/8)+1
  905. 20722 goto20728
  906. 20723 print"a potion";:qp=qp+1:gosub98:print" & ";:goto20720
  907. 20724 goto20728
  908. 20728 poke53269,0:gosub98:gosub98:kf=0:kb=0:ks=0:dx=0:dy=0
  909. 20730 if dg=0thensa=35072:goto20780
  910. 20731 if dg=1thensa=36096:goto20780
  911. 20732 if dg=2thensa=37120:goto20780
  912. 20734 if dg=3thensa=38144:goto20780
  913. 20736 if dg=4thensa=39168:goto20780
  914. 20738 if dg=10then8107
  915. 20740 if dg=11then8207
  916. 20742 if dg=20then8307
  917. 20744 if dg=21then8407
  918. 20746 if dg=40then8507
  919. 20748 if dg=41then8607
  920. 20750 if dg=30then8707
  921. 20752 if dg=31then8807
  922. 20754 if dg=32then8907
  923. 20780 ea=sa+999:ns=50176:gosub55010:poke53210,cl:sys53200:pokev+21,1
  924. 20781 ifdg=3thenpoke50420,32:remadj
  925. 20782 poke53283,cm:goto200
  926. 20800 py=24:px=1:gosub70:print"[159]";:print"teleporting....";:gosub98:gosub98:sd=0
  927. 20801 ifrw>0andgh=0thengh=1:gosub20900
  928. 20804 ifdg=10ordg=11thendg=10
  929. 20806 ifdg=20ordg=21thendg=20
  930. 20808 ifdg=40ordg=41thendg=40
  931. 20810 ifdg=30ordg=31ordg=32thendg=30
  932. 20812 goto1000
  933. 20900 print"[147][159]":print"some ghouls enter the spell"
  934. 20902 print:print"area & teleport with you to"
  935. 20904 print:print"the mainland !":print:print:print"press space..":gosub74:return
  936. 22000 poke198,0:wait198,1:geta$
  937. 22002 poke53270,peek(53270)and239:print"[159]":poke53269,0:end
  938. 30280 gosub20500
  939. 30281 px=3:py=17:gosub70:print"choose (or x-exit)  crystals ";:printcy
  940. 30283 px=5:py=19:gosub70:ifqs=1thenprint"s-strength 3":py=py+1
  941. 30285 gosub70:ifqc=1thenprint"c-confuse  3":py=py+1
  942. 30287 gosub70:ifqh=1thenprint"h-heal     5"
  943. 30289 px=21:py=19:gosub70:ifqr=1thenprint"r-revive  10":py=py+1
  944. 30291 gosub70:ifqf=1thenprint"f-flee    25":py=py+1
  945. 30293 gosub70:ifqb=1thenprint"m-missile 20"
  946. 30297 gosub74
  947. 30298 ifa$="s"then 30320
  948. 30299 ifa$="c"then 30330
  949. 30300 ifa$="h"then 30340
  950. 30301 ifa$="r"then 30350
  951. 30302 ifa$="f"then 30360
  952. 30303 ifa$="m"then 30365
  953. 30304 ifa$="x"then 30420
  954. 30308 goto30297
  955. 30320 if qs<>1then30400
  956. 30322 cy=cy-3:ifcy<0thency=cy+3:goto30410
  957. 30324 ks=8:ifdg>29thenks=12
  958. 30325 goto30420
  959. 30330 if qc<>1then30400
  960. 30332 cy=cy-3:ifcy<0thency=cy+3:goto30410
  961. 30334 kc=10:goto30420
  962. 30340 if qh<>1then30400
  963. 30342 cy=cy-5:ifcy<0thency=cy+5:goto30410
  964. 30344 hp=hp+50:gosub20520:goto30420
  965. 30350 if qr<>1then30400
  966. 30352 cy=cy-10:ifcy<0thency=cy+10:goto30410
  967. 30354 hp=hp+120:gosub20520:goto30420
  968. 30360 if qf<>1then30400
  969. 30362 cy=cy-25:ifcy<0thency=cy+25:goto30410
  970. 30364 kf=1:goto30420
  971. 30365 if qb<>1then30400
  972. 30366 cy=cy-20:ifcy<0thency=cy+20:goto30410
  973. 30367 kb=1:rh=2:gosub96:mn=mn-(rn+1):ifmn<1then30420
  974. 30368 px=3:py=17:gosub70:fork=1to34:print" ";:next
  975. 30370 gosub70:print"                    crystals ";:printcy:gosub98
  976. 30372 fork=1to6:gosub70:print"                                   ":py=py+1:next
  977. 30380 goto20602
  978. 30400 px=3:py=17:gosub70:print"what ?            ":gosub98
  979. 30402 gosub70:print"choose (or x-exit)"
  980. 30404 goto30297
  981. 30410 px=3:py=17:gosub70:print"need more crystals":gosub98
  982. 30412 gosub70:print"choose (or x-exit)"
  983. 30414 goto30297
  984. 30420 px=3:py=17:gosub70:fork=1to34:print" ";:next
  985. 30421 gosub70:print"                    crystals ";:printcy:gosub98
  986. 30422 fork=1to6:gosub70:print"                                   ":py=py+1:next
  987. 30423 ifa$="x"ora$="h"ora$="r"then20240
  988. 30424 py=18:px=10:gosub70:printna$;:print" casts a spell":gosub98
  989. 30425 if kf=1orkb=1then20700
  990. 30426 goto20240
  991. 35000 print"[147][159]":print"be sure that-":gosub98
  992. 35002 print:print"disk drive is on":gosub98
  993. 35004 print:print"game disk is in drive":gosub98:gosub98
  994. 35010 print:print:print"":print"s- save current game"
  995. 35012 print:print"l- load a saved game"
  996. 35013 print:print"x- exit"
  997. 35014 gosub74
  998. 35016 ifa$="s"then35100
  999. 35018 ifa$="l"then35200
  1000. 35019 ifa$="x"then2300
  1001. 35020 goto35014
  1002. 35100 p=832:k=hp:gosub35110:p=834:k=gl:gosub35110:p=836:k=fd:gosub35110
  1003. 35102 p=838:k=cy:gosub35110:p=840:k=qp:gosub35110:p=842:k=hb:gosub35110
  1004. 35104 p=844:k=gm:gosub35110:goto35120
  1005. 35110 pokep,int(k/256):pokep+1,k-(peek(p)*256):return
  1006. 35120 poke846,ws:poke847,sz:poke848,fp
  1007. 35130 poke849,qs:poke850,qc:poke851,qh:poke852,qt:poke853,qf:poke854,qb
  1008. 35132 poke855,qm:poke856,qr:poke857,re:poke858,rw:poke859,ra:poke860,rf
  1009. 35134 poke861,ca:goto36070
  1010. 35200 goto36000
  1011. 35201 p=832:gosub35210:hp=k:p=834:gosub35210:gl=k:p=836:gosub35210:fd=k
  1012. 35202 p=838:gosub35210:cy=k:p=840:gosub35210:qp=k:p=842:gosub35210:hb=k
  1013. 35204 p=844:gosub35210:gm=k:goto35220
  1014. 35210 k=peek(p)*256:k=k+peek(p+1):return
  1015. 35220 ws=peek(846):sz=peek(847):fp=peek(848)
  1016. 35222 qs=peek(849):qc=peek(850):qh=peek(851):qt=peek(852):qf=peek(853)
  1017. 35224 qb=peek(854):qm=peek(855):qr=peek(856):re=peek(857):rw=peek(858)
  1018. 35226 ra=peek(859):rf=peek(860):ca=peek(861)
  1019. 35227 ifrw>0thengh=1
  1020. 35228 tr=1:print:print::print"ok":gosub98:goto2300
  1021. 36000 remread
  1022. 36010 open15,dv,15
  1023. 36020 open2,dv,3,"0:tl,s,r"
  1024. 36030 fork=0to30
  1025. 36040 input#2,p
  1026. 36050 poke 832+k,p:next
  1027. 36060 close2:close15:goto35201
  1028. 36069 remwrite*
  1029. 36070 cr$=chr$(13):open15,dv,15,"s0:tl"
  1030. 36080 open2,dv,3,"0:tl,s,w"
  1031. 36090 fork=0to30:rem832-861
  1032. 36100 print#2,peek(k+832);cr$
  1033. 36110 next
  1034. 36120 close2:close15
  1035. 36130 print:print:print"ok !":gosub98:goto2300
  1036. 36999 remdies
  1037. 37000 gosub98:poke53269,0:print"[147][159]":gosub98:printna$;:print" has died !":goto37010
  1038. 37002 print"[147][159]":print"starved to death !"
  1039. 37010 gosub98:print:print:print"p- play again":print:print"q- quit game"
  1040. 37011 gosub74
  1041. 37012 ifa$="p"thenclr:gg=6:goto60
  1042. 37014 ifa$="q"thensys64738
  1043. 37016 goto37011
  1044. 37999 remend
  1045. 38000 gosub102:print"[159]":printtab(3)"we have the 4 runes !!":gosub98:gosub98
  1046. 38002 print"[147]":v=53248:pokev+21,2:pokev+2,165:pokev+3,140:poke53276,2
  1047. 38003 poke53285,11:poke53286,8:forp=53288to53294:pokep,5:next:rh=27:cl=3
  1048. 38004 sa=40256:gosub38020:sa=40322:gosub38020
  1049. 38006 sa=40386:gosub38020:sa=40450:gosub38020:sa=40514:gosub38020
  1050. 38008 sa=40578:gosub38020:sa=52800:gosub38020
  1051. 38010 sa=52864:gosub38020:sa=52928:gosub38020:sa=52992:gosub38020
  1052. 38012 ifvm=80thenpoke53269,0:goto2400
  1053. 38013 goto38004
  1054. 38020 ea=sa+63:ns=49216:gosub55010
  1055. 38022 rn=int(rnd(1)*1000+50176):pokern,29:pokern+5120,cl:cl=cl+1:vm=vm+1
  1056. 38024 ifcl=8thencl=3
  1057. 38025 print"";:print"     you have completed the quest !
  1058. 38026 [142]
  1059. 51000 [143]
  1060. 51008 chars[178]51200:screen[178]50176
  1061. 51009 rm[178][181](screen[173]16384)
  1062. 51010 [151]56334,[194](56334)[175]254
  1063. 51020 [151] 1,[194](1)[175]251
  1064. 51040 [151]1,[194](1)[176]4
  1065. 51050 [151]56334,[194](56334)[176]1
  1066. 51060 [151]56578,[194](56578)[176]3
  1067. 51070 [151]56576,([194](56576)[175]252)[176](3[171]rm)
  1068. 51072 [151]53272,18
  1069. 51074 [151]648,screen[173]256
  1070. 51078 [151] 55,0:[151]56,136:[143]34816
  1071. 51080 [142]
  1072. 55000 [143]move
  1073. 55010 ea[178]ea[170]1:l[178]ea[171]sa:ne[178]l[170]ns
  1074. 55020 x[178][181](l[173]256):y[178]l[171]256[172]x
  1075. 55030 a[178][181]((ne[171]y)[173]256):b[178]ne[171]256[172]a[171]y
  1076. 55040 c[178][181]((ea[171]y)[173]256):d[178]ea[171]256[172]c[171]y
  1077. 55050 [151] 781,x[170]1:[151]782,y
  1078. 55060 [151] 88,b[170]1:[151] 89,a
  1079. 55070 [151]90,d[170]1:[151] 91,c
  1080. 55080 [158]41964:[151] ns,[194](sa)
  1081. 55090 [142]
  1082. 60000 v[178]53248:[151]v,xx:[151]v[170]1,yy:[151]v[170]39,7:[151]v[170]21,0
  1083. 60002 [151]51192,0
  1084. 60003 sa[178]49408:ea[178]sa[170]63:ns[178]49152:[141]55010
  1085. 60004 [129]p[178]51193[164]51199:[151]p,1:[130]
  1086. 60006 [151]v[170]2,48:[151]v[170]4,88:[151]v[170]6,128:[151]v[170]8,48:[151]v[170]10,88:[151]v[170]12,128
  1087. 60008 [151]v[170]3,82:[151]v[170]5,82:[151]v[170]7,82
  1088. 60010 [151]v[170]9,114:[151]v[170]11,114:[151]v[170]13,114
  1089. 60100 [142]
  1090.