0 sys866:goto10:rem"{del}{del}{del}{del}{del}{del}{del}{del}{del}{del}{del}{del}{del}{del}{del}{del}{del}{del}{del}{del} 1 c$=c$+" ":j=0 2 j=j+1:b$=left$(c$,j):ifright$(b$,1)<>" "then2 3 ifb$=c$thena$="":goto5 4 a$=mid$(c$,j+1):a$=left$(a$,len(a$)-1) 5 b$=left$(b$,len(b$)-1):v$=left$(b$+"***",3):n$=left$(a$+"***",3):return 6 print"{down}{blk}Game Over.{blu} {down} Play again ?";:poke198,0 7 getr$:ifr$<>"y"andr$<>"n"then7 8 ifr$="y"thenrun 9 sys32775 10 poke36879,25:printchr$(8)"{clr}{blu}{swlc}{down}{down} MAGIC{$a0}MIRROR{sret} {CBM-Y}{CBM-Y}{CBM-Y}{CBM-Y}{CBM-Y} {CBM-Y}{CBM-Y}{CBM-Y}{CBM-Y}{CBM-Y}{CBM-Y}{blk}{down}{sret} by Michael Taylor.{down}{down}{down} 15 dimq$(4):fori=1to4:readq$(i):next:data"N","S","E","W" 20 y=-1:l=38:o=45:diml$(l),d$(l),o$(o),c$(o),p(o) 50 fori=1tol:readl$(i),d$(i):next 60 fori=1too:reado$(i),c$(i),p(i):next:i=11 100 data"in the middle of a Rose Bed",00020000 110 data"in a Garden",00030000 120 data"on a wide Lawn",02040500 130 data"in a Garden",03000000 140 data"in a huge Garden",00000003 150 data"at the end of a path",04170000 160 data"in a Bedchamber",00081000 170 data"in a dingy Attic",07001100 180 data"in the larder",00100000 190 data"in the Kitchen",00110007 200 data"in a Giant Hall",10121508 210 data"in a Storeroom",11000000 220 data"in a hidden Room",00140000 230 data"in a secret Vault",00070000 240 data"in a Bedroom",00000011 250 data"in a Cellar",00000000 260 data"in a swampy hole",06000000 270 data"in a damp SemidarkChamber",00001900 280 data"in an underground Cavern",00000018 290 data"by a Chasm",00000000 300 data"on a ledge",00002224 310 data"in a narrow tunnel",00000021 320 data"in a musty Cave",00220000 330 data"by a subterranean Lake",00002100 340 data"on a Canoe, on theunderground Lake",00000000 350 data"by an underground Lake",28000000 360 data"on a Ladder",00000000 370 data"at what seems to be a Dead End",00260000 380 data"on an empty road",31300000 390 data"on a road",29000000 400 data"by a Bend in the Road",00290032 410 data"at the end of the Road",00003100 420 data"in a sunny Meadow",35003429 430 data"by a pink palace",00370033 440 data"on a hillside",00330000 450 data"in a disused ChalkQuarry",00350000 460 data"in the Courtyard of the Pink Palace",34000000 470 data"in a tumbledown Shack",00360000 510 data"creaky old LADDER",lad,1 520 data"SPECTACLES",spe,2 530 data"sharp SWORD",swo,16 540 data"shiny TORCH",tor,9 550 data"brass KEY",key,13 560 data"small BOOK",boo,14 570 data"golden MEDAL",med,15 575 data"bottle of WHISKY",whi,17 580 data"rusty AQUALUNG",aqu,12 585 data"mirror BOX",box,97 590 data"hide CANOE",can,23 595 data"lumber AXE",axe,32 600 data"*the magic MIRROR*",mir,38 601 datarosebed,ros,2,gravel path,pat,4,deep pond,pon,6 605 data"Sign here says- {blk}VISIT THE{$a0}GREAT{$a0}CAVERN",sig,5 606 datatapestry,tap,14,painting,pai,7,larder,lar,10 610 dataclosed window with a garden beyond,win,8,passages,pas,11 612 data"Sign says- {blk}STORE{$a0}THE{$a0} MIRROR{$a0}HERE",sig,12,4-poster bed,bed,15 613 datatrapdoor,tra,97,trapdoor,tra,16,underground stream,str,19,stream,str,20 614 datadeep chasm,cha,20,deep chasm,cha,21,drunken ogre,ogr,21 615 datalarge rock,roc,22,wide lake,lak,24,lake,lak,26,small hole,hol,28 616 datamanhole (high up),man,26,manhole,man,27,grassy bank,ban,32 617 datamean-looking dwarf,dwa,31,hedge,hed,29,ornamental pool,poo,37 618 dataroad-block,roa,30,deserted shack,sha,36,inpeneterable forest,for,35 619 datapalace guard,gua,34 697 print"{down}Play Old or New Game (O or N) ? "; 698 getr$:ifr$<>"o"andr$<>"n"then698 699 printr$:ifr$="o"then4700 700 print"{blu}{down} Press 'RETURN'" 710 getr$:ifr$<>chr$(13)then710 720 d=0:poke198,0:if(i>18andi<29)and(t=0or(p(4)<>99andp(4)<>i))thend=1 730 ifdthenprint"{clr}{blu}It's too Dark to see!":goto810 740 print"{clr}I'm "l$(i)".":k=0:forj=1too:ifp(j)=ithenk=1 750 next:ifk=0then780 760 print"Visible Items are:{blu}{down}":forj=1too:ifp(j)=ithenprinto$(j)"." 770 next 780 ifd$(i)="00000000"then810 790 print"{down}{blu}I can go : {red}";:forj=1to4:ifmid$(d$(i),j*2-1,2)<>"00"thenprintq$(j)","; 800 next:print"{left}." 810 print"{down}{blu}----------------------"; 820 c$="":input"{blk}{down}Command {red}";c$:print"{blu}";:ifleft$(c$,3)<>"aga"thengosub1 825 ifc$=" "then982 830 ifv$="n**"orv$="s**"orv$="e**"orv$="w**"thenn$=v$:goto1500 840 ifv$="nor"orv$="sou"orv$="eas"orv$="wes"thenn$=v$:goto1500 845 ifv$="q**"orv$="qui"then6 850 ifv$="wai"then9500 860 ifv$="sav"then4600 880 ifv$="i**"orv$="inv"orv$="lis"then3000 890 ifn$="***"thenprint"I need a Noun too!":goto820 891 ifv$="get"orv$="tak"orv$="g**"then2000 892 ifv$="dro"orv$="lea"orv$="d**"then2500 895 ifv$="ope"then4000 900 ifv$="fol"then4500 905 ifv$="mov"orv$="m**"then5000 910 ifv$="rea"then5500 915 ifv$="say"then6000 920 ifv$="wea"then6500 925 ifv$="cli"then7000 930 ifv$="thr"orv$="t**"then7500 935 ifv$="loo"orv$="exa"orv$="l**"then8000 940 ifv$="swi"then8500 945 ifv$="jum"orv$="j**"then9000 950 ifv$="go*"then1000 955 ifv$="unl"then9600 960 ifv$="giv"then9700 965 ifv$="kil"orv$="k**"then9800 970 ifv$="cho"orv$="cut"then9900 981 print"I don't know "chr$(34)b$chr$(34):goto820 982 print"I don't understand.":goto820 983 print"I can't go there.":goto820 984 print"OK.":goto820 985 print"It's not Here!":goto820 986 print"I've already got it.":goto820 987 print"I'm carrying too much.":goto820 988 print"I haven't got it.":goto820 989 print"you could try LOOKing at things.":goto820 990 print"I can't "b$:print"a "a$:goto820 991 print"Not now ...":goto820 992 print"There's a passageway behind it!":goto700 993 print"Nothing Happens.":goto820 994 print"I see nothing Specia.{left}{inst}l":goto820 995 print"Something's there.":goto820 996 print"I find Something!":goto700 997 print"No air! ... I Drown!" 998 print"{down}I'm dead!":goto6. 999 print"He doesn't want it!":goto820 1000 ifn$="n**"orn$="s**"orn$="e**"orn$="w**"then1500 1010 ifn$="nor"orn$="sou"orn$="eas"orn$="wes"then1500 1020 ifn$<>"win"then1050 1030 ifi<>8orw=0then991 1040 i=5:goto720 1050 ifn$<>"lar"then1080 1060 ifi<>10then991 1070 i=9:goto720 1080 ifn$<>"ros"andn$<>"bed"then1110 1090 ifi<>2then991 1100 i=1:goto720 1110 ifn$<>"pon"then1150 1120 ifi<>6then991 1130 ifp(9)<>98then997 1140 i=18:goto1350 1150 ifn$<>"tra"then1200 1160 ifi<>15andi<>16then991 1170 ifi=15theni=16:goto720 1180 i=15:goto720 1200 ifn$<>"lak"then1240 1210 ifi<>24andi<>26then991 1220 ifp(11)<>99thenprint"I need a Boat.":goto820 1230 i=25:goto720 1240 ifn$<>"man"then1290 1250 ifi<>27andi<>29then991 1260 ifn=0then991 1270 ifi=27theni=29:p(37)=29:print"{down}OK.{sret}Below me, the ladder disappears!":p(1)=1:goto700 1280 print"{down}It's a long fall ... I break my Neck!":goto998 1290 ifn$<>"sha"then1320 1300 ifi<>36then991 1310 i=38:goto720 1320 ifn$<>"poo"then983 1330 ifi<>37then991 1340 ifp(9)<>98then997 1345 i=6 1350 print"OK.":forj=1to1500:next:print"{down}I surface.":goto700 1500 ifg=0andi=31and(n$="wes"orn$="w**")thenprint"The Dwarf bars my Wa!{left}{inst}y":goto820 1501 ifq=0andi=21thenprint"The Ogre bars my way!":goto820 1502 ifa=0andi=34and(n$="sou"orn$="s**")thenprint"The Guard bars my Wa!{left}{inst}y":goto820 1505 p=1:ifn$="sou"orn$="s**"thenp=3 1510 ifn$="e**"orn$="eas"thenp=5 1520 ifn$="w**"orn$="wes"thenp=7 1530 x=val(mid$(d$(i),p,2)) 1535 ifxtheni=x:goto720 1540 ifd=0then983 1550 print"{down}I fall and break my Neck!":goto6 2000 ifn$="i**"orn$="inv"then3000 2005 k=0:forj=1too:ifc$(j)=n$thenk=j:j=o+1 2010 next:ifp(k)=99then986 2015 ifk>13thenprint"{blu}It's beyond my power to do that.":goto820 2020 ifp(k)<>ithen990 2030 ifc=5then987 2040 c=c+1:p(k)=99:goto984 2500 k=0:forj=1too:ifc$(j)=n$thenk=j 2510 next:ifp(k)<>99andp(k)<>98then988 2520 c=c-1:ifi=25then7520 2530 ifk<>13thenp(k)=i:goto984 2540 ifp(10)<>ithenprint"It shatters!":goto6 2560 print"It lands in its Box, lights up, and says:" 2570 ifi<>12thenp(k)=i:print"{down}{grn}Hi there!":goto820 2580 print"{down}{grn}*Congratulations!* {blu}Youhave won!":goto6 3000 print"{down}I am carrying:{grn}":k=0:forj=1to13:ifp(j)=99orp(j)=98thenk=1 3010 next:ifk=0thenprint"Nothing at all!":goto820 3020 forj=1too:ifp(j)=99thenprinto$(j) 3030 ifp(j)=98thenprinto$(j)" (worn)" 3040 next:goto820 4000 ifn$="man"then4040 4010 ifn$<>"win"then990 4020 ifi<>8then991 4030 o$(21)="open window":w=1:goto700 4040 ifi<>27then991 4045 ifm=0thenprint"It's locked.":goto820 4050 n=1:o$(37)="open manhole":goto984 4500 ifn$<>"pat"then990 4510 ifi<>4then991 4520 i=6:goto720 4600 v$=chr$(13):print"OK.":open1,1,1,"m":print#1,i;v$q;v$n;v$m;v$y;v$b;v$w;v$d;v$t;v$c;v$g;v$a 4610 forj=1too:print#1,o$(j)v$p(j):next:forj=1tol:print#1,d$(j):next:close1:goto820 4700 print"OK.":open1:input#1,i,q,n,m,y,b,w,d,t,c,g,a 4710 forj=1too:input#1,o$(j),p(j):next:forj=1tol:input#1,d$(j):next:close1:goto700 5000 ifn$<>"pai"andn$<>"pic"then5030 5010 ifi<>7then991 5020 d$(7)="14081000":goto992 5030 ifn$<>"tap"then5060 5040 ifi<>14then991 5050 d$(14)="13070000":goto992 5060 ifn$<>"bed"then5090 5070 ifi<>15then991 5080 p(25)=i:goto996 5090 ifn$<>"roc"then990 5100 ifi<>22then991 5110 d$(22)="23000021":goto992 5500 ifn$<>"boo"then990 5510 ifp(6)<>99then988 5520 ifp(2)<>98thenprint"The print is too smallto read!":goto820 5530 print"{down}It says:":print"A useful magic word is'ZONK'.":goto820 6000 print"OK.":printchr$(34)a$chr$(34):ifn$<>"zon"or(p(4)<>99andp(4)<>i)then993 6010 print"The Torch lights up!":o$(4)="lit TORCH":t=1:goto700 6500 ifn$="spe"then6540 6510 ifn$<>"aqu"then990 6520 ifp(9)<>99then988 6530 p(9)=98:goto984 6540 ifp(2)<>99then988 6550 p(2)=98:goto984 7000 ifn$<>"lad"then990 7010 ifi=26then7050 7020 ifi<>5then991 7030 ifp(1)<>5then985 7040 i=8:goto700 7050 ifp(1)<>26then985 7060 i=27:goto700 7500 k=0:forj=1too:ifc$(j)=n$thenk=j 7510 next:ifp(k)<>99andp(k)<>98then988 7515 c=c-1:ifi=6then7540 7516 ifi<>25then7530 7520 print"It sinks in the Lake.":p(k)=97:ifk<>11then820 7525 print"{down}... so do I!":goto6 7530 print"OK.":p(k)=i:print"It falls at my Feet.":goto820 7540 print"It falls in the Pond.":p(k)=18:goto820 8000 ifn$="tap"orn$="pai"orn$="lar"orn$="poo"orn$="sha"then995 8005 if(n$="ros"orn$="bed")andp(1)=1then995 8010 ifn$="aro"then720 8090 ifn$="pal"orn$="gar"orn$="win"orn$="tra"orn$="pon"then995 8100 ifn$<>"cel"then8180 8110 ifi<>16then985 8115 ifbthen994 8120 b=1:p(10)=16:goto996 8180 ifn$="cha"orn$="lak"thenprint"It's very Deep!":goto820 8240 ifn$="ogr"orn$="gua"thenprint"He wants Something!":goto820 8300 ifn$<>"hed"then994 8310 ifi<>29then985 8320 print"I find a path leading East!":d$(29)="31303300":goto700 8500 ifn$="lak"then8560 8510 ifn$<>"str"then990 8520 ifi<>19andi<>20then991 8530 ifp(9)<>98then997 8540 ifi=19theni=20:goto720 8550 i=19:goto720 8560 ifi<>24andi<>25andi<>26then991 8570 print"It's too wide! I've drowned!":goto998 9000 ifn$="dow"then9060 9005 ifn$<>"cha"then990 9010 ifi<>20andi<>21then991 9020 ifc>4thenprint"I'm carrying too much!";:goto1550 9040 ifi=20theni=21:goto720 9050 i=20:goto720 9060 ifi<>27then991 9070 i=26:goto720 9500 print"Time passes ...":forj=1to1500:next:ifi<>25then993 9510 print"{down}The canoe reaches the Opposite Shore.":y=-y:ify=1theni=26:goto700 9520 i=24:goto700 9600 ifn$<>"man"then990 9610 ifi<>27then991 9615 ifp(5)<>99andp(5)<>1thenprint"I need a Key!":goto820 9620 ifmthenprint"It's already unlocke.{left}{inst}d":goto820 9630 m=1:goto984 9700 ifi=34then9740 9705 ifi<>21then991 9710 ifn$<>"whi"orq=1then999 9720 ifp(8)<>99then988 9730 p(8)=97:p(31)=97:c=c-1:q=1:goto720 9740 ifn$<>"med"ora=1then999 9750 ifp(7)<>99then988 9760 p(7)=97:p(45)=97:a=1:c=c-1:goto720 9800 ifn$<>"gua"andn$<>"ogr"andn$<>"dwa"then990 9810 ifp(3)<>99thenprint"I need a Sword!":goto820 9820 ifn$<>"dwa"then9850 9830 ifi<>31then985 9840 print"OK.":g=1:o$(39)="dead dwarf":goto700 9850 ifn$="gua"then9880 9860 ifi<>21then985 9870 print"He survives my attack,and strikes back!":goto998 9880 ifi<>34then985 9890 goto9870 9900 ifp(12)<>99thenprint"I need an Axe!":goto820 9910 ifn$<>"tre"andn$<>"for"then990 9920 ifi<>35then985 9930 print"I find a Secret Path!":d$(35)="36330000" 9940 o$(44)=o$(44)+" secret path":goto700