	0 'HAUNT.BA Barry Gaskins
1 'CLUB 100 Library - 415/939-1246 BBS, 937-5039 NEWSLETTER, 932-8856 VOICE
10 REM
100 CLS:PRINT "DO YOU WANT INSTRUCTIONS? (Y/N)"
105 ZZ$=INKEY$:if ZZ$="" then 105
107 if ZZ$="N" OR ZZ$="n" then 120
110 gosub 170
120 CLEAR(300):gosub 480
130 REM
140 gosub 620
150 gosub 750
160 GOTO 130
170 REM
190 PRINT " HAUNTED HOUSE"
200 PRINT " BY BARRY GASKINS"
240 PRINT " HAUNTED HOUSE"
250 PRINT "YOU ARE LOST IN THE WOODS AND ARE AT THE ENTRANCE to A STRANGE-LOOKING HOUSE. LOOKING for HELP AND FOOD YOU"
280 PRINT "DECIDE to GO IN... SUDDENLY THE DOOR SLAMS SHUT. YOU HEAR AN EVIL LAUGH AND "
300 PRINT "A VOICE COMING FROM THE VERY WALLS"
310 PRINT " 'YOU WILL NEVER LEAVE THIS "
320 PRINT "HOUSE. YOU WILL STAY for EVER to "
330 PRINT "WALK ITS ROOMS AND HALLS. HEAR THESE WORDS AND KNOW YOUR "
350 PRINT " DOOM!!!!! HA HA HA HA...."
380 PRINT "LOOKING AROUND YOU SEE THAT THERE ARE SEVERAL EXITS BUT NO WINDOWS. MAYBE YOU HAVE A CHANCE?"
410 PRINT "if YOU TELL ME WHAT YOU WANT to DO I WILL TELL YOU WHAT IS HAPPENING. AND if YOU NEED HELP JUST TYPE HELP IN PLACE OF YOUR COMMAND"
450 ZZ$=input$(1)
470 RETURN
480 dim S(13):dim S$(13):L=1
490 dim R$(13):dim E$(13):dim CO$(14)
500 for X=1 to 13:S(X)=X:read S$(X):NEXT
510 for X=1 to 13:read R$(X):NEXT
520 for X=1 to 12:read E$(X):NEXT
530 for X=1 to 14:read CO$(X):NEXT
540 RETURN
550 DATA ROPE,SWORD,KEY,BUCKET OF WATER,RUG,WAND ,MOLDY FOOD,WINE,KEGS,ASHES,ROCKS,LEAVES,NULL
560 DATA THE DEN,A TROPHY ROOM,THE SERVANTS QUARTERS,THE DINING ROOM,THE KITCHEN,THE CELLAR,A STORAGE ROOM,THE WINE CELLAR,AGING ROOM,A NARROW PASSAGE,A HUGE CAVE,A SMALL CAVE,THE OUTSIDE WORLD
570 DATA SOUTH EAST AND WEST,WEST,NORTH,NORTH,SOUTH AND EAST
580 DATA UP AND EAST,SOUTH,WEST EAST AND NORTH,WEST
590 DATA EAST AND WEST,EAST AND WEST,WEST
600 DATA NORTH,SOUTH,EAST,WEST,UP,DOWN
610 DATA GET,DROP,USE,OFFER,DRINK,SEARCH,ATTACK WITH,INVENTORY
620 PRINT "YOU ARE IN "R$(L)
630 PRINT "VISIBLE ITEMS: ";
640 for X=1 to 13:if S(X)=L then PRINT S$(X)" ";
650 NEXT:PRINT 
660 PRINT "YOU SEE EXITS "E$(L)
670 if L=6 AND  F2=0 then PRINT "THERE IS A GHOST IN THIS ROOM !!!"
680 if L=10 AND F4=0 then PRINT "A WALL OF FIRE BLOCKS YOUR WAY !!!"
690 if L=11 AND F5 =0 then PRINT "THERE IS A HUGE HUNGRY GIANT IN HERE"
700 if L=12 then PRINT "THERE IS A HOLE IN THE CEILING AND YOU CAN SEE THE OPEN SKY ABOVE !!!"
710 RETURN
720 PRINT "LEGAL COMMANDS ARE:"
730 for X=1 to 6:PRINT " "CO$(X):NEXT:for X=7 to 13:PRINT " "CO$(X)" SOMETHING":NEXT:PRINT " "CO$(14):PRINT 
740 PRINT "I ONLY LOOK AT THE FIRST 3 LETTERS OF EACH WORD SO YOU ONLY NEED to TYPE THE FIRST 3 LETTERS ":GOTO 1890
750 REM
760 input "WHAT DO YOU WANT to DO ";DO$:CLS
770 if DO$="UP" then X=5:GOTO 810
780 if LEN(DO$)<3 then 720
790 for X=1 to 14:if LEFT$(DO$,3)=LEFT$(CO$(X),3) then 810
800 NEXT:GOTO 720
810 if X<7 then 910
820 if X=14 then 1320
830 if X=7 then 1360
840 if X=8 then 1470
850 if X=9 then 1530
860 if X=11 then 1590
870 if X=10 then 1640
880 if X=12 then 1690
890 if X=13 then 1750
900 GOTO 720
910 ON L GOTO 920,970,990,1010,1030,1070,1110,1130,1170,1200,1230,1270
920 if X=1 then 1350
930 if X=2 then L=3:RETURN
940 if X=3 then L=2:RETURN
950 if X=4 then L=5:RETURN
960 GOTO 1350
970 if X=4 then L=1:RETURN
980 GOTO 1350
990 if X=1 then L=1:RETURN
1000 GOTO 1350
1010 if X=1 then L=5:RETURN
1020 GOTO 1350
1030 if X=2 then L=4:RETURN
1040 if X=3 then L=1:RETURN
1050 if X=6 AND F1 then L=6:RETURN
1060 GOTO 1350
1070 if X=3 AND F2 then L=8:RETURN
1080 if X=3 then PRINT "THE GHOST BLOCKS YOUR WAY !"
1090 if X=5 then L=5:RETURN
1100 GOTO 1350
1110 if X=2 then L=8:RETURN
1120 GOTO 1350
1130 if X=1 then L=7:RETURN
1140 if X=3 then L=9:RETURN
1150 if X=4 then L=6:RETURN
1160 GOTO 1350
1170 if X=3 AND F3 then L=10:RETURN
1180 if X=4 then L=8:RETURN
1190 GOTO 1350
1200 if X=3 AND F4 then L=11:RETURN
1210 if X=4 then L=9:RETURN
1220 GOTO 1350
1230 if X=3 AND F5 then L=12:RETURN
1240 if X=4 then L=10:RETURN
1250 if X=3 then PRINT "YOU WERE BURNED UP IN THE FIRE":GOTO 1820
1260 GOTO 1350
1270 if X=4 then L=11:RETURN
1280 if X=5 AND F6 then 1300
1290 GOTO 1350
1300 CLS:PRINT "YOU MADE IT OUT ALIVE !!!"
1310 PRINT "GOOD JOB ":END
1320 CLS:PRINT " INVENTORY:"
1330 for X=1 to 13:if S(X)=0 then PRINT S$(X)
1340 NEXT:GOTO 1890
1350 PRINT " YOU CANT GO THAT WAY":GOTO 1890
1360 DO$=DO$+" ":N=LEN(DO$)-1:for X=1 to N:if LEFT$(DO$,1)=" " then X=N
1370 DO$=RIGHT$(DO$,LEN(DO$)-1)
1380 NEXT:if LEN(DO$)<2 then 1430
1390 DO$=LEFT$(DO$,LEN(DO$)-1):if LEN(DO$)<3 then 1430
1400 for X=1 to 13:if LEFT$(DO$,3)=LEFT$(S$(X),3) then 1420
1410 NEXT:GOTO 1430
1420 if S(X)=L then S(X)=0:GOTO 1440
1430 PRINT "I SEE NO "DO$" HERE":GOTO 1890
1440 if DO$="RUG" then PRINT " THERE WAS A TRAPDOOR UNDER THE RUG!":PRINT :E$(5)="DOWN "+E$(5):GOTO 1890
1450 if X=9 then S(X)=L:PRINT "THE KEGS ARE MUCH TOO BIG to CARRY":GOTO 1890
1460 RETURN
1470 DO$=DO$+" ":N=LEN(DO$):for X=1 to N:if LEFT$(DO$,1)=" " then X=N
1480 DO$=RIGHT$(DO$,LEN(DO$)-1):NEXT:if LEN(DO$)<2 then 1520
1490 DO$=LEFT$(DO$,LEN(DO$)-1):if LEN(DO$)<3 then 1520
1500 for X=1 to 13:if LEFT$(DO$,3)=LEFT$(S$(X),3) AND S(X)=0 then S(X)=L:RETURN
1510 NEXT
1520 PRINT "YOU DON'T HAVE A "DO$:GOTO 1890
1530 REM 
1540 gosub 1840:if LEN(DO$)<3 then 1580
1550 if LEFT$(DO$,3)="KEY" AND S(3)=0 AND L=9 AND FO then PRINT "YOU OPENED THE KEG to REVEAL A PASSAGE!":F3=1:E$(9)=E$(9)+" AND EAST":GOTO 1890
1560 if LEFT$(DO$,3)="BUC" AND L=10 AND S(4)=0 then PRINT "THE WATER PUT THE FIRE OUT":F4=1:GOTO 1890
1570 if LEFT$(DO$,3)="ROP" AND S(1)=0 OR S(1)=L AND L=12 then F6=1:E$(12)=E$(12)+" AND UP":PRINT "YOUR ROPE CATCHES SOMETHING OUTSIDE":GOTO 1890
1580 PRINT "THAT HAD NO USEFUL EFFECT ":GOTO 1890
1590 REM
1600 gosub 1840:if LEN(DO$)<3 then 1630
1610 if LEFT$(DO$,3)="WIN" AND (S(8)=0 OR S(8)=L) then PRINT "WHILE YOU WERE DRUNK A TROLL CAME BY AND ATE YOU ":GOTO 1820
1620 if (LEFT$(DO$,3)="BUC"OR LEFT$(DO$,3)="WAT") AND (S(4)=0OR S(4)=L) then PRINT "THE WATER WAS POISON":GOTO 1820
1630 PRINT "I SEE NOTHING to DRINK AROUND HERE":GOTO 1890
1640 REM
1650 if  L<>6 OR L<>11 then PRINT "THERE IS NOBODY HERE to OFFER ANYTHING TO":GOTO 1890
1660 if L=6 then PRINT "THE GHOST DOESN'T WANT IT":GOTO 1890
1670 gosub 1840:if LEFT$(DO$,3)="WIN" AND S(8)=0 then PRINT "THE GIANT DRINKS THE WINE AND FALLS OVER ON THE FLOOR DRUNK":F5=1:GOTO 1890
1680 PRINT "THE GIANT GETS MAD AND THROWS A ROCK AT YOU. ":GOTO 1820
1690 REM
1700 gosub 1840
1710 if LEN(DO$)<3 then 1740
1720 if LEFT$(DO$,3)="RUG" AND L=5 then PRINT "THERE WAS A TRAPDOOR UNDER THE RUG !!":E$(5)="DOWN "+E$(5):GOTO 1890
1730 if LEFT$(DO$,3)="KEG" AND L=9 then PRINT "YOU FOUND A KEYHOLE IN ONE OF THE KEGS!":FO=1:GOTO 1890
1740 PRINT " THERE IS NOTHING SPECIAL ABOUT THAT":GOTO 1890
1750 REM
1760 N=LEN(DO$):for X=N to 1 STEP -1:if MID$(DO$,X,1)=" " then DO$=RIGHT$(DO$,N-X) ELSE 1761
1761 NEXT
1765 for Y=1 to 13:if LEFT$(S$(Y),3)=LEFT$(DO$,3) then 1780:NEXT
1770 GOTO 1810
1780 if LEFT$(DO$,3)="SWO" AND S(2)=0 AND L=6 then F2=1:PRINT "THE GHOST IS DEAD!!!":GOTO 1890
1785 if LEFT$(DO$,3)="SWO" AND S(2)<>0 then 1810
1790 if L=11 then PRINT "THE GIANT GRABBED YOU AND SQUEEZED YOU to DEATH !!!":GOTO 1820
1800 PRINT "THERE IS NOTHING to ATTACK":GOTO 1890
1810 PRINT "YOU DON'T HAVE ONE OF THOSE ":GOTO 1890
1820 PRINT "OH NO .....":PRINT "YOU DIED ":input "DO YOU WANT to PLAY AGAIN?";A$:if LEFT$(A$,1)="N" then END
1830 GOTO 10
1840 DO$=DO$+" ":N=LEN(DO$)-1:for X=1 to N:if LEFT$(DO$,1)=" " then X=N
1850 DO$=RIGHT$(DO$,LEN(DO$)-1)
1860 NEXT:if LEN(DO$)<2 then 1880
1870 DO$=LEFT$(DO$,LEN(DO$)-1):if LEN(DO$)<3 then 1880
1880 RETURN
1890 REM
1900 PRINT "HIT RETURN to CONTINUE":line input zz$
1920 RETURN

