10 DIM E(55):X=0 20 RESTORE 770:FOR B=1 TO 55:READ E(B ):NEXT B 30 CLS:PRINT CHR$129"Do you want the instructions(Y or N) ?";:Z$=GET$:IF Z$=" N" THEN 120 ELSE IF Z$="Y" THEN 40 ELSE 30 40 CLS:PRINT'''CHR$130"You have escap ed from the castle with a"CHR$130"valuab le jewel which you keep hidden." 50 TIME=0:REPEAT UNTIL TIME>400 60 PRINT''CHR$131" You must escape as quickly as possible"CHR$131"from the ar ea around the castle,as your"CHR$131"tim e is limited before Dracula's guards"CHR $131"find you and then kill you." 70 TIME=0:REPEAT UNTIL TIME>500 80 PRINT''CHR$132" The computer has a fairly large number"CHR$132"of commands ,so therefore if one command"CHR$132"doe s not work then try another." 90 TIME=0:REPEAT UNTIL TIME>500 100 PRINT''CHR$133"The first three let ters of each command"CHR$133"and object need be typed in,although,if"CHR$133"des ired,the full word may be entered." 110 TIME=0:REPEAT UNTIL TIME>500 120 CLS:A=1:R=0:S=0:T=0:W=0:SOUND &11, 0,0,0 130 RESTORE 140 ENVELOPE 1,1,-1,1,-1,0,15,30,0,0,0 ,0,W/3,0 150 SOUND 1,1,W,1 160 W=W+1:IF POS=0 PRINT CHR$130; 170 IF W>34 AND W<70 PRINT"Guards have discovered Dracula's death." 180 IF W>69 AND W<105 PRINT"They have now been alerted to find you." 190 IF W>104 AND W<140 PRINT"Your pres ence has been detected." 200 IF W>139 AND W<175 PRINT"You have been noticed." 210 IF W>174 AND W<210 PRINT"The guard s want to kill you." 220 IF W>209 AND W<245 PRINT"They are closing round you." 230 IF W=245 PRINT"Dracula's guards ha ve killed you.":GOTO 890 240 IF POS=0 PRINT CHR$130; 250 IF A=26 AND E(53)<>0 PRINT"You hav e fallen down into a hole in the"CHR$130 "dark.":GOTO 890 260 IF A=42 AND E(31)<>-1 PRINT"The ai r is too thin for you to breathe.":GOTO 890 270 IF A=8 AND E(20)=A AND E(15)=A E(1 5)=50:E(16)=A:PRINT"The anteater has eat en the termites,and"CHR$130"has revealed a harpoon." 280 IF E(31)<>50 AND S=1 AND A=43 PRIN T" Your air-cylinder has exploded in you r"CHR$130"face.":GOTO 890 290 IF A=35 AND T=1 PRINT"You have bee n stung by the scorpion.":GOTO 890 300 IF A=43 S=1 310 IF A=35 AND E(41)<>50 THEN T=1 320 IF E(51)=0 PRINT"You have sunk int o the sinking sand.":GOTO 890 330 IF E(44)<>0 AND A=36 PRINT"The cob ra has killed you.":GOTO 890:ELSE IF A=3 6 PRINT"The cobra keeps away from your g arlic." 340 IF A=13 AND E(6)<>-1 PRINT"You hav e sunk in the swamp.":GOTO 890 350 IF E(40)=0 AND E(39)<>51 PRINT"Dra cula has killed you.":GOTO 890 360 IF E(47)<>-1 AND A=32 PRINT"The mi notaur has killed you.":GOTO 890 370 IF A=21 AND E(26)<>50 PRINT"You ha ve fallen down a pit.":GOTO 890 380 IF A=30 AND E(34)<>50 OR A=29 AND E(34)=50 PRINT"You have drowned in the r iver.":GOTO 890 390 IF A=11 AND E(19)<>-1 PRINT"A guar d has killed you.":GOTO 890 400 IF POS=0 PRINT CHR$130; 410 FOR B=1 TO A:READ A$:NEXT B 420 VDU 31,0,3:PRINT CHR$130;A$ 430 PRINT'CHR$131"Exits:- ";:RESTORE 7 00:FOR C=1 TO A:READ D:NEXT C:IF D<>0 PR INT":North:"; 440 RESTORE 710:FOR C=1 TO A:READ D:NE XT C:IF D<>0 PRINT":South:"; 450 RESTORE 720:FOR C=1 TO A:READ D:NE XT C:IF D<>0 PRINT":East:"; 460 RESTORE 730:FOR C=1 TO A:READ D:NE XT C:IF D<>0 PRINT":West:"; 470 PRINT''CHR$132"Objects:- "; 480 H=0:RESTORE 740 490 FOR G=1 TO 55:READ C$:IF E(G)<>A O R H=6 NEXT G ELSE PRINT":";C$;":";:H=H+1 :IF H<>2 AND H<>4 NEXT G ELSE PRINT'CHR$ 132" ";:NEXT G 500 PRINT''CHR$133"Inventory:- "; 510 F=0:RESTORE 740 520 FOR G=1 TO 55:READ C$:IF E(G)<>0 A ND E(G)<>-1 OR F=6 NEXT G ELSE PRINT":"; C$;":";:F=F+1:IF F<>2 AND F<>4 NEXT G EL SE PRINT'CHR$133" ";:NEXT G 530 VDU 31,0,15,134:PRINT"[----------- --------------------------]" 540 VDU 31,0,19,134:PRINT"[----------- --------------------------]":VDU 31,0,17 ,135 550 IF A=49 THEN 2020 560 INPUT"Command? "B$ 570 CLS:VDU 31,0,21,130 580 IF LEFT$(B$,3)="EXA" OR LEFT$(B$,3 )="WEA" OR LEFT$(B$,3)="EAT" OR LEFT$(B$ ,3)="SHO" OR LEFT$(B$,3)="SPE" OR LEFT$( B$,3)="STA" THEN 780 590 IF LEFT$(B$,1)<>"N" THEN 600 ELSE RESTORE 700:FOR C=1 TO A:READ D:NEXT C:I F D=0 THEN 640 ELSE 630 600 IF LEFT$(B$,1)<>"S" THEN 610 ELSE RESTORE 710:FOR C=1 TO A:READ D:NEXT C:I F D=0 THEN 640 ELSE 630 610 IF LEFT$(B$,1)<>"E" THEN 620 ELSE RESTORE 720:FOR C=1 TO A:READ D:NEXT C:I F D=0 THEN 640 ELSE 630 620 IF LEFT$(B$,1)<>"W" THEN 780 ELSE RESTORE 730:FOR C=1 TO A:READ D:NEXT C:I F D=0 THEN 640 ELSE 630 630 A=A+D:GOTO 130 640 PRINT"No exit!":GOTO 130 650 DATA Outside of castle,Part of a p ath,Entrance to outhouse,Woodcutter's hu t,Cloakroom,Path beside a river,W.End of corridor,Glade,Corridor,Bank of river,G uards' quarters,E.End of corridor 660 DATA Swamp in forest,Fuel room,Foo d room,Dense part of forest,Money room,S tore room,Cleared area of forest,Supply room,Lion pits,Large tree in forest,Cair n in forest,Thin forestry,Clearing 670 DATA Mouth of a cave,Bear's cave,D imly lit part of cave,Exit from cave,Ent rance to a maze,Part of a maze with a le ver,Minotaur's section of maze,Centre of maze 680 DATA Thick undergrowth,Ditch in ma ze,Area guarded by a cobra,Thick bushes in maze,Exit from maze,Burnt area,Rubbis h dump,Steep sides of a mountain 690 DATA Pass in a mountainous region, Large valley,Sides of a lake,Rocky part of a route,Sinking sand,Old windswept ro ad,Outside of city gates,Home city 700 DATA 0,0,-1,0,0,-2,0,-2,0,-2,-2,3, 3,0,0,3,-3,0,2,0,0,0,0,-2,-1,-1,-1,1,0,0 ,-1,1,1,0,1,1,0,1,0,0,0,-1,0,-1,0,0,1,0, 0 710 DATA 0,1,0,2,0,0,0,2,2,0,0,0,0,3,- 3,-3,0,0,-3,0,-2,2,0,1,0,1,0,0,-1,1,0,0, -1,-1,0,-1,-1,0,-1,0,1,0,1,0,0,0,0,-1,0 720 DATA 0,-1,2,-2,2,0,2,0,3,0,0,0,-3, 0,0,0,0,-3,0,-2,0,-3,-2,0,0,0,1,0,1,0,1, 0,2,2,0,2,2,3,0,-3,0,0,-1,1,2,-2,0,1,0 730 DATA 1,2,0,0,-2,0,-2,0,-2,0,0,-3,0 ,-3,3,0,0,2,3,0,2,0,0,0,0,0,0,-1,0,-1,0, -1,0,0,-2,-2,-3,-2,-2,0,-3,1,0,2,-1,0,-2 ,0,-1 740 DATA PARCHMENT,POST,WALL,MATCHES,C HAIN-SAW,BOOTS,DOG,TERMITES,HARPOON,GLAS SES,GUARD,TAPER,CANS,FOOD,TREES,SPADE,CH EST,DUSTER,BOXING-GLOVE,ANTEATER,FUEL-TA NK,OIL,LARGE-TREE,CUBE,RUSTY-KEY,LION,DO OR,CORD,BEAR,SIGN,AIR-CYLINDER 750 DATA CRUCIBLE,LEVER,MINOTAUR,FOUNT AIN,BULLET,UNDERGROWTH,GRAVE,DRACULA,CRO SS,SCORPION,COBRA,BUSHES,GARLIC,SHOTGUN, SPEAR,DIAMOND,SNOW,WHALE,WEREWOLF,SAND,G ATES,LIT-TAPER,KEY,FLICK-KNIFE 760 DATA GET,DRO,WEA,EAT,REA,LIG,PAT,E XA,TUR,FEE,DUS,OPE,PUN,PUL,FIL,CUT,DIG,H IT,THR,CLI,MEL,KIL,SHO,SPE,STA 770 DATA 1,2,3,3,4,5,6,8,50,10,11,11,1 4,15,16,50,17,18,18,19,20,20,22,50,23,24 ,25,25,27,27,28,30,31,32,33,50,34,50,50, 50,35,36,37,50,38,39,40,41,44,45,46,48,5 0,50,50 780 M=0:N=0:O=0:IF LEFT$(B$,3)="QUI" T HEN 690 790 RESTORE 760:FOR I=1 TO 25:READ C$: IF LEFT$(B$,3)=C$ M=I 800 NEXT I:IF M<>0 THEN 820 810 PRINT"I do not understand you.":GO TO 130 820 RESTORE 740:D$=MID$(B$,3,4):FOR J= 1 TO 55:READ C$:C$=LEFT$(C$,3) 830 FOR K=4 TO 10:IF LEFT$(D$,1)<>" " AND C$=MID$(D$,2,4) N=1 840 IF J=8 AND D$="STER" OR J=12 AND D $="-TAP" OR J=28 AND D$="SCOR" K=10:N=0: GOTO 860 850 IF C$=MID$(D$,2,3) O=J:K=10:J=55 E LSE D$=MID$(B$,K,4) 860 NEXT K:NEXT J:IF O<>0 THEN 870 ELS E PRINT"Pardon?":GOTO 130 870 IF N=1 PRINT"Learn to type."'CHR$1 30; 880 ON M GOTO 940,990,1040,1080,1130,1 180,1220,1260,1300,1320,1360,1400,1450,1 480,1510,1570,1620,1680,1720,1780,1810,1 860,1890,1940,1980 890 VDU 23;11,0;0;0;0,31,6,10:PRINT"Pr ess space to start again":IF INKEY$(50)= " " VDU 23;11,255;0;0;0:GOTO 20 ELSE VDU 31,6,10:PRINT" ":IF INKEY$(50)=" " VDU 23;11,255;0;0; 0:GOTO 20 ELSE 890 900 PRINT"I cannot do that.":GOTO 130 910 PRINT"O.K.":GOTO 130 920 PRINT"I am not carrying it.":GOTO 130 930 PRINT"I do not see a place to put it.":GOTO 130 940 IF O=3 OR O=7 OR O=8 OR O=11 OR O= 15 OR O=21 OR O=23 OR O=26 OR O=27 OR O= 29 OR O=30 AND E(29)=27 OR O=32 OR O=33 OR O=34 OR O=35 OR O=37 OR O=38 OR O=39 OR O=41 OR O=42 OR O=43 OR O=49 OR O=50 OR O=52 OR O=2 AND R=0 THEN 900 950 IF F=6 PRINT"I am carrying too muc h.":GOTO 130 960 IF E(O)=A THEN 980 970 PRINT"I do not see it here.":GOTO 130 980 E(O)=0:GOTO 910 990 IF E(O)<>0 AND E(O)<>-1 THEN 920 1000 IF H=6 THEN 930 1010 IF O=22 OR O=13 AND E(22)=0 AND H= 5 OR O=5 AND E(22)=-1 AND H=5 OR A=20 AN D H=5 THEN 900 1020 IF O=13 AND E(22)=0 OR O=5 AND E(2 2)=-1 E(22)=20 1030 E(O)=A:GOTO 910 1040 IF O<>6 AND O<>10 AND O<>19 AND O< >31 THEN 900 1050 IF E(O)<>0 AND E(O)<>-1 THEN 920 1060 IF E(O)=-1 PRINT"I am already wear ing it.":GOTO 130 1070 E(O)=-1:GOTO 910 1080 IF O<>14 AND O<>41 THEN 900 1090 IF O=41 AND A<>35 THEN 970 1100 IF O=14 AND E(O)<>0 THEN 920 1110 IF O=41 T=0 1120 E(O)=50:PRINT"Burp...that was good .":GOTO 130 1130 IF O<>1 AND O<>30 THEN 900 1140 IF E(O)<>0 THEN 920 1150 IF O=1 PRINT" You must escape quic kly before you are"CHR$130"caught by Dra cula's guards.":GOTO 130 1160 IF E(10)<>-1 PRINT"It is necessary for glasses to be worn "CHR$130"before this sign may be read.":GOTO 130 1170 PRINT"It is dangerous to cross the stream at "CHR$130"a point next to the exit from the cave." 1180 IF O<>12 THEN 900 1190 IF E(O)<>0 THEN 920 1200 IF E(4)<>0 PRINT"I do not have any matches.":GOTO 130 1210 E(O)=50:E(53)=0:GOTO 910 1220 IF O<>7 THEN 900 1230 IF A<>6 THEN 970 1240 PRINT"The dog lets you past it.":A =8:GOTO 130 1250 PRINT"See what has been revealed." :GOTO 130 1260 IF O<>3 AND O<>23 AND O<>35 AND O< >37 AND O<>43 AND O<>52 THEN 900 1270 IF E(O)<>A THEN 970 1280 IF O=3 OR O=52 PRINT"This could be climbed with some cord.":GOTO 130 1290 E(O)=50:E(O+1)=A:GOTO 1250 1300 IF O<>24 THEN 900 1310 IF E(O)<>0 THEN 920 ELSE PRINT"It says:- (C) COPYRIGHT,IAN R. WATT":GOTO 1 30 1320 IF O<>26 THEN 900 1330 IF E(O)<>A THEN 970 1340 IF E(14)<>0 PRINT"I do not have an y food.":GOTO 130 1350 E(O)=50:E(14)=50:PRINT" The lion d isappeared after eating your"CHR$130"foo d.":GOTO 130 1360 IF O<>25 AND O<>47 THEN 900 1370 IF E(O)<>0 THEN 920 1380 IF O=25 PRINT"The rust has been du sted off your key.":E(O)=50:E(54)=0:GOTO 130 1390 PRINT"Your diamond is now a lethal weapon.":E(O)=-1:GOTO 130 1400 IF O<>27 THEN 900 1410 IF A<>25 THEN 970 1420 IF E(25)=0 PRINT"The key does not fit.":GOTO 130 1430 IF E(54)<>0 PRINT"I do not have a key.":GOTO 130 1440 PRINT"You have passed through the door.":A=26:GOTO 130 1450 IF O<>11 THEN 900 1460 IF A<>11 THEN 970 1470 PRINT"You have been thrown by the guard into "CHR$130"an adjacent room.":A =14:GOTO 130 1480 IF O<>33 THEN 900 1490 IF A<>31 THEN 970 1500 PRINT"You have pulled a lever,and by doing so"CHR$130"have alerted Dracula 's guards.":GOTO 890 1510 IF O<>5 AND (O<>13 OR F=6) THEN 90 0 1520 IF E(O)<>0 THEN 920 1530 IF O=13 AND E(22)<>A THEN 970 1540 IF O=13 E(22)=0:GOTO 910 1550 IF E(22)<>0 PRINT"I have nothing t o fill it with.":GOTO 130 1560 E(22)=-1:GOTO 910 1570 IF O<>15 THEN 900 1580 IF E(O)<>A THEN 970 1590 IF E(5)<>0 PRINT"I have nothing to cut with.":GOTO 130 1600 IF E(22)<>-1 PRINT"I need some oil in the chain-saw.":GOTO 130 1610 E(22)=20:E(O)=50:E(16)=A:GOTO 1250 1620 IF O<>2 AND (O<>38 AND H<>6) THEN 900 1630 IF E(O)<>A THEN 970 1640 IF E(16)<>0 PRINT"I have nothing t o dig with.":GOTO 130 1650 IF O=38 E(39)=A:E(40)=A:PRINT"Drac ula is here in an advanced state of"CHR$ 130"reincarnation."'CHR$130;:GOTO 1250 1660 IF R=1 PRINT"I have already dug it out.":GOTO 130 1670 R=1:GOTO 910 1680 IF O<>29 THEN 900 1690 IF E(O)<>A THEN 970 1700 IF E(2)<>0 PRINT"The bear kills yo u.":GOTO 890 1710 E(O)=50:PRINT"The bear has run awa y.":GOTO 130 1720 IF O<>9 AND O<>17 AND O<>28 AND O< >31 OR O=9 AND A<>44 OR O=17 AND A<>10 O R O=28 AND A<>3 AND A<>48 OR O=31 AND A< >43 THEN 900 1730 IF E(O)<>0 AND E(O)<>-1 THEN 920 1740 IF O=9 PRINT"You have been assassi nated by the 'save"CHR$130"the whale' or ganisation.":GOTO 890 1750 IF O=17 PRINT"The chest acts as a platform across the"CHR$130"river.":E(17 )=10:A=13:GOTO 130 1760 IF O=28 PRINT"It has caught onto s omething.":E(O)=-1:GOTO 130 1770 PRINT"It has exploded in mid air." :E(O)=50:GOTO 130 1780 IF O<>28 OR A<>3 AND A<>48 THEN 90 0 1790 IF E(O)<>-1 PRINT"It is not attach ed to anything.":GOTO 130 1800 IF A=3 A=40:E(O)=0:GOTO 130:ELSE A =49:E(O)=0:GOTO 130 1810 IF A<>30 OR O<>40 AND O<>48 THEN 9 00 1820 IF E(O)<>0 THEN 920 1830 IF O=40 AND E(48)<>50 PRINT"The cr ucible is not clean.":GOTO 130 1840 IF O=48 PRINT"The crucible is now clean.":E(O)=50:GOTO 130 1850 PRINT"A flick-knife has been forme d.":E(O)=51:E(55)=0:GOTO 130 1860 IF O<>34 THEN 900 1870 IF E(O)<>A THEN 970 1880 PRINT"The force resulting from the minotaur's"CHR$130"destruction has proj ected you into the "CHR$130"next room.": A=31:E(O)=50:GOTO 130 1890 IF O<>39 THEN 900 1900 IF E(O)<>A THEN 970 1910 IF E(45)<>0 PRINT"I have no shotgu n.":GOTO 130 1920 IF E(36)<>0 PRINT"I have no bullet .":GOTO 130 1930 PRINT"Dracula is really dead now." :E(O)=51:E(36)=51:E(45)=51:GOTO 130 1940 IF O<>50 OR A<>45 THEN 900 1950 IF E(O)<>A THEN 970 1960 IF E(46)<>0 PRINT"I do not have a pear.":GOTO 130 1970 E(50)=47:PRINT"It has run away wou nded.":GOTO 130 1980 IF O<>50 OR A<>47 THEN 900 1990 IF E(O)<>A THEN 970 2000 IF E(55)<>0 PRINT"I do not have a flick-knife.":GOTO 130 2010 E(50)=50:PRINT" It has shrivelled up,disappearing into"CHR$130"the ground. ":GOTO 130 2020 W=245-W:IF W>X X=W 2030 VDU 31,0,17,130:PRINT"Score=";W;" Best Score=";X:GOTO 890
In the plan on the previous page, the room number is given in the top right hand corner, and the room name is given at the top of the room square. Any objects in a room at the beginning of the game are in brackets below the room name. A stream separates the western side of the plan from the larger eastern side, but does not act as a room -- it is fatal to fall into the stream. At the two instances where is encountered, the two rooms on either side are separated by an obstacle which must be climbed with the cord.
1) R -- This variable concerns whether a post has, or has not been dug out of the ground. If "R" equals zero then the post is still in the ground, and therefore cannot be picked up. On the other hand, if "R" equals one, then the post will no longer be in the ground. The adventurer would then be able to "GET" it.
2) S -- The state of stability of an air-cylinder is controlled by this variable. When "S" equals zero there is no chance of the air-cylinder exploding, but "S" is set equal to one when the player enters the "Large valley", and it must be thrown away immediately, or else it will explode in the player's face. It is necessary to carry this object at this stage since the adventurer would otherwise die in the thin air in the "Pass in a mountainous region", which is encountered prior to entering the "Large valley". The logic behind the air cylinder exploding, is that the drop in altitude makes it unstable (it is pressurised).
3) T -- If this variable equals one, then a scorpion is in a position to kill the adventurer the next time a move is made, if this move is the incorrect one. "T" will equal zero when it has been removed from the game, or if it has not yet been encountered. When it is encountered, "T" is set equal to one, and the one way to render it harmless, is to "EAT" it.
4) POS -- This variable contains the number of the column which the cursor is in.
As in "Dracula's castle", there are no additions to the list of string variables from the model adventure. This points towards a fixed list, which will apply to any adventure which you may try and write.
I feel that there is again a need to analyse line numbers in this adventure, so that the structure of a third adventure may be compared with two others, and thus allow a greater understanding for other adventures to be written from the information within the chapters of this book. The line numbers or groups of line numbers, are given below with comments alongside them:
1)
10)
31)
The plan, along with the necessary documentation, should be sufficient to give you an idea of what is happening in the program. After all, you always have Chapter Two and the Appendices to refer to if you have any queries about either the structure or the content of the program.