5 CLS:RANDOM:DEFINTA-Z:CLEAR140
10 DIMN9(2),N1$(50),N$(50),N(50),P(50),CO$(17),LO$(30),LO(30,4),SC(2),D(2),NA$(2),L1(2)
15 PRINTCHR$(23);TAB(6)"Medieval  Adventure"
30 FORR=1TO48:READN1$(R),N$(R),N(R),P(R):NEXT
31 FORR=1TO30:READLO$(R),LO(R,1),LO(R,2),LO(R,3),LO(R,4):NEXT
32 FORR=1TO17:READCO$(R):NEXT
33 PRINT:INPUT"Player #1, your name";NA$(1):INPUT"Player #2, your name";NA$(2):GOTO6080
35 X$="":R=0:D(1)=15+RND(30):D(2)=15+RND(30):T=1:B$="<"+STRING$(62,"=")+">":L1(1)=1:L1(2)=30
36 N1$(49)=NA$(1):N$(49)=LEFT$(NA$(1),3):N(49)=L1(1):P(49)=0
37 N1$(50)=NA$(2):N$(50)=LEFT$(NA$(2),3):N(50)=L1(2):P(50)=0
38 GOSUB4065
40 D(T)=D(T)-1
41 GOTO 6010
42 IF(T=1ANDD(1)=0)OR(T=2ANDD(2)=0)THENA$="":GOSUB4065:PRINT"A dragon appears out of nowhere!"
45 C=0:PRINT:PRINTNA$(T);:INPUT", what does thou thinkest we should do";A$:X$=A$:GOSUB11000
50 GOSUB5040:V$=LEFT$(X$,3):GOSUB6065:FORR=1TO17:IFV$=CO$(R)THEN60ELSENEXT
51 IFV$="WAI"GOSUB4145:GOTO12000
55 PRINT"I do not knowest how to ";A$:GOTO45
60 V=R:FORR=1TOLEN(X$):IFMID$(X$,R,1)=" "THEN70ELSENEXT
61 IFV$="SCO"ORV$="INV"ORV$="ALA"ORV$="BOO"THEN80
62 IFV$="EXA"THENGOSUB4065:PRINT"O.K.":GOTO40
65 PRINT"Please use a two word command so that I can understand.":GOTO45
70 M=R:V1$=MID$(X$,R+1,3):GOSUB5040:FORR=1TO50:IFV1$=N$(R)THEN80ELSENEXT
71 IFV1$="NOR"ORV1$="SOU"ORV1$="EAS"ORV1$="WES"THEN80
75 M=LEN(A$)-M:PRINT"I do not knowest what a";RIGHT$(A$,M+1);" is.":GOTO45
80 ONVGOTO150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950
150 IFV1$<>"NOR"ANDV1$<>"SOU"ANDV1$<>"EAS"ANDV1$<>"WES"THEN170
152 IFV1$="NOR"ANDLO(A9,1)>0THENL1(T)=LO(A9,1):GOTO165
154 IFV1$="SOU"ANDLO(A9,2)>0THENL1(T)=LO(A9,2):GOTO165
156 IFV1$="EAS"ANDLO(A9,3)>0THENL1(T)=LO(A9,3):GOTO165
158 IFV1$="WES"ANDLO(A9,4)>0THENL1(T)=LO(A9,4):GOTO165
160 PRINT"I can not go in that direction.":GOTO45
165 GOSUB4145:GOSUB4065:PRINT"O.K. I did. He won't see where he is till his next turn.":GOTO12010
170 GOSUB6000:IFZ9=2THEN40
175 IFR=15THENUN=0:PRINT"The alligators knock ";NA$(T);" unconscious!":GOSUB4145:FOR R=1TO3000:NEXT:UN=4:GOTO165
180 IFR=16THENL1(T)=9:GOTO165
185 IFR=48THENL1(T)=21:GOTO165
190 GOTO160
200 A3=0:A4=0:GOSUB6000:IFZ9=2THEN40
202 IFN9(T)>=5PRINT"I can't carry any more.":GOTO40
205 IFN(R)=-TPRINT"I already have it.":GOTO40
210 IFR=25ORR=10ORR=11ORR=12ORR=13ORR=15ORR=16ORR=19ORR=20ORR=23ORR=24ORR=32ORR=37ORR=40ORR>43THENPRINT"I'm not able to do that.":GOTO40
212 IFR=6ANDN(20)=7ANDA9=7PRINT"The witch won't let me.":GOTO40
214 IFR=5ANDN(19)=24ANDA9=24PRINT"The sorcerer won't let me.":GOTO40
216 IFR=33ANDN(10)=12ANDA9=12PRINT"The rats won't let me.":GOTO11050
218 IFR=28ANDN(13)=19ANDA9=19PRINT"The hornets won't let me!":GOTO11050
219 IFR=38ANDN(39)=0THENN(39)=L1(T):A4=1
220 A3=R:N(R)=-T:GOSUB4065:PRINT"O.K. I did."
222 IFA3=38ANDA4=1:PRINT"A piece of paper falls out!":A4=0
223 GOTO40
250 FOR R=1 TO 48:IF N(R)=-T AND N$(R)=V1$THEN 256 ELSE NEXT
255 PRINT"I'm not carrying that.":GOTO40
256 IFR=4THENAR=0
257 IFR=36ANDA9=19ANDN(13)=19PRINT"The bar erupts into thick yellow smoke!":PRINT"The nest is destroyed!":N(13)=0:N(36)=0:FORR=1TO1500:NEXT:GOSUB4065:GOTO40
258 IFR=14ANDA9=12ANDN(10)=12THENPRINT"The rats eat the cheese!":PRINT"It is poisioned!":N(10)=0:N(14)=0:FORR=1TO3000:NEXT:GOSUB4065:PRINT"I did.":GOTO40
260 N(R)=A9:GOSUB 4065:PRINT"O.K. I dropped it.":GOTO 40
300 SC(T)=0:FOR R=1 TO 50
305 IF T=1 AND N(R)=1 THEN SC(1)=SC(1)+P(R)
310 IF T=2 AND N(R)=30 THEN SC(2)=SC(2)+P(R)
312 NEXT
315 PRINTNA$(T);", out of 210 thou hast";SC(T):GOTO 40
350 PRINT"I am currently carrying for thee, ";NA$(T);":":X5=0
355 FOR R=1 TO 48:IF N(R)=-T THEN PRINTN1$(R);:B=1
356 IF N(R)=-T AND R<>4 PRINT" "
357 IF N(R)=-T AND R=4 AND AR<>-T THENPRINT" "
358 IF R=4 AND AR=-T PRINT". Which you are wearing."
360 NEXT
365 IF B=0 PRINT"Nothing"
370 GOTO 40
400 GOSUB 6000:IF Z9=2 THEN 40
405 IF R=5 OR R=6 OR R=23 OR R=24 OR R=44PRINT"It hath writing on it.":GOTO 40
410 IF R=7 OR R=9 OR R=1 PRINT"It is very sharp.":GOTO 40
415 IF R=8 PRINT"It is filled with gun powder.":GOTO 40
420 IF R=21 PRINT"It's by Leonardo da Vinci.":GOTO 40
425 IF R=30 AND N(29)=0THEN N(29)=L1(T):GOSUB4065:PRINT"Methinks there is a brilliant ruby in there.":GOTO 40
430 IF R=32 PRINT"It looketh as if it might tip over at any instant.":GOTO 40
435 IF R=35 AND N(36)=0 THEN N(36)=L1(T):GOSUB4065:PRINT"Methinks there is something there.":GOTO 40
440 IF R=41 PRINT"It is very -moldable-":GOTO 40
443 IF R=42 PRINT"It hath a key-like impression in it.":GOTO 40
445 PRINT"I can see nothing methinks interesting.":GOTO 40
450 GOSUB 6000:IF Z9=2 THEN 40
455 PRINT"The value of that is";P(R):GOTO 40
500 GOSUB6000:IFZ9=2THEN40
503 IF R=19 OR R=20 PRINT"I can not....":PRINT"An evil spell is making me unconscious!":FORR=1TO3000:NEXT:UN=0:GOSUB4145:UN=6:GOTO12000
505 OB=R:INPUT"With what weapon";X$:GOSUB11000:V1$=LEFT$(X$,3):GOSUB 6000:IF Z9=2 THEN 40
510 IF R<>1 AND R<>3 AND R<>7 AND R<>9 PRINT"That is not a weapon!":GOTO40
515 IF T=2 THEN 526
517 IF OB=11 THEN N(11)=0:D(1)=15+RND(30):GOTO12030
519 IF OB=49 PRINT"Thou can not kill thyself!":GOTO 40
520 IF OB<>50 THEN PRINT"I can not harm that.":GOTO 40
521 IF R=1 AND N(2)=-2 THEN PRINT"The sword bounces off his shield!":GOTO 40
522 IF R=3 AND N(4)=-2 PRINT"The ball bounces off his armor!":GOTO 40
523 IF R=3 AND N(8)<>-1 PRINT"I have no gun powder!":GOTO 40
524 UN=4+RND(6):GOSUB4065:PRINT"Got him!":FORR=1TO50:IFN(R)=-2 AND P(R)>0 THEN N(R)=1:GOTO12050
525 NEXT:GOTO 40
526 IF OB=12 THEN N(12)=0:D(2)=15+RND(30):GOTO12030
528 IF OB=50 PRINT"Thou can not kill thyself!":GOTO 40
530 IF OB<>49 PRINT"I can not harm that!":GOTO 40
532 IF R=1 AND N(2)=-1 PRINT"The sword bounces off his shield!":GOTO40
534 IF R=3 AND N(4)=-1 PRINT"The ball bounces off his armor!":GOTO40
536 IF R=3 AND N(8)<>-2 PRINT"I have no gun powder!":GOTO 40
538 UN=4+RND(6):GOSUB4065:PRINT"Got him!":FOR R=1 TO 50:IF N(R)=-1 AND P(R)>0 THEN N(R)=30:GOTO12050
540 NEXT:GOTO 40
550 GOSUB6000:IFZ9=2THEN40
555 IF T=1 PRINTNA$(2); ELSE PRINTNA$(1);
560 T1=R:INPUT", What what would you like to trade for that";X$:GOSUB11000:V1$=X$:IF LEFT$(V1$,3)="NOT" THEN PRINT"He doesn't want to trade.":GOTO40
561 IF T=1 THEN T2=-2 ELSE T2=-1
562 FOR R=1 TO 50:IF N(R)=T2ANDN$(R)=LEFT$(V1$,3)THEN 564 ELSE NEXT
563 PRINT"I do not see that here.":GOTO 40
564 IF T1=4 OR R=4 THEN AR=0
565 IF T=1 THEN N(T1)=-2:N(R)=-1:PRINT"O.K. The trade is done.":GOTO40
570 IF T=2 THEN N(T1)=-1:N(R)=-2:PRINT"O.K. The trade is done.":GOTO40
600 GOSUB 6000:IF Z9=2 THEN 40
605 IF R<>40 AND R<>32 AND R<>37 THEN PRINT"O.K.":PRINT"Nothing happens.":GOTO 40
610 IF R=40 PRINT"A trap door opens....":PRINT"Down I go! You're knocked unconscious!":UN=0:L1(T)=10:GOSUB4145:FOR R=1 TO 3000:NEXT:UN=4:GOSUB4065:PRINT"I did.":GOTO12010
615 IF R=32 PRINT"The wall spins around....":PRINT"I am elsewhere!":FORR=1 TO 2000:NEXT:L1(T)=22:GOSUB4145:GOSUB4065:PRINT"I did.":GOTO12010
620 IF R=37 AND N(16)<>0 PRINT"Nothing happens.":GOTO 40
625 IF R=37 PRINT"I hear clinking noises!":PRINT"Something seemeth different now.":N(16)=5:N(46)=0:GOTO 40
650 IF V1$<>"KEY" PRINT"I can't do that!":GOTO 40
655 IF N(41)<>-T PRINT"I have nothing to make it with.":GOTO 40
660 IF N(42)<>-T PRINT"I have nothing to shape it.":GOTO 40
665 PRINT"O.K.":N(41)=0:N(42)=0:N(43)=-T:N9(T)=N9(T)-1:GOTO40
700 GOSUB 6000:IF Z9=2 THEN 40
705 IF R<>14 AND R<>36 AND R<>5 PRINT"I can not eat that!":GOTO 40
710 IF R=14 PRINT"Gulp! That was delectable!":N(14)=0:GOTO 40
715 IF R=36 PRINT"I can only fit a piece in my mouth!":PRINT"The acid eats at my stomach!":PRINT"I'm unconscious!":UN=0:GOSUB4145:UN=4:FORR=1 TO 3000:NEXT:GOSUB4065:PRINT"Oh, my stomach!":GOTO12010
720 IF R=5 PRINT"The cream driveth me unconscious!":UN=0:GOSUB4145:UN=4:FORR=1 TO 2000:NEXT:GOSUB4065:PRINT"Whew! What a stench!":GOTO12010
750 GOSUB 6000:IF Z9=2 THEN 40
755 IF R<>5 AND R<>6 AND R<>23 AND R<>24 AND R<>44 AND R<>39 THEN PRINT"It is unreadable!":GOTO 40
756 IF(R=5 OR R=6 OR R=39)AND N(R)<>-T PRINT"I don't have that!":GOTO40
760 IF R=5 PRINT"Dangerous if opened!":GOTO 40
765 IF R=6 PRINT"It says:":PRINT"Magic word = Alacazam!":GOTO 40
770 IF R=23 PRINT"It says: ";NA$(1);", drop treasure here and say: Score.":GOTO 40
775 IF R=24 PRINT"It says:";NA$(2);", Drop treasure here and say: score.":GOTO 40
780 IF R=44 PRINT"It says: Beware the dragon of these harrowed halls!":GOTO 40
785 IF R=39 PRINT"It says: Magic word = Boo!":GOTO 40
800 GOSUB 6000:IF Z9=2 THEN 40
805 IF R<>4 THEN PRINT"I can't do that!":GOTO 40
810 IF N(4)<>-T PRINT"I don't have it.":GOTO 40
815 PRINT"O.K. You are now wearing armor.":AR=-T:GOTO 40
850 GOSUB 6000:IF Z9=2 THEN 40
855 IF R<>5 AND R<>25 AND R<>47 THEN PRINT"It will not open.":GOTO40
860 IF R=5 AND (L1(T)<>7 OR N(20)=0)PRINT"Nothing happens.":GOTO 40
865 IF R=5 PRINT"The witch shreiks as a yellow vapor rises from the cream.":PRINT"She flies away on her broom,":PRINT"Leaving something behind.":N(22)=7:FORR=1TO3000:NEXT:N(20)=0:GOSUB4065:PRINT"I did.":GOTO40
870 IF R=25 AND N(43)=-T AND N(31)=0 PRINT"I open the chest.":PRINT"Something fell out.":FOR R=1 TO 1500:NEXT:N(31)=L1(T):GOSUB4065:PRINT"I did.":GOTO 40
875 IF R=47 AND N(43)=-T THEN N(47)=0:N(48)=20:GOSUB4065:PRINT"The door is open!":GOTO 40
880 PRINT"I can not do that....yet!":GOTO  40
900 IF L1(T)<>24 OR N(19)<>24 PRINT"Nothing happens.":GOTO 40
905 N(19)=0:N(18)=24:GOSUB4065:PRINT"The sorcerer is so startled he disappears!":PRINT"But he left something behind.":GOTO 40
950 IF N(26)<>0 OR L1(T)<>12 PRINT"Nothing happens.":GOTO 40
955 N(26)=12:GOSUB 4065:PRINT"A diamond tiarra appears out of the air!":GOTO 40
4000 DATA an iron sword,SWO,9,0,an iron shield,SHI,27,0,an ancient blunderbuss,BLU,22,0,a suit of armor,ARM,4,0,a jar of magic cream,CRE,24,0,a magic book,BOO,7,0,a very sharp dagger,DAG,15,0,a bull's horn,HOR,26,0,a well forged battle axe,AXE
4005 DATA 16,0,scurrying rats,RAT,12,0,a ferocious dragon,DRA,0,0,a ferocious dragon,DRA,0,0,a hornet's nest,NES,19,0,a piece of swiss cheese,CHE,25,0,a pit full of deadly allgators,PIT,5,0,an open drawbridge over the pit,DRA,0,0,the king's gold crown
4010 DATA CRO,22,20,the sorcerer's sceptor,SCE,0,25,an evil sorcerer,SOR,24,0,an evil witch,WIT,7,0,an abstract painting,PAI,6,0,the witch's pointy hat,HAT,0,30,a sign,SIG,1,0,a sign,SIG,30,0,a wooden chest,CHE,13,0,a diamond tiarra,TIA,0,15
4015 DATA a silver necklace,NEC,9,20,a golden ring,RIN,19,15,a giant ruby,RUB,0,25,a large catapult,CAT,18,0,a gem encrusted robe,ROB,0,15,a large statue,STA,26,0,an elegant oriental rug,RUG,12,15,a pair of jade earrings,EAR,17,10,a golden jar,JAR
4020 DATA 14,20,a bar of nitric acid,ACI,0,0,a handle in the wall,HAN,23,0,a loose brick from the wall,BRI,8,0,a sheet of paper,PAP,0,0,a rope hanging from the ceiling,ROP,11,0,some loose clay,CLA,29,0,a metal mold,MOL,2,0,a large key,KEY,0,0
4025 DATA a sign,SIG,11,0,the magnificent country side,COU,6,0,a closed drawbridge,DRA,5,0,a heavy steel door,DOO,20,0,an open steel door,DOO,0,0
4030 DATA in a secluded red alcove of the castle,0,3,0,0,at one end of a red hallway,0,6,3,0,in a red central corridor,1,7,4,2,in a red connecting hallway,0,8,5,3,at the other end of a red hallway,0,0,0,4,on an outdoor terrace,2,11,0,0
4035 DATA in the witch's lair,3,0,0,0,in a narrow stone hallway,4,14,0,0,in a seldom used storeroom,5,0,0,0,deep beneath the surface of the earth,0,16,11,0,in a red corner turret,6,17,12,0,in the north-west part of the central plaza,0,18,13,11
4040 DATA in the north-east part of the central plaza,0,19,14,12,in a red corner turret,8,20,0,13,on the roof of the castle,0,21,0,0,in the dungeon of the castle,10,0,0,0,in a blue corner turret,11,23,18,0
4045 DATA in the south-west part of the central plaza,12,0,19,17,in the south-east part of the central plaza,13,0,20,18,in a blue corner turret,14,25,0,19,on a winding spiral staircase,15,0,0,20,in the king's storeroom,0,26,0,0,in a narrow stone hallway,17,27
4050 DATA 0,0,in the sorcerer's workroom,0,28,0,0,on a terrace overlooking the central plaza,20,29,0,0,at the other end of a blue hallway,0,0,27,0,in a blue connecting hallway,23,0,28,26,in a blue central corridor,24,30,29,27
4055 DATA at one end of a blue hallway,25,0,0,28,in a secluded blue alcove of the castle,28,0,0,0
4060 DATA "GO ","GET","DRO","SCO","INV","EXA","VAL","KIL","TRA","PUL","MAK","EAT","REA","WEA","OPE","BOO","ALA"
4065 A9=L1(T):CLS:PRINTNA$(T);", we are ";LO$(A9);"."
4067 N(49)=L1(1):N(50)=L1(2)
4070 N=0:N9(T)=0:FOR R=1 TO 50
4073 IF(T=1ANDN(R)=-1)OR(T=2ANDN(R)=-2)THENN=N+1
4075 IF(T=1ANDR=49)OR(T=2ANDR=50)THEN4100
4080 IF N(R)=A9 PRINT"I can see ";N1$(R)
4100 NEXT R
4103 N9(T)=N
4105 PRINT"We could go: ";
4110 IF LO(A9,1)>0 PRINT"North  ";
4115 IF LO(A9,2)>0 PRINT"South  ";
4120 IF LO(A9,3)>0 PRINT"East  ";
4125 IF LO(A9,4)>0 PRINT"West  ";
4130 PRINT" ":PRINTB$
4133 IF A$="" THEN RETURN
4134 IFC=1 THEN IF T=1 THEN C$=NA$(2) ELSE IF T=2 THEN C$=NA$(1)
4135 IF C=0 C$=NA$(T)
4137 PRINTC$;" told me to ";A$:RETURN
4145 IF UN>0 THEN UN=UN-1:RETURN
4150 IFT=1THENT=2ELSET=1
4155 C=1:RETURN
4160 PRINT"Now it is ";NA$(T);"'s turn."
4165 IF UN=0 RETURN
4166 IF T=1 PRINTNA$(2);" is unconscious.":RETURN
4167 IF T=2 PRINTNA$(1);" is unconscious.":RETURN
5040 IF X$="N" THEN A$="go north":X$="GO NORTH"
5041 IF X$="S" THEN A$="go south":X$="GO SOUTH"
5042 IF X$="E" THEN A$="go east":X$="GO EAST"
5043 IF X$="W" THEN A$="go west":X$="GO WEST"
5044 RETURN
6000 Z9=0:FOR R=1 TO 50:IF V1$=N$(R) AND (N(R)=A9 OR N(R)=-T) THEN Z9=1:RETURN
6002 NEXT
6005 Z9=2:PRINT"I do not see that here.":RETURN
6010 IF D(1)>0 THEN 6025
6015 IF D(1)=0 AND T=1 THEN N(11)=L1(1):GOTO 42
6020 IF D(1)=-1 AND T=1THEN PRINT"The dragon knocks ";NA$(1);" unconscious!":UN=0:GOSUB4145:UN=3+RND(7):FORR=1TO3000:NEXT:GOSUB4065:D(1)=15+RND(30):N(11)=0:A$="":GOTO42
6025 IF D(2)>0 THEN 6040
6030 IF D(2)=0 AND T=2 THEN N(12)=L1(2):GOTO 42
6035 IF D(2)=-1 THEN PRINT"The dragon knocks ";NA$(2);" unconscious!":UN=0:GOSUB4145:UN=3+RND(7):FORR=1TO3000:NEXT:GOSUB4065:D(2)=15+RND(30):N(12)=0:A$="":GOTO42
6040 IF SC(1)=210 PRINTNA$(1);", you have 210 points! You win!":PRINT"Sorry ";NA$(2);".":STOP
6045 IF SC(2)=210 PRINTNA$(2);", you have 210 points! You win!":PRINT"Sorry ";NA$(1);".":STOP
6050 GOTO 42
6065 IF V$="WAL" OR V$="RUN" THEN V$="GO ":RETURN
6067 IF V$="TAK" OR V$="CAR" THEN V$="GET":RETURN
6069 IF V$="LIS" THEN V$="INV":RETURN
6071 IF V$="LOO" THEN V$="EXA":RETURN
6073 IF V$="WOR" THEN V$="VAL":RETURN
6075 IF V$="STE" THEN V$="GET":RETURN
6077 RETURN
6080 CLS
6090 PRINTNA$(1);", ";NA$(2);":  Welcome to the 12th century!"
6095 PRINT:PRINT"Thine objective is to gather all the treasure thee can find."
6100 PRINT"Thou does this by ordering thine slave (the computer) to"
6105 PRINT"do various things. Do this by uttering two word commands."
6110 PRINT"For example: Get cup  Eat cheese  Kill dragon  Look sword"
6115 PRINT"In addition, some commands needeth only one word. For example:"
6120 PRINT" A magic word (maybe)   Inventory   Score"
6125 PRINT"There is much riches and honor to be had by the bravest knight!"
6130 PRINT"Leteth us hope he is thou!";:INPUT" Hit enter";X$
6135 GOTO 35
10000 'COPYRIGHT (C) CLOAD 1980
        HUGH LAMPERT (& MIKE GREENHOLZ)
        110 LINDNER PL.
        MALVERNE, NY 11565
11000 FORX1=1TOLEN(X$):X2=ASC(MID$(X$,X1,1)):IFX2>96THENMID$(X$,X1,1)=CHR$(X2-32)
11010 NEXTX1:RETURN
11050 PRINT"They attack me!":PRINT"I'm unconscious!":UN=0:GOSUB4145:UN=3:FORR=1TO3000:NEXT
12000 GOSUB4065
12010 GOSUB4160:GOTO40
12030 GOSUB4065:PRINT"The dragon whimpers into the darkness to die.":GOTO40
12050 PRINT"I take a treasure from him and bring it back.":GOTO40
