10 REM ' "BA=BLUNT AXE GG=GRUE GONE DD=DRAGON DEAD CL=CLIMB LADDER CC=CLOSET CHOPPED AD=APPLE DOWN EI=ENOUGH INVENTORY DF=DUG AND FOUND ALREADY SA=SHOWED AMULET DS=DUG IN SAND
540 A$="": F$="": S$="": IF RM=2 THEN EG=EG+1: IF EG=10 AND GG<>1 THEN 7620
550 IF RM=30 AND DD<>1 THEN FB=FB+1
560 IF FB<>3 THEN 610 ELSE SH=SH+1
570 IF OB(44)<>-1 THEN PRINT"I have been burnt by a fire breathing dragon!": GOTO 7620
580 IF OB(44)=-1 THEN PRINT"The dragon sends a breath of fire at me, but it reflects off my shield.":FB=0
590 IF SH=2 THEN PRINT"I don't know if I can hold the shield for much longer, because it's very hot!": GOTO 540
600 IF SH=3 THEN PRINT"The shield is too hot to hold, so I drop it!": OB(44)=RM: GS=1: GOSUB 8090: GOTO 3630
610 INPUT"What is your command >>";A$
620 IF LEN(A$)>15 THEN PRINT"Be Sensible!!!": GOTO 540
630 IF A$="" THEN 7310
640 GOSUB 7730
650 IF A$<>"" THEN A$=A$+" "
660 FOR I=1 TO LEN(A$)
670 IF MID$(A$,I,1)<>" " THEN NEXT I
680 F$=LEFT$(A$,I-1)
690 FOR I=LEN(A$) -1 TO 1 STEP-1
700 IF MID$(A$,I,1)<>" " THEN NEXT I
710 S$=MID$(A$,I+1,LEN(A$)-I-1)
720 IF F$< "A" OR F$> "Z" THEN GOTO 7310
730 ON ASC(A$)-64 GOTO 740,750,790,1020,1270,2000,2070,3090,3100,3300,3510,3610,3740,3840,3970,4150,4400,4470,4690,5340,5520,5890,5900,6050,6150,6160
740 REM *** A ***
750 REM *** B ***
760 IF F$<>"BUY" THEN 7310
770 GOTO 3020
780 GOTO 7580
790 REM *** C ***
800 IF F$<>"CLIMB" THEN 910
810 FOR I=1 TO NO: IF S$=OB$(I) THEN 830 ELSE NEXT I
820 GOTO 7310
830 IF OB(I)=-1 THEN 7360
840 IF OB(I)<>RM THEN 7360
850 IF S$=OB$(1) AND OB(1)=1 THEN CL=1: GOTO 7250
860 IF S$=OB$(1) THEN 7250
870 IF S$=OB$(49) THEN PRINT"The walls are far too slippery.":GOTO 540
880 IF F$<>"CHOP" THEN 1010
890 FOR I=1 TO NO: IF S$=OB$(I) THEN 940
900 NEXT I: GOTO 7310
910 IF OB(8)=-1 AND BA=0 THEN 950
920 IF OB(8)<>-1 THEN 7360
930 IF BA=1 THEN PRINT"Try examining axe!": GOTO 540
940 IF RM=6 AND S$=OB$(3) AND AD<>1 THEN PRINT"The vibrations of the axe loosen the apple from the branch, and it falls to the ground.": AD=1: BA=1: GOTO 540
950 IF RM=20 AND S$=OB$(30) THEN PRINT"I make a hole big enough to get through.": CC=1: BA=1: GOTO 540
960 IF RM=7 AND S$=OB$(35) THEN PRINT"You have fun, chopping the fence into splinters": OB(35)=0: OB(48)=7: BA=1: GOTO 3630
970 IF RM=6 AND S$=OB$(3) THEN PRINT "The vibrations caused by the axe, cause the apple to fall.": AD=1: BA=1: GOTO 540
980 IF RM=1 OR RM=2 AND S$=OB$(1) THEN PRINT "You violently chop the ladder into splinters.": LD=1: BA=1: OB(1)=0: OB(50)=RM: GOTO 3630
990 GOTO 7580
1000 IF F$<>"CUT" THEN 7310
1010 GOTO 5160
1020 REM *** d ***
1030 IF F$<>"D" THEN 1070
1040 IF RM=6 THEN 6180
1050 IF RM=29 AND SR=1 THEN 6180
1060 IF RM=29 AND SR=2 THEN 6210
1070 IF F$<>"DROP" THEN 1140
1080 FOR I=1 TO NO: IF S$=OB$(I) THEN 1100
1090 NEXT I: GOTO 7310
1100 IF OB(I)<>-1 THEN 7340
1110 IF S$=OB$(31) THEN WG=0
1120 IF S$=OB$(26) THEN 4280
1130 OB(I)=RM: EI=EI-1: GOTO 3630
1140 REM * DIG *
1150 IF OB(9)<>-1 THEN 7360
1160 IF F$<>"DIG" THEN 7310
1170 IF RM<>15 THEN 1220
1180 IF DF=1 THEN 7500
1190 IF SA<>1 THEN PRINT"Ghost won't let me!": GOTO 540
1200 OB(13)=15: OB(15)=15: DF=1
1210 GOTO 7520
1220 IF RM<>17 THEN 1260
1230 IF DS=1 THEN 7500
1240 OB(10)=17: DS=1
1250 GOTO 7520
1260 GOTO 7500
1270 REM *** E ***
1280 IF F$<>"E" THEN 1460
1290 IF RM=18 THEN 6660
1300 IF RM=14 THEN 6540
1310 IF RM=19 THEN 6760
1320 IF RM=6 THEN 6510
1330 IF RM=22 THEN 6790
1340 IF RM=5 THEN 6270
1350 IF RM=4 THEN 6240
1360 IF RM=3 THEN 6210
1370 IF RM=25 THEN 6850
1380 IF RM=27 THEN 6940
1390 IF RM=9 THEN 6390
1400 IF RM=8 THEN 6450
1410 IF RM<>30 THEN 1440
1420 IF DD<>1 THEN PRINT"Dragon won't let me!": GOTO 540
1430 IF DD=1 THEN 7140
1440 REM * EXAM *
1450 GOTO 7460
1460 IF F$<>"EXAM" THEN 1500
1470 FOR I=1 TO NO: IF S$=OB$(I) THEN 1500
1480 NEXT I
1490 GOTO 7310
1500 IF OB(I)<>RM AND OB(I)<>-1 THEN 7360 ELSE 1510
1510 IF S$=OB$(1) THEN PRINT"It's fairly short.": GOTO 540
1520 IF S$<>OB$(38) THEN 1550
1530 IF RM=16 OR RM=17 THEN PRINT"It's a 2-metre wide bottomless chasm." ELSE 7360
1540 GOTO 540
1550 IF S$=OB$(2) THEN PRINT"He gives you a big grin, whilst licking his chops": GOTO 540
1560 IF S$=OB$(18) THEN PRINT"It's got something written on it.": GOTO 540
1570 IF S$=OB$(19) THEN PRINT"It looks quite valuable.": GOTO 540
1580 IF S$=OB$(44) AND SH=0 THEN PRINT"It's got a sense of strength about it!": GOTO 540
1590 IF S$=OB$(44) AND SH>1 THEN PRINT"The shield is red hot!": GOTO 540
1600 IF S$=OB$(3) AND AA=0 THEN 1610 ELSE 1620
1610 PRINT"The tree is petrified, yet there is a red apple on one of it's branches.": OB(4)=RM: AA=1: GOSUB 8090: GOTO 3630
1620 IF S$=OB$(3) AND AA=1 AND AD=0 THEN 1610
1630 IF S$=OB$(3) AND AD=1 THEN PRINT"It's petrified!": GOTO 540
1640 IF S$="SYMBOL" THEN PRINT "It resembles a ghost.": GOTO 540
1650 IF S$=OB$(37) THEN PRINT"It's rusty": GOTO 540
1660 IF S$=OB$(4) THEN PRINT"It's a big, red, heathly, looking apple.": GOTO 540
1670 IF S$=OB$(21) THEN PRINT"It's stuck to the wall": GOTO 540
1680 IF S$=OB$(22) THEN PRINT"It's a smelly decayed corpse.": GOTO 540
1690 IF S$=OB$(51) THEN PRINT"It's The Treasure Of Elgon!!!!": GOTO 540
1700 IF S$=OB$(36) THEN PRINT"It's a sharpening stone.": GOTO 540
1710 IF S$=OB$(24) THEN PRINT"There's something written on it.": GOTO 540
1720 IF S$=OB$(6) THEN PRINT"It looks deserted.": GOTO 540
1730 IF S$=OB$(26) THEN PRINT"It seems sturdy.": GOTO 540
1740 IF S$=OB$(7) AND MS=0 THEN PRINT"He looks poor.": GOTO 540
1750 IF S$=OB$(7) AND MS=1 THEN PRINT"He's dead! And I don't think his condition will get any better!": GOTO 540
1760 IF S$<> OB$(20) THEN 1790
1770 IF AI<>1 THEN PRINT"There is a small round hole in the middle.": GOTO 540
1780 PRINT"There is an ankh inserted in the middle of it.": GOTO 540
1790 IF S$=OB$(8) THEN 1980
1800 IF S$=OB$(29) THEN PRINT"It has a very strong current.": GOTO 540
1810 IF S$<>OB$(30) THEN 1840
1820 IF CC<>1 THEN PRINT"It's an old WOODEN closet, and it's locked": GOTO 540
1830 PRINT"It's got a hole chopped in it.": GOTO 540
1840 IF S$=OB$(31) THEN PRINT"They are reading glasses.": GOTO 540
1850 IF S$=OB$(10) THEN PRINT"It's got a strange symbol that protrudes from it.": GOTO 540
1860 IF S$=OB$(32) THEN PRINT"It's steel and it feels very thick.": GOTO 540
1870 IF S$=OB$(11) THEN PRINT"He is big, and looks like he could have great strength.": GOTO 540
1880 IF S$<>OB$(35) THEN 1910
1890 IF PA=1 THEN 7420
1900 PRINT"It has a loose plank, nailed on with one nail.": GOTO 540
1910 IF S$=OB$(12) THEN PRINT"It is an old grave covered with weeds.": GOTO 540
1920 IF S$=OB$(34) THEN PRINT"It has a clawed head.": GOTO 540
1930 IF S$=OB$(38) THEN PRINT"The chest looks very old and you sense it is full of treasure.": GOTO 540
1940 IF S$=OB$(13) THEN PRINT"They look like they are human.": GOTO 540
1950 IF S$=OB$(14) THEN PRINT"It is a ring with a small thin screw coming off it.": GOTO 540
1960 IF S$=OB$(33) THEN PRINT"It's a sentry post!": GOTO 540
1970 GOTO 7420
1980 IF BA<>1 THEN PRINT"It's sharp": GOTO 540
1990 IF BA=1 THEN PRINT"It's blunt.": GOTO 540
2000 REM *** F ***
2010 IF F$<>"FEED" THEN 7310
2020 IF S$<>OB$(2) THEN 2060
2030 IF OB(4)<>-1 THEN 7360
2040 IF RM<>2 THEN 7360
2050 PRINT"The grue has lived for over 100 years and along the way, he has learnt how to feed himself!!!": GOTO 540
2060 GOTO 7580
2070 REM *** G ***
2080 IF F$<>"GET" THEN 2550
2090 IF EI>4 THEN PRINT"I'm carrying too much!": GOTO 540
2100 FOR I=1 TO NO: IF S$=OB$(I) THEN 2110 ELSE NEXT I: GOTO 7310
2110 IF OB(I)<>-1 THEN 2120 ELSE 2140
2120 IF S$<>OB$(26) THEN 2170
2130 IF PR=1 OR PA=0 AND RM=7 THEN PRINT "How?": GOTO 540
2140 IF PA=1 AND OB(26)=RM THEN 2540
2150 IF RM<>7 THEN 7380
2160 IF OB(26)=-1 THEN 7480
2170 IF S$=OB$(52) THEN 2180 ELSE 2200
2180 IF RM=31 AND MC=1 THEN 7400
2190 GOTO 7560
2200 IF OB(I)<>RM THEN 7380
2210 IF S$=OB$(36) THEN PRINT"It's Heavy!": GOSUB 8090: GOTO 2540
2220 IF S$=OB$(1) THEN 2540
2230 IF S$=OB$(48) THEN 2540
2240 IF S$=OB$(51) THEN 7190
2250 IF S$=OB$(44) AND GS=0 THEN 2540
2260 IF S$=OB$(44) AND GS=1 THEN PRINT"Too hot!": GOTO 540
2270 IF S$=OB$(43) THEN PRINT"I Feel power within it": GOSUB 8090: GOTO 2540
2280 IF S$=OB$(8) THEN 2540
2290 IF S$=OB$(9) AND MP<>1 THEN PRINT"Merchant wants something.": GOTO 540
2300 IF S$=OB$(9) AND MP=1 THEN 2540
2310 IF S$=OB$(18) THEN PRINT"It's too Heavy!": GOTO 540
2320 IF S$=OB$(38) THEN PRINT"It's too Heavy!": GOTO 540
2330 FOR X=10 TO 11: IF S$=OB$(X) THEN 2540 ELSE NEXT X
2340 FOR Y=13 TO 15: IF S$=OB$(Y) THEN 2540 ELSE NEXT Y
2350 IF S$=OB$(18) THEN 7400
2360 IF S$=OB$(12) THEN 7400
2370 IF S$=OB$(19) THEN 2540
2380 IF S$=OB$(26) THEN 2540
2390 IF S$=OB$(27) THEN 2540
2400 IF S$=OB$(31) THEN 2540
2410 IF S$=OB$(7) AND MS=0 THEN PRINT"He avoids you saying 'Are you some kind of Weirdo??'": GOTO 540
2420 IF S$=OB$(7) AND MS=1 THEN PRINT"I don't want to pick up a body with it's guts all over the place!": GOTO 540
2430 IF S$=OB$(34) THEN 2540
2440 IF S$=OB$(35) AND UH=1 THEN 2540
2450 IF S$=OB$(37) AND PS=1 THEN 2540
2460 IF S$<>OB$(22) THEN 2490
2470 PRINT "No Thanks!"
2480 GOTO 540
2490 IF S$=OB$(24) THEN PRINT"It's Stuck!!": GOTO 540
2500 IF S$=OB$(4) AND AA=0 THEN PRINT"I can't see any apple around here!": GOTO 540
2510 IF S$=OB$(4) AND AD<>1 THEN PRINT"I can't reach it!": GOTO 540
2520 IF S$=OB$(4) AND AD=1 THEN OB(4)=-1: GOTO 3630
2530 GOTO 7400
2540 OB(I)=-1: EI=EI+1: GOTO 3630 :REM EI = enough inventory
2550 REM * GO *
2560 IF F$<>"GO" THEN 2920
2570 IF S$<>OB$(5) THEN 2630
2580 IF RM<>2 THEN 7360
2590 IF GG<>1 THEN 2790
2600 IF OB(1)=-1 THEN PRINT"Something won't fit!": GOTO 540
2610 IF S$=OB$(5) AND RM<>2 THEN 7360
2620 GOTO 6240
2630 FOR I=1 TO NO: IF S$=OB$(I) THEN 2640 ELSE NEXT I: GOTO 7360
2640 IF S$="PLANK" THEN 2750
2650 IF S$=OB$(52) AND RM=31 AND MC=1 THEN 7290
2660 IF OB(I)<>RM THEN 7360
2670 IF S$=OB$(6) AND RM=7 THEN 6390
2680 IF S$=OB$(25) THEN 6940
2690 IF S$=OB$(17) THEN 6880
2700 IF S$=OB$(1) THEN 830
2710 IF S$=OB$(42) THEN 6820
2720 IF S$=OB$(29) THEN PRINT "I've been swept under by the current, and drown.": GOTO 7620
2730 IF S$=OB$(23) THEN 7000
2740 IF S$<>OB$(26) THEN 2830
2750 IF PR<>1 THEN 7600
2760 IF RM=14 THEN 6600
2770 IF RM=15 THEN 6570
2780 GOTO 7600
2790 IF GG<> 1 THEN PRINT"Grue won't let me!": GOTO 540
2800 GOTO 6240
2810 IF AI<>1 THEN PRINT"I Don't know what you mean.": GOTO 540
2820 GOTO 7000
2830 IF S$<>OB$(33) THEN 2860
2840 IF RM<>12 THEN 7360
2850 GOTO 6480
2860 IF S$<>OB$(30) THEN 2890
2870 IF CC<>1 THEN PRINT "Only ghosts can walk through doors!": GOTO 540
2880 IF CC=1 THEN 6730
2890 IF S$<>OB$(32) THEN 2910
2900 IF PS=1 AND DO=1 THEN 7060 ELSE 7360
2910 GOTO 7310
2920 REM * give *
2930 IF F$<>"GIVE" THEN 7310
2940 FOR I=1 TO NO: IF S$=OB$(I) THEN 2960
2950 NEXT I: GOTO 7310
2960 IF S$<>OB$(4) THEN 3010
2970 IF RM=13 THEN 3060
2980 IF RM<>2 THEN 7360
2990 IF OB(4)<>-1 THEN 7360
3000 PRINT"To Whom?": GOTO 540
3010 IF S$<>OB$(19) THEN 3050
3020 IF RM<>13 THEN 7360
3030 IF OB(19)<>-1 THEN 7360
3040 CM=1: GOTO 3000
3050 IF S$<>OB$(4) THEN 7600
3060 IF OB(4)<>-1 THEN 7360
3070 PRINT"To Whom?": ME=1: AM=1: GOTO 540
3080 GOTO 7600
3090 REM *** H ***
3100 REM *** I ***
3110 IF F$<>"I" THEN 3200
3120 Z=0: FOR I=1 TO NO: IF OB(I)=-1 THEN Z=Z+1
3130 NEXT I
3140 IF Z=0 THEN PRINT"I'm not carrying anything.": GOTO 540
3150 PRINT:PRINT"I am carrying the following:"
3160 FOR I=1 TO NO
3170 IF OB(I)=-1 THEN PRINT OB$(I)+". ";
3180 NEXT I: PRINT
3190 GOTO 540
3200 IF F$<>"INSERT" THEN 7310
3210 FOR I=1 TO NO: IF S$=OB$(I) THEN 3230
3220 NEXT I: GOTO 7310
3230 IF S$<>OB$(14) THEN 3290
3240 IF OB(14)<>-1 THEN 7360
3250 IF RM<>18 THEN 7360
3260 PRINT"It fits perfectly in the hole.": GOSUB 8090
3270 OB(14)=0:AI=1
3280 GOTO 3630
3290 GOTO 7580
3300 REM *** J ***
3310 IF F$<>"JUMP" THEN 7310
3320 IF RM<>29 THEN 3370
3330 IF CL=1 THEN 6330
3340 PRINT" I jump up, and luckily land back on the ladder - jumping whilst on a ladder is not a safe thing to do!"
3350 CL=0
3360 GOTO 540
3370 IF RM<>16 THEN 3410
3380 PRINT"I jump across the chasm, and just make it to the other side."
3390 GOSUB 8090
3400 GOTO 6660
3410 IF RM<>17 THEN 3460
3420 IF OB(36)=-1 THEN PRINT"The weight of the stone, shortens the jump, and I fall down the pit.": GOTO 7620
3430 PRINT"I jump across the chasm, and just make it to the other side."
3440 GOSUB 8090
3450 GOTO 6630
3460 IF RM<>1 THEN 3480
3470 PRINT"I jump as far as I could, but I end up a few inches short from the top.": GOTO 540
3480 IF RM<>2 THEN 3500
3490 PRINT"I hit my head on the roof.": GOTO 540
3500 PRINT"Whee!!": GOTO 540
3510 REM *** K ***
3520 IF F$<>"KILL" THEN 7310
3530 IF S$=OB$(7) AND RM=13 AND MS=0 THEN 3570
3540 IF S$=OB$(46) AND RM=30 AND DD=0 THEN 3580
3550 IF S$=OB$(2) AND RM=2 AND GG=0 THEN 3560 ELSE 7600
3560 IF S$<>OB$(2) AND RM<>2 THEN 3570 ELSE 3590
3570 IF S$<>OB$(7) AND RM<>13 THEN 3580 ELSE 3590
3580 IF S$<>OB$(46) AND RM<>30 THEN 3600 ELSE 3590
3590 PRINT"How?": GOTO 540
3600 GOTO 7580
3610 REM *** L ***
3620 IF F$<>"LOOK" THEN 7310
3630 PRINT CLS$
3640 PRINT RM$(RM)+VI$
3650 PRINT
3670 FOR I=1 TO NO: IF OB(I)=RM THEN PRINT OB$(I)+". ";
3680 NEXT I
3700 PRINT:PRINT
3710 PRINT"Some obvious exits are :- ";
3720 PRINT DI$(RM): PRINT STRING$(80,45)
3730 GOTO 540
3740 REM *** M ***
3750 IF F$<>"MOVE" THEN 7310
3760 FOR I=1 TO NO: IF OB$(I)=S$ THEN 3770 ELSE NEXT I: GOTO 7310
3770 IF S$<>OB$(38) THEN 3810
3780 IF RM<>31 THEN 7360
3790 IF MC=1 THEN 3800 ELSE PRINT"After moving the chest, you discover a small hole under it.": GOSUB 8090: OB(52)=31: MC=1: GOTO 3630
3800 PRINT"OK, I move it back over the hole.": OB(52)=0: MC=0: GOSUB 8090: GOTO 3630
3810 IF S$=OB$(36) THEN PRINT"OK": GOTO 540
3820 FOR I=1 TO NO: IF S$=OB$(I) THEN 7580 ELSE NEXT I
3830 GOTO 7310
3840 REM *** N ***
3850 IF F$<>"N" THEN 7310
3860 IF RM=1 THEN 6210
3870 IF RM=16 THEN 6600
3880 IF RM=13 THEN 6330
3890 IF RM=20 THEN 6820
3900 IF RM=24 THEN 6790
3910 IF RM=6 THEN 6360
3920 IF RM<>30 THEN 3950
3930 IF DD<>1 THEN PRINT "Dragon won't let me!": GOTO 540
3940 GOTO 6300
3950 IF RM=22 THEN 6910
3960 GOTO 7460
3970 REM *** O ***
3980 IF F$<>"OPEN" THEN 7310
3990 FOR I=1 TO NO: IF S$=OB$(I) THEN 4010
4000 NEXT I:GOTO 7310
4010 IF S$<>OB$(21) THEN 4070
4020 IF BO=1 THEN PRINT"It's already open!": GOTO 540
4030 IF RM<>11 THEN 7360
4040 IF BU<>1 THEN PRINT "It's locked!":GOTO 540
4050 OB(16)=11:BO=1
4060 GOTO 3630
4070 IF S$<>OB$(32) THEN 4120
4080 IF RM<>5 THEN 7360
4090 IF PS<>1 THEN 7360
4100 PRINT"Ok.": DO=1
4110 GOTO 540
4120 IF S$<>OB$(38) THEN 7580
4130 IF RM<>31 THEN 7360
4140 PRINT"It won't budge!": GOTO 540
4150 REM *** P ***
4160 IF F$<>"PAY" THEN 4220
4170 IF S$<>OB$(7) THEN 4250
4180 IF MP=1 AND OB(19)=-1 THEN PRINT"OK": OB(19)=0: GOTO 540
4190 IF RM<>13 THEN 7360
4200 IF OB(19)<>-1 THEN 7360
4210 OB(19)=0:MP=1:PRINT"The merchant offers you the shovel.": GOTO 540
4220 IF F$<>"PUT" THEN 4330
4230 FOR I=1 TO NO: IF S$=OB$(I) THEN 4260
4240 NEXT I: GOTO 7310
4250 GOTO 7580
4260 IF S$<>OB$(26) THEN 4320
4270 IF OB(26)<>-1 THEN 7360
4280 IF RM<>14 THEN 4320
4290 PRINT"The plank is placed over the river."
4300 GOSUB 8090
4310 OB(41)=15: OB(26)=RM: PR=1
4320 OB(I)=RM: GOTO 3630
4330 IF F$<>"PULL" THEN 4380
4340 IF S$<>OB$(16) THEN 4390
4350 PRINT"You hear a loud thud, but nothing appears to happen."
4360 OB(42)=12: DB=1
4370 GOTO 540
4380 IF F$<>"PLACE" THEN 7310
4390 GOTO 4230
4400 REM *** Q ***
4410 IF F$<>"QUIT" THEN 7310
4420 PRINT"Are you sure you want to Quit <Y/N> ?"
4430 GOSUB 7730
4440 Z$=INKEY$: IF Z$="Y" OR Z$="y" THEN 7630
4450 IF Z$="N" OR Z$="n" THEN 4460 ELSE 4440
4460 PRINT"OK": GOTO 540
4470 REM *** R ***
4480 IF F$<>"READ" THEN 4600
4490 FOR I=1 TO NO: IF S$=OB$(I) THEN 4510
4500 NEXT I: GOTO 7310
4510 IF S$<>OB$(24) THEN 4560
4520 IF WG<>1 THEN 7360
4530 IF RM<>1 THEN 7360
4540 PRINT: PRINT" If you are STUMPed,": PRINT" then the magic word is":PRINT" in Alphabetical; and 5"
4550 PRINT" long; and don't forget": PRINT" first one is also the": PRINT " last...": PRINT: GOTO 540
4560 IF S$<>OB$(18) THEN 4580
4570 IF RM<>21 OR WG<>1 THEN 7360
4580 PRINT"The Book has one word written in it:": PRINT:PRINT" RACK": PRINT:OB(17)=21: GOSUB 8090
7110 IF OB(44)<>-1 THEN PRINT"I have been burnt by a fire breathing dragon!": GOTO 7620
7120 IF OB(44)=-1 THEN PRINT"The dragon sends a breath of fire at me, but it reflects off my shield.":FB=0
7130 GOTO 540
7140 REM *** Room 31 ***
7150 RM=31
7160 OB(38)=RM
7170 GOTO 3630
7180 PRINT CLS$
7190 FA$="FANTASTIC!!!! You Solved It!"
7200 FOR X=13 TO 20: PRINT: NEXT X
7205 PRINT FNCUR$(26,15);
7210 FOR I=1 TO LEN(FA$)
7220 PRINT MID$(FA$,I,1);
7230 NEXT I
7240 GOTO 7630
7250 REM *** Ladder Room ***
7260 SR=RM
7270 RM=29
7280 GOTO 3630
7290 REM *** Room 32 ***
7300 RM=32: OB(51)=RM: GOTO 3630
7310 REM *** Errors ***
7320 PRINT"I don't understand!"
7330 GOTO 540
7340 PRINT"I'm not carrying anything!"
7350 GOTO 540
7360 PRINT"I can't do that...Yet!"
7370 GOTO 540
7380 PRINT"I can't see it here."
7390 GOTO 540
7400 PRINT"It's beyond my power to do that."
7410 GOTO 540
7420 PRINT"I see nothing special."
7430 GOTO 540
7440 PRINT"Nothing happens."
7450 GOTO 540
7460 PRINT"I can't go that way!"
7470 GOTO 540
7480 PRINT"I already have that."
7490 GOTO 540
7500 PRINT"I found nothing!"
7510 GOTO 540
7520 PRINT"I found something!"
7530 GOSUB 8090: GOTO 3630
7540 PRINT"Huh?"
7550 GOTO 540
7560 PRINT"What?"
7570 GOTO 540
7580 PRINT"I can't do that."
7590 GOTO 540
7600 PRINT"Sorry."
7610 GOTO 540
7620 PRINT"I'm Dead!"
7630 PA$="Play Again (Y/N)"
7640 FOR Z=15 TO 20: PRINT FNCUR$(1,Z);: PRINT STRING$(78,32): NEXT Z
7645 PRINT FNCUR$(32,17);
7650 FOR I=1 TO LEN(PA$)
7660 PRINT MID$(PA$,I,1);
7670 FOR K=1 TO 40: NEXT K
7680 NEXT I
7690 P$=INKEY$
7700 IF P$="Y" OR P$="y" THEN RESTORE: RUN
7710 IF P$="N" OR P$="n" THEN PRINT:PRINT:PRINT TAB(35);"Goodbye...":END
7720 GOTO 7690
7730 FOR J=1 TO LEN(A$)
7740 C$=MID$(A$,J,1): IF ASC(C$)<97 THEN 7760
7750 MID$(A$,J,1) = CHR$(ASC(C$)-32)
7760 NEXT J
7770 RETURN
7780 DATA 2,2,6,0,2,7,13,7,13,0,15,15,0,27,0,0,0,21,4,18,11,23,0,1,23,0,19,0,14,20,9,5,12,10,7,28,5,31,16,15,0,0,25,24,0,30,17,0,1,0,0,0
7790 DATA "LADDER","GRUE","TREE","APPLE","TUNNEL","SHACK","MERCHANT","AXE","SHOVEL","AMULET","GHOST","GRAVE","BONES","ANKH","KEY","LEVER","PASSAGE","BOOK","COIN","STUMP","BOX","SKELETON","CRAWLWAY","SIGN","STAIRS","PLANK","SAW","HOLE","RIVER","CLOSET"
7800 DATA "GLASSES","DOOR","POST","HAMMER","FENCE","STONE","PADLOCK","CHEST","CHASM","RIVER","PLANK","DRAWBRIDGE","SWORD","SHIELD","VAULT","DRAGON","CHASM","SPLINTERS","PIT","SPLINTERS","TREASURE","HOLE"
7810 REM *** Heading ***
7820 PRINT CLS$: PRINT:PRINT
7825 PRINT TAB(18);" T H E T R E A S U R E O F E L G O N ":PRINT:PRINT
7830 PRINT" A DDDD V V EEEEE N N TTTTT U U RRRR EEEEE"
7840 PRINT" A A D D V V E NN N T U U R R E"
7850 PRINT" AAAAA D D V V EEE N NN N T U U RRRRR EEE"
7860 PRINT" A A D D V V E N NN N T U U R RR E"
7870 PRINT" A A DDDD VV EEEEE N NN T UUUUUU R R EEEEE"
7880 PRINT:PRINT
7890 PRINT" By: Keith Hawthorn."
7900 PRINT" -------------------"
7905 PRINT:PRINT" <Modified for the Microbee by A.Laughton>"
7910 PRINT:PRINT:PRINT" Press any key to start game!"
7920 Z$=INKEY$: IF Z$="" THEN 7920 ELSE 7930
7930 PRINT CLS$
7940 PRINT" The Treasure of Elgon."
7950 PRINT" ----------------------"
7960 PRINT:PRINT:PRINT
7970 PRINT" In this adventure you are required to find the Treasure of Elgon, but along": PRINT: PRINT" your way you will encounter many problems."
7980 PRINT: PRINT" This adventure will accept two word commands, ie: exam grue, climb pit etc.": PRINT
7990 PRINT " You can also SAVE GAME, and RESTORE GAME.":PRINT
8000 PRINT" GGGG OOO OOO DDDD L U U CCCC K K ! ! !"
8010 PRINT" G O O O O D D L U U C K KK ! ! !"
8020 PRINT" G GG O O O O D D L U U C KK ! ! !"
8030 PRINT" G G O O O O D D L U U C K KK"
8040 PRINT" GGG OOO OOO DDDD LLLLL UUU CCCC K K ! ! !"
8050 PRINT:PRINT:PRINT:PRINT" Do you wish to restore a saved game?"
8060 Z$=INKEY$:IF Z$="Y" OR Z$="y" THEN 4620
8070 IF Z$="N" OR Z$="n" THEN RETURN
8080 GOTO 8060
8090 REM * WAIT FOR KEY *
8100 PRINT:PRINT"Press a key to continue."
8110 Z$=INKEY$:IF Z$="" THEN 8110 ELSE RETURN
8120 FOR I=1 TO NO: PRINT OB(I);" ";OB$(I);" ";: NEXT I