4360 IF F7=1 THEN PRINT "Spacecraft repairs complete."
4365 V=V+1
4370 GOTO 1040
4380 REM **********************************************
4390 REM ** subroutine to describe items at location **
4400 REM **********************************************
4410 IF I=1 THEN B$="an ELECTRONIC KEY"
4420 IF I=2 THEN B$="SEALANT"
4430 IF I=3 THEN B$="an OXYGEN MODULE"
4440 IF I=4 THEN B$="an ILLUMINATOR"
4450 IF I=5 THEN B$="a ROBOT"
4460 IF I=6 THEN B$="a DEACTIVATOR"
4470 IF I=7 THEN B$="a NUCLEAR BOMB"
4480 IF I=8 THEN B$="a TRANSPORTER UNIT"
4490 IF I=9 THEN B$="DILITHIUM CRYSTALS"
4500 IF I=10 THEN B$="a COMPUTER MESSAGE"
4510 IF I=11 THEN B$="a POWER UNIT"
4520 IF I=12 THEN B$="a MIRROR"
4530 IF I=13 THEN B$="a CODED BADGE"
4540 IF I=14 THEN B$="a POWER PACK"
4545 IF I=15 THEN B$="a SHOVEL"
4550 RETURN
4560 REM ***********************************************
4570 REM ** subroutine to convert an item to a number **
4580 REM ***********************************************
4590 FOR J=1 TO LEN(B$)
4600 IF MID$(B$,J,1)=" " THEN 4640
4610 NEXT J
4620 I=-1
4630 RETURN
4640 C$=MID$(B$,J+1,3)
4650 I=0
4660 IF C$="ele" THEN I=1
4670 IF C$="key" THEN I=1
4680 IF C$="sea" THEN I=2
4690 IF C$="oxy" THEN I=3
4700 IF C$="mod" THEN I=3
4710 IF C$="ill" THEN I=4
4720 IF C$="rob" THEN I=5
4730 IF C$="dea" THEN I=6
4740 IF C$="nuc" THEN I=7
4750 IF C$="bom" THEN I=7
4760 IF C$="tra" THEN I=8
4770 IF C$="dil" THEN I=9
4780 IF C$="cry" THEN I=9
4790 IF C$="com" THEN I=10
4800 IF C$="mes" THEN I=10
4810 IF C$="uni" THEN I=11
4820 IF C$="mir" THEN I=12
4830 IF C$="bad" THEN I=13
4840 IF C$="pac" THEN I=14
4845 IF C$="sho" THEN I=15
4850 RETURN
4860 REM ***************************************
4870 REM ** subroutine to process try command **
4880 REM ***************************************
4890 INPUT B$
4900 C$=LEFT$(B$,3)
4910 IF C$="try" THEN 4950
4920 IF C$="use" THEN 4950
4930 I=-1
4940 RETURN
4950 GOSUB 4590
4960 IF I<1 THEN 5012
4970 IF O(I)=99 THEN RETURN
4980 PRINT"You don't have ";RIGHT$(B$,LEN(B$)-J);"!"
4990 GOTO 4930
5000 PRINT "Your attempt fails!"
5010 GOTO 4930
5012 PRINT "With what?": GOTO 4930
5020 REM ************************
5030 REM ** print instructions **
5040 REM ************************
5045 CLS
5050 PRINT "You have crash landed on the earth's moon. You have limited supplies and time in which to survive. You will encounter various items and situations during your travels."
5055 PRINT
5060 PRINT "To travel, you may enter directions such as north or n, as well as s, e, w, and u or d (up or down)."
5065 PRINT
5090 PRINT "To communicate, enter commands (verbs), followed by object names, if applicable.For example: get xxx, leave xxx, use xxx, etc."
5110 PRINT "Unless instructed otherwise, be sure to press the ENTER key after each input. The enter key is on the right of the keyboard and has this symbol on it: "+CHR$( 17)+CHR$(196)+CHR$(217)
5115 PRINT
5120 PRINT "Once you have survived, the object then is to achieve the optimum survival time.May the force be with you!!!"
5122 PRINT
5124 COLOR 16,7:PRINT"Press any key to continue":COLOR 7,0
5126 A$=INKEY$: IF A$="" THEN 5126
5130 RETURN
6000 '****************************************
6001 '** object locations **
6002 '****************************************
6010 DATA 21,19,99,06,32,00,38
6020 DATA 35,00,35,99,33,34,37,43
7500 '********************************
7501 '** text location descriptions **
7502 '********************************
8001 DATA "at Mare Serenitatis. Long eerie"
8002 DATA "shadows from distant mountains and craters cast"
8003 DATA "themselves across the barren landscape."
8004 DATA "on a promontary point on the rim of the"
8005 DATA "crater Posidonius, only half visible when seen from below."
8006 DATA "There is total darkness to the East."
8007 DATA "between the craters of Dawes and Plinius."
8008 DATA "at a narrow pass in the mountains of Haemus."
8009 DATA "at a steep base of the crater of Manilus."
8010 DATA "at Mare Vaporum. The Apennines Mountains"
8011 DATA "rise ominously to the North and West."
8012 DATA "at the base of the awesome Mt. Eudoxus."
8013 DATA "inside the crater of Aristoteles. The"
8014 DATA "crater floor is littered with rocks."
8015 DATA "in Lacus Somnorium, North of Posidonius"
8016 DATA "and North East of Mare Serenitatus."
8017 DATA "at the base of the Burg crater in Lacus"
8018 DATA "Mortis. The surface is very soft here."
8019 DATA "at the East side of the vast Mare of"
8020 DATA "Imbrium. To the North the low angle of"
8021 DATA "the sun casts eerie shadows on the soft lunar surface"
8022 DATA "and the distant mountains to the East. To the West, the"
8023 DATA "Mare stretches out of sight to the horizon. To the South"
8024 DATA "the Apennine Mountains seem to rise out of nowhere."
8025 DATA "at the base of the crater of Plato. A"
8026 DATA "shiney object is seen to the West."
8027 DATA "standing before a small metal shed. A"
8028 DATA "sign reads ventillator shaft number 2."
8029 DATA "somewhere East of Mare Serenitatus."
8030 DATA "There is total darkness."
8031 DATA "at the crash site of a space craft."
8032 DATA "The entrance to the space craft is before you."
8033 DATA "at the center of vast Mare of Imbrium."
8034 DATA "in the air lock chamber of the space cINT100
8409 KINGDOM
110 '
120 GOSUB 2210:GOSUB 1990
130 KEY OFF:WIDTH 80
140 RANDOMIZE VAL(RIGHT$(TIME$,2))
150 CLS:RESTORE:K=100:S=500:P=2500:Q=100
160 A=0:D=1:M=0:N=0:Z1=0:L=5
170 GOSUB 1840
180 B1=0:B2=0:B3=0:B4=0:B5=0:K1=0:S1=0:P1=0:N1=0
190 ON M GOTO 330,440,540,690
200 IF S<=2*K OR S<T1 THEN M=M+1:GOTO 330
210 IF 5*K<=Q THEN M=M+1:GOTO 330
220 PRINT "HOW MANY SQUARES DO YOU WISH TO TRADE SERVANTS FOR";
230 GOSUB 2490:B1=AA
240 IF S-(B1*T1)=>2*K THEN 280
250 PRINT "SERVANTS MUST TEND YOUR KNIGHTS, ";
260 PRINT "YOU MAY TRADE FOR ONLY";INT((S-2*K)/T1);"SQUARES."
270 GOTO 220
280 IF Q+B1=<5*K THEN 310
290 PRINT "YOU HAVEN'T ENOUGH KNIGHTS TO PROTECT SUCH A KINGDOM!"
300 GOTO 220
310 S=S-B1*T1:Q=Q+B1
320 M=M+1:GOTO 170
330 IF P<=5*Q+T2 OR P<T2 THEN M=M+1:GOTO 440
340 IF 5*K<=Q THEN M=M+1:GOTO 440
350 PRINT "HOW MANY SQUARES DO YOU WISH TO ACQUIRE BY TRADING PEASANTS FOR";
360 GOSUB 2490:B2=AA:IF P-(B2*T2)=>5*(Q+B2) THEN 400
370 GOSUB 1740
380 PRINT "PEASANTS MUST TEND YOUR LAND, ";
390 PRINT "YOU MAY TRADE FOR ONLY";Z;"SQUARES.":GOTO 350
400 IF Q+B2<=5*K THEN 430
410 PRINT "YOU HAVE NOT ENOUGH KNIGHTS TO PROTECT SUCH A KINGDOM!
420 GOTO 350
430 P=P-(B2*T2):Q=Q+B2:GOTO 320
440 IF D=1 OR N<T3 OR 5*K<=Q THEN M=M+1:GOTO 540
450 PRINT "HOW MANY SQUARES DO YOU WISH TO ACQUIRE BY TRADING NOMADS FOR";
460 GOSUB 2490:B5=AA:IF N-(B5*T3)>=0 THEN 500
470 PRINT "SIR, YOU HAVE NOT ENOUGH NOMADS TO MAKE SUCH A TRADE!"
480 X=INT(N/T3):IF Q+X>5*K THEN X=5*K-Q
490 PRINT "YOU MAY TRADE FOR ONLY";X;"SQUARES.":GOTO 450
500 IF Q+B5=<5*K THEN 530
510 PRINT "SIR, YOU HAVEN'T ENOUGH KNIGHTS TO PROTECT SUCH A KINGDOM"
520 GOTO 450
530 N=N-B5*T3:Q=Q+B5:GOTO 320
540 PRINT "HOW MANY SQUARES DO YOU WISH TO TRADE FOR SERVANTS";
550 GOSUB 2490:B3=AA:IF B3<Q/2+1 THEN 670
560 IF Z1=0 THEN 630
570 CLS
580 IF Z1=1 THEN PRINT CHR$(12):PRINT :PRINT :PRINT :PRINT :PRINT :PRINT
590 COLOR 12:IF Z1=1 THEN PRINT "SUCH A FOOL!! THOUGH WARNED,"
600 PRINT "YOU TRADED AWAY MORE THAN HALF THE KINGDOM."
610 PRINT "THE PEOPLE HAVE RIOTED, YOU HAVE BEEN DETHRONED AND
620 PRINT "SHALL BE BEHEADED ON THE MORROW.":GOTO 1670
630 COLOR 15:Z1=1:PRINT "SIR!! IF YOU TRADE AWAY SUCH LAND, THE PEOPLE
640 PRINT "WILL SURELY REVOLT. PLEASE I BEG YOU RECONSIDER."
650 IF M=4 THEN 690
660 GOTO 540
670 S=S+B3*T1:Q=Q-B3
680 GOTO 320
690 PRINT "HOW MANY SQUARES DO YOU WISH TO TRADE FOR PEASANTS";
700 GOSUB 2490:B4=AA:IF B4<Q/2+1 THEN 730
710 IF Z1=0 THEN 630
720 IF Z1=1 THEN 570
730 P=P+B4*T2:Q=Q-B4
740 M=0:A=1
750 FOR I=1 TO 1000:NEXT I:CLS
760 GOSUB 1840:COLOR 12:PRINT:PRINT "THE BARBARIANS ARE MARCHING TOWARD THE KINGDOM."
770 PRINT "YOU MUST SEND YOUR PEOPLE OUT TO FIGHT THEM OFF!":PRINT:COLOR 15
780 IF Q/5>K OR K<=1 THEN 820
790 PRINT "HOW MANY KNIGHTS WILL YOU SEND ";:GOSUB 2490:K1=AA
800 A$="HALF YOUR KNIGHTS MUST STAY TO DEFEND THE CASTLE."
810 IF K1>K/2 THEN PRINT A$:PRINT :GOTO 790
820 IF S<2*(K-K1)+1 THEN 860
830 PRINT "HOW MANY SERVANTS WILL YOU SEND ";:GOSUB 2490:S1=AA
840 A$="SOME SERVANTS MUST STAY TO TEND YOUR KNIGHTS."
850 IF S-S1<2*(K-K1) THEN PRINT A$:PRINT :GOTO 830
860 IF P>0 THEN PRINT "HOW MANY PEASANTS WILL YOU SEND ";:GOSUB 2490:P1=AA
870 IF P>0 AND P1>P THEN PRINT "SIR, YOU HAVEN'T THAT MANY!":PRINT
880 IF N>0 THEN PRINT "HOW MANY NOMADS WILL YOU SEND ";:GOSUB 2490:N1=AA
890 IF N>0 AND N1>N THEN PRINT "SIR, YOU HAVEN'T THAN MANY!":PRINT