-
Notifications
You must be signed in to change notification settings - Fork 4
/
MCDOOBY.BAS
138 lines (138 loc) · 4.75 KB
/
MCDOOBY.BAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
1 mode 1:REM ** "The Treasure of McDooby's Mansion" Version 2.0
2 defint a-z
3 PRINT TAB(10);"****************************"
4 PRINT TAB(10);"* The Treasure of *"
5 PRINT TAB(10);"* McDooby's Mansion *"
6 PRINT TAB(10);"* Version 2 *"
7 PRINT TAB(10);"* By: Jason Wells *";TAB(10);"* CPC Version by SRS *"
8 PRINT TAB(10);"****************************"
9 PRINT TAB(10);"Press SPACE bar to begin."
10 PRINT TAB(10);"(Be sure the CapsLock is on.)"
11 A$=INKEY$:IF A$<>CHR$(32) THEN 11
12 '
13 GOTO 27
14 '
17 FOR T=1 TO 2000:NEXT T:print chr$(7);
21 RETURN
22 ?;:REM *** Endless Woods
23 PRINT"You are in a forest with strange trees EVERYWHERE."
24 GOSUB 1000:GOTO 22
27 ?;:REM *** Near House
28 PRINT"You can see a house to the NORTH, woods to the SOUTH, EAST, and WEST."
29 GOSUB 1000
30 IF C$="WEST" OR C$="SOUTH" OR C$="EAST" THEN 22
31 IF C$="NORTH" THEN 33
32 GOTO 27
33 ?;:REM *** Front Door
34 PRINT"The front door of the house. Forests surround you on the EAST and WEST sides."
35 INPUT"Do you want to ring the DOORBELL(Y/N)?",Z$:IF Z$="Y" THEN GOSUB 14
36 GOSUB 1000
38 IF C$="NORTH" THEN 42
39 IF C$="EAST" OR C$="WEST" THEN 22
40 IF C$="SOUTH" THEN 27
41 GOTO 33
42 ?;:REM *** Hallway
44 PRINT"A grand entrance hall. Exits are in all directions."
46 GOSUB 1000
48 IF C$="EAST" THEN 52
49 IF C$="SOUTH" THEN 33
50 IF C$="WEST" THEN 83
51 IF C$="NORTH" THEN 69
52 ?;:REM *** Kitchen
53 PRINT"A very old kitchen. There are more cracks on the wall than you can count."
54 IF J=0 THEN PRINT"There is a JAR on the counter."
55 IF J=1 THEN GOTO 57
56 INPUT"Do you want to get the JAR(Y/N)";Z$:IF Z$="Y" THEN J=1
57 GOSUB 1000:IF C$="WEST" THEN 42
58 IF C$="NORTH" THEN 60
59 GOTO 52
60 ?;:REM *** Dining Room
61 PRINT"This is a nice dining room.";:IF K=0 THEN PRINT"A KEY is on the table."
62 IF K=1 THEN GOSUB 1000:goto 66
63 INPUT"Do you want to get the KEY(Y/N)";Z$:IF Z$="Y" THEN K=1:GOSUB 1000:GOTO 66
64 IF Z$="N" THEN GOSUB 1000
66 IF C$="SOUTH" THEN 52
67 IF C$="WEST" THEN 69
68 GOTO 60
69 ?;:REM *** Library
70 PRINT"You are in the library. Many books are on the walls."
71 IF S=1 THEN GOSUB 1000:GOTO 78
72 IF S=0 THEN PRINT"A sword is on the shelf."
73 INPUT"Do you want to get the SWORD(Y/N)";Z$
74 IF Z$="N" THEN GOSUB 1000:GOTO 78
76 IF Z$="Y" THEN S=1:GOSUB 1000
78 IF C$="EAST" THEN 60
79 IF C$="SOUTH" THEN 42
80 GOTO 69
83 ?;:REM *** Ballroom
84 PRINT"You have entered a very nice ballroom. There is a loose PANEL on the NORTH wall."
85 GOSUB 1000
86 IF C$="EAST" THEN 42
87 IF C$="NORTH" THEN 90
88 GOTO 83
90 ?;:REM *** Secret passage
91 REM
92 PRINT"A very dark passage. The stairs seem to lead DOWN into the darkness."
93 PRINT"The only ways out are UP and DOWN."
95 GOSUB 1000
96 IF C$="DOWN" THEN 100
97 IF C$="UP" THEN 83
98 GOTO 90
100 ?;:REM *** In front of door
101 PRINT"A massive DOOR stands in front of you to the EAST."
102 GOSUB 1000
103 IF C$="EAST" AND DOOR=1 THEN 110
104 IF C$="EAST" AND K=1 THEN DOOR=1:PRINT"DOOR unlocked.":GOSUB 1000
105 IF C$="UP" THEN 90
106 REM
108 IF DOOR=0 THEN PRINT"The large DOOR is locked."
109 goto 100
110 ?;:REM *** Troll's cave
113 IF T=0 THEN PRINT"A TROLL is here to meet you." ELSE GOSUB 1000:goto 118
114 IF S=1 THEN 116
115 IF S=0 THEN PRINT"BAP!POW!WHAM!OOOF! That darn TROLL did a smashing job of killing you.":goto 2000
116 PRINT"You successfully defeat the TROLL.":T=1:GOSUB 1000
118 IF C$="WEST" THEN 100
119 IF C$="EAST" THEN 122
120 GOTO 100
122 ?;:REM *** Sorcerer's room
123 REM *** COOLNESS ***
124 PRINT"A room with a strange glowing GEM."
125 IF SO=0 THEN PRINT"Unfortunatly a sorcerer guards it(MCDOOBY!!!)."
126 IF J=0 THEN PRINT"The wizards magic turns you into sub-atomic particles blown away by the prevailing wind.":GOTO 2000
129 IF J=1 AND SO=0 THEN PRINT"You pour the jar of water on the wizard. He dissolves into a puddle of orange ooze.":SO=1
130 gosub 1000:IF C$="WEST" THEN 110
131 IF C$="NORTH" THEN PRINT"You take the";:PRINT" GEM ";:PRINT"on your way out of the mansion":GOTO 3000
132 GOTO 122
1000 REM Get command from user.
1002 INPUT"Enter command";C$
1003 IF C$="Q" THEN END
1004 rem IF C$="B" THEN RUN"BOSS.BAS"
1006 rem IF C$="H" THEN RUN"HELP.BAS"
1007 IF C$="INV" THEN GOSUB 4000
1008 RETURN
2000 REM G A M E O V E R
2002 FOR Z=1 TO 7:PRINT:NEXT Z
2004 PRINT"You really screwed up this time."
2005 REM
2006 REM
2008 PRINT"1) Try again"
2009 PRINT"2) I give up"
2010 INPUT"Enter choice -->",Q$
2012 IF Q$="1" THEN 3012
2014 IF Q$="2" THEN END
2016 GOTO 2010
3000 REM THE END
3002 ?;:C$="YOU WIN!!"
3004 FOR T=1 TO 25:PRINT C$;:NEXT T
3006 REM
3010 A$=INKEY$:IF A$="" THEN 3006
3012 CLEAR:RUN
4000 REM *** Inventory
4002 ?;:PRINT"Inventory"
4004 PRINT"---------"
4006 IF J=1 THEN PRINT"JAR"
4008 IF K=1 THEN PRINT"KEY"
4010 IF S=1 THEN PRINT"SWORD"
4012 IF S=0 AND K=0 AND J=0 THEN PRINT"Nothing."
4014 RETURN