1 REM ======================================================================= 5 CLEAR : CLS : REM Mini-Westfront : By: Paul Panks (dunric@yahoo.com) 8 COLOR 15, 1: REM Website: http://www.geocities.com/dunric/miniwf.html 9 REM ======================================================================= 10 DIM AO$(36), CL$(25), TC(25), DE$(50, 2), LO(36), NO$(36), OB$(36), VB$(25) 12 DIM M(50, 6), A, AC, B, BG, C, CT, DT, dy, FD, FL, HM, HP, I, IC, LT, LV, MM, MP, N, QS, P, RM, SI 14 DIM EX, FH, GD, TN, U, V, WA, WD, WE, WF, WV, X, Y, Z, WR$(20), E$(1), R$(54) 15 AC = 1: BG = 0: CT = 1: dy = 1: EX = 0: FD = 500: FH = 100: FL = 0: HM = 200: HP = HM: IC = 0: LT = 0: LV = 1: MM = 50 16 GD = 200: MP = MM: QS = 1: RM = 1: SI = 0: TN = 0: WA = 500: WD = 0: WE = 0: WF = 0: WV = 1: GOSUB 900 18 REM === Introduction and Title Screen ==================================== 19 AO$(0) = "n": AO$(1) = "s": AO$(2) = "e": AO$(3) = "w": AO$(4) = "u": AO$(5) = "d" 20 CLS : PRINT "'Mini-Westfront'": COLOR 7, 1: PRINT "A smaller version of Westfront PC": PRINT 22 COLOR 10, 1: PRINT "*** Optimized for GW-BASIC on July 12, 2004 ***": PRINT 23 COLOR 7, 1: PRINT "Saved game (Y/N/Q): "; 24 A$ = INKEY$: IF A$ = "" THEN GOTO 24 25 IF A$ = "y" OR A$ = "Y" THEN COLOR 15, 1: PRINT "Yes": PRINT : GOTO 30 26 IF A$ = "n" OR A$ = "N" THEN COLOR 15, 1: PRINT "No": PRINT : GOTO 39 27 IF A$ = "q" OR A$ = "Q" THEN COLOR 15, 1: PRINT "Quit": PRINT : PRINT "Thanks! :)": END 28 GOTO 24 29 REM === Check for Saved Game ============================================= 30 COLOR 7, 1: PRINT "Enter saved game to load: "; : COLOR 15, 1 31 INPUT "", F$: IF LEN(F$) > 16 THEN COLOR 12, 1: PRINT "(Name was too long).": GOTO 30 32 OPEN "I$", 1, F$ + ".sav": INPUT #1, AC: INPUT #1, BG: INPUT #1, CT: INPUT #1, dy: INPUT #1, EX 33 INPUT #1, FD: INPUT #1, FL: INPUT #1, GD: INPUT #1, HM: INPUT #1, HP: INPUT #1, IC: INPUT #1, LT 34 INPUT #1, LV: INPUT #1, MM: INPUT #1, MP: INPUT #1, QS: INPUT #1, RM: INPUT #1, SI: INPUT #1, FH 35 INPUT #1, WA: INPUT #1, WD: INPUT #1, WE: INPUT #1, WF: INPUT #1, WV: FOR X = 6 TO 35: INPUT #1, LO(X): NEXT X: CLOSE 1 36 COLOR 10, 1: PRINT : PRINT "Game loaded.": PRINT : COLOR 14, 1: PRINT "< Press any key... >" 37 A$ = INKEY$: IF A$ = "" THEN GOTO 37 38 GOTO 62 39 REM === New Game Player ================================================== 40 COLOR 11, 1: PRINT "Enter your name: "; : COLOR 7, 1: INPUT "", F$: IF LEN(F$) > 16 THEN PRINT : GOTO 40 41 PRINT : COLOR 6, 1: PRINT "@ Press any key to begin playing... @": GOSUB 990 49 REM === Plot Introduction ================================================ 50 PRINT : COLOR 14, 1: PRINT "PLOT INTRODUCTION": PRINT : COLOR 15, 1 51 PRINT "A long time ago, when mystics, warriors and villagers with smelly socks" 52 PRINT "roamed the land, things were great. You could slay dragons, beat up no-good" 53 PRINT "thieves, and even go on adventures with your drinking buddies.": PRINT 54 PRINT "There was a king to swear allegiance to, a princess to chase after, and" 55 PRINT "evil wizards to vanquish...all in all, life was grand.": PRINT 56 PRINT "Until one day, that is, when a wandering sorcerer stole a powerful orb" 57 PRINT "of light from the once mighty kingdom. It is up to you, brave knight, to" 58 PRINT "defeat the evil sorcerer and return glory to the kingdom once more!": PRINT 59 COLOR 14, 1: PRINT "< Press any key... >" 60 A$ = INKEY$: IF A$ = "" THEN GOTO 60 61 REM === Main Loop/Title Information ====================================== 62 CLS 65 COLOR 15, 1: PRINT "MINI-WESTFRONT": PRINT "(C)opyright 2004 By Paul Panks (dunric@yahoo.com)" 66 PRINT "Version 45, BUILD 378 (July 14, 2004 11:58 P.M.)": PRINT "All rights reserved, whether expressed or implied.": PRINT 67 REM === Print current Room Description =================================== 70 FOR Z = 1 TO 2: FOR A = 1 TO LEN(DE$(RM, Z)) 80 FOR X = 1 TO 15: IF CL$(TC(X)) = MID$(DE$(RM, Z), A, 1) THEN COLOR TC(X), 1: X = 16: GOTO 87 81 NEXT X 82 IF ASC(MID$(DE$(RM, Z), A, 1)) < 33 THEN PRINT MID$(DE$(RM, Z), A, 1); 83 IF ASC(MID$(DE$(RM, Z), A, 1)) > 43 AND ASC(MID$(DE$(RM, Z), A, 1)) < 91 THEN PRINT MID$(DE$(RM, Z), A, 1); 84 IF ASC(MID$(DE$(RM, Z), A, 1)) > 96 AND ASC(MID$(DE$(RM, Z), A, 1)) < 128 THEN PRINT MID$(DE$(RM, Z), A, 1); 87 NEXT A: PRINT : NEXT Z 88 COLOR 7, 1: PRINT "Obvious exits: "; : COLOR 6, 1: PRINT "< "; 90 REM === Check for valid room exits ======================================= 91 FOR X = 0 TO 5: IF M(RM, X) > 0 THEN COLOR 14, 1: PRINT NO$(X); " "; 92 NEXT X: COLOR 6, 1: PRINT ">": IF FL = 1 AND LO(27) = RM AND V <> 5 THEN COLOR 11, 1: PRINT "Faldor arrives." 93 REM === Place nouns/objects ============================================== 94 COLOR 12, 1: FOR X = 6 TO 35: IF LO(X) = RM THEN PRINT "You see "; NO$(X); " here." 95 NEXT X: COLOR 11, 1 99 REM === Main Parser Routine ============================================== 100 GOSUB 800: COLOR 6, 1: PRINT ">"; : V = 0: N = 0: NE$ = "": N$ = "": N2$ = "": V$ = "": V2$ = "": PR = 0: PT = 0 101 NM = 0: BZ = 0: FOR X = 1 TO 10: WR$(X) = "": NEXT X: COLOR 7, 1: LINE INPUT "", A$: GOSUB 2000: PT = 1: NM = 0: IF A$ = "i" THEN A$ = "inventory" 102 D$ = A$: FOR A = 1 TO LEN(D$): IF MID$(D$, A, 1) = " " THEN A$ = MID$(D$, PT, A - PT): PT = A + 1: NM = NM + 1: WD$(NM) = A$ 103 NEXT A: COLOR 15, 1: NM = NM + 1: A$ = MID$(D$, PT, A - PT): WD$(NM) = A$: V$ = WD$(1): NE$ = WD$(2): GOSUB 2000 104 IF WD$(3) = "and" OR WD$(3) = "then" THEN V2$ = WD$(4): N2$ = WD$(5): CO = 1 105 IF WD$(3) = "in" OR WD$(3) = "from" OR WD$(3) = "to" THEN V$ = WD$(1): NE$ = WD$(2): PR = 1: BZ = 1 106 V = 0: FOR X = 0 TO 24: IF V$ = VB$(X) THEN V = X 107 IF WD$(1) = "examine" OR WD$(3) = "examine" OR WD$(1) = "exa" OR WD$(3) = "exa" OR WD$(1) = "x" OR WD$(3) = "x" THEN V$ = "examine": WD$(1) = "examine": V = 6 108 NEXT X: N = 0: FOR X = 0 TO 35: IF NE$ = NO$(X) OR NE$ = AO$(X) THEN N = X 109 NEXT X: GOSUB 1700: IF D$ = "l" OR D$ = "lk" THEN GOTO 70 110 GOSUB 1600: ON V GOSUB 119, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350 111 IF CO = 1 THEN CO = 0: GOTO 106 112 IF V = 5 THEN GOTO 70 113 IF V > 90 THEN COLOR 12, 1: PRINT "You can't do that." 114 GOTO 100 119 IF RM = 8 AND N = 1 AND LT = 0 THEN COLOR 12, 1: PRINT "It is much too dark to move south!": PRINT "You need a light source (with fuel)!": RETURN 120 IF RM = 46 OR RM = 47 THEN IF LO(21) = 205 THEN COLOR 15, 1: PRINT "The ring shines as you pass...": GOTO 121 IF RM = 46 OR RM = 47 THEN IF A$ = "go west" OR A$ = "west" OR A$ = "w" THEN COLOR 12, 1: PRINT "You must be wearing the ring to enter here.": PRINT "The castle is protected by magic only the ring can break!": RETURN 121 IF RM = 20 AND N = 1 AND LO(34) = RM THEN COLOR 12, 1: PRINT "The vampire stops you!": COLOR 11, 1: PRINT "It hisses,'Humans are not allowed here!'": RETURN 122 IF RM = 25 AND N = 0 AND LO(31) = RM THEN COLOR 12, 1: PRINT "The barbarian steps in front!": COLOR 11, 1: PRINT "He bellows,'You may not enter the sacred castle!'": RETURN 123 IF RM = 30 AND N = 4 AND LO(30) = RM THEN COLOR 12, 1: PRINT "The knight shakes his head.": COLOR 11, 1: PRINT "He frowns,'I'm sorry, but no one is allowed upstairs. Move along now...'": RETURN 124 IF RM = 33 AND N = 1 AND LO(32) = RM THEN COLOR 12, 1: PRINT "The goblin blocks your path!": COLOR 11, 1: PRINT "It barks,'No one is allowed on this bridge! LEAVE, NOW!'": RETURN 125 IF RM = 46 AND N = 3 AND LO(28) = RM THEN COLOR 12, 1: PRINT "The werewolf blocks you!": COLOR 11, 1: PRINT "It growls,'Grrrrrrrrrrrrrrrrr!!!...'": RETURN 126 GOSUB 1900: IF M(RM, N) = 0 OR N > 5 THEN COLOR 12, 1: PRINT "You can't go that way.": RETURN 127 RM = M(RM, N): COLOR 7, 1: PRINT "You move "; NO$(N); "...": COLOR 15, 1: V = 5: IF FL = 1 THEN LO(27) = RM: COLOR 11, 1: PRINT "Faldor follows you "; NO$(N); "..." 128 RETURN 129 REM === GET/TAKE Verb =================================================== 130 IF FL = 1 AND LO(27) = RM AND LO(N) = RM AND WD$(1) = "faldor," THEN IF N < 25 THEN LO(N) = 1027: COLOR 15, 1: PRINT "Faldor takes "; NO$(N); ".": COLOR 12, 1: PRINT "Faldor says,'Ok.'": RETURN 131 IF LO(N) <> RM AND LO(N) <> 405 OR N < 6 OR N > 24 THEN COLOR 12, 1: PRINT "You can't do that.": RETURN 132 IF LO(N) = 405 THEN IF LO(11) = 101 OR LO(11) = RM THEN LO(N) = 101: COLOR 15, 1: PRINT "Ok.": RETURN 133 IF IC > 7 THEN COLOR 12, 1: PRINT "You are carrying too much already!": RETURN 134 LO(N) = 101: IC = IC + 1: COLOR 15, 1: PRINT "Taken." 138 RETURN 139 REM === DROP Verb ======================================================= 140 IF FL = 1 AND LO(27) = RM AND LO(N) = 1027 AND WD$(1) = "faldor," THEN IF N < 25 THEN LO(N) = RM: COLOR 15, 1: PRINT "Faldor drops "; NO$(N); ".": COLOR 12, 1: PRINT "Faldor says,'Ok.'": RETURN 141 IF LO(N) <> 101 OR N < 6 OR N > 24 THEN COLOR 12, 1: PRINT "You can't do that.": RETURN 142 LO(N) = RM: IC = IC - 1: COLOR 15, 1: PRINT "Dropped." 148 RETURN 149 REM === Inventory ======================================================= 150 IF FL = 1 AND LO(27) = RM AND WD$(1) = "faldor," THEN GOSUB 2100: RETURN 151 AC = 0: IC = 0: SI = 0: WD = 0: FOR X = 6 TO 35: IF LO(X) = 101 THEN COLOR 7, 1: PRINT " "; NO$(X); ".": SI = 1: IC = IC + 1 152 IF LO(X) = 105 THEN COLOR 11, 1: PRINT " "; NO$(X); " "; : COLOR 12, 1: PRINT "(wielded)": SI = 1: WD = 1: IC = IC + 1 153 IF LO(X) = 205 THEN COLOR 10, 1: PRINT " "; NO$(X); " "; : COLOR 13, 1: PRINT "(worn)": SI = 1: AC = AC + X: IC = IC + 1 154 IF LO(X) = 305 THEN COLOR 14, 1: PRINT " "; NO$(X); " "; : COLOR 6, 1: PRINT "(lit)": SI = 1: IC = IC + 1 155 IF LO(X) = 405 THEN COLOR 13, 1: PRINT " "; NO$(X); " "; : COLOR 11, 1: PRINT "(backpack)": SI = 1 156 NEXT: IF AC > 0 AND SI <> 0 THEN COLOR 11, 1: PRINT "Your armor is protecting"; AC; "% of your body." 157 IF SI = 0 THEN COLOR 12, 1: PRINT " Alas, you carry nothing but air.": RETURN 158 COLOR 14, 1: PRINT "You are carrying"; IC; "total items.": RETURN 159 REM === Look ============================================================ 160 GOTO 70 168 RETURN 169 REM === Examine ========================================================= 170 IF FL = 1 AND LO(27) = RM AND WD$(1) = "faldor," THEN COLOR 12, 1: PRINT "Faldor says,'I can't examine that,"; F$; "'": RETURN 171 IF LO(N) <> RM AND LO(N) <> 101 AND LO(N) <> 105 AND LO(N) <> 205 AND LO(N) <> 305 THEN COLOR 7, 1: GOSUB 2200: RETURN 172 COLOR 7, 1: PRINT OB$(N): IF N > 24 THEN GOSUB 995 178 RETURN 179 REM === Read ============================================================ 180 IF FL = 1 AND LO(27) = RM AND WD$(1) = "faldor," THEN COLOR 12, 1: PRINT "Faldor says,'I don't know how to read,"; F$; "'": RETURN 181 IF LO(N) <> RM AND LO(N) <> 101 THEN COLOR 12, 1: PRINT "You can't do that.": RETURN 182 IF N = 13 THEN COLOR 11, 1: PRINT "The book reads:": PRINT : COLOR 7, 1: PRINT " '...the ring enhances all magical abilities...'": PRINT : RETURN 183 COLOR 15, 1: PRINT "You notice nothing unusual about it." 188 RETURN 189 REM === Use ============================================================= 190 IF N = 6 THEN GOTO 210 191 IF LO(N) <> 101 AND LO(N) <> RM THEN COLOR 12, 1: PRINT "You can't do that yet.": COLOR 15, 1: PRINT "(Hint: try another way)": RETURN 192 IF N <> 10 THEN COLOR 12, 1: PRINT "You can't "; WD$(1); " that here.": RETURN 193 IF RM = 17 THEN RM = 18: COLOR 7, 1: PRINT "You use the rope to climb the tree...": COLOR 11, 1: PRINT "You climb up...": LO(10) = 18: RETURN 194 IF RM = 18 THEN RM = 17: COLOR 7, 1: PRINT "You use the rope to climb down...": COLOR 11, 1: PRINT "You slowly climb down...": LO(10) = 17: RETURN 195 IF RM = 25 THEN RM = 32: COLOR 7, 1: PRINT "You use the rope to climb the ramparts...": COLOR 11, 1: PRINT "You climb up...": LO(10) = 32: RETURN 196 IF RM = 32 THEN RM = 25: COLOR 7, 1: PRINT "You use the rope to climb the ramparts...": COLOR 11, 1: PRINT "You climb down...": LO(10) = 25: RETURN 197 COLOR 12, 1: PRINT A$;": That cannot be climbed." 198 RETURN 199 REM === Climb =========================================================== 200 IF FL = 1 AND LO(27) = RM AND WD$(1) = "faldor," THEN COLOR 15, 1: PRINT "Faldor complains that he is unable to scale it.": RETURN 201 IF A$ = "castle" AND RM = 25 THEN IF LO(10) = RM OR LO(10)=101 THEN GOTO 190 202 IF A$ = "castle" AND RM = 32 THEN IF LO(10)=RM OR LO(10)=101 THEN GOTO 190 203 IF A$ = "tree" AND RM = 17 THEN IF LO(10)=RM OR LO(10)=101 THEN GOTO 190 204 IF A$ = "tree" AND RM = 18 THEN IF LO(10)=RM OR LO(10)=101 THEN GOTO 190 206 COLOR 12, 1: PRINT A$;": That cannot be climbed." 208 RETURN 209 REM === Light =========================================================== 210 IF FL = 1 AND LO(27) = RM AND WD$(1) = "faldor," THEN COLOR 12, 1: PRINT "Faldor tried to light it, but failed miserably.": RETURN 211 IF LO(N) <> 101 AND LO(N) <> RM THEN COLOR 12, 1: PRINT "You can't light that.": RETURN 212 IF N <> 6 THEN COLOR 12, 1: PRINT "Sorry, but the "; NO$(N); " won't light.": RETURN 213 IF LT = 1 OR LO(N) = 305 THEN COLOR 14, 1: PRINT "The lantern is already aglow.": RETURN 214 LT = 1: LO(N) = 305: COLOR 14, 1: PRINT "The lantern flickers on." 218 RETURN 219 REM === Eat ============================================================= 220 IF FL = 1 AND LO(27) = RM AND WD$(1) = "faldor," AND LO(N) = 1027 AND N = 8 THEN COLOR 12, 1: PRINT "Faldor doesn't like the food. Bleck!": RETURN 221 IF N = 8 AND LO(N) = RM OR N = 8 AND LO(N) = 101 THEN LO(N) = 14: COLOR 7, 1: PRINT "You eat the food...": PRINT "You feel less hungry than before!": FD = FD + 250: HP = HM: RETURN 222 COLOR 12, 1: PRINT "You can't eat that." 228 RETURN 229 REM === Drink =========================================================== 230 IF FL = 1 AND LO(27) = RM AND LO(N) = 1027 AND N = 9 THEN LO(N) = 2: COLOR 15, 1: PRINT "Faldor drinks the water.": COLOR 12, 1: PRINT "Faldor says,'That tastes great,"; F$; "!'": FH = FH + 25 231 IF N = 9 AND RM = 2 AND LO(N) = RM OR LO(N) = 101 AND RM = 2 AND N = 9 THEN HP = HM: MP = MM: COLOR 7, 1: PRINT "Ahhhh....": PRINT "It's very refreshing!": WA = WA + 50: RETURN 232 IF N = 9 AND RM = 22 AND LO(N) = RM OR LO(N) = 101 AND RM = 22 AND N = 9 THEN HM = HM + 4: HP = HM: MM = MM + 2: MP = MM: COLOR 7, 1: PRINT "You drink from the lake...": PRINT "Wow! You feel so much better!!!": WA = WA + 125: RETURN 233 COLOR 12, 1: PRINT "You can't drink that." 238 RETURN 239 REM === Kill ============================================================ 240 GOSUB 2500: RANDOMIZE TIMER: MH = INT(RND * 500 + N) + N: IF LO(N) <> RM OR N < 25 THEN COLOR 12, 1: PRINT "You can't attack that.": RETURN 241 GOSUB 2500: TN = 1: COLOR 6, 1: PRINT "@ You attack @": COLOR 15, 1: PRINT ">": GOSUB 800 242 TN = 2: COLOR 6, 1: PRINT "@ The "; NO$(N); " attacks @": COLOR 15, 1: PRINT ">": GOSUB 800 243 IF HP < 1 THEN COLOR 12, 1: PRINT : PRINT "Alas, you have sustained a mortal blow...": PRINT "You died.": PRINT : GOSUB 970: PRINT : COLOR 15, 1: PRINT "@ The End @": GOSUB 990: END 244 IF MH < 1 THEN COLOR 12, 1: PRINT : PRINT "The "; NO$(N); " has died.": PRINT "You killed it dead.": GOSUB 980 245 COLOR 14, 1: PRINT : PRINT "@@@ Press any key @@@": PRINT : GOSUB 990: IF MH > 0 AND HP > 0 THEN GOSUB 800: GOTO 241 248 RETURN 249 REM === Score =========================================================== 250 COLOR 10, 1: PRINT "You have"; HP; "hit points (of"; HM; "max) and"; EX 251 PRINT "experience points. You carry with you"; GD; "gold coins." 252 PRINT "Type 'inventory' (or 'i') to see what you are carrying." 258 RETURN 259 REM === Save ============================================================ 260 IF FL = 1 AND LO(27) = RM AND WD$(1) = "faldor," THEN COLOR 15, 1: PRINT "Faldor cannot save a game. Only you can.": RETURN 261 OPEN "O$", 1, F$ + ".sav": PRINT #1, AC: PRINT #1, BG: PRINT #1, CT: PRINT #1, dy: PRINT #1, EX 262 PRINT #1, FD: PRINT #1, FL: PRINT #1, GD: PRINT #1, HM: PRINT #1, HP: PRINT #1, IC: PRINT #1, LT 263 PRINT #1, LV: PRINT #1, MM: PRINT #1, MP: PRINT #1, QS: PRINT #1, RM: PRINT #1, SI: PRINT #1, FH 264 PRINT #1, WA: PRINT #1, WD: PRINT #1, WE: PRINT #1, WF: PRINT #1, WV: FOR X = 6 TO 35: PRINT #1, LO(X): NEXT X: CLOSE 1 265 COLOR 7, 1: PRINT "Game saved." 268 RETURN 269 REM === Help ============================================================ 270 IF FL = 1 AND LO(27) = RM AND WD$(1) = "faldor," THEN COLOR 12, 1: PRINT "Faldor complains,'I'm trying my best,"; F$; "!'": RETURN 271 COLOR 15, 1: PRINT "I can offer no help..." 278 RETURN 279 REM === Give ============================================================ 280 IF FL = 0 THEN COLOR 12, 1: PRINT "You can only give it to Faldor!": RETURN 281 IF LO(27) <> RM THEN COLOR 15, 1: PRINT "Faldor isn't here.": COLOR 12, 1: PRINT "You can only give it to Faldor!": RETURN 282 IF LO(N) <> 101 THEN COLOR 12, 1: PRINT "You must be holding it to give that to Faldor!": RETURN 283 LO(N) = 1027: IC = IC - 1: COLOR 15, 1: PRINT "Ok.": COLOR 7, 1: PRINT "Faldor takes the "; NO$(N); " from you.": COLOR 15, 1: PRINT "He says,"; : COLOR 10, 1: PRINT "'Thank you!'" 288 RETURN 289 REM === Quit ============================================================ 290 IF FL = 1 AND LO(27) = RM AND WD$(1) = "faldor," THEN COLOR 15, 1: PRINT "Faldor cannot quit a game. Only you can.": RETURN 291 COLOR 6, 1: PRINT "@ Press any key to quit... @": GOSUB 990: COLOR 15, 1: PRINT "Thanks! :)": END 299 REM === Wield =========================================================== 300 IF FL = 1 THEN IF LO(27) = RM THEN IF LO(N) = 1027 THEN COLOR 15, 1: PRINT "Faldor says he can't wield that.": RETURN 301 IF LO(N) <> 101 OR N < 15 OR N > 17 THEN COLOR 12, 1: PRINT "You can't wield that.": RETURN 302 IF N > 14 AND N < 18 THEN LO(N) = 105: COLOR 15, 1: PRINT "Wielded.": WD = 1: DM = N 303 RETURN 309 REM === Unwield ========================================================= 310 IF FL = 1 THEN IF LO(27) = RM THEN IF LO(N) = 1027 THEN COLOR 15, 1: PRINT "Faldor complains,'I can't do that,"; F$; ".'": RETURN 311 IF LO(N) <> 105 OR N < 15 OR N > 17 THEN COLOR 12, 1: PRINT "You can't unwield that.": RETURN 312 IF N > 14 AND N < 18 THEN LO(N) = 101: COLOR 15, 1: PRINT "Unwielded.": WD = 0: DM = 1 313 RETURN 319 REM === Wear ============================================================ 320 IF FL = 1 THEN IF LO(27) = RM THEN IF LO(N) = 1027 THEN COLOR 15, 1: PRINT "Faldor tries to wear it, but it doesn't fit!": RETURN 321 IF LO(N) <> 101 OR N < 18 OR N > 24 THEN COLOR 12, 1: PRINT "You can't wear that.": RETURN 322 IF N > 17 AND N < 25 THEN LO(N) = 205: COLOR 15, 1: PRINT "Worn.": AC = AC + N 323 RETURN 329 REM === Remove ========================================================== 330 IF FL = 1 THEN IF LO(27) = RM THEN IF LO(N) = 1027 THEN COLOR 15, 1: PRINT "Faldor says he can't remove that here.": RETURN 331 IF LO(N) <> 205 OR N < 18 OR N > 24 THEN COLOR 12, 1: PRINT "You can't remove that.": RETURN 332 IF N > 17 AND N < 25 THEN LO(N) = 101: COLOR 15, 1: PRINT "Removed.": AC = AC - N 333 RETURN 339 REM === Faldor Help ===================================================== 340 COLOR 7, 1: PRINT "Faldor is just like you, except sort of dumb. He can act as your personal" 341 PRINT "bodyguard. You can also order him around, have him pick up objects and" 342 PRINT "generally act as your personal servant. He is dependable most of the time." 343 PRINT : PRINT "Faldor can only carry certain objects, and may fight alongside you if he" 344 PRINT "feels you need the help.": PRINT : PRINT "To give faldor a command, type:": PRINT 345 COLOR 15, 1: PRINT "faldor, ": PRINT : COLOR 7, 1: PRINT "where is any valid verb, and is any valid noun.": PRINT 346 PRINT "To have Faldor follow you, type: "; : COLOR 15, 1: PRINT "faldor, follow": PRINT 347 RETURN 349 REM === Put ============================================================= 350 IF FL = 1 AND LO(27) = RM AND WD$(1) = "faldor," THEN COLOR 12, 1: PRINT "Faldor complains that he cannot do that.": RETURN 351 IF LO(N) = 101 OR LO(N) = RM THEN IF N > 5 AND N < 25 AND N <> 11 THEN LO(N) = 405: COLOR 15, 1: PRINT "Ok.": RETURN 352 COLOR 12, 1: PRINT "You can't do that." 358 RETURN 799 REM === Random Events Routine =========================================== 800 IF MH < 1 THEN GOTO 820 801 RANDOMIZE TIMER: I = INT(RND * 35) + 1: CT = CT + 1: IF CT > 250 THEN CT = 0: COLOR 12, 1: PRINT "The monsters have been revived.": GOSUB 950 802 IF TN = 1 THEN IF I < 5 THEN COLOR 7, 1: PRINT " Alas, you missed...": RETURN 803 IF TN = 1 THEN IF I > 4 AND I < 10 THEN COLOR 15, 1: PRINT " You grazed "; NO$(N); ".": DT = I: MH = MH - DT 804 IF TN = 1 THEN IF I > 9 AND I < 15 THEN COLOR 15, 1: PRINT " You hit "; NO$(N); " hard.": DT = I + DM: MH = MH - DT 805 IF TN = 1 THEN IF I > 14 AND I < 20 THEN COLOR 15, 1: PRINT " You hit "; NO$(N); " very hard.": DT = I + DM + DM: MH = MH - DT 806 IF TN = 1 THEN IF I > 19 AND I < 25 THEN COLOR 15, 1: PRINT " You smashed "; NO$(N); " with a bone-crushing sound.": DT = I + I + DM + DM + DM: MH = MH - DT 807 IF TN = 1 THEN IF I > 24 AND I < 27 THEN COLOR 15, 1: PRINT " You massacred "; NO$(N); " into small fragments.": DT = DM * 8: MH = MH - DT 808 IF TN = 1 THEN IF I > 26 AND I < 30 THEN COLOR 10, 1: PRINT " AMAZING BLOW!": PRINT "You crushed "; NO$(N); " into atoms!!": DT = DM * 12: MH = MH - DT 809 IF TN = 1 THEN IF I > 29 AND I < 32 THEN COLOR 13, 1: PRINT " CRUSHING BLOW!!": PRINT "You destroyed "; NO$(N); "!!!": DT = DM * 16: MH = MH - DT 810 IF TN = 1 THEN IF I = 32 THEN IF LO(17) = 105 THEN COLOR 11, 1: PRINT " Your SCIMITAR GLOWS!": PRINT "A flash of light strikes "; NO$(N); "!!": DT = DM * 50: MH = MH - DT 811 IF TN = 1 THEN IF I = 33 THEN IF LO(18) = 205 THEN COLOR 9, 1: PRINT " Your CLOAK blinds "; NO$(N); "!!": GOTO 800 812 IF TN = 1 THEN IF I = 34 THEN IF LO(21) = 205 THEN COLOR 14, 1: PRINT " Your RING pulsates!": PRINT "A fireball hits "; NO$(N); "!!": GOSUB 961: DT = 21 * 4: MH = MH - DT 813 IF TN = 1 THEN IF I = 35 THEN IF LO(24) = 205 THEN COLOR 11, 1: PRINT " Your SHROUD feels warm!": PRINT "You just regained"; I + MH; "hit points.": HP = HP + I + MH: IF HP > HM THEN HM = HP 814 IF TN = 1 THEN IF I = 36 THEN COLOR 15, 1: PRINT " The "; NO$(N); " dodged your attack." 815 RANDOMIZE TIMER: I = INT(RND * 8) + 1 816 IF TN = 2 THEN IF I < 5 THEN COLOR 7, 1: PRINT " It missed you..." 817 IF TN = 2 THEN IF I > 4 AND I < 10 THEN COLOR 15, 1: PRINT " It struck you hard!": DT = I * 4: HP = HP - DT: IF AC > DT THEN DT = DT - AC: HP = HP + DT 818 IF TN = 2 THEN IF I > 9 AND I < 15 THEN COLOR 12, 1: PRINT " AMAZING BLOW!!": PRINT "The "; NO$(N); " sliced you badly!!!": DT = I * 8: HP = HP - DT: IF AC > DT THEN DT = DT - AC: HP = HP + DT 819 IF TN = 2 THEN IF I > 14 THEN COLOR 15, 1: PRINT " You dodged the attack..." 820 IF HP < HM * .25 THEN IF LO(13) = 101 THEN IF MP >= 5 THEN MP = MP - 5: COLOR 14, 1: PRINT "You cast a heal spell: >>>>> H E A L ! ! !": RANDOMIZE TIMER: I = INT(RND * 100) + 1: HP = HP + I: IF HP > HM THEN HM = HP 821 RANDOMIZE TIMER: JK = I: I = INT(RND * 150) + 1: IF RM = 1 OR RM = 3 OR RM = 7 OR RM > 9 AND RM < 15 OR RM = 19 OR RM > 24 AND RM < 31 OR RM > 36 AND RM < 45 OR RM = 48 THEN CT = CT + 1: RETURN 822 CT = CT + 1: IF I > 9 AND I < 15 THEN COLOR 11, 1: PRINT "You hear thunder rumbling in the distance." 823 IF I > 14 AND I < 20 THEN COLOR 11, 1: PRINT "Lightning flashes across the sky, scarring it across." 824 IF I > 19 AND I < 25 THEN COLOR 11, 1: PRINT "A cool wind blows from the southwest." 825 IF I > 24 AND I < 30 AND JK < 30 THEN COLOR 14, 1: PRINT "The sun shines and you feel better.": HP = HM: MP = MM 826 IF I > 29 AND I < 35 THEN COLOR 11, 1: PRINT "A gentle rain pelts the ground." 827 IF I > 34 AND I < 40 THEN COLOR 11, 1: PRINT "You notice storm clouds gathering on the horizon." 828 IF I > 39 AND I < 45 THEN COLOR 11, 1: PRINT "The moon hangs overhead, casting a shadow." 829 IF I > 44 AND I < 50 THEN COLOR 11, 1: PRINT "There is a torrential downpour." 830 IF WA = 30 OR FD = 30 THEN COLOR 12, 1: PRINT "You are running out of food and water!" 831 IF WA = 15 OR FD = 15 THEN COLOR 12, 1: PRINT "You are feeling very thirsty.": PRINT "Your stomach rumbles emptily..." 832 IF WA <= 0 OR FD <= 0 THEN COLOR 12, 1: PRINT "You have died from dehydration and lack": PRINT "of food on day"; dy; "...": PRINT : GOSUB 990: GOTO 970 833 IF A$ = "room" THEN COLOR 15, 1: PRINT "You are in room:"; : COLOR 12, 1: PRINT RM 834 IF D$ = "where is "+NO$(N) THEN COLOR 15, 1: PRINT "The ";NO$(N);" is in location:"; : COLOR 12, 1: PRINT LO(21): D$="score" 835 RETURN 899 REM === Read in Text Color Attributes =================================== 900 FOR X = 1 TO 15: READ CL$(X), TC(X): NEXT X 901 REM === Read in Room Descriptions and Game Map ========================== 902 FOR X = 0 TO 48: READ DE$(X, 1), DE$(X, 2): FOR Y = 0 TO 5: READ M(X, Y) 903 NEXT Y: NEXT X 904 REM === Read in Noun Names, Locations and Descriptions ================== 905 FOR X = 0 TO 35: READ NO$(X), LO(X), OB$(X): NEXT X 906 REM === Read in Verb Names ============================================== 907 FOR X = 1 TO 24: READ VB$(X): NEXT X 908 REM === Return to the Beginning ========================================= 909 RETURN 949 REM === Revive monsters ================================================= 950 LO(25) = 2: LO(26) = 10: LO(27) = 2: LO(28) = 46: LO(29) = 19: LO(30) = 30: LO(31) = 25 951 LO(32) = 33: LO(33) = 22: LO(34) = 20: LO(35) = 48 959 RETURN 960 REM === Fireball (special attack) ======================================= 961 COLOR 12, 1: PRINT ">>>>>"; : COLOR 6, 1: PRINT ">>>>>"; : COLOR 14, 1: PRINT ">>>>>"; : COLOR 15, 1: PRINT ">>>>> "; : COLOR 7, 1: PRINT "F I R E - B A L L ! ! !" 962 RETURN 969 REM === Player perished in battle ======================================= 970 COLOR 10, 1: PRINT "********************************" 971 COLOR 10, 1: PRINT "* *" 972 COLOR 10, 1: PRINT "* "; : COLOR 7, 1: PRINT " ...THOU ART SLAIN... "; : COLOR 10, 1: PRINT "*" 973 COLOR 10, 1: PRINT "* *" 974 COLOR 10, 1: PRINT "********************************" 975 PRINT : COLOR 14, 1: PRINT "< Press any key... >": GOSUB 990 978 RETURN 979 REM === Monster loses in battle to player =============================== 980 COLOR 11, 1: PRINT "You gained"; I + DM + AC; "experience points" 981 PRINT "and"; N; "gold coins.": DT = I + DM + AC: GD = GD + N: EX = EX + DT: IF DT > 55 THEN PRINT "You gained a level!": HM = HM + 25: HP = HM: MM = MM + 15: MP = MM: LV = LV + 1: EX = EX + I + DM + AC: GD = GD + N 982 FOR X = 7 TO 24: IF LO(X) = 1000 + N THEN COLOR 7, 1: PRINT " You found "; NO$(X); " on it!": LO(X) = RM 983 NEXT X: LO(N) = 998: IF N = 35 THEN GOTO 1500 988 RETURN 989 REM === Wait for a key press ============================================ 990 A$ = INKEY$: IF A$ = "" THEN GOTO 990 991 RETURN 994 REM === Check to see what the monster is carrying ======================= 995 COLOR 11, 1: PRINT "The "; NO$(N); " is carrying:": SI = 0 996 FOR X = 7 TO 24: IF LO(X) = 1000 + N THEN COLOR 15, 1: PRINT " "; NO$(X); ".": SI = 1 997 NEXT X: IF SI = 0 THEN COLOR 12, 1: PRINT " Nothing!" 998 RETURN 1000 REM === Color values and seeds ========================================= 1001 DATA "!",1,"@",2,"#",3,"$",4,"%",5,"^",6,"&",7,"*",8 1002 DATA "(",9,")",10,"-",11,"=",12,"[",13,"]",14,"\",15,"&Obvious exits: ","^< ",99,99,99,99,99,99 1100 REM === Room Descriptions ============================================== 1101 DATA "\You are inside a small tavern with creaky wooden floors." 1102 DATA "\A staircase heads upstairs to the second floor.",0,2,0,0,13,0 1103 DATA "\You are standing near a small artisan well. The water looks" 1104 DATA "\murky green. =A cobblestone path heads south out of town.",1,8,3,4,0,0 1105 DATA "\You are standing inside a small house. There isn't much here, save for" 1106 DATA "\a small bed and a wooden table =(atop the table rests several items)\.",0,0,0,2,0,0 1107 DATA "\You are standing on a small hillside &(overlooking the village" 1108 DATA "to the west)\. =It descends some fifty feet towards a small road.",0,0,2,5,0,0 1109 DATA "\You are walking on a dusty road just outside of town. Smoke billows" 1110 DATA "\from houses surrounding the main gate. =A barn lies to the north.",7,0,4,6,0,0 1111 DATA "\You have reached a small boulder, blocking a small cave. Some" 1112 DATA "\thieves have moved it here &(in hopes of thwarting others)\.",0,0,5,0,0,0 1113 DATA "\You are standing inside a small barn. Stables line the walls" 1114 DATA "\here, while a small stack of hay is visible nearby.",0,5,0,0,0,0 1115 DATA "\You are facing the entrance to a small village. A stone archway" 1116 DATA "\rises high above, vines growing steadfast to the concrete walls.",2,15,9,10,0,0 1117 DATA "\You are standing inside a small cathedral. High stained glass" 1118 DATA "\windows rise above, giving you a great sense of soaring height.",11,0,0,8,0,0 1119 DATA "\You are standing inside a small guild. A fireplace burns softly" 1120 DATA "\near the back wall. There are several tables and chairs here.",0,0,8,0,0,0 1121 DATA "\You are facing a stone altar. A single bible =(latched in place)" 1122 DATA "\stands near the center. You notice a back room towards the east.",0,9,12,0,0,0 1123 DATA "\You are standing inside a small room near the back of the cathedral." 1124 DATA "\There are several wooden barrels here =(some of them empty)\.",0,0,0,11,0,0 1125 DATA "\You are standing in the middle of an upstairs hallway on the second" 1126 DATA "\floor of the tavern. A small room is visible to the east of here.",0,1,14,0,0,1 1127 DATA "\You are inside a small room. A bed is visible here, resting against the" 1128 DATA "\back wall. Looking outside, you notice a lone tree =(aged and old)\.",0,0,0,13,0,0 1129 DATA "\You are walking in a small forest. Light filters down from the canopy" 1130 DATA "\above as birds chirp nearby. =A path heads east deeper into the forest.",8,23,16,0,0,0 1131 DATA "\You are walking down a narrow path in the forest. Looks like you've been" 1132 DATA "\here before. The path heads east past a large oak tree.",0,0,17,15,0,0 1133 DATA "\You are standing in front of an old oak tree. It has low lying branches" 1134 DATA "\and it looks climbable. The path slopes down towards the east.",0,0,20,16,0,0 1135 DATA "\You are on a branch at the top of a tree. There is a small hut resting" 1136 DATA "\against it to the east. The hut has thatched roofing and a small window.",0,0,19,0,0,0 1137 DATA "\You are standing inside a small hut. There is a small bookshelf here as" 1138 DATA "\well as a small wooden table. But the table appears empty...",0,0,0,18,0,0 1139 DATA "\You are facing an intersection in the forest. A smaller path &(less wide)" 1140 DATA "\turns sharply towards the south here. Where it leads is unknown.",0,21,0,17,0,0 1141 DATA "\You are walking in a grassy meadow. You notice a small lake towards" 1142 DATA "\the east (too far away to examine closely).",20,0,22,0,0,0 1143 DATA "\You are standing near a lake at the edge of the forest. It glistens oddly" 1144 DATA "\in the fading light. The only exit is back west.",0,0,0,21,0,0 1145 DATA "\You are standing in a small clearing. A forest grows to the north, rising" 1146 DATA "\hundreds of feet into the air. A bridge is visible south of the clearing.",15,33,45,24,0,0 1147 DATA "\You are on a small hillside west of the main clearing. It slopes down" 1148 DATA "\towards the southwest, near a large stone castle. It appears abandoned.",0,0,23,25,0,0 1149 DATA "\You are standing in front of a large stone castle. The ramparts rise" 1150 DATA "\high above, piercing the clouds like knives. The drawbridge is down.",26,0,24,0,0,0 1151 DATA "\You are walking in the main hallway of the castle. It appears to fork" 1152 DATA "\to the west around a small corridor. You are not certain where it leads.",27,25,0,0,0,0 1153 DATA "\You are facing a narrow corridor within the castle. A pair of gryphons" 1154 DATA "\stand watch here =(with evil eyes)\. The corridor continues west.",0,26,0,28,0,0 1155 DATA "\You are walking down a narrow corridor. It turns up ahead near a small" 1156 DATA "\entrance room. The room is usually heavily guarded.",29,0,27,30,0,0 1157 DATA "\You are standing within the castle parlor. It is an open area with a large" 1158 DATA "\chandelier hanging down. An entrance hall is west.",0,28,0,30,0,0 1159 DATA "\You are standing in front of a long, winding staircase near the" 1160 DATA "\western rampart of the castle. It is usually guarded by a knight.",0,0,29,0,31,0 1161 DATA "\You have reached a walkway atop the western rampart. A stone walkway extends" 1162 DATA "\several hundred feet in front of you. It is covered in overhanging vines.",0,30,0,32,0,30 1163 DATA "\You have reached the western rampart of the castle. It is mostly bare save" 1164 DATA "\for a few small items scattered about =(some of them useful)\.",0,0,31,0,0,0 1165 DATA "\You are standing in front of a small wooden bridge. It stands above a" 1166 DATA "\small stream, rumbling towards the southeast. The bridge is usually guarded.",23,46,34,0,0,0 1167 DATA "\You are walking down a dusty trail east of the small bridge. It heads down" 1168 DATA "\a small hillside towards the southeast. There is a cottage at the bottom.",0,0,35,33,0,0 1169 DATA "\You are walking down a hillside, elevation 100 feet. The hill continues to" 1170 DATA "\to slope down ever so slightly =(near the base of a cottage)\.",0,0,36,34,0,0 1171 DATA "\You are standing in front of a small cottage at the base of a large hill." 1172 DATA "\The cottage appears mostly abandoned, however. Should you enter it?",0,37,0,35,0,0 1173 DATA "\You have entered into a massive living room within the cottage. A large" 1174 DATA "\corridor breaks off here, heading east. =The door slams shut behind you...",0,0,38,0,0,0 1175 DATA "\You are facing several rooms in a narrow corridor. A kitchen stands to" 1176 DATA "\the north, while a larger room is south of here.",39,43,40,37,0,0 1177 DATA "\You are standing inside a small kitchen, barely furnished. There isn't" 1178 DATA "\much here save for a small table. There is no stove anywhere. How odd...",0,38,0,0,0,0 1179 DATA "\You are walking down a darkened corridor within the cottage. To the east" 1180 DATA "\stands the master bedroom, barely visible from here.",0,0,41,38,0,0 1181 DATA "\You are standing in front of the master bedroom. The open doorway to the" 1182 DATA "\north invites you inside. Peeking in, you notice several items of interest.",42,0,0,40,0,0 1183 DATA "\You are standing inside the master bedroom. The room is mostly littered" 1184 DATA "\with discarded items =(plus an old bed)\. Nothing else remains here.",0,41,0,0,0,0 1185 DATA "\You are standing inside a small guestroom. Many of the items here have" 1186 DATA "\been moved or taken since your last visit here. Strange how you don't know.",38,0,44,0,0,0 1187 DATA "\You are standing inside a cramped closet. The air is quite stuffy here." 1188 DATA "\There is barely enough room to move.! Why are you inside here, anyway?",0,0,0,43,0,0 1189 DATA "\You are in a forest that appears to be dying. The bark on most of these" 1190 DATA "\trees has been charred badly =(from a recent fire)\.",0,0,0,23,0,0 1191 DATA "\You are facing a lone road, heading west. The road stops abruptly at a" 1192 DATA "\dark castle. The castle has a fountain and a small courtyard.",33,0,0,47,0,0 1193 DATA "\You are standing in the castle courtyard. A fountain rests in the middle" 1194 DATA "\here, as water pours out into a marble basin below. The entrance is west.",0,0,46,48,0,0 1195 DATA "\You are standing before a golden throne, at the heart of the castle. How" 1196 DATA "\you got here is not known. You feel great evil surrounding this place!",0,0,47,0,0,0 1199 REM === Nouns and Locations ============================================ 1200 DATA "north",99,"...","south",99,"...","east",99,"...","west",99,"..." 1205 DATA "up",99,"...","down",99,"..." 1206 DATA "lantern",14,"lantern: a small brass lantern with rusted hinges. It is blood-stained." 1207 DATA "oil",12,"oil: a flask of oil used with the lantern. No good by itself." 1208 DATA "food",39,"food: standard iron rations lasting two weeks." 1209 DATA "water",2,"water: it appears murky green, almost lifeless." 1210 DATA "rope",12,"rope: a coil of rope about ten feet in length." 1211 DATA "backpack",44,"backpack: a large, leather backpack. Useful for holding things." 1212 DATA "pole",7,"pole: a long wooden pole about twenty feet in length. Might be useful." 1213 DATA "spellbook",19,"spellbook: an ancient book of spells and black magic. Try reading it." 1214 DATA "orb",1050,"It appears to be glowing! A single, yet brilliant, flame glows from within." 1215 DATA "dagger",14,"dagger: a simple metal dagger. It looks old and worn." 1216 DATA "sword",42,"sword: a long metal sword, sharp as a razor. It is cast from a strong iron." 1217 DATA "scimitar",32,"scimitar: a heavy scimitar, with a sharp blade. It is shining in the light." 1218 DATA "cloak",19,"cloak: a fine elven cloak, made from imported silk. It has a medium hood." 1219 DATA "helmet",3,"helmet: a brass helmet with no visible marks. It is finely crafted." 1220 DATA "shield",22,"shield: a strong metal shield. It has a lion emblazoned on the front." 1221 DATA "ring",1029,"ring: a fine ring of protection. It glows softly, a pale blue." 1222 DATA "armor",1036,"armor: a sturdy suit of platemail armor. It has chains linking it together." 1223 DATA "boots",1036,"boots: a pair of leather knife boots. They look dangerous (but not to you)." 1224 DATA "shroud",1030,"shroud: an ancient shroud. It has an air of mystery about it." 1225 DATA "villager",2,"villager: a common villager. He smiles at you briefly before passing." 1226 DATA "paladin",10,"paladin: a veteran of several wars. He seems grizzled and very tough indeed." 1227 DATA "faldor",2,"faldor: this is faldor, the bodguard. Type 'fhelp' for more information." 1228 DATA "werewolf",46,"werewolf: a vicious werewolf with fiery eyes. He growls at you!" 1229 DATA "hobbit",19,"hobbit: a small creature with furry feet. He seems fairly light-hearted." 1230 DATA "knight",30,"knight: a strong knight with a deadly gaze. He watches you closely!" 1231 DATA "barbarian",25,"barbarian: an evil barbarian with flowing hair and a sharp blade." 1232 DATA "goblin",33,"goblin: a menacing goblin with an ugly face. He bars passage to the north!" 1233 DATA "dragon",22,"dragon: a large, green dragon with tough scales and powerful claws." 1234 DATA "vampire",20,"vampire: an evil vampire with hellish eyes. He is a blood fiend!" 1235 DATA "mordimar",48,"mordimar: this is mordimar, evil of the ancients. You sense great power!" 1300 REM === Verbs ========================================================== 1301 DATA "go","get","drop","inventory","look","examine","read","use","climb" 1310 DATA "light","eat","drink","kill","score","save","help","give","quit" 1319 DATA "wield","unwield","wear","remove","fhelp","put" 1499 REM === Player wins game =============================================== 1500 COLOR 15, 1: PRINT "You defeated the sorcerer!": PRINT 1501 COLOR 11, 1: PRINT "Mordimar's corpse lay at your feet, battered with blood. You feel" 1502 PRINT "a sense of relief knowing he is truly dead. Now that the orb is back in" 1503 PRINT "the rightful hands of the kingdom, you can lay your sword down and rest" 1504 PRINT "easy knowing you have fulfilled your destiny!": PRINT 1505 PRINT "Besides, with the taverns opening shortly, you'll have plenty of time" 1506 PRINT "to drink away the sorrows of this land once more! Congratulations, for you" 1507 PRINT "are a true warrior of Guilder!!": PRINT : COLOR 7, 1: PRINT "@ The End @": PRINT 1508 COLOR 14, 1: PRINT "< Press any key... >": PRINT 1509 GOSUB 990: PRINT : COLOR 15, 1: PRINT "Thanks for playing! :)": GOSUB 990: END 1599 REM === Bug fix routines =============================================== 1600 : 1601 IF V = 0 THEN V = 99 1602 RETURN 1700 IF D$ = "n" OR D$ = "north" THEN V = 1: N = 0 1701 IF D$ = "s" OR D$ = "south" THEN V = 1: N = 1 1702 IF D$ = "e" OR D$ = "east" THEN V = 1: N = 2 1703 IF D$ = "w" OR D$ = "west" THEN V = 1: N = 3 1704 IF D$ = "u" OR D$ = "up" THEN V = 1: N = 4 1705 IF D$ = "d" OR D$ = "down" THEN V = 1: N = 5 1706 RETURN 1899 REM === Handle Cottage Quest =========================================== 1900 IF LO(20) = 101 OR LO(20) = 205 THEN IF RM = 37 AND N = 0 THEN M(37, 0) = 36: COLOR 12, 1: PRINT "The door swings open..." 1901 RETURN 1999 REM === Handle Faldor ================================================== 2000 IF WD$(1) = "faldor," THEN V$ = WD$(2): NE$ = WD$(3) 2001 IF A$ = "faldor, follow" OR A$ = "follow" THEN IF LO(27) = RM AND FL = 0 THEN FL = 1: COLOR 15, 1: PRINT "Faldor is now following you.": GOTO 100 2002 RETURN 2099 REM === Handle Faldor inventory ======================================== 2100 COLOR 15, 1: PRINT "Faldor is carrying the following items:": SI = 0 2101 COLOR 7, 1: FOR X = 7 TO 24: IF LO(X) = 1027 THEN PRINT " "; NO$(X); ".": SI = 1 2102 NEXT X: IF SI = 0 THEN COLOR 12, 1: PRINT " Nothing!" 2103 RETURN 2199 REM === Extended examine command ======================================= 2200 IF WD$(2) = "village" OR WD$(2) = "archway" THEN PRINT "The "; WD$(2); " towers above, beckoning you inside": PRINT "the inner walls.": SI = 1 2201 IF WD$(2) = "clouds" THEN PRINT "The clouds float by endlessly. They appear to drift by without care.": SI = 1 2202 IF WD$(2) = "well" THEN PRINT "The well is constructed from hewn rocks. Moss grows on either side.": SI = 1 2203 IF WD$(2) = "moss" THEN IF RM = 2 THEN PRINT "The moss appears green and lifeless.": SI = 1 2204 IF WD$(2) = "tavern" THEN PRINT "This tavern looks ages old. There are several tables in": PRINT "the front of the room.": SI = 1 2205 IF WD$(2) = "tables" THEN IF RM = 1 THEN PRINT "The tables feel coarse and worn. Light flickers from candles": PRINT "atop the tables.": SI = 1 2206 IF WD$(2) = "candles" THEN IF RM = 1 THEN PRINT "The candles burn softly, casting a faint light.": SI = 1 2207 IF WD$(2) = "sun" THEN PRINT "The sun does not appear too hot or too cold. If only you could reach it...": SI = 1 2208 IF WD$(2) = "hill" THEN PRINT "The hills are too far away to view closely.": SI = 1 2209 IF WD$(2) = "hillside" THEN PRINT "The hillside? Try 'hills' instead.": SI = 1 2210 IF WD$(2) = "hut" THEN IF RM = 19 THEN PRINT "The hut appears cramped and irregular in size. There is a table": PRINT "here beside a small bookshelf.": SI = 1 2211 IF WD$(2) = "bookshelf" THEN IF RM = 19 THEN PRINT "The bookshelf is entirely empty. Someone has cleaned it bare!": SI = 1 2212 IF WD$(2) = "table" THEN IF RM = 19 THEN PRINT "The table is made from birch wood. It has words carved into the": PRINT "surface of the table.": SI = 1 2213 IF WD$(2) = "surface" THEN IF RM = 19 THEN PRINT "The surface of the table is smooth and well crafted. You": PRINT "notice words carved into the table.": SI = 1 2214 IF WD$(2) = "words" THEN IF RM = 19 THEN PRINT "The words read: "; : COLOR 11, 1: PRINT "'...The Ancient One fears the Ring of Power...'": COLOR 7, 1: SI = 1 2215 IF WD$(2) = "doorway" THEN IF RM = 41 THEN PRINT "The doorway appears old and rustic.": SI = 1 2216 IF WD$(2) = "bedroom" THEN IF RM > 37 AND RM < 44 THEN PRINT "The bedroom appears mostly bare, although there is a bed visible nearby.": SI = 1 2217 IF WD$(2) = "bed" THEN IF RM > 37 AND RM < 44 THEN PRINT "The bed appears soft and comfortable!": SI = 1 2218 IF WD$(2) = "tree" THEN IF RM > 16 AND RM < 20 THEN PRINT "This old oak tree is twisted by age and time. Most of the": PRINT "branches are slightly charred from a recent fire.": SI = 1 2219 IF WD$(2) = "branches" THEN IF RM > 16 AND RM < 20 THEN PRINT "The branches are twisted and aged. Some appear climbable, however.": SI = 1 2220 IF WD$(2) = "courtyard" THEN IF RM = 47 THEN PRINT "The courtyard appears fairly wide, with a foutain visible in the center.": PRINT "You also notice an entrance to the west, beckoning you inside...": SI = 1 2221 IF WD$(2) = "fountain" THEN IF RM = 47 THEN PRINT "The fountain is very lovely. It is made from stone, and molded into": PRINT "the shape of a natural beauty. Water pours down towards a basin below.": SI = 1 2222 IF WD$(2) = "basin" THEN IF RM = 47 THEN PRINT "The basin is filled with water. However, it is magically held in": PRINT "place by an unseen force. You try to drink it, but you can't!": SI = 1 2223 IF WD$(2) = "throne" THEN IF RM = 48 THEN PRINT "This is a golden throne, gleaming in the fading light while surrounded": PRINT "by mist and darkness. It appears magical, almost out of time...": SI = 1 2224 IF WD$(2) = "walkway" THEN IF RM > 30 AND RM < 33 THEN PRINT "This walkway extends towards the end of the western rampart. It is covered": PRINT "in vines, hanging down the wall far below.": SI = 1 2225 IF WD$(2) = "vines" THEN IF RM > 30 AND RM < 33 THEN PRINT "The vines are twisted and tangled, and they hang down by several": PRINT "hundred feet. They do not appear safe to climb, however...": SI = 1 2226 IF WD$(2) = "rampart" THEN IF RM > 30 AND RM < 33 THEN PRINT "The western rampart appears quite sturdy desite advancing age.": PRINT "This castle must have seen a lot of combat over the course of several": PRINT "years. At the top is a flag.": _ SI = 1 2227 IF WD$(2) = "flag" THEN IF RM > 30 AND RM < 33 THEN PRINT "The flag flaps quietly in the breeze above. It appears to part the": PRINT "wind with the surrounding clouds.": SI = 1 2228 IF WD$(2) = "bridge" THEN IF RM = 23 OR RM = 25 OR RM = 33 THEN PRINT "It appears fairly sturdy despite the water around it. You'd": PRINT "think something would brittle the wood, right?": SI = 1 2229 IF WD$(2) = "path" THEN PRINT "The path continues south, just beyond a small hill.": SI = 1 2230 IF WD$(2) = "forest" THEN PRINT "The forest towers above you, with hundreds of trees rising high": PRINT "above. The sunlight is very dim, casting shadows on the forest floor.": SI = 1 2231 IF WD$(2) = "sunlight" THEN PRINT "The sunlight is blocked somewhat by towering trees.": SI = 1 2232 IF WD$(2) = "trees" THEN PRINT "The trees appear tall and rise hundreds of feet into the clouds above.": SI = 1 2233 IF WD$(2) = "meadow" THEN PRINT "The meadow glistens oddly in the fading light. It appears": PRINT "to move seemlessly about the wind.": SI = 1 2234 IF WD$(2) = "wind" THEN PRINT "The wind is blowing softly, as but a lonely breeze...": SI = 1 2235 IF WD$(2) = "parlor" THEN IF RM > 24 AND RM < 33 THEN PRINT "It is much wider than other rooms nearby.": SI = 1 2236 IF WD$(2) = "lake" THEN IF RM = 21 OR RM = 22 THEN PRINT "The lake appears to glisten oddly, especially near the": PRINT "edge of the beach.": SI = 1 2237 IF WD$(2) = "beach" THEN IF RM = 21 OR RM = 22 THEN PRINT "The beach is littered with leaves, cast down from trees high above.": SI = 1 2238 IF WD$(2) = "leaves" THEN IF RM = 21 OR RM = 22 THEN PRINT "These leaves appear very brittle. Picking them up": PRINT "would probably crush them.": SI = 1 2239 IF WD$(2) = "leaves" THEN PRINT "You notice nothing remarkable about the leaves.": SI = 1 2251 COLOR 7, 1: PRINT "You notice nothing unusual about the "; WD$(2); "." 2252 RETURN 2499 REM === Handle Faldor during combat ==================================== 2500 IF N <> 27 THEN GOTO 2503 2501 COLOR 11, 1: PRINT "You sense a friendly aura about Faldor and back off!": N = 0 2502 RETURN 2503 COLOR 6, 1: PRINT ">": COLOR 11, 1: PRINT "Faldor attacks "; NO$(N); ":" 2504 RANDOMIZE TIMER: I = INT(RND * 35) + 1: IF LO(17) = 1027 THEN IF I <= 10 THEN COLOR 14, 1: PRINT " Faldor's SIMITAR glows!!": PRINT "He slashes and wounds "; NO$(N); " badly!!": DT = FH: MH = MH - FH: GOTO 2507 2505 IF I >= 30 THEN COLOR 15, 1: PRINT " Faldor struck "; NO$(N); " hard.": DT = I: MH = MH - I: GOTO 2507 2506 COLOR 15, 1: PRINT " Faldor missed..." 2507 COLOR 6, 1: PRINT ">" 2508 RETURN