start tok64 d64-lhUfD6 10 POKE51,243:POKE52,75:POKE55,243:POKE56,75:CLR:v=53248:POKE53265,27 20 POKE1000,3:POKEv+21,0:SYS49971:PRINT"{clear}{ct h}{ct n}{yellow}":POKEv+37,9:POKEv+38,1 30 DIMo$(49),co$(26),ca$(25),o%(132),cp$(2),vs(3,3),i(3,3),iw(4,3) 35 o%(121)=30:o%(115)=1:o%(122)=50:o%(123)=50:o%(124)=50:POKE842,204:SYS50019 40 cp$(0)=" with ":cp$(1)=" to ":cp$(2)=" on ":POKE829,9:POKE830,9:SYS50964 42 d$(1)="north":d$(2)="east":d$(3)="south":d$(4)="west" 100 FORl=1TO26:READco$(l):NEXT:FORl=1TO49:READo$(l):NEXT 110 FORl=1TO49:READo%(l):NEXT:FORl=1TO25:READca$(l):NEXT:POKE808,225:REM"{delete*17} 120 FORl=1TO25:READa:o%(50+a)=l:NEXT:o%(74)=21:FORl=1TO64:POKE900+l,0:NEXT 130 FORl=1TO3:FORl1=1TO3:READvs(l,l1),i(l,l1):NEXTl1,l 135 FORl=1TO4:FORl1=1TO3:READiw(l,l1):NEXTl1,l 390 GOSUB2100:od=1:IFco=0THENSYS49152:r=2:co=8:POKE902,1:POKE950,1:GOSUB700 400 PRINT"{down}";:SYS50300 402 GOSUB8000:IFa$=""THENPRINT"{up*2}":GOTO400 405 PRINT:o=0:co=0:pc=0:ca=21:SYS50300:IFLEFT$(a$,7)<>"say to "THEN440 410 a$=RIGHT$(a$,LEN(a$)-7):IFLEFT$(a$,1)=CHR$(34)THEN499 415 FORl=1TOLEN(a$):IFMID$(a$,l,1)=CHR$(34)THEN420 418 NEXT:GOTO499 420 IFl=LEN(a$)ORLEN(a$)<9THEN499 425 a1$=LEFT$(a$,l-2):a$=MID$(a$,l+1,LEN(a$)-l-1):IFa$=""ORa$=CHR$(34)THEN499 430 FORl=1TO25:IFa1$=LEFT$(ca$(l),LEN(a1$))THENca=l:GOTO435 431 IFa1$=RIGHT$(ca$(l),LEN(a1$))THENca=l:GOTO435 433 NEXT:GOTO499 435 IFl<20THENPRINT"{down}The "; 438 IFl<21ANDo%(r+50)=lTHENPRINTca$(l)" ignores you.":GOTO400 439 IFl<21THENPRINTca$(l)" is not here.":GOTO400 440 IFa$=("say "+CHR$(34)+"orion"+CHR$(34))THENGOSUB1800:GOTO400 442 FORl=1TOLEN(a$):IFMID$(a$,l,1)=" "THEN445 443 NEXT:l=l-1:a1$=a$:a$="":GOTO447 445 a1$=LEFT$(a$,l-1):a$=RIGHT$(a$,LEN(a$)-l) 447 FORl=1TO26:IFLEFT$(co$(l),LEN(a1$))=a1$THEN450 448 NEXT:GOTO499 450 co=l:IFco<24THEN480 451 a2$=cp$(co-24):a=LEN(a2$):IFa$=""THEN499 452 FORl=1TOLEN(a$)-a:IFMID$(a$,l,LEN(a2$))=a2$THEN455 453 NEXT:GOTO499 455 a1$=LEFT$(a$,l-1):a$=RIGHT$(a$,LEN(a$)-l-a+1):IFa1$=""ORa$=""THEN499 460 IFco>24THENa2$=a$:a$=a1$:a1$=a2$ 470 FORpc=1TO25:IFRIGHT$(ca$(pc),LEN(a1$))=a1$THEN480 472 IFLEFT$(ca$(pc),LEN(a1$))=a1$THEN480 475 NEXT:GOTO499 480 IFa$=""THEN502 481 FORl=1TO49:IFRIGHT$(o$(l),LEN(a$))=a$THEN490 482 IFLEFT$(o$(l),LEN(a$))=a$THEN490 485 NEXT:l=0 490 o=l:GOTO502 499 IFca=21THENPRINT"{down}Sorry,I don't understand.":GOTO400 500 PRINT"{down}"ca$(ca)" does not understand.":GOTO400 502 IFo=0ANDco>8ANDco<24ANDco<>15ANDco<>11ANDco<>21ANDco<>20ANDco<>16ANDco<>22THEN499 505 IFca>21ANDo%(ca+99)<>0THENPRINT"{down}"ca$(ca)" is not with you.":GOTO400 510 ONcoGOSUB900,900,900,900,970,985,700,700,1000,1100,2200,1130,1160 515 a=co-13:IFco<14THEN525 520 ONaGOSUB1275,1650,1680,1700,1600,1220,1750,1850,1550,1250,1300,1400,1500 525 IFa=42THENGOSUB792 530 IFr=0THENPOKE1000,3:POKE54296,0:GOTO2200 535 IFa=43THENGOSUB820 540 SYS50300:oc=0:FORl=1TO41:IFo%(l)=0THENoc=oc+1 545 NEXT 599 GOTO400 600 POKEv+23,0:POKEv+29,0:POKEv+28,0:FORl=0TO16:POKEv+l,0:NEXT 605 POKE180,0:POKE181,PEEK(30655+r):SYS50076 610 IFr=11THENPOKE181,122:SYS50076 615 IFr=48THENPOKE181,127:SYS50076 620 POKE181,r+127:SYS50076:p=28575+32*r 625 FORl=0TO7:p=p+1:a=PEEK(p)*2:IFa=0THENPOKE2040+l,223:p=p+3:GOTO660 630 IFa>255THENa=a-256:POKEv+16,PEEK(v+16)OR2^l 635 POKEv+l*2,a:p=p+1:POKEv+l*2+1,PEEK(p):p=p+1:a=PEEK(p):POKEv+39+l,a 640 IFa>239THENPOKEv+28,PEEK(v+28)OR2^l 645 p=p+1:a=PEEK(p):POKE63480+l,224+(aAND31) 650 IF(aAND64)=64THENPOKEv+29,PEEK(v+29)OR2^l 655 IF(aAND128)=128THENPOKEv+23,PEEK(v+23)OR2^l 660 NEXTl:POKEv+21,255:RETURN 700 IFco=8THENSYS49971:POKEv+21,0:POKE900+r,1 702 PRINT"{clear}{down*16}You're {down}":SYS50300 705 p=23408+80*r:a=p/256:POKE251,256*(a-INT(a)):POKE252,a:SYS50320 710 r$="":FORl=0TO3:r$=r$+CHR$(PEEK(p+l)):NEXT 715 IFr=59THEN733 718 FORl=0TO3:a=PEEK(p+l):IFa=65THENPRINT"There is an archway to the "d$(l+1)"." 722 IFa=67THENPRINT"A copper";:GOSUB60020 727 IFa=71THENPRINT"A golden";:GOSUB60020 729 NEXT 730 IFr=54THENPRINT"Fire gates hang in all four walls.":GOTO740 733 FORl=0TO3 735 IFPEEK(p+l)=73THENPRINT"A fire gate hangs in the "d$(l+1)" wall.":GOTO740 738 NEXT 740 a=0:FORl=0TO3:IFPEEK(p+l)=80THENa=a+1:l1=l 742 NEXT:IFa=1THENPRINT"A passage leads off to the "d$(l1+1)".":GOTO750 743 l1=0:IFa=0THEN750 744 PRINT"Passages run ";:FORl=0TO3:IFPEEK(p+l)=80THENPRINTd$(l+1)",";:l1=l1+1 746 IFPEEK(p+l)=80ANDl1=a-1THENPRINT"{left} and "; 748 NEXT:PRINT"{left}." 750 a$="A ":a=0:PRINT"{up}":FORl=1TO42:l1=aAND1:IFl=41ORl=9THEN760 755 IFo%(l)=rTHENPRINTa$o$(l)",";:a=a+1:a$="a ":IFl1=1THENPRINT 760 NEXT:IFa=1THENPRINT"{left} is nearby." 765 IFa>1THENPRINT"{left} are nearby." 770 m=o%(r+50):IFm=0OR(m>15ANDm<30)THEN790 775 a$="!":PRINT"There is a ";:IFm>60THENm=m-60:PRINT"dead ";:a$="." 780 IFm>30THENm=m-30:PRINT"sleeping ";:a$=".":IFr=40THENa$=".{up}{left} {up}" 785 PRINTca$(m)" nearby"a$ 790 IFo%(r+50)<>20THEN810 792 PRINT"Anton the Gypsy King sits by the fire.{space*2}Anton says:'"; 794 IFo%(37)<>90THENPRINT"Find my magic mirror,and in it I will read your future.'" 796 IFo%(36)<>90ANDo%(37)=90THENPRINT"Cross my palm with silver.'" 798 IFo%(36)<>90ORo%(37)<>90THEN810 800 PRINT"In the mirror,I see you":PRINT"playing a mandolin among many pillars.'" 805 PRINT"Anton leaves.":o%(61)=0 810 IFr=57ANDo%(107)=19THENPRINT"A Guard looks in through the bars. 812 IF(r=24ORr=32)ANDo%(125)=1THENPRINT"A crystal bridge spans the chasm. 818 IFr=30ANDo%(121)=30THENPRINT"Istar looks out through the bars. 820 IFr<>61THEN830 822 IFo%(117)=0THENPRINT"A tiny plant grows among the rubble.":GOTO880 824 IFo%(117)=1THENPRINT"A six-foot beanstalk grows upward.":GOTO880 826 PRINT"A huge beanstalk grows up through the{space*3}hole in the roof." 830 IFr=37ANDo%(129)=0THENPRINT"Black smoke drifts across the floor." 835 IFr=54ANDo%(115)=1THENPRINT"A pile of hot ashes lies on the block." 880 IFco<>8THENRETURN 882 a=0:IFPEEK(1000)<>3THEN898 884 IFr=16ORr=19THENa=2 886 IFr=41ORr=54ORr=48THENa=3 888 IFr=2ORr=8ORr=33ORr=13ORr=18THENa=1 890 IFa>0THENGOSUB7000 898 GOTO600 900 m=o%(r+50):IFm>0ANDm<16ANDco<>rdTHEN60030 903 IFco=rdORr<>54ORo%(115)<>1THEN910 905 PRINT"{down}The Phoenix rises from the ashes!!" 908 o%(104)=13:o%(115)=2:GOTO900 910 a$=MID$(r$,co,1):IFa$="w"THENPRINT"{down}Stone bars your way.":RETURN 915 IFa$="o"ORa$="a"ORa$="p"THEN955 920 IFa$="h"THENPRINT"{down}You fell to your death!":r=0:RETURN 925 IFa$="i"ANDo%(116)<>1THENPRINT"{down}You were incinerated!":r=0:RETURN 930 IFa$="f"THENPRINT"{down}That way is forbidden!":RETURN 935 IFa$="c"ANDo%(39)=0THEN955 940 IF(r=19ORr=20)ANDa$="g"ANDo%(40)=0THEN955 945 IF(a$="g"ANDo%(26)=0ANDr<>19ANDr<>20)ORa$="i"THEN955 950 PRINT"{down}You do not have the key.":RETURN 955 IFco=1THENr=r-8 956 IFco=2THENr=r+1 957 IFco=3THENr=r+8 958 IFco=4THENr=r-1 960 rd=co+2:IFrd>4THENrd=rd-4 962 IFr=26ANDo%(107)=19THENPRINT"{down}The Castle Guard overpowers you!" 963 IFr=26ANDo%(107)=19THENr=57:FORl=1TO2500:NEXT 965 SYS49971:POKEv+21,0:co=7:IFPEEK(900+r)=0THENco=8 966 IFco=7THENPOKE842,204:SYS50019 968 GOTO700 970 IFr<>58ANDr<>61ANDr<>64THEN983 973 IFr=61ANDo%(117)<2THEN983 975 m=o%(r+50) 978 IFm>0ANDm<16ANDco<>rdTHEN60030 980 r=r-32:rd=6:GOTO965 983 PRINT"{down}You cannot go that way.":RETURN 985 IFr<>26ANDr<>29ANDr<>32THEN983 988 IFr=29ANDo%(117)<2THEN983 990 m=o%(r+50) 993 IFm>0ANDm<16ANDco<>rdTHEN60030 995 r=r+32:rd=5:GOTO965 1000 m=o%(r+50):IFm>0ANDm<16THENPRINT"{down}You must kill the "ca$(m)" first!":RETURN 1003 IFo>46ORo=43THEN1070 1005 IFo%(o)<>rTHENPRINT"{down}The "o$(o)" is not here.":RETURN 1010 IFoc=10THENPRINT"{down}You cannot carry anything else.":RETURN 1015 IFo=7ORo=18ORo=42ORo=9THENPRINT"{down}The "o$(o)" is too heavy.":RETURN 1020 IF(o=4ANDca<>22)OR(o=11ANDca<>23)THEN60040 1025 IFo=10ANDo%(6)<>0ANDo%(118)=0THENPRINT"{down}You have nothing to put the bird in.":RETURN 1030 IF(o=10ORo=13)ANDca<>23THENPRINT"{down}Something about "ca$(ca)" scares it.":RETURN 1035 IFo=10THENo$(10)="caged songbird":o%(118)=1:o%(6)=50:GOTO1065 1040 IFo=13ANDo%(119)<>1THENPRINT"{down}The falcon flies off as Beren approaches.":RETURN 1050 IFo=26ANDr=34THENPOKE26129,70:o%(120)=1:r$="{f*4}" 1052 IFo=35ANDo%(126)=0THENPRINT"{down}It is too high for "ca$(ca)" to reach.":RETURN 1065 o%(o)=0:PRINT"{down}You now have the "o$(o)"." 1068 IFo=41THENPRINT"{down}A "o$(40)" lies on the stone floor.":o%(40)=20 1069 RETURN 1070 IFo%(3)<>0THENPRINT"{down}You do not have a bottle.":RETURN 1072 IF(o=47ANDr=45)OR(o>47ANDr=o-10)THEN1080 1075 PRINT"{down}There is no "o$(o)" here.":RETURN 1080 o$(3)="bottle of "+o$(o):o%(127)=o 1085 PRINT"{down}You now have a "o$(3)".":RETURN 1100 IFo%(o)<>0THEN60000 1105 o%(o)=r:PRINT"{down}You have dropped the "o$(o)"." 1115 IFo=26ANDr=34THENo%(120)=0:POKE26129,65:r$="faff" 1120 IF(o=37ORo=35)ANDo%(34)<>rTHENo%(o)=99:PRINT"It SMASHES on the floor!" 1125 RETURN 1130 IFo%(o)<>0THEN60000 1135 IFo<>8ANDo<>31THENPRINT"{down}No help there!":RETURN 1140 IFca<>22THENPRINT"{down}There is nothing on the "o$(o)" that" 1145 IFca<>22THENPRINTca$(ca)" can understand.":RETURN 1148 PRINT"{down}Istar reads:" 1150 IFo=8THENPRINT"'Stand among the stars and say 'ORION''":RETURN 1155 PRINT"'Between the Cavern and the Castle,seek and ye shall find.'":RETURN 1160 IFo%(o)<>0THEN60000 1165 IFo<>5ANDo<>19ANDo<>25THENPRINT"{down}How can "ca$(ca)" play a "o$(o)"?":RETURN 1168 IFo>5ANDPEEK(1000)=3THENa=1:GOSUB7000 1170 PRINT"{down}";:IFo=19THEN1190 1172 IFo=25THEN1200 1174 l1=0:l=9:GOSUB1185:l=3:GOSUB1185:l=37:GOSUB1185 1176 IFo%(126)=0ANDr=43THENPRINT"The "o$(35)" falls.":l1=10 1177 IFl1=10THENo%(126)=1:IFo%(34)<>rTHENo=35:GOTO1120 1179 IFo%(125)=1ANDr=24THENPRINT"The bridge shatters!" 1180 IFo%(125)=1ANDr=24THENPOKE25330,72:POKE25968,72:r$="pwhw":o%(125)=0:l1=1 1181 IFo%(r+50)=3THENo%(74)=0:PRINT"The balrog falls to its death!" 1183 IFl1>0THENRETURN 1184 PRINT"The music sounds,but nothing happens.":RETURN 1185 IFo%(l)<>0ANDo%(l)<>rTHENRETURN 1186 PRINT"The "o$(l)" shatters!" 1188 IFo%(121)=30ANDl=9THENPRINT"Istar steps out of the cage.":o%(121)=0 1189 o%(l)=99:l1=l1+1:RETURN 1190 IFca<>24ORo%(r+50)<>4THEN1184 1195 PRINT"The "ca$(4)" goes to sleep!":o%(90)=34:RETURN 1200 IFr<>34ORo%(120)=0THEN1184 1205 o%(120)=0:POKE26129,65:r$="faff" 1210 PRINT"An archway appears in the east wall.":RETURN 1220 IFo%(o)<>0THEN60000 1225 IFo<>27THENPRINT"{down}Why kiss a "o$(o)"?":RETURN 1230 PRINT"{down}The frog becomes Beren,last king of{space*5}Karn!!" 1235 o%(27)=99:o%(55)=0:o%(122)=0:RETURN 1250 IFo=43ANDr=5THEN1255 1253 IFo%(o)<>0ANDo%(o)<>rTHEN60000 1255 IFo%(33)<>0THENPRINT"{down}You do not have the "o$(33)".":RETURN 1260 o%(o)=99:PRINT"{down}The "o$(o)" goes up in flame!" 1265 IFo<>43ORo%(55)<>9THENRETURN 1270 o%(o)=5:o%(55)=16:PRINT"The "ca$(9)" dies screaming!!":RETURN 1275 IFo%(o)<>0THEN60000 1280 IFo<>4THENPRINT"{down}Why wave a "o$(o)"?":RETURN 1282 IFca=22ANDo%(r+50)=15THENPRINT"{down}The Spirit vanishes.":o%(71)=0:RETURN 1285 IFca<>22ORr<>24ORo%(125)=1THENPRINT"{down}Nothing happens.":RETURN 1288 PRINT"{down}A crystal bridge forms across the chasm.":o%(125)=1 1290 IFo%(74)=21THENo%(74)=3:PRINT"A balrog appears on the bridge!!" 1295 POKE25968,79:POKE25330,79:r$="pwow":RETURN 1300 IFpc>19THENPRINT"{down}Why attack "ca$(pc)"?":RETURN 1305 m=o%(50+r):IFm<>pcTHENPRINT"{down}The "ca$(pc)" is not here.":RETURN 1310 IFo%(o)<>0THEN60000 1315 IFo=2ANDm=2THENPRINT"{down}The "ca$(2)" vanishes!":o%(67)=0:RETURN 1320 IFm=7ANDo=15THEN1395 1325 IF(m=10ORm=12)ANDo=11ANDca=23THEN1395 1330 IFm=11ANDo=32ANDca=25THEN1395 1335 IFm=13ANDo=11ANDca=23THENPRINT"{down}The Phoenix collapses into ashes!" 1340 IFm=13ANDo=11ANDca=23THENo%(104)=0:o%(115)=1:RETURN 1345 IFm=12ANDo=14ANDca=22THENPRINT"{down}The Vampire becomes Haldir!" 1350 IFm=12ANDo=14ANDca=22THENo%(91)=0:o%(123)=0:RETURN 1355 IFm=11THENPRINT"{down}The Pirate hides in a tunnel which is" 1357 IFm=11THENPRINT"too small for "ca$(ca)" to follow him" 1358 IFm=11THENPRINT"with the "o$(o)".":RETURN 1360 IF(m<>8ANDm<>14)OR(m=8ANDo%(127)<>49)OR(m=14ANDo%(127)<>47)THEN1390 1361 IFo<>3THEN1390 1362 a$=o$(o%(127)):a$="{down}"+CHR$(ASC(LEFT$(a$,1))+128)+RIGHT$(a$,LEN(a$)-1) 1365 PRINTa$" runs all over the "ca$(m)"!":o$(3)="bottle" 1370 o%(127)=0:GOTO1395 1390 PRINT"{down}No use!":RETURN 1395 PRINT"{down}The "ca$(m)" falls dead{sh space}to the ground!":o%(r+50)=o%(r+50)+60 1396 IFm=11THENPRINT"A map falls from his pocket.":o%(31)=51 1399 RETURN 1400 m=o%(50+r):IFm<>pcANDpc<20THEN60050 1405 IFo%(o)<>0THEN60000 1408 IFpc>21OR(m=20ANDo<>36ANDo<>37)THENPRINT"{down}"ca$(pc)" gives it back.":RETURN 1410 IFm=19ANDo=38THENPRINT"{down}The Guard throws a key through the door,and goes." 1415 IFm=19ANDo=38THENo%(107)=0:o%(38)=99:o%(39)=r:RETURN 1420 IFm=1ANDo=1THENPRINT"{down}The bear eats hungrily.":o%(1)=99:o%(56)=31:RETURN 1430 IFm=20THENPRINT"{down}Anton takes the "o$(o)".":o%(o)=90:a=42:RETURN 1435 IFm=17ANDo=12THENPRINT"{down}The falcon eats the meat.":o%(119)=1:o%(12)=99:RETURN 1490 IFpc<11THENPRINT"{down}The "ca$(pc)" eats it!":o%(o)=99:RETURN 1495 PRINT"{down}The "ca$(pc)" throws it down.":o%(o)=r:RETURN 1500 IFo<>13ANDo<>10THENPRINT"{down}How can"ca$(ca)" set a "o$(o)" on something?":RETURN 1505 m=o%(r+50):IFo%(o)<>0THEN60000 1510 IFca<>23THENPRINT"{down}The "o$(o)" ignores "ca$(ca)".":RETURN 1512 IFm<>pcTHEN60050 1513 a$="songbird":IFo=13THENa$="falcon" 1515 IF(o=10ANDpc<>5)OR(o=13ANDpc<>6)THENPRINT"{down}The "a$" faints!":RETURN 1520 PRINT"{down}The "a$" has a furious battle" 1525 PRINT"with the "ca$(pc)",and kills it!":o%(r+50)=o%(r+50)+60:RETURN 1550 a=0:FORl=121TO124:IFo%(l)=0THENa=a+1:l1=l 1552 NEXT:PRINT"{down}";:IFa=1THENPRINT"With you is "ca$(l1-99)".":GOTO1560 1553 l1=0:IFa=0THEN1560 1554 PRINT"With you are ";:FORl=121TO124:IFo%(l)=0THENPRINTca$(l-99)",";:l1=l1+1 1558 NEXT:PRINT"{left}." 1560 PRINT"You are carrying ";:SYS50300 1570 a=0:FORl=1TO42:l1=aAND1:IFl=41THEN1580 1572 IFo%(l)=0ANDl1=1THENPRINT 1575 IFo%(l)=0THENPRINT"a "o$(l)",";:a=a+1:SYS50300 1580 NEXT:IFa=0THENPRINT"{left} nothing "; 1585 PRINT"{left}.":RETURN 1600 IFo%(o)<>0THEN60000 1605 IF(o=3ANDo%(127)>46)ORo=21ORo=22THEN1615 1610 PRINT"{down}You cannot drink the "o$(o)"!":RETURN 1615 IFca<>21THEN499 1620 IF(o=3ANDo%(127)<>47)ORo=21THENPRINT"{down}It poisons you!":r=0:RETURN 1625 PRINT"{down}You have drunk the "o$(o)"." 1630 IFo=3THENo$(o)="bottle":o%(127)=0:RETURN 1635 PRINT"{down}You are now invulnerable to fire!":o%(116)=1:o%(22)=99:RETURN 1650 IFo%(3)<>0ORo%(127)<>47THENPRINT"{down}You have no water.":RETURN 1655 IFr=54ANDo%(115)=1THEN1670 1658 IFr=61ANDo%(117)<2THEN1675 1660 PRINT"{down}There is nothing worth watering here.":RETURN 1665 o$(3)="bottle":o%(127)=0:RETURN 1670 PRINT"{down}The ashes hiss,shrivel and vanish!":o%(115)=0:GOTO1665 1675 o%(117)=o%(117)+1:a=43:GOTO1665 1680 IFo%(3)<>0ORo%(127)<>48THENPRINT"{down}You have no oil.":RETURN 1685 IFr=40ANDo%(128)=0THEN1690 1688 PRINT"{down}There is nothing worth oiling here.":RETURN 1690 PRINT"{down}You have oiled the hinges.":o%(128)=1:GOTO1665 1700 IFo=44ANDo%(39)=0THENPRINT"{down}The gate is now open.":RETURN 1701 IFo<>18ANDo<>42ANDo<>7ANDo<>9ANDo<>44ANDo%(o)<>0THEN60000 1702 IF(o=18ORo=42ORo=7ORo=9)ANDo%(o)<>rTHENPRINT"{down}It is not here.":RETURN 1703 IFo<>23THEN1710 1704 PRINT"{down}A strong wind rushes from the box." 1706 IFr<>37ORo%(129)=1THENPRINT"The box is blown away.":o%(23)=47:RETURN 1708 PRINT"The smoke is blown away!":o%(24)=37:o%(129)=1:RETURN 1710 m=o%(r+50):IFm>0ANDm<16THENPRINT"{down}You must kill the "ca$(m)" first!":RETURN 1712 IFo<>42THEN1720 1714 IFo%(130)=1THEN60010 1716 PRINT"{down}A Vampire leaps out of the coffin!":o%(91)=12:o%(130)=1:RETURN 1720 IFo<>7THEN1730 1722 IFo%(131)=1THEN60010 1724 IFo%(128)=0THENPRINT"{down}The hinges are jammed with rust.":RETURN 1726 PRINT"{down}Khadim climbs out of the chest!":o%(124)=0:o%(131)=1:RETURN 1730 IFo<>18THEN1740 1732 IFo%(132)=1THEN60010 1734 IFo%(16)<>0THENPRINT"{down}You have nothing to open it with.":RETURN 1736 IFca<>23THENPRINT"{down}The clam is closed too tightly for":PRINTca$(ca)" to open.":RETURN 1738 PRINT"{down}A pearl falls out!":o%(132)=1:o%(17)=r:RETURN 1740 PRINT"{down}You cannot open the "o$(o)".":RETURN 1750 IFo%(29)<>0THENPRINT"{down}You have nothing to dig with.":RETURN 1755 IFr<>59ORo%(30)<>50THENPRINT"{down}You dig many holes,but find nothing.":RETURN 1760 PRINT"{down}Your shovel strikes something - an{space*6}emerald lies on the sand!" 1765 o%(30)=r:RETURN 1800 IFr=1THENr=od:GOTO965 1805 IFr<>22ANDr<>36ANDr<>19ANDr<>14ANDr<>27THENPRINT"{down}Nothing happens.":RETURN 1810 od=r:r=1:GOTO965 1850 a=0:FORl=1TO64:IFPEEK(900+l)=1THENa=a+1 1855 NEXT 1860 FORl=5TO40:IFo%(l)<>1THEN1870 1862 IFl=5ORl=14ORl=17ORl=19ORl=20ORl=24ORl=26ORl=28ORl=30ORl=35ORl=40THENa=a+5 1870 NEXTl:FORl=121TO124:IFo%(l)=0THENa=a+50 1875 NEXTl:a=a/319*100:a=INT(a*10)/10:PRINT"{down}You have scored"a"{left}%" 1880 IFa<100THENRETURN 1885 PRINT"{down}'And thus were the Heroes freed,and{space*5}peace was restored to the"; 1890 PRINT" land of Karn.'":GOTO2202 2000 PRINT"{clear}":SYS50964:a$="":FORl=1TO64:a$=a$+CHR$(PEEK(900+l)+64):NEXT 2002 o%(50)=r:o%(0)=rd 2005 POKEv+21,0:OPEN1,8,2,"@0:game,s,w":FORl=0TO132:PRINT#1,o%(l);CHR$(13);:NEXT 2010 PRINT#1,a$;CHR$(13):CLOSE1 2015 RETURN 2100 PRINT"{down}LOAD a game from disk?(Y/N)":POKE198,0 2105 GETa$:IFa$<>"y"ANDa$<>"n"THEN2105 2110 IFa$="n"THENRETURN 2112 PRINT"{clear}":SYS50964 2115 OPEN1,8,2,"game,s,r":FORl=0TO132:INPUT#1,o%(l):NEXT:r=o%(50):INPUT#1,a$ 2118 CLOSE1:rd=o%(0):IFLEN(a$)<64THENRUN 2120 FORl=1TO64:POKE900+l,ASC(MID$(a$,l,1))-64:NEXT:POKE1000,3 2125 IFo%(118)=1THENo$(10)="caged songbird" 2130 IFo%(120)=1THENPOKE26129,70 2132 IFo%(125)=1THENPOKE25968,79:POKE25330,79 2135 IFo%(127)>0THENo$(3)="bottle of "+o$(o%(127)) 2140 POKE829,9:POKE830,9:SYS49152:co=8:GOSUB700:RETURN 2200 IFPEEK(1000)<>3THENRETURN 2201 GOSUB1850 2202 PRINT"{down}SAVE to disk?(Y/N)":SYS50300 2205 GETa$:IFa$<>"y"ANDa$<>"n"THEN2205 2210 IFa$="y"THENGOSUB2000 2220 RUN 7000 POKE1000,3:POKE54296,0:FORl=0TO14STEP7:POKE54276+l,0:NEXT:nv=3 7003 FORl=1001TO1022:POKEl,0:NEXT 7005 FORl=0TO2:n=i(a,l+1):IFn=0THENPOKE1016+l,1:GOTO7050 7020 POKE54277+(l*7),iw(n,1):POKE54278+(l*7),iw(n,2):POKE1013+l,iw(n,3) 7030 w=vs(a,l+1)/256:POKE1004+l,256*(w-INT(w)):POKE1001+l,w:nv=nv-1 7050 NEXT:POKE1000,nv:RETURN 8000 a$="":PRINT"{cm p}";:a=0:IFPEEK(1000)=3THENPOKE54296,0 8005 GETa1$:IFa1$=""THEN8005 8010 IFa1$<"a"ANDa1$<>" "ANDa1$<>CHR$(34)ANDa1$<>CHR$(20)ANDa1$<>CHR$(13)THEN8005 8015 IFa1$>"z"ANDa1$<"A"THEN8005 8020 IFa1$>"Z"THEN8005 8025 IFa<60ANDa1$=>" "THENa$=a$+a1$:PRINT"{left}"a1$"{cm p}";:POKE212,0:GOTO8060 8030 IFa1$=CHR$(20)ANDa>0THENPRINT"{left} {left*2}{cm p}";:a=a-1:a$=LEFT$(a$,a):GOTO8005 8035 PRINT"{left} ";:RETURN 8060 a=a+1:IFa=39THENSYS50300 8065 GOTO8005 10000 DATA north,east,south,west,up,down,look,picture,take,drop,end,read,play 10010 DATA wave,water,oil,open,drink,kiss,dig,score,list,light,attack,give,set 10100 DATA pot of honey,bible,bottle,wand,silver flute,wicker cage 10105 DATA rusty iron chest,scroll,crystal cage,songbird,sword,piece of meat 10110 DATA falcon 10120 DATA silver cross,spear,crowbar,pearl,giant clam,golden lyre 10130 DATA diamond,black potion,white potion,wooden box,ruby,mandolin,gold key 10140 DATA frog,sapphire,shovel,emerald,map,dagger,tinderbox,velvet pillow 10150 DATA jade flower,silver coin,mirror,bag of gold,copper key,jewelled key 10160 DATA carpet,coffin,marsh gas,copper gate,z 10170 DATA z,water,oil,acid 10180 DATA 58,13,30,14,16,52,40,14,30,23,25,58,28,63,26,49,50,60,33,40,55,55 10190 DATA 47,50,33,34,5,48,51,50,50,27,1,27,43,29,64,17,50,50,20 10195 DATA 41,50,50,50,50,50,50,50 10200 DATA bear,barrowight,balrog,giant spider,serpent,vampire bat 10210 DATA hydra,"Knight",swamp lizard,dragon,"Pirate","Vampire","Phoenix" 10220 DATA "Witch","Spirit",frog,falcon,songbird,"Guard" 10230 DATA "Anton",you,"Istar","Beren","Haldir","Khadim",6,17,50,40,31 10240 DATA 63,35,42,5,48,51,50,50,62,21,50,28,23,57,11,0,30,50,50,50 10300 DATA 19444,2,19594,1,19716,0 10305 DATA 19718,2,20202,4,20710,1 10310 DATA 21334,3,22392,3,23248,3 10320 DATA 16,240,17,10,31,33,16,240,33,96,48,33 60000 PRINT"{down}You do not have the "o$(o)".":RETURN 60010 PRINT"{down}You have already opened it.":RETURN 60020 PRINT" gate is set in the "d$(l+1)" wall.":RETURN 60030 PRINT"{down}You cannot get past the "ca$(m)"!":RETURN 60040 PRINT"{down}A mysterious force prevents "ca$(ca)".":RETURN 60050 PRINT"{down}The "ca$(pc)" is not here.":RETURN stop tok64 (bastext 1.0)