REM The MAGIC FLUTE (A Text Adventure) REM Coded in PowerBASIC for MS-DOS on 2/27/2002; revised on 07/11/2003 REM for the GDR Interactive Fiction Contest REM ---> dunric@yahoo.com <--- REM (This game is in the Public Domain!) screen 0 cls rem color 10,0:?"* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *" rem for x=1 to 10:color 10,0:?"* *":next rem color 10,0:?"* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *" locate 3,40:color 15:?"THE" locate 5,37:color 9:?"M A G I C" locate 7,37:color 9:?"F L U T E" locate 8,34:color 13:?"By: Paul Panks" locate 10,2:color 15:?">>>>>";:color 14:?">>>>>";:color 12:?">>>>>";:color 4:?">>>>> "; color 7:?"{Interactive Fiction Contest (";:color 11:?"GDR";:color 7:?")} "; color 4:?"<<<<<";:color 12:?"<<<<<";:color 14:?"<<<<<";:color 15:?"<<<<<" locate 12,2:color 11:?"Synopsis" locate 14,2:color 15:?"Three sacred treasures -- The Orb of Destiny, The Book of Sacrament and The" locate 15,2:color 15:?"Magic Flute -- are stolen by an evil Demigorgan, summoned from the depths" locate 16,2:color 15:?"of Hades to reck havoc on this world." locate 18,2:color 15:?"It is your duty, as the Brave Adventurer(tm), to seek out these three" locate 19,2:color 15:?"sacred treasures and restore order to this world. Only you can do it!" locate 21,9:color 11:?" (You are playing Version: 1.01) " locate 23,9:color 14:?" Press any key to begin playing! " gosub 5000: REM Get keypress gosub 9600 color 14:?"Press any key to begin!":gosub 5000 start: cls:color 0,0 color 11:?"Saved Game":? color 15:?"Are you playing a saved game? (Y/N): "; gosub 5000:if len(na$)<2 or na$="" or na$=" " or na$=chr$(13) then na$="dunric" 50 hp&=75:hm&=75:mp&=25:mm&=25:g&=250:fd=800:wa=800:ex&=0:lv=1:wf=0:bg=0:ic=0:rm=19:we&=0:wv&=0:dim no$(40),ao$(40),ob$(40),mh(40),p(40),en(40),dm(40),lo(40),vb$(30),vb2$(30),rn$(100),de$(100),de2$(100),wrd$(20),m%(100,6) 51 dm=1:orb=0:flute=0:book=0:verbose=1:dt=0:dy=1:IF si=2 then ?:color 14:?"Enter your name: ";:color 10:input "",na$:if len(na$)=1 then color 12:?"Aborted.":goto start 52 restore 8001:for x=1 to 37:read no$(x),ao$(x),ob$(x),mh(x),p(x),en(x),dm(x),lo(x):next 53 for x=1 to 25:read vb$(x),vb2$(x):next 54 for x=1 to 70:read rn$(x):next:for x=1 to 70:read de$(x):next:for x=1 to 70:for y=1 to 6:read m%(x,y):next:next:cm=1 55 lo(19)=1030:lo(20)=1031:lo(21)=1035:lo(23)=1031:lo(24)=1029:lo(9)=10 56 de$(71)="You are standing on a branch at the top of a tree. From here you can see the surrounding forest, while mountains rise to the west.":rn$(71)="On a branch overlooking the forest" 57 for x=1 to 5:m(71,x)=0:next:m%(71,6)=23 58 if si=1 then si=0:goto 1000 59 if si=2 then si=0:goto 60 60 cls:locate 1,1:for x=1 to 25:color 0,0:?" ";:next:locate 2,1 61 gosub 11000:if verbose=1 and LIGHT=1 then color 11:print rn$(rm) 62 if verbose=1 and LIGHT=1 then color 15:print de$(rm):else if LIGHT=1 then color 15:? rn$(rm)".":else if LIGHT=0 then color 7:?"It is too dark to see clearly..." 63 gosub 9100 64 color 14:?"Obvious exits: ";:color 5:?"< "; 65 for x=1 to 6:if m%(RM,x)>0 then color 7:print no$(x)" "; 66 next:color 5:?">":for x=7 to 27:if lo(x)=rm then color 7:? no$(x)"." 67 next:for x=28 to 37:if lo(x)=rm then color 12:? no$(x)"." 68 next 69 j=csrlin:for x=1 to 5:wrd$(x)="":next:n=0:v=0:n$="":v$="":hp&=hp&+1:gosub 9500:goto 9900 70 gosub 2000:locate j,1:color 15:?">";:color 10:input "",a$:a$=lcase$(a$):if a$=chr$(13) then color 15:?"What?":goto 69 71 GOTO 9200 73 DT = DT + 1: gosub 8750 74 IF DT = 100 THEN COLOR 12: PRINT "The monsters have been revived.": sleep 1:color 13:GOSUB 8800 75 IF DT = 15 THEN COLOR 14: PRINT "The sun is rising on the next day." 76 IF DT = 30 THEN COLOR 14: PRINT "A new day has begun in Antioch.": DY = DY + 1: COLOR 15: PRINT "It is now day:"; : COLOR 12: PRINT DY 77 IF DT = 60 THEN COLOR 14: PRINT "The sun is setting on the current day." 78 if DT>=300 then DT=0 82 if a$="n" or a$="north" or a$="go north" or a$="move north" then n=1:cm=n:goto 980 83 if a$="s" or a$="south" or a$="go south" or a$="move south" then n=2:cm=n:goto 980 84 if a$="e" or a$="east" or a$="go east" or a$="move east" then n=3:cm=n:goto 980 85 if a$="w" or a$="west" or a$="go west" or a$="move west" then n=4:cm=n:goto 980 86 if a$="u" or a$="up" or a$="go up" or a$="move up" then n=5:cm=n:goto 980 87 if a$="d" or a$="down" or a$="go down" or a$="move down" then n=6:cm=n:goto 980 88 if a$="quit" or a$="exit" or a$="bye" or a$="goodbye" or a$="good bye" or a$="quit game" or a$="exit game" then cls:color 14:?"End of game":sleep 1:end 89 if a$="jr" or a$="jump room" then color 14:print"Which room? (1-70): ";:color 12:input "",b$:b=val(b$):if b<1 or b>70 then color 12:?"Aborted.":goto 69 90 if a$="jr" or a$="jump room" then rm=b:color 10:?"Teleporting to room: ";:color 14:? mid$(str$(rm),2);:color 10:?"...":goto 61 91 if a$="room" or a$="rm" or a$="compass" or a$="map" then color 15:?"You are in room: ";:color 12:? mid$(str$(rm),2):color 14:?"You are heading "ao$(cm)" from "lcase$(rn$(rm))".":goto 69 92 if a$="save" or a$="sve" or a$="sv" or a$="save game" then goto 1100 93 if a$="inv" or a$="inven" or a$="inventory" or a$="i" then goto 5500 100 si=0:f=0:z=1:for x=1 to len(a$):if mid$(a$,x,1)<>chr$(32) then f=f+1 101 if mid$(a$,x,1)=" " then si=si+1:wrd$(si)=mid$(a$,z,f):z=x+1:f=0 102 next:wrd$(si+1)=mid$(a$,z,f) 103 if si>4 then si=0:color 14:?"Command too complex. Please shorten command.":goto 69 104 if wrd$(3)="" or wrd$(4)="" then goto 108 105 OBJ=0:if wrd$(3)="in" then if wrd$(1)="put" or wrd$(1)="place" then OBJ=1:goto 6000 106 if wrd$(3)="from" then if wrd$(1)="get" or wrd$(1)="take" then OBJ=2:goto 6000 107 if wrd$(1)="" or wrd$(1)=chr$(13) or wrd$(1)=chr$(32) or len(a$)<1 or a$=chr$(13) or a$=chr$(32) or len(a$)=1 then color 15:?"What?":goto 69 108 n$=wrd$(2):v$=wrd$(1):if wrd$(2)="" then color 15:?"There's a noun missing in that sentence.":goto 69 109 si=0:for x=7 to 37:if n$=no$(x) or n$=ao$(x) then n=x:si=1:x=37 110 next:if si=0 then color 15:?"I don't know the word '"wrd$(2)"'.":goto 69 111 si=0:for x=1 to 25:if v$=vb$(x) or v$=vb2$(x) then v=x:si=1:x=25 112 next:if si=0 then color 15:?"The verb is unrecognized by this program.":goto 69 113 on v goto 82,120,130,140,150,160,170,180,190,6000,200,210,230,250,260,270,9700,15000 114 color 14:?"I don't understand your command.":goto 69 119 REM +--- GET 120 if lo(n)<>rm then color 15:?"The "no$(n)" isn't here.":goto 69 121 if n>27 or n<7 then color 14:?"The "no$(n)" cannot be taken.":goto 69 122 if ic>10 then color 15:?"You are carrying too much already.":goto 69 123 ic=ic+1:lo(n)=-1:color 15:? lcase$(no$(n))":Taken.":ob$(11)="A coil of rope (20' feet). It is quite sturdy for climbing.":goto 69 129 REM +--- DROP 130 if lo(n)<>-1 then color 15:?"You aren't carrying that to drop.":goto 69 131 if n>27 or n<7 then color 14:?"The "no$(n)" isn't a valid object.":goto 69 132 ic=ic-1:lo(n)=rm:color 15:?"Ok.":goto 69 139 REM +--- UNLOCK 140 color 15:?"Unlock: Unimplemented command error.":goto 69 149 REM +--- WIELD 150 if lo(n)<>-1 then color 15:?"You aren't carrying that to wield.":goto 69 151 if n>27 or n<7 then color 14:?"The "no$(n)" cannot be wielded.":goto 69 152 WD=0:for x=17 to 21:if lo(x)=105 then f=x:x=21:WD=1 153 next:if WD=1 then color 15:?"You are already wielding something! ("no$(f)")":goto 69 154 if n<17 or n>21 then color 15:?"The "no$(n)" is not a valid weapon.":goto 69 155 WD=1:lo(n)=105:dm=mh(n):color 15:?"You wield "no$(n)".":goto 69 159 REM +--- UNWIELD 160 if lo(n)<>105 then color 15:?"You aren't wielding that (to unwield).":goto 69 161 if n>27 or n<7 then color 14:?"The "no$(n)" cannot be unwielded.":goto 69 162 WD=0:lo(n)=-1:dm=1:color 15:?"You unwield "no$(n)".":goto 69 169 REM +--- WEAR 170 if lo(n)<>-1 then color 15:?"You aren't carrying that to wear.":goto 69 171 if n>27 or n<7 then color 14:?"The "no$(n)" cannot be worn.":goto 69 172 if n<22 or n>26 then color 15:?"The "no$(n)" is not a suitable armor.":goto 69 173 lo(n)=205:ac=ac+mh(n):color 15:?"You wear "no$(n)".":goto 69 179 REM +--- REMOVE 180 if lo(n)<>205 then color 15:?"You aren't carrying that to remove.":goto 69 181 if n>27 or n<7 then color 14:?"The "no$(n)" cannot be removed.":goto 69 182 lo(n)=-1:ac=ac-mh(n):color 15:?"You remove "no$(n)".":goto 69 189 REM +--- EXAMINE 190 if n<7 then color 12:?"Don't be silly!":goto 69 191 if lo(n)<>rm and lo(n)<>-1 and lo(n)<>105 and lo(n)<>205 then color 15:?"You do not see the "no$(n)" here.":goto 69 192 color 15:? ob$(n):if n>27 or n=7 then color 14:?"The "no$(n)" is carrying:":goto 193:else goto 69 193 si=0:for x=7 to 37:if n<>7 and lo(x)=1000+n then color 7:?" "no$(x):si=1:else if n=7 then if lo(x)=305 then color 7:?" "no$(x):si=1 194 next:if si=0 then color 12:?"Nothing!":goto 69 198 goto 69 199 REM +--- EAT/DRINK 200 if lo(n)<>-1 and lo(n)<>rm then color 15:?"The "no$(n)" isn't here.":goto 69 201 if n<>13 then color 15:?"It's beyond your power to do that!":goto 69 202 if wrd$(1)="eat" and n=13 then color 15:?"Please use drink instead.":goto 69 203 if ob$(13)="An empty bottle of wine." then color 15:?"The bottle is already empty.":goto 69 204 if ob$(13)="A bottle full of water." then color 15:?"You drink from the bottle.":?"Ahhhhhh!...":wa=wa+500:ob$(13)="An empty bottle of wine.":goto 69 208 ob$(13)="An empty bottle of wine.":hp&=hm&:mp&=mm&:color 14:?"You drink the wine and feel much better!":goto 69 209 REM +--- BUY 210 if rm<>14 then color 15:?"You are not in the village shop.":goto 69 211 if lo(n)<>75 then color 15:?"The "no$(n)" isn't sold here.":goto 69 212 if g&
10 then color 15:?"You are carrying too much already.":goto 69
214 g&=g&-p(n):lo(n)=-1:ic=ic+1:color 11:?"You purchase the "no$(n)".":color 10:?"Gold:";:color 14:? g&:goto 69
229 REM +--- SELL
230 if rm<>14 then color 15:?"You are not in the village shop.":goto 69
231 if lo(n)<>-1 and lo(n)<>105 and lo(n)<>205 then color 15:?"You aren't carrying that to sell.":goto 69
232 if lo(n)=105 then color 15:?"You must unwield that first.":goto 69
233 if lo(n)=205 then color 15:?"You must remove that first.":goto 69
234 g&=g&+p(n):lo(n)=75:ic=ic-1:color 11:?"You sell the "no$(n)".":color 10:?"Gold:";:color 14:? g&:goto 69
249 REM +--- USE
250 if n<7 or n>27 then color 12:?"Don't be silly!":goto 69
251 if lo(n)<>-1 then color 15:?"You must be carrying that.":goto 69
252 if n=11 and RM=40 then color 15:?"You swing the rope and it catches on a branch.":?"You climb up...":sleep 1:RM=39:ob$(11)="A coil of rope (hanging down).":lo(11)=40:ic=ic-1:goto 61
253 if n=11 and RM<>40 then color 15:?"The rope cannot be used here.":goto 69
254 if n=10 and RM=68 and m%(68,3)=0 then color 15:?"Click! The door unlocks...":m%(68,3)=69:goto 69:else if n=10 and RM=62 and m%(62,3)=0 then color 15:?"Click! The door unlocks.":m%(62,3)=63:goto 69
255 if n=10 and RM=68 or n=10 and RM=62 then color 15:?"The door is already unlocked.":goto 69
256 if n=10 and RM=50 and m%(50,4)=0 then color 15:?"Click! The door unlocks...":m%(50,4)=51:goto 69:else if n=10 and RM=65 and m%(65,2)=0 then color 15:?"Click! The door unlocks.":m%(65,2)=66:goto 69
257 if n=10 and RM=50 or n=10 and RM=65 then color 15:?"The door is already unlocked.":goto 69
258 color 14:?"The "wrd$(2)" cannot be used here.":goto 69
259 REM +--- LIGHT
260 if n<7 or n>27 then color 12:?"Don't be silly!":goto 69
261 if lo(n)<>-1 and lo(n)<>rm and lo(n)<>105 and lo(n)<>205 then color 15:?"You don't see that here.":goto 69
262 if n=8 and lo(9)=-1 then ob$(8)="An old lantern with rusted hinges. It glows with a soft light.":color 15:?"You turn the lantern on.":LIGHT=1:goto 69
263 if n=8 and lo(9)<>-1 then color 15:?"You need oil to light the lantern.":goto 69
264 if n=22 and lo(8)=-1 AND lo(9)=-1 then ob$(22)="A layered, dark green cloak. It is ablaze with a fiery glow.":mh(n)=mh(n)+2:if lo(n)=205 then ac=ac+2:goto 69
265 if n=22 and lo(8)=-1 and lo(9)=-1 then ?"Ok.":goto 69
266 if n=22 and lo(8)<>-1 or n=22 and lo(9)<>-1 then color 15:?"Both the oil and lantern are required to light the cloak.":goto 69
268 print "The "wrd$(2)" cannot be lit.":goto 69
269 REM +--- EXTINGUISH
270 if n<7 or n>27 then color 12:?"Don't be silly!":goto 69
271 if lo(n)<>-1 and lo(n)<>rm and lo(n)<>105 and lo(n)<>205 then color 15:?"You don't see that here.":goto 69
272 if n=8 and ob$(8)="An old lantern with rusted hinges. It glows with a soft light." then ob$(8)="An old lantern with rusted hinges. It is blood stained.":LIGHT=0:color 15:?"You turn the lantern off.":goto 69
273 if n=22 and ob$(22)="A layered, dark green cloak. It is ablaze with a fiery glow." then color 15:?"The cloak is no longer ablaze.":ob$(22)="A layered, green cloak. It protects the user from light blows.":mh(n)=mh(n)-2
274 if n=22 and lo(n)=205 then ?"Ok.":ac=ac-2:goto 69
275 if n=22 then color 15:?"Ok.":goto 69
279 ?"The "wrd$(2)" cannot be extinguished.":goto 69
980 if n=3 and rm=68 and m%(68,3)=0 then color 15:?"The locked door prevents passage.":goto 69
981 if rm=12 and n=4 or rm=17 and n=1 or rm=17 and n=3 or rm=18 and n<>2 or rm=24 and n<>4 or rm=29 and n=3 or rm=29 and n=4 or rm=35 and n=3 or rm=35 and n=2 or rm=43 and n<>4 then color 15:?"The path is blocked by fallen trees.":goto 69
982 if rm=21 and n=4 or rm=21 and n=1 or rm=27 and n=3 or rm=33 and n<>1 then color 15:?"The path is much too rocky in that direction.":goto 69
983 if rm=34 and n=1 or rm=34 and n=4 or rm=42 and n=1 or rm=42 and n=2 or rm=54 and n=3 or rm=54 and n=4 or rm=55 and n<>3 or rm=57 and n<>4 then color 15:?"The path is blocked by Redwood trees.":goto 69
984 if rm=2 and n=1 or rm=2 and n=2 or rm=11 and n=3 or rm=11 and n=2 or rm=7 and n=1 or rm=7 and n=2 or rm=8 and n=2 or rm=8 and n=4 or rm=9 and n<>2 then color 15:?"The path is blocked by dense trees.":goto 69
985 if rm=30 or rm=31 or rm=37 or rm=38 or rm=44 or rm=45 or rm=46 or rm=47 or rm=48 or rm=49 or rm=50 or rm=51 or rm=52 or rm=53 or rm=58 or rm>58 and rm<64 or rm=65 or rm=66 then if m%(rm,n)=0 then color 15:?"There's a wall there.":goto 69
986 if rm=4 or rm=13 or rm=1 or rm=67 or rm=68 or rm=69 or rm=70 then if m%(rm,n)=0 then color 15:?"There's a wall there.":goto 69
987 if rm=50 and n=4 and lo(35)=rm then color 13:?"The "no$(35)" stops you!":color 15:?"'You may not pass!'":goto 69
988 if rm=31 and n=2 and lo(32)=rm then color 13:?"The "no$(32)" steps in front!":color 15:?"'Leave at once, or perish!'":goto 69
989 if rm=53 and n=2 and lo(31)=rm then color 13:?"The "no$(31)" grabs you!":color 15:?"'I cannot allow your passage!'":goto 69
990 if rm=62 and n=3 and lo(36)=rm then color 13:?"The "no$(36)" glares at you!":color 15:?"'This is no place for mere mortals!'":goto 69
991 if rm=65 and n=2 and lo(37)=rm then color 13:?"The "no$(37)" growls at you!":color 15:?"'You fool! No mortals are allowed in this cavern!":sleep 1:color 14:?"You are whisked high into the air...":sleep 1:RM=31:goto 61
994 if m%(rm,n)=0 then color 12:?"You can't go that way!":goto 69
995 if RM>=21 then if LIGHT=0 or lo(8)<>-1 or lo(9)<>-1 then color 12:?"It's too dark, but you try anyway..."
999 rm=m%(rm,n):color 7:?"You move "no$(n)"...":goto 61
1000 color 15:?"Enter the filename (minus extention): ";
1001 color 11:input "",f$:if len(f$)<1 or f$=" " or f$=chr$(13) then color 12:?"Aborted.":run
1002 ?:color 9:?"Loading saved game...":na$=f$
1003 open f$+".sav" for input as #1
1004 input#1,rm:input#1,bg:input#1,ic:input#1,fd:input#1,wa:input#1,wf:input#1,hp&:input#1,mp&:input#1,hm&:input#1,mm&:input#1,g&:input#1,ex&:input#1,we&:input#1,wv&:input#1,lv
1005 for x=7 to 37:input#1,mh(x):input#1,p(x):input#1,en(x):input #1,dm(x):input #1,lo(x):next
1006 input #1,orb:input #1,flute:input #1,book:input#1,dt:input#1,dy:input#1,verbose:input#1,sk:close #1:color 15:?"Data loaded!"
1007 goto 60
1100 color 14:?"Saving "na$"..."
1103 open na$+".sav" for output as #1
1104 print#1,rm:print#1,bg:print#1,ic:print#1,fd:print#1,wa:print#1,wf:print#1,hp&:print#1,mp&:print#1,hm&:print#1,mm&:print#1,g&:print#1,ex&:print#1,we&:print#1,wv&:print#1,lv
1105 for x=7 to 37:print#1,mh(x):print#1,p(x):print#1,en(x):print#1,dm(x):print#1,lo(x):next
1106 print#1,orb:print#1,flute:print#1,book:print#1,dt:print#1,dy:print#1,verbose:print#1,sk:close #1:color 14:?"Done."
1107 goto 69
2000 locate 1,1:color 15,4:? space$(80)
2001 locate 1,1:color 15,4:? rn$(rm)+" "+time$+" Day: "+mid$(str$(dy),2):color 0,0:color 15
2002 return
4999 end
5000 SI=0
5001 ry$=inkey$:if ry$="" then goto 5001
5002 If ry$<>"y" and ry$<>"Y" and ry$<>"n" and ry$<>"N" then SI=64
5003 if ry$="y" or ry$="Y" then color 7:?"Yes":SI=1
5004 if ry$="n" or ry$="N" then color 7:?"No":SI=2
5005 return
5499 REM +--- Handle Inventory
5500 ic=0:for x=7 to 37:if lo(x)=-1 or lo(x)=105 or lo(x)=205 then ic=ic+1
5501 next:if ic=0 then color 12:?"Alas, you are empty handed.":goto 69
5502 color 15:?"You are carrying:":ac=0:for x=7 to 37
5503 if lo(x)=-1 then color 15:? " "no$(x)
5504 if lo(x)=105 then color 11:? " "no$(x)" ";:color 12:?"(wielded)"
5505 if lo(x)=205 then color 10:? " "no$(x)" ";:color 13:?"(worn)":ac=ac+mh(x)
5506 if lo(x)=305 then color 7:?" "no$(x)" ";:color 14:?"(in backpack)"
5507 next
5508 color 14:?"You are carrying";:color 12:? ic;:color 14:?"items."
5509 if ac>0 then color 11:?"Your armor is protecting";cint(ac*100/8);"percent of your body."
5517 color 15:goto 69
5999 REM +--- Handle PUT/PLACE in backpack command
6000 if wrd$(4)<>"bag" and wrd$(4)<>"backpack" then color 14:?"That is not a valid container.":goto 69
6003 if lo(7)<>-1 then color 15:?"You are not carrying the backpack.":goto 69
6004 if wrd$(2)="backpack" or wrd$(2)="bag" then color 12:?"Don't be silly!":goto 69
6005 if wrd$(2)="north" or wrd$(2)="south" or wrd$(2)="east" or wrd$(2)="west" or wrd$(2)="up" or wrd$(2)="down" then color 15:?"What you expected did not happen.":goto 69
6006 if wrd$(2)="villager" or wrd$(2)="warrior" or wrd$(2)="orc" or wrd$(2)="goblin" or wrd$(2)="dragon" or wrd$(2)="wolf" then color 12:?"It's beyond your power to do that!":goto 69
6007 if wrd$(2)="cobra" or wrd$(2)="fireking" or wrd$(2)="demon" or wrd$(2)="demigorgon" then color 12:?"It's beyond your power to do that!":goto 69
6008 WEIGHT=0:for x=7 to 27:if lo(x)=305 then WEIGHT=WEIGHT+en(x)
6009 NEXT
6010 n=0:if wrd$(2)="lantern" then n=8
6011 if wrd$(2)="oil" or wrd$(2)="fuel" then n=9
6012 if wrd$(2)="key" then n=10
6013 if wrd$(2)="rope" then n=11
6014 if wrd$(2)="scroll" then n=12
6015 if wrd$(2)="wine" then n=13
6016 if wrd$(2)="pole" then n=14
6017 if wrd$(2)="book" then n=15
6018 if wrd$(2)="orb" then n=16
6019 if wrd$(2)="sword" then n=17
6020 if wrd$(2)="dagger" then n=18
6021 if wrd$(2)="scimitar" then n=19
6022 if wrd$(2)="axe" then n=20
6023 if wrd$(2)="broadsword" then n=21
6024 if wrd$(2)="cloak" or wrd$(2)="robe" then n=22
6025 if wrd$(2)="ring" then n=23
6026 if wrd$(2)="armor" then n=24
6027 if wrd$(2)="boots" then n=25
6028 if wrd$(2)="helmet" then n=26
6029 if wrd$(2)="flute" then n=27
6037 if n=0 then color 15:?"Please use a valid object.":goto 69
6038 IF OBJ=1 THEN GOTO 6040
6039 GOTO 6053
6040 if WEIGHT+en(n)>38 then color 12:?"The weight of the backpack would be too heavy!":color 15:?"Current weight: ";:color 11:? mid$(str$(WEIGHT),2):goto 69
6041 WEIGHT=WEIGHT+en(n):lo(n)=305:ic=ic-1:bg=bg+1:color 15:?"Ok.":goto 69
6052 REM +--- Handle GET/TAKE from backpack command
6053 OBJ=0
6054 if lo(n)<>305 then color 15:?"The backpack does not contain the "wrd$(2)".":goto 69
6055 if ic>10 then color 12:?"You are carrying too much already!":goto 69
6056 ic=ic+1:bg=bg-1:lo(n)=-1:WEIGHT=WEIGHT-en(n):n=0:color 15:?"Done.":goto 69
7998 REM +--- DATA statements
7999 REM Read in Noun, Desc. of Noun, HP, Price, Exp. earned, Damage and Loc.
8001 data "North","north","This is the direction North.",0,0,0,0,999
8002 data "South","south","This is the direction South.",0,0,0,0,999
8003 data "East","east","This is the direction East.",0,0,0,0,999
8004 data "West","west","This is the direction West.",0,0,0,0,999
8005 data "Up","up","This is the direction Up.",0,0,0,0,999
8006 data "Down","down","This is the direction Down.",0,0,0,0,999
8007 data "backpack","bag","A small leather backpack. You can place things inside it.",0,28,0,0,13
8008 data "lantern","lantern","An old lantern with rusted hinges. It is blood stained.",0,50,5,0,75
8009 data "oil","fuel","A quart of oil, used to fuel a lantern. It has a peculiar odor.",0,75,2,0,10
8010 data "key","key","A small metal key. It appears to fit a standard door lock.",0,15,0,0,39
8011 data "rope","rope","A coil of rope (20' long). It is quite sturdy for climbing.",0,8,3,0,10
8012 data "scroll","scroll","A tattered scroll, of unknown origin. It is written in an obscure dialect.",0,20,2,0,75
8013 data "Wine Bottle","wine","A bottle of fine red wine. It sparkles with a soft ambiance.",0,500,9,0,69
8014 data "Wooden Pole","pole","A long wooden pole (10' long). It is useful in reaching high places.",0,80,40,0,71
8015 data "Sacred Book","book","This is the Book of Sacrament, an ancient book used in religious ceremonies.",0,1000,5,0,63
8016 data "Destiny Orb","orb","This is the Orb of Destiny. It glows with a strange bluish hue.",0,2000,7,0,51
8017 data "sword","sword","A small metal sword. The hilt is made from bronze and iron wedges.",3,300,12,0,75
8018 data "dagger","dagger","A small dagger with a jewel afixed to the hilt. The edges are quite worn.",2,150,2,0,75
8019 data "Shining Scimitar","scimitar","This fine scimitar is crafted in strong steel. The blade is curved sharply.",4,480,40,0,1030
8020 data "Goblin Axe","axe","A razor-sharp axe. The hilt is slightly damaged (from heavy use).",5,500,40,0,1031
8021 data "Broadsword","broadsword","This long metal broadsword is quite a find! It glows with a soft light...",7,820,40,0,1035
8022 data "cloak","robe","A layered, dark green cloak. It protects the user from light blows.",2,220,14,0,75
8023 data "ring","ring","A golden ring, glowing with a pale blue light. It protects against magic.",1,125,0,0,1031
8024 data "Justin's Armor","armor","A finely crafted platemail armor, with an eagle on the front. Max protect.",3,400,28,0,1029
8025 data "Knife Boots","boots","A pair of leather boots, with knives afixed to the fronts. Great protection.",2,250,20,0,70
8026 data "Iron Helmet","helmet","A glistening Iron helmet, crafted for maximum visability and protection.",3,310,8,0,1030
8027 data "Magic Flute","flute","The Magic Flute of legend. It reportedly can put anyone into an eternal sleep.",0,5000,1,0,66
8028 data "Villager","villager","A common villager (with smelly socks of course). His breath is quite foul!",58,15,25,3,12
8029 data "Warrior","warrior","A strong warrior with flowing hair and a long beard. He nods at you briefly.",75,20,50,5,22
8030 data "Orc","orc","This is a vicious orc. They are brutal and quite savage.",88,55,65,6,27
8031 data "Goblin","goblin","A small goblin, with dark red eyes and ugly teeth. It looks rather mean!",96,150,75,4,53
8032 data "Red Dragon","dragon","This is an ancient Red Dragon, straight from the Hills of Antioch.",400,200,300,12,31
8033 data "Grey Wolf","wolf","A small wolf with yellow eyes and a steady gaze. It growls in obvious fear.",60,30,100,4,54
8034 data "cobra","snake","This is a deadly cobra, with a lethal bite! Watch out for this beast!",125,75,80,14,8
8035 data "Hellish Fireking","fireking","This is a Fireking, straight from the fires of Hades! It breathes deadly fire.",680,280,450,16,50
8036 data "Dark Demon","demon","This is a hideous looking demon, with a charred face and rotting flesh.",1240,320,550,18,62
8037 data "Green Demigorgon","demigorgon","This is a Green Demigorgon, summoned up from the depths of Hades. Deadly!",1800,600,1000,22,65
8099 REM Verbs 1-25
8101 data "go","move" : REM 1
8102 data "get","take" : REM 2
8103 data "drop","throw" : REM 3
8104 data "unlock","open" : REM 4
8105 data "wield","equip" : REM 5
8106 data "unwield","unequip" : REM 6
8107 data "wear","ready" : REM 7
8108 data "remove","unready" : REM 8
8109 data "examine","read" : REM 9
8110 data "put","place" : REM 10
8111 data "eat","drink" : REM 11
8112 data "buy","purchase" : REM 12
8113 data "sell","trade" : REM 13
8114 data "use","handle" : REM 14
8115 data "light","burn" : REM 15
8116 data "extinguish","blow" : REM 16
8117 data "kill","attack" : REM 17
8118 data "assess","appraise" : REM 18
8119 data "score","?" : REM 19
8120 data "quit","exit" : REM 20
8121 data "save","sv" : REM 21
8122 data "help","hlp" : REM 22
8123 data "time","day" : REM 23
8124 data "map","compass" : REM 24
8125 data "play","touch" : REM 25
8199 REM Room names 1-70
8201 data "A small Cathedral"
8202 data "Dirt path"
8203 data "On the path"
8204 data "Inside the Tavern"
8205 data "Village stables"
8206 data "Country path"
8207 data "Grassy trail"
8208 data "A Grassy Hillside"
8209 data "A Large Boulder"
8210 data "Inside the toolshed"
8211 data "A small Farm"
8212 data "Road through the village"
8213 data "A small house"
8214 data "The village shop"
8215 data "Market Square"
8216 data "Eastern Path"
8217 data "Forest path"
8218 data "Upper Forestland"
8219 data "On the path to town"
8220 data "The Village entrance"
8221 data "Purple mountain range, 100 feet"
8222 data "A junction in the forest"
8223 data "Middle Forestland"
8224 data "A Dying forest"
8225 data "The Village gate"
8226 data "Purple mountain range, 300 feet"
8227 data "Purple mountain range, 200 feet"
8228 data "Forest end"
8229 data "Lower Forestland"
8230 data "Glistening waterfall"
8231 data "Entrance to small cave"
8232 data "Middle Path"
8233 data "End of mountains"
8234 data "Redwood Forest"
8235 data "Small clearing"
8236 data "End of path"
8237 data "Narrow tunnel, by rushing water"
8238 data "Twisted intersection"
8239 data "Inside the hut"
8240 data "The Ancient Tree"
8241 data "Redwood Forest, upstream of a small river"
8242 data "Redwood Forest, by a small lake"
8243 data "The Forest Lake"
8244 data "Narrow tunnel, near a junction"
8245 data "A small tunnel, heading south"
8246 data "A small tunnel, heading west"
8247 data "Narrow tunnel, near a dead end"
8248 data "Twisted passageway, with pourous walls"
8249 data "Tunnel end"
8250 data "A narrow tunnel, by an ancient keep"
8251 data "An ancient keep, long since abandoned"
8252 data "The tunnel end"
8253 data "Twisted passageway, heading into darkness"
8254 data "A rolling hillside, with a blue sky above"
8255 data "Western hillside"
8256 data "A rolling hillside, near a tree stump"
8257 data "By the Tree Stump"
8258 data "Twisted passageway, near a mulberry patch"
8259 data "An ancient passageway, heading south"
8260 data "An ancient passage, heading west"
8261 data "By the mulberry patch"
8262 data "A dark tunnel, with pourous walls"
8263 data "In the pale light of an ancient keep"
8264 data "The hillside end"
8265 data "A fiery passageway, with soot blackened walls"
8266 data "A remarkable keep, heading into shining light"
8267 data "Upstairs hallway"
8268 data "A wooden doorway"
8269 data "Bedroom"
8270 data "Inside a small closet"
8299 REM Read in room descriptions 1-70
data "You are standing inside a small cathedral. High stained glass windows dominate the interior of this building, while rows of pews line the center of the room. An altar stands in the back of the cathedral."
data "You stand on a dirt path near a small village. To the west, you notice the path heads past a small farm and stableyard. A well worn path is directly east."
data "You are on a well worn path in the middle of town. You notice wheel ruts impressed upon the surface of the ground, apparently made by carriages as they passed through town. A cathedral is north of here and a tavern east."
data "You are standing inside a small tavern. Several small tables stand near the center of the room, while a bartender can be seen serving drinks behind a long oak bar. A stairway leads upstairs into a long hallway."
data "You are inside a small, dusty stableyard. There are wooden stables near the back of the room, and a loft at the very top of the room. To the south lies a well worn path, heading past a small farm."
data "You are on a country road, just south of a small farm. Rows of corn and wheat are visible for miles on end, while a stableyard can be seen to the north. A grassy trail heads west past a large hill."
data "You are walking on a grassy trail. There is a large hill directly west of here, heading past a large boulder. The path continues west."
data "You are by a grassy hill, just east of a small path. There stands a large boulder with chipped edges to the north."
data "You are facing a large boulder. The path east is blocked and cannot be entered without great effort. You notice on the surface of the rock a faint inscription."
data "You are standing inside a dark tool shed. There are literally rows of shelves lining the walls, but you can't seem to reach them from here. The only exit is back east."
data "You are standing outside near a small farm. The air is crisp and clean here, while a cool wind blows from the northeast. Rows of corn and barley dot the landscape, rising to the sun...or whatever else is out there."
data "You are standing on a well worn path heading through town. You notice a small house to the east of here, with a thatched roof and a brick chimney. Soft plumes of ashen smoke billow up from the top."
data "You are inside a small one room house near the center of town. A few simple chairs and a table adorn the interior, while a brick fireplace is nicely set into the eastern wall. There is also a small kitchen here."
data "You are standing inside a dusty shop. Rows of shelves lie neatly across the room, while small windows look out into the busy town. A plump clerk keeps busy behind a small wooden counter. He smiles at you as you enter."
data "You are at the village square, a marketplace in the center of town. There are applecarts here, some containing fruits and vegetables, others rare trinkets and medallions. A small path heads east out of town."
data "You are on a small dirt path heading east out of town. The area is littered with debris from the nearby forest. A small wooden sign is visible by the side of the road, where a few flowers also grow."
data "You are on a well worn path heading into a dark forest. Tall trees tower above you, the lucious canopy providing ample shade from the brilliant sunlight above. A cool wind blows from the west, as the path continues south."
data "You are at the outer realm of a small forest. The trees thin out a bit here and give way to a small clearing. To the south, the trees become very dense and twisted by branches."
data "You are on a western road near the entrance to a small village. An iron gate breaks monotony to the south, complete with an archway and scaling herb vines. The road you are traveling on breaks off here into town."
data "You are by the marketplace on a well worn path. The air is alive with the business of the surrounding marketplace, abuzz with economic transactions and shrewd attendants. Just beyond the square lies a fountain."
data "You are on a purple mountain range nearly one hundred feet above solid ground. The mountains head south into a rocky cliff."
data "You are at a turnoff point in the middle of a dark forest. Light is spare here, but the sounds of wildlife keep your ears busy and at attention. The forest heads east here into a twisted, decaying woodland."
data "You are standing in a darkened forest. High branches raise their wooden frames towards the sky above, while the canopy blocks visible sunlight from your eyes. The woods thin out towards the south."
data "You are near the edge of a forest. The trees thin out here and give rise to a rolling hillside. The path you are traveling ends here."
data "You are standing before a large iron gate, with rusted hinges. Above the gate stands an impressively carved archway, constructed from cobblestone and mud. A twisting vine grows on either side of the gate."
data "You are in the high altitude of a purple mountain range. Breathing becomes laborous here, but there is just enough air to sustain your vigor. To the south lies a small cave."
data "You are standing on a purple mountain. The edge of the mountain drops off hundreds of feet here, so don't look down, ok? The mountains continue west of here."
data "You have reached the end of a path near the rising forest. To the north lies a turnoff point and west of there a purple mountain range."
data "You are standing in the lower forest. The trees above you are tall and quite alive. The air is fresh and clean. To the south, the trees thin out and give way to a small clearing. Beyond that lies a Redwood forest."
data "You stand before an impressive waterfall in the mist of this cavern. The water splashes down in a beautiful foray of colors and textures. Just beyond the waterfall, in the well of the cavern wall, lies a small hole."
data "You are standing before the entrance to a large cave. The air is stale and the temperature considerably cooler on the inside. The pourous cavern walls are just visible beyond the cave entrance. Mountains are to the north."
data "You are walking down a path just beyond a small village. The surrounding area becomes twisted and dark to the west, thus passage is restricted by fallen trees. The path you are traveling ends to the south."
data "You have reached the limits of this mountain range. Just beyond this landscape lies a beautiful blue sky, which opens up into a flowery plain. However, a thin red line, swirled in smoke and haze, prevents access."
data "You are standing in a towering Redwood forest. The tops of the trees overhead are beyond height and dimension. You notice a clearing to the east, while a small stream is visible a few hundred yards to the southeast."
data "You are standing in the middle of a small clearing. Towering Redwood trees grow to the west, while the forest path heads north back into the heart of the forest. There is a sign by the side of the road here."
data "You have reached an impassable area of the landscape, as rocky cliffs and a dangerous gorge prevent movement to the west. Southern travel is restricted by a deep canyon. Crossing it requires a mule."
data "You are in a narrow tunnel just north of the sound of rushing water. The air is very damp here, and the smell of water and moss is abundant. Surprisingly, you do not feel the least bit afraid or disoriented."
data "You are at an intersection in a twisting corridor. The cavern walls are chiseled from shale and earth. The surrounding area is further complicated by stalactite wedges pressed against the ceiling of the cave."
data "You have reached a small hut atop this ancient tree. Tables and chairs line the interior of this room, while a small bookshelf is visible near the backmost wall. There is a hearth here, and atop that, rests a crude mantle."
data "You stand before an ancient tree. The twisting branches echo the years gone by. Very little foliage graces the limbs of this tree, yet it appears lively and vigorous nonetheless. The Redwood forest is east."
data "You are in the middle of a Redwood forest. The trees are quite tall here, but you do not feel diminshed in size in the least. The foliage is a naturally burnt amber. To the south lies a grassy hillside."
data "You are standing in a Redwood forest. The trees thin out here and give way to a small lake. The surface of the lake glistens and the air is quite clean. Just beyond the lake lie placid mountains."
data "You are standing before a shimmering lake. The light from the sun reflects off the surface of the water, parting gentle waves across it. A few trees are visible nearby, and the shoreline is quite pleasant."
data "You are standing in a narrow corridor in this tremendous cavern. To the north, the tunnel widens some into an unknown room. To the east lies an intersection, while west of here a much smaller tunnel begins."
data "You are walking in a narrow tunnel. The air is quite stale here and the rockface of the tunnel rather pourous. To the south, the tunnel turns sharply to the west. There are etchings carved into the wall here."
data "You are walking down a narrow tunnel. The ceiling is quite low here but you don't feel uncomfortable, in fact, you can walk with ease. To the west, the tunnel narrows considerably, making walking futile."
data "You are in a narrow tunnel, twisted with age and rocks. The tunnel stop to the south in front of a large mirror. The mirror has an odd surface, like it comes from another dimension."
data "You are crawling down a very narrow tunnel. Twisted passageways are on either side, but the most likely candidate lies to the east. Further south the tunnel opens up into a narrow room. The room has an odd glow to it."
data "You have reached the end of this narrow tunnel. In fact, further travel is made quite impossible by the impenetrable rockface in front of you. The only exit is west."
data "You have reached the end of this narrow tunnel. Remarkably, carved within the rockface of the cavern is a small keep. It is guarded by a large door. Behind the door lies unknown peril."
data "You are standing inside a small keep. This fantastic room is made even more remarkable by the presence of candles, burning softly in the pale air. These candles appear to illuminate some wooden chests."
data "You have reached a dead end to this narrow tunnel. A twisted passage heads north back towards the heart of the cavern."
data "You are crawling down a narrow tunnel, the ceiling walls very close to your nose. From the little you can see, you notice a small patch of what appear to be mushrooms or berries directly south."
data "You stand in the midst of rolling hills. Upon the hills grow beautiful flowers, some of which are populated by bees and dragonflies. The hillside becomes steeper to the south, but it does not appear too difficult to cross."
data "You are standing at the southern edge of the hillside. Just beyond these hills are purple mountains, which rise hundreds of feet in the air. To the east the hillside slopes down near a large tree stump."
data "You are standing in the middle of rolling hills. Beautiful flowers grow in the grass surrounding you, while a clear blue sky opens up before you. To the east lies a remarkable tree stump, aged with time."
data "You stand before an amazing tree stump. The rings of the tree appear to encircle the centuries before, but the wood is quite well suited for continued nurishment. A hole is visible within the center of the stump."
data "You are crawling down a narrow tunnel. The ceiling begins to slope down even further, making further travel very difficult. Although this appears to require more effort than you can presently give, you must press on."
data "You are turning the corner of this narrow side tunnel. The rockface is harsher than previous tunnels, and you feel an intense heat emminating from beyond the corner of this passageway."
data "You are crawling down a very narrow side tunnel. The rockface becomes jagged and harsh towards the west. As the light dims, the surrounding area feels unusually warm and damp. You are perspiring feverishly."
data "You are standing before a mulberry patch, a subset of the blueberry. Upon each stem grows these remarkably tastey berries, which are rather healthy and nourishing to your body. Two adjacent tunnels break off from here."
data "You are crawling in a narrow tunnel. It ends abruptly at a keep, carved deep within the rock of these walls. There is a door before the entrance which requires a key of some sort. West of here lies a mulberry patch."
data "You are standing in a remarkable keep, carved into the rock of the cavern walls. There are bookshelves here, but what grabs your attention are hundreds of small candles, flickering lively in the pale air."
data "You have reached the outer limits of these rolling hills. Further travel south is made impossible by a steep canyon. A raging river burrows a path through the heart of the canyon. The only exit is north."
data "You are crawling in a tunnel, which ends abruptly at this point. The walls are redhot and the air is unbearably hot and humid. You can barely stand it here, but there is also a small keep here, guarded by wooden door."
data "You are standing in a tremendously dark keep. Abscent from this room are candles (or any form of light). Tattered scrolls of unknown origin litter the room, while an oblong mirror stands impressively against the wall."
data "You are walking in the upstairs hallway of this tavern. The floor creaks beneath you and the air is quite cold here. There is a door to the east here, and beyond it, a small room. A soft glow is visible underneathe."
data "You are standing before a large door. It is shut tightly and cannot be opened without a key. There is a pale green light glowing from beneathe the door, and you sense a magic about it. The hallway continues west."
data "You are standing inside a small room. Oak furniture adorns the room, while a small bed rests against the back wall. A closet is set into a wall to the south."
data "You are standing in a small closet. The light is very dim here, but you can see many small objects within this room. There is a light above and a switch to turn it on."
8399 REM Data map 1-70
8401 data 0,3,0,0,0,0
8402 data 0,0,3,6,0,0
8403 data 1,12,4,2,0,0
8404 data 0,0,0,3,67,0
8405 data 0,6,0,0,0,0
8406 data 5,11,2,7,0,0
8407 data 0,0,6,8,0,0
8408 data 9,0,7,0,0,0
8409 data 0,8,0,0,0,0
8410 data 0,0,11,0,0,0
8411 data 6,0,0,10,0,0
8412 data 3,15,13,0,0,0
8413 data 0,0,0,12,0,0
8414 data 0,0,15,0,0,0
8415 data 12,20,16,14,0,0
8416 data 0,0,17,15,0,0
8417 data 0,22,0,16,0,0
8418 data 0,23,0,0,0,0
8419 data 0,25,20,0,0,0
8420 data 15,0,0,19,0,0
8421 data 0,0,22,0,0,0
8422 data 17,28,23,21,0,0
8423 data 18,29,24,22,0,0
8424 data 0,0,0,23,0,0
8425 data 19,32,0,0,0,0
8426 data 0,0,27,0,0,0
8427 data 21,0,0,26,0,0
8428 data 22,0,0,0,0,0
8429 data 23,35,0,0,0,0
8430 data 0,37,0,0,0,0
8431 data 26,38,0,0,0,0
8432 data 25,36,0,0,0,0
8433 data 27,0,0,0,0,0
8434 data 0,41,35,0,0,0
8435 data 29,0,0,34,0,0
8436 data 32,0,0,0,0,0
8437 data 30,44,0,0,0,0
8438 data 31,48,0,44,0,0
8439 data 0,0,0,0,0,40
8440 data 0,0,41,0,0,0
8441 data 34,54,42,40,0,0
8442 data 0,0,43,41,0,0
8443 data 0,0,0,42,0,0
8444 data 37,47,38,45,0,0
8445 data 0,46,44,0,0,0
8446 data 45,0,0,50,0,0
8447 data 44,52,0,0,0,0
8448 data 38,53,49,0,0,0
8449 data 0,0,0,48,0,0
8450 data 0,0,46,0,0,0
8451 data 0,0,50,0,0,0
8452 data 47,0,0,0,0,0
8453 data 48,58,0,0,0,0
8454 data 41,56,0,0,0,0
8455 data 0,0,56,0,0,0
8456 data 54,64,57,55,0,0
8457 data 0,0,0,56,0,0
8458 data 53,61,0,0,0,0
8459 data 0,65,60,0,0,0
8460 data 0,0,61,59,0,0
8461 data 58,0,62,60,0,0
8462 data 0,0,63,61,0,0
8463 data 0,0,0,62,0,0
8464 data 56,0,0,0,0,0
8465 data 59,66,0,0,0,0
8466 data 65,0,0,0,0,0
8467 data 0,0,68,0,0,4
8468 data 0,0,0,67,0,0
8469 data 0,70,0,68,0,0
8470 data 69,0,0,0,0,0
8749 REM +--- Handle weather events
8750 IF DT = 90 THEN COLOR 11: PRINT "It is nightfall. The moon is now visible over the horizon."
8751 IF DT = 160 THEN COLOR 12: PRINT "The moonlight is very dim."
8752 IF DT = 190 THEN COLOR 11: PRINT "The moonlight has given way to the rising sun."
8753 IF DT = 220 THEN COLOR 11: PRINT "The sun is rising."
8754 RANDOMIZE TIMER: f = INT(RND * 300) + 1
8755 IF f >= 0 AND f <= 10 AND WEV = 0 THEN WEV = 1: COLOR 14: PRINT "There is a slight breeze outside."
8756 IF f >= 11 AND f <= 31 AND WEV = 1 THEN WEV = 2: COLOR 14: PRINT "A cool wind blows from the northeast."
8757 IF f >= 32 AND f <= 45 THEN COLOR 7: PRINT "The sun shines and you feel better...": hp% = hm%
8758 IF f >= 46 AND f <= 52 THEN COLOR 7: PRINT "A gentle wind blows and you feel stronger...": mp% = mm%
8759 IF f >= 53 AND f <= 68 AND WEV = 4 THEN WEV = 5: COLOR 14: PRINT "A gentle rain pelts the ground."
8760 IF f >= 69 AND f <= 73 AND WEV = 2 THEN WEV = 3: COLOR 14: PRINT "A few clouds gather in the distance."
8761 IF f >= 74 AND f <= 80 AND WEV = 3 THEN WEV = 4: COLOR 14: PRINT "Dark clouds looms over the horizon. It looks like rain."
8762 IF f >= 81 AND f <= 90 AND WEV = 5 THEN WEV = 6: COLOR 14: PRINT "The gentle rain has increased to a steady downpour."
8763 IF f >= 91 AND f <= 105 AND WEV = 6 THEN WEV = 7: COLOR 14: PRINT "The rain begins to taper off as the wind calms down."
8764 IF f >= 106 AND f <= 110 AND WEV = 7 THEN WEV = 8: COLOR 14: PRINT "The clouds scatter and the sun comes out. It is a pleasant temperature."
8765 IF f >= 111 AND f <= 118 AND WEV = 8 THEN WEV = 0: COLOR 14: PRINT "A warm breeze blows from the southwest. The air is temperate and mild."
8790 RETURN
8799 REM +--- Revive the NPCs
8800 RESTORE 8028
8823 FOR X = 28 TO 37:read no$(x),ao$(x),ob$(x),mh(x),p(x),en(x),dm(x),lo(x):next
8824 if LIGHT=1 or lo(8)=-1 and lo(9)=-1 then lo(9)=75:LIGHT=0:color 13:?"Your lantern fuel has expired!":sleep 1:color 10:?"You are teleported somewhere...":sleep 1:RM=9
8834 RETURN
9099 REM +--- Show signs, banners, stuff in room, etc.
9100 if rm=14 then color 14:?"Type 'list' to see what the store has for sale."
9101 if rm=4 then color 14:?"Type 'list' to see what the tavern has on tap."
9102 if rm=35 then color 14:?"There is a small wooden sign here."
9103 if rm=1 and lv<2 then color 11:?"Type 'pray' to regain hit points."
9104 if LIGHT=0 then IF RM>21 then color 12:?"It is too dark to see!"
9105 if rm=4 then color 11:?"Type 'skills' to see what you've learned."
9198 return
9199 REM +--- Examine stuff in room commands
9200 if rm=4 and a$="list" then goto 9300
9201 if rm=14 and a$="list" then goto 9350
9202 if rm=35 then if a$="examine sign" or a$="read sign" then color 11:?"(read sign)":?:color 15:?"The sign reads: 'The Orb is said to move water, but not wine.'":goto 69
9203 if rm=35 then if a$="get sign" or a$="take sign" then color 15:?"A mysterious voice bellows: 'Leave it alone!'":goto 69
9204 if a$="help" then gosub 9600:goto 69
9205 if a$="l" or a$="lk" or a$="look" then goto 61
9206 if a$="score" or a$="sc" or a$="?" then goto 9400
9207 if rm=1 and a$="pray" then if lv<2 then hp&=hm&:mp&=mm&:color 15:?"A lightning bolt streaks down and heals you fully.":goto 69
9208 if rm=1 and a$="pray" then color 15:?"You are too high a level to pray at the altar!":goto 69
9209 if a$="get all" then goto 10000
9210 if a$="skills" and rm=4 then goto 12000
9212 if a$="powerup" or a$="power up" then goto 16000
9213 if a$="return" then goto 17000
9214 if a$="dispell" then goto 18000
9215 if a$="light" then goto 19000
9216 goto 20000
9299 REM +--- List command in the tavern
9300 color 15:?"Here is what the tavern has on tap :"
9301 color 11:?"(1) Wizard's Potion (20g:25hp)"
9302 color 11:?"(2) Drunk's Delight (40g:35hp)"
9303 color 11:?"(3) King's Ale (50g:50hp)"
9304 color 11:?"(4) Nirvana Trip (140g:90hp)"
9305 color 11:?"(5) Food and Water (100g:+ fw)"
9306 color 15:?"Enter selection (1-5) or 0 for none:";:input "",a$:si=val(a$)
9307 if si=0 then color 12:?"Aborted.":goto 69
9308 if si=1 and g&<20 then color 15:?"You don't have enough gold.":color 12:?"Aborted.":goto 69
9309 if si=2 and g&<40 then color 15:?"You don't have enough gold.":color 12:?"Aborted.":goto 69
9310 if si=3 and g&<50 then color 15:?"You don't have enough gold.":color 12:?"Aborted.":goto 69
9311 if si=4 and g&<140 then color 15:?"You don't have enough gold.":color 12:?"Aborted.":goto 69
9312 if si=5 and g&<100 then color 15:?"You don't have enough gold.":color 12:?"Aborted.":goto 69
9313 if si=1 then g&=g&-20:hp&=hp&+25:color 13:?"You purchase a Wizard's Potion.":color 15:?"You quickly consume it...":goto 69
9314 if si=2 then g&=g&-40:hp&=hp&+35:color 13:?"You purchase a Drunk's Delight.":color 15:?"You quickly consume it...":goto 69
9315 if si=3 then g&=g&-50:hp&=hp&+50:color 13:?"You purchase a King's Ale.":color 15:?"You quickly consume it...":goto 69
9316 if si=4 then g&=g&-140:hp&=hp&+90:color 13:?"You purchase a Nirvana Trip.":color 15:?"You quickly consume it...":goto 69
9317 if si=5 then g&=g&-100:fd=fd+4000:wa=wa+3000:color 13:?"You purchase Food and Water.":color 15:?"You quickly consume both...":goto 69
9320 color 12:?"Aborted.":goto 69
9349 REM +--- List command in the shop
9350 color 15:?"Here is what the shop has in stock:"
9351 si=0:for x=7 to 37
9352 if lo(x)=75 then color 7:? no$(x)": "tab(50);p(x):si=1
9353 next:if si=0 then color 12:?"Alas, the shop has nothing in stock.":goto 69
9354 color 10:?"Gold:";:color 14:? g&:goto 69
9399 REM +--- Check over "stats"
9400 color 14:?"You have the following attributes:"
9401 color 15:?"Name:";:color 11:?" "na$
9402 color 15:?"Level:";:color 11:? lv
9403 color 15:?"Exp:";:color 11:? ex&
9404 color 15:?"HP:";:color 11:? hp&"/"hm&
9405 color 15:?"MP:";:color 11:? mp&"/"mm&
9406 color 15:?"Gold:";:color 11:? g&
9407 color 15:?"Weight:";:color 11:? WEIGHT+1"/ 39"
9408 color 15:?"Food:";:color 11:? fd;:color 15:?" Water:";:color 11:? wa
9409 if sk>0 then color 15:gosub 14000
9410 goto 69
9499 REM +--- Check for "over stats"
9500 if hp&>hm& then hp&=hm&
9501 if mp&>mm& then mp&=mm&
9502 if fd>5000 then fd=5000
9503 if wa>5000 then wa=5000
9504 if g&>25000 then g&=25000
9505 if hp&>5000 then hp&=5000
9506 if hm&>5000 then hm&=5000
9507 if mp&>5000 then mp&=5000
9508 if mm&>5000 then mm&=5000
9509 if fd<25 then color 12:?"You are nearly out of food!"
9510 if wa<25 then color 12:?"You are almost out of water!"
9511 if fd<-20 then color 13:?"You have died from starvation on day"DY"...":sleep 2:fd=800:wa=800:hp&=0:goto 9800
9512 if wa<-10 then color 13:?"You have died from dehydration on day"DY"...":sleep 2:fd=800:wa=800:hp&=0:goto 9800
9513 fd=fd-2:wa=wa-3
9550 return
9599 REM +--- Help command
9600 cls
9601 locate 1,1:color 11:?"In-Game commands":?:color 15:?"Below is a list of game commands.":?
9602 color 11:?"Verbs":?:color 7
9603 ?"GO GET DROP UNLOCK WIELD UNWIELD WEAR REMOVE EXAMINE"
9604 ?"READ PUT PLACE EAT DRINK BUY SELL USE LIGHT"
9605 ?"EXTINGUISH KILL ATTACK INVENTORY SCORE QUIT"
9606 ?"SAVE HELP TIME DAY MAP COMPASS PLAY":?
9607 color 14:?"Verb usage: ";:color 10:?"[verb] [noun] (Optional): [in/from] [object]":?
9608 color 11:?"Examples":?:color 13:?"wield sword get sword put sword in bag"
9609 ?"get sword from bag":?
9698 return
9699 REM +--- Kill/Attack command
9700 if n<28 then color 15:?"It's beyond your power to do that!":goto 69
9701 if lo(n)<>rm then color 15:?"The "no$(n)" isn't here.":goto 69
9702 if sk<1 then color 11:?"You haven't learned the Fighting skill yet!":goto 69
9710 randomize timer:i=int(rnd*45)+1
9711 color 13:?"[