00010 ! ! ADVENT -- Game of adventures 00020 ! ! Translated into BASIC-PLUS from the FORTRAN IV program ! developed by Willie Crowther and modified by Don Woods ! 00030 ! Keith Barnett Alexis I. duPont High School 12/24/77 ! 01000 ! ! Set-up; create coded data file if necessary 01010 EXTEND 01020 ON ERROR GOTO 32000 01030 TRVSIZ%=750% \ TABSIZ%=300% \ LOCSIZ%=150% \ VRBSIZ%=35% \ RTXSIZ%=205% \ CLSMAX%=12% \ HNTSIZ%=20% \ MAGSIZ%=35% 01040 RANDOMIZE 01050 DIM HATH%(12%), TK(22%) \ MAT READ HATH% 01060 OPEN "KB:" AS FILE 3% 01100 LDN$="GAME:" 01110 OPEN LDN$+"ADVENT.DAT" FOR INPUT AS FILE 1% 01120 DIM #1%, TRAVEL(750%), KTAB%(300%), ATAB$(300%)=8%, LTEXT%(150%), STEXT%(150%), KEYW%(150%), COND0%(150%), PLAC%(100%), FIXD%(100%), PTEXT%(700%), ACTSPK%(35%), RTEXT%(205%), CTEXT%(12%), CVAL%(12%), HINTS%(20%,4%), MTEXT%(35%), WKDAY(0%), WKEND(0%), HOLID(0%), HBEGIN%(0%), HEND%(0%), HNAME$(0%), SHORT%(0%), MAGIC$(0%)=8%, MAGNM%(0%), LATNCY%(0%), MSG%(1%), HANDY%(55%), LINES$(32767%) 01130 OPEN "ADVENT.ADV" FOR INPUT AS FILE 4% \ IF OTHER%(27%)=1% THEN OTHER%(27%)=FNVARSET% + FNSTART% \ DUM%=FNCHAIN%(11000%) 01135 IF OTHER%(27%)<>2% THEN KILL "ADVENT.ADV" \ GOTO 1130 01140 DIM #4%, ABB%(150%), ATLOC%(150%), PLACE%(100%), FIXED%(100%), COND%(150%), LINK%(200%), PROP%(100%), HINTLC%(20%), HINTED%(20%), DSEEN%(6%), DLOC%(6%), ODLOC%(6%), HNAME%(4%), OTHER%(35%) 01150 OTHER%(27%)=FNSTART% 01160 CLOSE 1%,4% \ DUM%=FNVARSET% \ GOTO 10000 01198 ! ! Set up changeable database (forced motion, ATLOC, LINK) ! 01200 OPEN LDN$+"ADVENT.CPY<40>" FOR OUTPUT AS FILE 4% \ FOR I%=1% TO LTEXT%(0%) \ COND%(I%)=COND0%(I%) \ COND%(I%)=2% IF LTEXT%(I%)-LTEXT%(I%-1%)>0% AND KEYW%(I%) AND FNMOD%(ABS(TRAVEL(KEYW%(I%))),1000%)=1% \ NEXT I% 01205 HINTED%(I%), HINTLC%(I%)=0% FOR I%=1% TO HINTS%(0%,0%) \ ABB%(I%), ATLOC%(I%)=0% FOR I%=1% TO LTEXT%(0%) \ PLACE%(I%), PROP%(I%), LINK%(I%), LINK%(I%+100%)=0% FOR I%=0% TO 100% 01210 FOR I%=100% TO 1% STEP -1% \ IF FIXD%(I%)>0% THEN DUM%=FNDROP%(I%+100%,FIXD%(I%)) + FNDROP%(I%,PLAC%(I%)) 01220 NEXT I% \ FOR I%=100% TO 1% STEP -1% \ FIXED%(I%)=FIXD%(I%) \ DUM%=FNDROP%(I%,PLAC%(I%)) IF PLAC%(I%)<>0% AND FIXD%(I%)<=0% \ NEXT I% 01228 ! TALLY keeps track of how many treasures (50 through MAXTRS) have ! not been found, TALLY2 how many can never be found. 01230 MAXTRS%=64% \ TALLY%, TALLY2%=0% 01240 FOR I%=50% TO MAXTRS% \ PROP%(I%)=-1% IF PTEXT%(I%*7%)-PTEXT%(I%*7%-7%)>0% \ TALLY%=TALLY%-PROP%(I%) \ NEXT I% 01400 OTHER%(0%)=114% \ OTHER%(1%)=140% \ DSEEN%(I%),ODLOC%(I%)=0% FOR I%=1% TO 6% \ OTHER%(2%)=0% 01410 DLOC%(1%)=19% \ DLOC%(2%)=27% \ DLOC%(3%)=33% \ DLOC%(4%)=44% \ DLOC%(5%)=64% \ DLOC%(6%)=OTHER%(0%) \ OTHER%(3%)=18% 01420 OTHER%(I%)=0% FOR I%=4% TO 20% 01430 OTHER%(21%)=5% \ OTHER%(22%)=30% \ OTHER%(23%)=50% 01440 OTHER%(24%)=TALLY% \ OTHER%(25%)=TALLY2% \ OTHER%(26%), OTHER%(27%)=2% \ OTHER%(I%)=0% FOR I%=28% TO 35% \ OTHER%(33%)=-1% 1450 CLOSE 4% 01500 ! Transfer sample 01510 OPEN LDN$+"ADVENT.CPY" FOR INPUT AS FILE 5% \ OPEN "ADVENT.ADV" FOR OUTPUT AS FILE 4% \ FIELD #5%, 512% AS S1$ \ FIELD #4%, 512% AS S2$ \ FOR I%=1% TO 5% \ GET #5%, RECORD I% \ LSET S2$=S1$ \ PUT #4%, RECORD I% \ NEXT I% \ CLOSE 4%,5% \ GOTO 1130 02000 ! ! Initialize basic data base ! ! The text file contains several sections the first line of which ! is the section number and the last "-1" (and "End") ! Section 1: Long form descriptions. Each line begins with the ! location number. ! Section 2: Short form descriptions. ! Section 3: Travel table. Each line consists of a location number, ! a location number to go to, and a list of verbs that will ! cause the travel. If Y is the resultant location, M=Y/1000 ! and N=Y MOD 1000. If N<=300 it's the location, if 300500 ! message N-500 from section 6 is printed and he stays where ! he is. If M=0 the motion is unconditional, 0" FOR OUTPUT AS FILE 1% 02040 INPUT #2%, SECT% \ PRINT "Now loading section";SECT% \ ON SECT%+1% GOTO 9000, 2100, 2100, 3000, 4000, 2100, 2100, 5000, 6000, 7000, 2100, 8000, 2100 02100 ! Sections 1, 2, 5, 6, 10, 12 02110 LINES$="" \ OLDLOC%=0% 02120 INPUT LINE #2%, LIN$ \ I%=INSTR(1%,LIN$,",") \ LOC%=VAL(LEFT(LIN$,I%-1%)) \ LIN$=RIGHT(LIN$,I%+1%) \ LIN$=LEFT(LIN$,LEN(LIN$)-2%)+" " IF MID(LIN$,LEN(LIN$)-2%,1%)="?" \ IF LOC%=OLDLOC% THEN LINES$=LINES$+LIN$ \ GOTO 2120 02130 IF OLDLOC%=0% THEN OLDLOC%=LOC% \ LINES$=LIN$ \ GOTO 2120 02140 X%=(LEN(LINES$)+15%)/16% \ LINES$(KK%+LINUSE%)=MID(LINES$,KK%*16%-15%,16%) FOR KK%=1% TO X% 02150 LINUSE%=LINUSE%+X% \ FOR KK%=OLDLOC% TO LOC%-1%-(2%+OLDLOC%)*(LOC%=-1%) \ IF SECT%=1% THEN LTEXT%(KK%)=LINUSE% ELSE IF SECT%=2% THEN STEXT%(KK%)=LINUSE% ELSE IF SECT%=6% THEN RTEXT%(KK%)=LINUSE% ELSE IF SECT%=12% THEN MTEXT%(KK%)=LINUSE% 02160 NEXT KK% \ IF SECT%=10% THEN CLSSES%=CLSSES%+1% \ CTEXT%(CLSSES%)=LINUSE% \ CVAL%(CLSSES%)=OLDLOC% 02170 GOTO 2190 IF SECT%=5% \ IF LOC%=-1% THEN LTEXT%(0%)=OLDLOC% IF SECT%=1% \ STEXT%(X%)=LINUSE% FOR X%=OLDLOC% TO LTEXT%(0%) IF SECT%=2% \ RTEXT%(0%)=OLDLOC% IF SECT%=6% \ CTEXT%(0%)=CLSSES% IF SECT%=10% \ MTEXT%(0%)=OLDLOC% IF SECT%=12% \ GOTO 2040 02180 LINES$=LIN$ \ OLDLOC%=LOC% \ GOTO 2120 02190 X%=(OLDLOC%-OLDLOC%/100%*100%)*7%+OLDLOC%/100% \ PTEXT%(KK%)=LINUSE% FOR KK%=X%-6% TO X%-OLDLOC%/100% \ LINES$=LIN$ \ IF LOC%>0% AND LOC%<100% THEN PTEXT%(KK%)=LINUSE% FOR KK%=(OLDLOC%-OLDLOC%/100%*100%)*7%+1% TO LOC%*7%-7% \ OLDLOC%=LOC% \ GOTO 2120 02200 OLDLOC%=OLDLOC%-OLDLOC%/100%*100%+100%+LOC% \ IF LOC%=-1% THEN PTEXT%(0%)=OLDLOC%-99% \ GOTO 2040 02210 INPUT LINE #2%, LIN$ \ I%=INSTR(1%,LIN$,",") \ LOC%=VAL(LEFT(LIN$,I%-1%)) \ LIN$=RIGHT(LIN$,I%+1%) \ IF OLDLOC%/100%*100%-100%=LOC% THEN LINES$=LINES$+LIN$ \ GOTO 2210 02220 X%=(LEN(LINES$)+15%)/16% \ LINES$(KK%+LINUSE%)=MID(LINES$,KK%*16%-15%,16%) FOR KK%=1% TO X% \ LINUSE%=LINUSE%+X% \ GOTO 2190 03000 ! Section 3 03010 KEYW%(I%)=0% FOR I%=0% TO 150% 03020 MAT INPUT #2%, TK \ LOC%=TK(1%) \ NEWLOC=TK(2%) \ IF LOC%=-1% THEN TRAVEL(0%)=TRVS% \ GOTO 2040 03030 IF KEYW%(LOC%) THEN TRAVEL(TRVS%)=-TRAVEL(TRVS%) ELSE KEYW%(LOC%)=TRVS%+1% 03040 FOR L%=3% TO NUM \ TRVS%=TRVS%+1% \ TRAVEL(TRVS%)=NEWLOC*1000+TK(L%) \ NEXT L% \ TRAVEL(TRVS%)=-TRAVEL(TRVS%) \ GOTO 3020 04000 ! Section 4 04010 TABNDX%=1% 04020 INPUT #2%, KTAB%(TABNDX%), ATAB$(TABNDX%) \ IF KTAB%(TABNDX%)=-1% THEN KTAB%(0%)=TABNDX% \ GOTO 2040 04030 TABNDX%=TABNDX%+1% \ GOTO 4020 05000 ! Section 7 05010 PLAC%(I%), FIXD%(I%)=0% FOR I%=0% TO 100% 05020 TK(3%)=0% \ MAT INPUT #2%, TK \ OBJ%=TK(1%) \ J%=TK(2%) \ K%=TK(3%) \ IF OBJ%=-1% THEN STEXT%(0%)=OLDOBJ% \ GOTO 2040 05030 PLAC%(OBJ%)=J% \ FIXD%(OBJ%)=K% \ OLDOBJ%=OBJ% \ GOTO 5020 06000 ! Section 8 06010 ACTSPK%(I%)=0% FOR I%=0% TO 35% 06020 INPUT #2%, VERB%, J% \ GOTO 2040 IF VERB%=-1% \ ACTSPK%(VERB%)=J% \ GOTO 6020 07000 ! Section 9 07010 COND0%(I%)=0% FOR I%=0% TO 150% 07020 MAT INPUT #2%, TK \ K%=TK(1%) \ GOTO 2040 IF K%=-1% \ FOR I%=2% TO NUM \ LOC%=TK(I%) \ DUM%=FNBUG%(8%) IF (COND0%(LOC%) AND 2%^K%)<>0% \ COND0%(LOC%)=COND0%(LOC%)+2%^K% \ NEXT I% \ GOTO 7020 08000 ! Section 11 08010 HINTS%(I%,X%)=0% FOR I%=0% TO 20% FOR X%=0% TO 4% \ HNTMAX%=0% 08020 MAT INPUT #2%, TK \ K%=TK(1%) \ IF K%=-1% THEN HINTS%(0%,0%)=HNTMAX% \ GOTO 2040 08030 HINTS%(K%,I%)=TK(I%+1%) FOR I%=1% TO 4% \ HNTMAX%=K% IF K%>HNTMAX% \ GOTO 8020 09000 ! Section 0 09005 VERB%=0% \ VERB%=VERB%+1% UNTIL KTAB%(VERB%)/1000%=3% \ VERB%=KTAB%(VERB%-1%)-2000% 09010 PRINT "Table space used:" 09020 PRINT USING " ##### of 32767 words of messages",LINUSE% 09030 PRINT USING " ##### of ##### travel options",TRAVEL(0%),TRVSIZ% 09040 PRINT USING " ##### of ##### vocabulary words",KTAB%(0%),TABSIZ% 09050 PRINT USING " ##### of ##### locations",LTEXT%(0%),LOCSIZ% 09060 PRINT USING " ##### of ##### objects",STEXT%(0%),100% 09070 PRINT USING " ##### of ##### action verbs",VERB%,VRBSIZ% 09080 PRINT USING " ##### of ##### RTEXT messages",RTEXT%(0%),RTXSIZ% 09090 PRINT USING " ##### of ##### class messages",CTEXT%(0%),CLSMAX% 09100 PRINT USING " ##### of ##### hints",HINTS%(0%,0%),HNTSIZ% 09110 PRINT USING " ##### of ##### magic messages",MTEXT%(0%),MAGSIZ% 09120 HANDY$="BACKLOOKCAVENULLENTRDEPRKEYSLAMPGRATCAGEROD STEPBIRDDOOR"+ "PILLSNAKFISSTABLCLAMOYSTMAGADWARKNIFFOODBOTTWATEOIL PLAN"+ "AXE MIRRDRAGCHASTROLBEARMESSVENDBATTGOLDCOINCHESEGGSTRID"+ "VASEEMERPYRAPEARRUG SPICCHAISAY LOCKTHROFINDINVE" 09130 HANDY%(X%)=FNVOCAB%(CVT$$(MID(HANDY$,X%*4%-3%,4%),-1%),(X%+36%)/43%) FOR X%=1% TO LEN(HANDY$)/4% 09140 DUM%=FNPOOF% \ CLOSE 1%,2% \ GOTO 1110 10000 ! ! Now start ! ! DFLAG is set to 1 when he reaches hall of mists, to 2 when he meets ! a dwarf, to 3 when a knife is thrown, and to more than 3 if the ! dwarves are mad (increases accuracy). The pirate is dwarf #6. ! 10010 DUM%=FNMOTD%(0%) \ HINTED%(3%)=FNYES%(65%,1%,0%) \ NEWLOC%=1% \ SETUP%=3% \ LIMIT%=330% \ LIMIT%=1000% IF HINTED%(3%) 10020 GOTO 10030 IF NEWLOC%>8% OR NEWLOC%=0% OR NOT CLOSNG% \ DUM%=FNRSPEAK%(130%) \ NEWLOC%=LOC% \ CLOCK2%=15% IF NOT PANIC% \ PANIC%=-1% 10030 GOTO 10050 IF NEWLOC%=LOC% OR FNFORCED%(LOC%) OR FNBITSET%(LOC%,3%) \ FOR I%=1% TO 5% \ GOTO 10040 IF ODLOC%(I%)<>NEWLOC% OR NOT DSEEN%(I%) \ NEWLOC%=LOC% \ DUM%=FNRSPEAK%(2%) \ GOTO 10050 10040 NEXT I% 10050 LOC%=NEWLOC% \ GOTO 11000 IF LOC%=0% OR FNFORCED%(LOC%) OR FNBITSET%(NEWLOC%,3%) \ GOTO 10100 IF DFLAG% \ DFLAG%=1% IF LOC%>14% \ GOTO 11000 10100 GOTO 10120 IF DFLAG%<>1% \ GOTO 11000 IF LOC%<15% OR FNPCT%(95%) \ DFLAG%=2% \ FOR I%=1% TO 2% \ J%=1%+5%*RND \ DLOC%(J%)=0% IF FNPCT%(50%) AND SAVED%=-1% \ NEXT I% 10110 FOR I%=1% TO 5% \ DLOC%(I%)=DALTLC% IF DLOC%(I%)=LOC% \ ODLOC%(I%)=DLOC%(I%) \ NEXT I% \ DUM%=FNRSPEAK%(3%) + FNDROP%(AXE%,LOC%) \ GOTO 11000 10120 DTOTAL%, ATTACK%, STICK%=0% \ FOR I%=1% TO 6% \ GOTO 10220 IF DLOC%(I%)=0% \ J%=1% \ KK%=KEYW%(DLOC%(I%)) \ GOTO 10150 IF KK%=0% 10130 NEWLOC%=FNMOD%(ABS(TRAVEL(KK%))/1000%,1000%) \ GOTO 10140 IF NEWLOC%>300% OR NEWLOC%<15% OR NEWLOC%=ODLOC%(I%) OR J%>1% AND NEWLOC%=TK(J%-1%) OR J%>19% OR NEWLOC%= DLOC%(I%) OR ABS(TRAVEL(KK%))/1000000=100 \ GOTO 10140 IF FNFORCED%(NEWLOC%) OR FNBITSET%(NEWLOC%,3%) AND I%=6% \ TK(J%)=NEWLOC% \ J%=J%+1% 10140 KK%=KK%+1% \ GOTO 10130 IF TRAVEL(KK%-1%)>=0% 10150 TK(J%)=ODLOC%(I%) \ J%=J%-1% IF J%>1% \ J%=1%+J%*RND \ ODLOC%(I%)=DLOC%(I%) \ DLOC%(I%)=TK(J%) \ DSEEN%(I%)=DSEEN%(I%) AND LOC%>14% OR (DLOC%(I%)=LOC% OR ODLOC%(I%)=LOC%) \ GOTO 10220 IF NOT DSEEN%(I%) \ DLOC%(I%)=LOC% \ GOTO 10210 IF I%<>6% \ GOTO 10220 IF LOC%=CHLOC% OR PROP%(CHEST%)>=0% \ K%=0% \ FOR J%=50% TO MAXTRS% \ GOTO 10160 IF J%=PYRAM% AND (LOC%=PLAC%(PYRAM%) OR LOC%=PLAC%(EMRALD%)) \ GOTO 10170 IF FNTOTING%(J%) 10160 K%=1% IF FNHERE%(J%) \ NEXT J% \ GOTO 10200 IF TALLY%=TALLY2%+1% AND PLACE%(CHEST%)=0% AND K%=0% AND FNHERE%(LAMP%) AND PROP%(LAMP%)=1% \ DUM%=FNRSPEAK%(127%) IF ODLOC%(6%)<>DLOC%(6%) AND FNPCT%(20%) \ GOTO 10220 10170 DUM%=FNRSPEAK%(128%) \ DUM%=FNMOVE%(CHEST%,CHLOC%) IF PLACE%(MESSAG%)=0% \ DUM%=FNMOVE%(MESSAG%,CHLOC2%) \ FOR J%=50% TO MAXTRS% \ GOTO 10180 IF J%=PYRAM% AND (LOC%=PLAC%(PYRAM%) OR LOC%=PLAC%(EMRALD%)) \ DUM%=FNCARRY%(J%,LOC%) IF FNAT%(J%) AND FIXED%(J%)=0% \ DUM%=FNDROP%(J%,CHLOC%) IF FNTOTING%(J%) 10180 NEXT J% 10190 DLOC%(6%), ODLOC%(6%)=CHLOC% \ DSEEN%(6%)=0% \ GOTO 10220 10200 DUM%=FNRSPEAK%(186%)+FNMOVE%(CHEST%,CHLOC%)+ FNMOVE%(MESSAG%,CHLOC2%) \ GOTO 10190 10210 DTOTAL%=DTOTAL%+1% \ GOTO 10220 IF ODLOC%(I%)<>DLOC%(I%) \ ATTACK%=ATTACK%+1% \ KNFLOC%=LOC% IF KNFLOC%>=0% \ STICK%=STICK%+1% IF 1000%*RND<95%*(DFLAG%-2%) 10220 NEXT I% 10500 ! Dwarves have moved; tell about it 10510 GOTO 11000 IF DTOTAL%=0% \ IF DTOTAL%=1% THEN DUM%=FNRSPEAK%(4%) ELSE PRINT "There are";DTOTAL%;"threatening little dwarves in "; "the room with you." 10520 GOTO 11000 IF ATTACK%=0% \ DFLAG%=3% IF DFLAG%=2% \ DFLAG%=20% IF SAVED%<>-1% \ K%=52% \ IF ATTACK%=1% THEN DUM%=FNRSPEAK%(5%) ELSE PRINT ATTACK%;"of them throw knives at you!" \ K%=6% 10530 IF STICK%>1% THEN PRINT STICK%;"of them get you!" ELSE DUM%=FNRSPEAK%(K%+STICK%) \ GOTO 11000 IF STICK%=0% 10540 OLDLC2%=LOC% \ GOTO 14020 11000 DUM%=FNCHAIN%(11000%) 14020 DUM%=FNCHAIN%(14020%) 19000 ! ! Chain entries ! 19020 DUM%=FNVARSET% \ GOTO 10020 19100 ! Magic mode 19110 DUM%=FNVARSET% + FNMAINT% + FNCHAIN%(11000%) 20000 ! ! Functions ! ! I/O functions (SPEAK, GETIN, YES) 20100 ! Speak -- print message 20110 DEF FNSPEAK%(SUBSC%,LNGTH%) \ IF SUBSC%>0% THEN IF LEFT(LINES$(SUBSC%-LNGTH%+1%),3%)<>">$<" THEN PRINT IF BLKLIN% \ PRINT LINES$(F0%); FOR F0%=SUBSC%-LNGTH%+1% TO SUBSC% 20120 FNEND 20300 ! Rspeak -- random messages 20310 DEF FNRSPEAK%(I%) \ FDUM%=FNSPEAK%(RTEXT%(I%),RTEXT%(I%)+(RTEXT%(I%-1%)*(I%>1%)+ PTEXT%(PTEXT%(0%)*7%)*(I%=1%))) IF I%>0% \ FNEND 20400 ! Mspeak -- magic messages 20410 DEF FNMSPEAK%(I%) \ FDUM%=FNSPEAK%(MTEXT%(I%),MTEXT%(I%)+(MTEXT%(I%-1%)*(I%>1%)+ CTEXT%(CTEXT%(0%))*(I%=1%))) IF I%>0% \ FNEND 20500 ! Getin -- input word(s) 20510 DEF FNGETIN% \ INPUT #3%, IN$ \ IN$=CVT$$(IN$,252%) \ SPAC%=INSTR(1%,IN$+" "," ") \ WD1$=LEFT(IN$,SPAC%-1%) \ WD2$=RIGHT(IN$,SPAC%+1%) \ FNEND 20600 ! Yes -- Random question 20610 DEF FNYES%(X%,Y%,Z%) \ FDUM%=FNRSPEAK%(X%) \ ANSWER%=FNYESX% \ FDUM%=FNRSPEAK%(Y%) IF ANSWER% \ FDUM%=FNRSPEAK%(Z%) IF NOT ANSWER% \ FNYES%=ANSWER% \ FNEND 20700 ! Yesm -- Magic question 20710 DEF FNYESM%(X%,Y%,Z%) \ FDUM%=FNMSPEAK%(X%) \ ANSWER%=FNYESX% \ FDUM%=FNMSPEAK%(Y%) IF ANSWER% \ FDUM%=FNMSPEAK%(Z%) IF NOT ANSWER% \ FNYESM%=ANSWER% \ FNEND 20800 ! Yesx -- print and input for questions 20810 DEF FNYESX% 20820 FDUM%=FNGETIN% \ IF LEFT(WD1$,1%)="Y" THEN FNYESX%=-1% ELSE IF LEFT(WD1$,1%)="N" THEN FNYESX%=0% ELSE PRINT "Please answer the question." \ GOTO 20820 20830 FNEND 21000 ! ! Data structure functions (VOCAB, DSTROY, JUGGLE, MOVE, ! PUT, CARRY, DROP) 21100 ! Vocab -- look up value for word (return -1 if not found) 21110 DEF FNVOCAB%(ID$,INIT%) \ LNGTH%=LEN(ID$) \ FOR I%=1% TO KTAB%(0%) \ IF INIT%<0% OR KTAB%(I%)/1000%=INIT% THEN IF LEFT(ATAB$(I%),LNGTH%)=ID$ THEN FNVOCAB%=KTAB%(I%)+INIT%*1000%*(INIT%>=0%) \ GOTO 21140 21130 NEXT I% \ IF INIT%>=0% THEN FDUM%=FNBUG%(5%) ELSE FNVOCAB%=-1% 21140 FNEND 21400 ! Move -- Pick up and drop object 21410 DEF FNMOVE%(OBJECT%,WHERE%) \ IF OBJECT%>100% THEN FROM%=FIXED%(OBJECT%-100%) ELSE FROM%=PLACE%(OBJECT%) 21420 FDUM%=FNCARRY%(OBJECT%,FROM%) IF FROM%>0% AND FROM%<301% \ FDUM%=FNDROP%(OBJECT%,WHERE%) \ FNEND 21600 ! Carry -- start toting object 21610 DEF FNCARRY%(OBJECT%,WHERE%) \ IF OBJECT%<101% THEN GOTO 21660 IF PLACE%(OBJECT%)=-1% \ PLACE%(OBJECT%)=-1% \ HOLDNG%=HOLDNG%+1% 21620 IF ATLOC%(WHERE%)=OBJECT% THEN ATLOC%(WHERE%)=LINK%(OBJECT%) \ GOTO 21660 21630 TEMP%=ATLOC%(WHERE%) 21640 IF LINK%(TEMP%)<>OBJECT% THEN TEMP%=LINK%(TEMP%) \ GOTO 21640 21650 LINK%(TEMP%)=LINK%(OBJECT%) 21660 FNEND 21700 ! Drop -- Place object at location 21710 DEF FNDROP%(OBJECT%,WHERE%) \ IF OBJECT%>100% THEN FIXED%(OBJECT%-100%)=WHERE% ELSE HOLDNG%=HOLDNG%-1% IF PLACE%(OBJECT%)=-1% \ PLACE%(OBJECT%)=WHERE% 21720 IF WHERE%>0% THEN LINK%(OBJECT%)=ATLOC%(WHERE%) \ ATLOC%(WHERE%)=OBJECT% 21730 FNEND 22000 ! ! Wizardry functions (START, MAINT, WIZARD, HOURS, NEWHRS, MOTD, POOF) 22100 ! Start -- Check for prime time or suspended game 22110 DEF FNSTART% \ TIM%=FNDATIME% \ PRIMTM=WKDAY(0%) \ PRIMTM=WKEND(0%) IF FNWEEK.END% \ PRIMTM=HOLID(0%) IF DAY%>=HBEGIN%(0%) AND DAY%<=HEND%(0%) \ PTIME%=NOT FNSHIFT%(PRIMTM,TIM%/60%) \ SOON%=0% 22120 IF OTHER%(26%)<0% THEN DELAY=(DAY%-OTHER%(14%))*1440%+(TIM%-OTHER%(20%)) \ IF DELAY=HBEGIN%(0%) AND DAY%<=HEND%(0%) THEN & PRINT & \PRINT "Today is a hoilday, namely ";HNAME$(0%) & \PRINT & 22182 FNSTART%=START% & \FNEND & 22200 ! Maint -- Change various things if wizard 22210 DEF FNMAINT% \ GOTO 22240 IF NOT FNWIZARD% \ BLKLIN%=0% \ FDUM%=FNHOURS% IF FNYESM%(10%,0%,0%) \ FDUM%=FNNEWHRS% IF FNYESM%(11%,0%,0%) \ IF FNYESM%(26%,0%,0%) THEN FDUM%=FNMSPEAK%(27%) \ INPUT #3%, HBEGIN%(0%) \ FDUM%=FNMSPEAK%(28%) \ INPUT #3%, HEND%(0%) \ TIM%=FNDATIME% \ HBEGIN%(0%)=HBEGIN%(0%)+DAY% \ HEND%(0%)=HBEGIN%(0%)+HEND%(0%)-1% \ FDUM%=FNMSPEAK%(29%) \ INPUT #3%, HNAME$(0%) 22220 PRINT "Length of short game (null to leave at "; NUM1$(SHORT%(0%));")? "; \ INPUT #3%, X% \ SHORT%(0%)=X% IF X%>0% \ FDUM%=FNMSPEAK%(12%) \ FDUM%=FNGETIN% \ MAGIC$(0%)=WD1$ IF WD1$<>"" \ FDUM%=FNMSPEAK%(13%) \ INPUT #3%, X% \ MAGNM%(0%)=X% IF X%>0% 22230 PRINT "Latency for restart (null to leave at "; NUM1$(LATNCY%(0%));")? "; \ INPUT #3%, X% \ FDUM%=FNMSPEAK%(30%) IF X%>0% AND X%<45% \ X%=45% IF X%>0% AND X%<45% \ LATNCY%(0%)=X% IF X%>0% \ FDUM%=FNMOTD%(-1%) IF FNYESM%(14%,0%,0%) \ OTHER%(14%)=0% \ OTHER%(26%)=2% \ KILL "ADVENT.ADV" \ GOTO 32700 22240 FNEND 22300 ! Wizard -- Verify if he's a wizard 22310 DEF FNWIZARD% \ WIZARD%=FNYESM%(16%,0%,7%) \ GOTO 22340 IF NOT WIZARD% \ FDUM%=FNMSPEAK%(17%) + FNGETIN% \ GOTO 22330 IF WD1$<>MAGIC$(0%) 22320 FDUM%=FNMSPEAK%(18%) + FNGETIN% \ MGCNV$="" \ MGCNV$=CHR$(ASCII(RIGHT(MAGIC$(0%),LEN(MAGIC$(0%))-F0%))- FNMOD%(MAGNM%(0%)/10^F0%,10%))+MGCNV$ FOR F0%=0% TO LEN(MAGIC$(0%))-1% \ IF MGCNV$=WD1$ THEN FDUM%=FNMSPEAK%(19%) \ GOTO 22340 22330 FDUM%=FNMSPEAK%(20%) \ WIZARD%=0% 22340 FNWIZARD%=WIZARD% \ FNEND 22400 ! Hours -- Print hours the cave is open and next holiday 22410 DEF FNHOURS% \ FDUM%=FNHOURSX%(WKDAY(0%),"MON - FRI:")+ FNHOURSX%(WKEND(0%),"SAT - SUN:")+ FNHOURSX%(HOLID(0%),"Holidays:") + FNDATIME% \ GOTO 22420 IF HEND%(0%)1%));", namely ";HNAME$(0%) 22420 FNEND 22500 ! Hoursx -- used by hours 22510 DEF FNHOURSX%(H,DAY$) \ FIRST%=-1% \ FROM%=0% \ IF H=0% THEN PRINT " ";DAY$;" Open all day" \ GOTO 22550 22520 FROM%=FROM%+1% UNTIL FNSHIFT%(H,FROM%) \ GOTO 22530 IF FROM%>23% AND FIRST% \ GOTO 22550 IF FROM%>23% \ TILL%=FROM% \ TILL%=TILL%+1% UNTIL NOT FNSHIFT%(H,TILL%) OR TILL%>23% \ PRINT USING " \ \ ##:00 TO ##:00", DAY$,FROM%,TILL% IF FIRST% \ PRINT USING " ##:00 TO ##:00", FROM%,TILL% IF NOT FIRST% \ FIRST%=0% \ FROM%=TILL% \ GOTO 22550 IF TILL%>23% \ GOTO 22520 22530 PRINT " ";DAY$;" Closed all day" 22550 FNEND 22600 ! Newhrs -- Change cave hours 22610 DEF FNNEWHRS% \ FDUM%=FNMSPEAK%(21%) \ WKDAY(0%)=FNNEWHRX("Weekdays:") \ WKEND(0%)=FNNEWHRX("Weekends:") \ HOLID(0%)=FNNEWHRX("Holidays:") \ FDUM%=FNMSPEAK%(22%) + FNHOURS% \ FNEND 22700 ! Newhrx -- used by newhrs 22710 DEF FNNEWHRX(DAY$) \ NEWHRX=0% \ PRINT "Prime time on ";DAY$ \ INPUT #3%, "From: ";FROM% \ GOTO 22720 IF FROM%<0% OR FROM%>23% \ INPUT #3%, "Till: ";TILL% \ IF TILL%>0% AND TILL%<25% THEN NEWHRX=NEWHRX+2^I% FOR I%=FROM% TO TILL%-1% 22720 FNNEWHRX=NEWHRX \ FNEND 22800 ! Motd -- Message of the day 22810 DEF FNMOTD%(ALTER%) \ MOTD$="" \ IF ALTER% THEN FDUM%=FNMSPEAK%(23%) ELSE FDUM%=FNSPEAK%(MTEXT%(MTEXT%(0%))+MSG%(1%),MSG%(1%)) \ GOTO 22830 22820 INPUT LINE #3%, LIN$ \ MOTD$=MOTD$+LIN$ \ GOTO 22820 IF LEN(LIN$)>2% \ F0%=(LEN(MOTD$)+15%)/16% \ LINES$(F1%+MTEXT%(MTEXT%(0%)))=MID(MOTD$,F1%*16%-15%,16%) FOR F1%=1% TO F0% \ MSG%(1%)=F0% 22830 FNEND 22900 ! Poof -- start up for database initialization 22910 DEF FNPOOF% \ WKDAY(0%)=32512 \ WKEND(0%), HOLID(0%), HBEGIN%(0%), MSG%(1%)=0% \ HEND%(0%)=-1% \ SHORT%(0%)=30% \ MAGIC$(0%)="DWARF" \ MAGNM%(0%)=11111% \ LATNCY%(0%)=90% \ MSG%(0%)=LINUSE%+1% \ FNEND 23000 ! ! Utility functions (SHIFT, DATIME, CIAO, BUG) 23100 ! Shift -- check if bit is set (for hours) 23110 DEF FNSHIFT%(VALUE,BIT%) \ FDUM=INT(VALUE/2^BIT%) \ FNSHIFT%=-1-INT(VALUE/2^(BIT%+1%))*2%+FDUM \ FNEND 23200 ! Datime -- get date and time 23210 DEF FNDATIME% \ D0$=DATE$(0%) \ MON%=INSTR(1%," JanFebMarAprMayJunJulAugSepOctNovDec", MID(D0$,4%,3%))/3% \ YEAR%=VAL(RIGHT(D0$,8%))-77% \ DAY%=-(YEAR%=(YEAR%+1%)/4%*4%-1% AND MON%>2%) \ DAY%=DAY%+HATH%(I%) FOR I%=1% TO MON%-1% \ DAY%=DAY%+VAL(LEFT(D0$,2%)) \ DAY%=DAY%+YEAR%*365%+YEAR%/4% 23220 FNDATIME%=TIME(0%)/60% \ FNEND 23230 ! FNWEEK.END%=-1% IF IT IS SATURDAY OR SUNDAY & DEF FNWEEK.END% & \WEEK.1%=SWAP%(CVT$%(RIGHT(SYS(CHR$(6%)+CHR$(-3%)),27%))) & \WEEK.2%=WEEK.1%/1000% & \WEEK.3%=WEEK.1%-WEEK.2%*1000% & \WEEK.3%=(WEEK.2%-7%)/4%+(365%*(WEEK.2%-8%))+WEEK.3% & \WEEK.3%=WEEK.3%-(WEEK.3%/7%*7%) & \FNWEEK.END%=(WEEK.3%<2%) & \FNEND & 23300 ! Ciao -- get out 23310 DEF FNCIAO% \ DUM%=FNSETVAR% \ GOTO 32700 \ FNEND 23400 ! Bug -- fatal errors ! 3 Too many travel options ! 4 Too many vocabulary words ! 5 Can't find required vocabulary word ! 6 Too many RTEXT or MTEXT messages ! 7 Too many hints ! 8 Location has COND bit being set twice ! 9 Invalid section number in database ! 10 Who knows 23410 DEF FNBUG%(NUMB%) \ PRINT "Fatal error";NUMB%; \ PRINT "(";NUM1$(ERR);",";NUM1$(ERL);")"; IF NUMB%=10% \ PRINT \ KILL LDN$+"ADVENT.DAT" IF NUMB%<10% \ GOTO 32700 \ FNEND 24000 ! ! Other functions (TOTING, HERE, AT, LIQ2, LIQ, LIQLOC, ! BITSET, FORCED, DARK, PCT) 24100 ! Toting -- True if object is being carried 24110 DEF FNTOTING%(OBJ%)=PLACE%(OBJ%)=-1% 24200 ! Here -- Ture if object is at same location 24210 DEF FNHERE%(OBJ%)=PLACE%(OBJ%)=LOC% OR FNTOTING%(OBJ%) 24300 ! At -- True if on either side of two-placed object 24310 DEF FNAT%(OBJ%)=PLACE%(OBJ%)=LOC% OR FIXED%(OBJ%)=LOC% 24600 ! Bitset -- True if COND bit is set 24610 DEF FNBITSET%(L%,N%)=(COND%(L%) AND 2%^N%)<>0% 24700 ! Forced -- True if location moves without input 24710 DEF FNFORCED%(LOC%)=COND%(LOC%)=2% 24800 ! Dark -- True if it's dark 24810 DEF FNDARK% \ FNDARK%=COND%(LOC%)-COND%(LOC%)/2%*2%=0% AND (PROP%(LAMP%)=0% OR NOT FNHERE%(LAMP%)) \ FNEND 24900 ! Pct -- True N% of the time 24910 DEF FNPCT%(N%)=100%*RND$< 32,You can't get by the snake. 33,You are in a large room, with a passage to the south, a passage to the 33,west, and a wall of broken rock to the east. There is a large "Y2" on 33,a rock in the room's center. 34,You are in a jumble of rock, with cracks everywhere. 35,You're at a low window overlooking a huge pit, which extends up out of 35,sight. A floor is indistinctly visible over 50 feet below. Traces of 35,white mist cover the floor of the pit, becoming thicker to the right. 35,Marks in the dust around the window would seem to indicate that 35,someone has been here recently. Directly across the pit from you and 35,25 feet away there is a similar window looking into a lighted room. A 35,shadowy figure can be seen there peering back at you. 36,You are in a dirty broken passage. To the east is a crawl. To the 36,west is a large passage. Above you is a hole to another passage. 37,You are on the brink of a small clean climbable pit. A crawl leads 37,west. 38,You are in the bottom of a small pit with a little stream, which 38,enters and exits through tiny slits. 39,You are in a large room full of dusty rocks. There is a big hole in 39,the floor. There are cracks everywhere, and a passage leading east. 40,You have crawled through a very low wide passage parallel to and north 40,of the hall of mists. 41,You are at the west end of hall of mists. A low wide crawl continues 41,west and another goes north. To the south is a little passage 6 feet 41,off the floor. 42,You are in a maze of twisty little passages, all alike. 43,You are in a maze of twisty little passages, all alike. 44,You are in a maze of twisty little passages, all alike. 45,You are in a maze of twisty little passages, all alike. 46,Dead end 47,Dead end 48,Dead end 49,You are in a maze of twisty little passages, all alike. 50,You are in a maze of twisty little passages, all alike. 51,You are in a maze of twisty little passages, all alike. 52,You are in a maze of twisty little passages, all alike. 53,You are in a maze of twisty little passages, all alike. 54,Dead end 55,You are in a maze of twisty little passages, all alike. 56,Dead end 57,You are on the brink of a thirty foot pit with a massive orange column 57,down one wall. You could climb down here but you could not get back 57,up. The maze continues at this level. 58,Dead end 59,You have crawled through a very low wide passage parallel to and north 59,of the hall of mists. 60,You are at the east end of a very long hall apparently without side 60,chambers. To the east a low wide crawl slants up. To the north a 60,round two foot hole slants down. 61,You are at the west end of a very long featureless hall. The hall 61,joins up with a narrow north/south passage. 62,You are at a crossover of a high N/S passage and a low E/W one. 63,Dead end 64,You are at a complex junction. A low hands and knees passage from the 64,north joins a higher crawl from the east to make a walking passage 64,going west. There is also a large room above. The air is damp here. 65,You are in bedquilt, a long east/west passage with holes everywhere. 65,To explore at random select north, south, up, or down. 66,You are in a room whose walls resemble swiss cheese. Obvious passages 66,go west, east, NE, and NW. Part of the room is occupied by a large 66,bedrock block. 67,You are at the east end of the twopit room. The floor here is 67,littered with thin rock slabs, which make it easy to descend the pits. 67,There is a path here bypassing the pits to connect passages from east 67,and west. There are holes all over, but the only big one is on the 67,wall directly over the west pit where you can't get to it. 68,You are in a large low circular chamber whose floor is an immense slab 68,fallen from the ceiling (slab room). East and west there once were 68,large passages, but they are now filled with boulders. Low small 68,passages go north and south, and the south one quickly bends west 68,around the boulders. 69,You are in a secret N/S canyon above a large room. 70,You are in a secret N/S canyon above a sizable passage. 71,You are in a secret canyon at a junction of three canyons, bearing 71,north, south, and SE. The north one is as tall as the other two 71,combined. 72,You are in a large low room. Crawls lead north, SE, and SW. 73,Dead end crawl. 74,You are in a secret canyon which here runs E/W. It crosses over a 74,very tight canyon 15 feet below. If you go down you may not be able 74,to get back up. 75,You are at a wide place in a very tight N/S canyon. 76,The canyon here becomes too tight to go further south. 77,You are in a tall E/W canyon. A low tight crawl goes 3 feet north and 77,seems to open up. 78,The canyon runs into a mass of boulders -- dead end. 79,The stream flows out through a pair of 1 foot diameter sewer pipes. 79,It would be advisable to use the exit. 80,You are in a maze of twisty little passages, all alike. 81,Dead end 82,Dead end 83,You are in a maze of twisty little passages, all alike. 84,You are in a maze of twisty little passages, all alike. 85,Dead end 86,Dead end 87,You are in a maze of twisty little passages, all alike. 88,You are in a long, narrow corridor stretching out of sight to the 88,west. At the eastern end is a hole through which you can see a 88,profusion of leaves. 89,There is nothing here to climb. Use "UP" or "OUT" to leave the pit. 90,You have climbed up the plant and out of the pit. 91,You are at the top of a steep incline above a large room. You could 91,climb down here, but you would not be able to climb up. There is a 91,passage leading back to the north. 92,You are in the giant room. The ceiling here is too high up for your 92,lamp to show it. Cavernous passages lead east, north, and south. On 92,the west wall is scrawled the inscription, "FEE FIE FOE FOO" [Sic]. 93,The passage here is blocked by a recent cave-in. 94,You are at one end of an immense north/south passage. 95,You are in a magnificent cavern with a rushing stream, which cascades 95,over a sparkling waterfall into a roaring whirlpool which disappears 95,through a hole in the floor. Passages exit to the south and west. 96,You are in the soft room. The walls are covered with heavy curtains, 96,the floor with a thick pile carpet. Moss covers the ceiling. 97,This is the oriental room. Ancient oriental cave drawings cover the 97,walls. A gently sloping passage leads upward to the north, another 97,passage leads SE, and a hands and knees crawl leads west. 98,You are following a wide path around the outer edge of a large cavern. 98,Far below, through a heavy white mist, strange splashing noises can be 98,heard. The mist rises up through a fissure in the ceiling. The path 98,exits to the south and west. 99,You are in an alcove. A small NW path seems to widen after a short 99,distance. An extremely tight tunnel leads east. It looks like a very 99,tight squeeze. An eerie light can be seen at the other end. 100,You're in a small chamber lit by an eerie green light. An extremely 100,narrow tunnel exits to the west. A dark corridor leads NE. 101,You're in the dark-room. A corridor leading south is the only exit. 102,You are in an arched hall. A coral passage once continued up and east 102,from here, but is now blocked by debris. The air smells of sea water. 103,You're in a large room carved out of sedimentary rock. The floor and 103,walls are littered with bits of shells imbedded in the stone. A 103,shallow passage proceeds downward, and a somewhat steeper one leads 103,up. A low hands and knees passage enters from the south. 104,You are in a long sloping corridor with ragged sharp walls. 105,You are in a cul-de-sac about eight feet across. 106,You are in an anteroom leading to a large passage to the east. Small 106,passages go west and up. The remnants of recent digging are evident. 106,A sign in midair here says "Cave under construction beyond this point. 106,Proceed at own risk. [Witt Construction Company]" 107,You are in a maze of twisty little passages, all different. 108,You are at witt's end. Passages lead off in ALL directions. 109,You are in a north/south canyon about 25 feet across. The floor is 109,covered by white mist seeping in from the north. The walls extend 109,upward for well over 100 feet. Suspended from some unseen point far 109,above you, an enormous two-sided mirror is hanging parallel to and 109,midway between the canyon walls. (The mirror is obviously provided 109,for the use of the dwarves, who as you know, are extremely vain.) A 109,small window can be seen in either wall, some fifty feet up. 110,You're at a low window overlooking a huge pit, which extends up out of 110,sight. A floor is indistinctly visible over 50 feet below. Traces of 110,white mist cover the floor of the pit, becoming thicker to the left. 110,Marks in the dust around the window would seem to indicate that 110,someone has been here recently. Directly across the pit from you and 110,25 feet away there is a similar window looking into a lighted room. A 110,shadowy figure can be seen there peering back at you. 111,A large stalactite extends from the roof and almost reaches the floor 111,below. You could climb down it, and jump from it to the floor, but 111,having done so you would be unable to reach it to climb back up. 112,You are in a little maze of twisting passages, all different. 113,You are at the edge of a large underground reservoir. An opaque cloud 113,of white mist fills the room and rises rapidly upward. The lake is 113,fed by a stream, which tumbles out of a hole in the wall about 10 feet 113,overhead and splashes noisily into the water somewhere within the 113,mist. The only passage goes back to the south. 114,Dead end 115,You are at the northeast end of an immense room, even larger than the 115,giant room. It appears to be a repository for the "adventure" 115,program. Massive torches far overhead bathe the room with smoky 115,yellow light. Scattered about you can be seen a pile of bottles (all 115,of them empty), a nursery of young beanstalks murmuring quietly, a bed 115,of oysters, a bundle of black rods with rusty stars on their ends, and 115,a collection of brass lanterns. Off to one side a great many dwarves 115,are sleeping on the floor, snoring loudly. A sign nearby reads: "Do 115,not disturb the dwarves!" An immense mirror is hanging against one 115,wall, and stretches to the other end of the room, where various other 115,sundry objects can be glimpsed dimly in the distance. 116,You are at the southwest end of the repository. To one side is a pit 116,full of fierce green snakes. On the other side is a row of small 116,wicker cages, each of which contains a little sulking bird. In one 116,corner is a bundle of black rods with rusty marks on their ends. A 116,large number of velvet pillows are scattered about on the floor. A 116,vast mirror stretches off to the northeast. At your feet is a large 116,steel grate, next to which is a sign which reads, "Treasure vault. 116,Keys in main office." 117,You are on one side of a large, deep chasm. A heavy white mist rising 117,up from below obscures all view of the far side. A SW path leads away 117,from the chasm into a winding corridor. 118,You are in a long winding corridor sloping out of sight in both 118,directions. 119,You are in a secret canyon which exits to the north and east. 120,You are in a secret canyon which exits to the north and east. 121,You are in a secret canyon which exits to the north and east. 122,You are on the far side of the chasm. A NE path leads away from the 122,chasm on this side. 123,You're in a long east/west corridor. A faint rumbling noise can be 123,heard in the distance. 124,The path forks here. The left fork leads northeast. A dull rumbling 124,seems to get louder in that direction. The right fork leads southeast 124,down a gentle slope. The main corridor enters from the west. 125,The walls are quite warm here. From the north can be heard a steady 125,roar, so loud that the entire cave seems to be trembling. Another 125,passage leads south, and a low crawl goes east. 126,You are on the edge of a breath-taking view. Far below you is an 126,active volcano, from which great gouts of molten lava come surging 126,out, cascading back down into the depths. The glowing rock fills the 126,farthest reaches of the cavern with a blood-red glare, giving every- 126,thing an eerie, macabre appearance. The air is filled with flickering 126,sparks of ash and a heavy smell of brimstone. The walls are hot to 126,the touch, and the thundering of the volcano drowns out all other 126,sounds. Embedded in the jagged roof far overhead are myriad twisted 126,formations composed of pure white alabaster, which scatter the murky 126,light into sinister apparitions upon the walls. To one side is a deep 126,gorge, filled with a bizarre chaos of tortured rock which seems to 126,have been crafted by the devil himself. An immense river of fire 126,crashes out from the depths of the volcano, burns its way through the 126,gorge, and plummets into a bottomless pit far off to your left. To 126,the right, an immense geyser of blistering steam erupts continuously 126,from a barren island in the center of a sulfurous lake, which bubbles 126,ominously. The far right wall is aflame with an incandescence of its 126,own, which lends an additional infernal splendor to the already 126,hellish scene. A dark, foreboding passage exits to the south. 127,You are in a small chamber filled with large boulders. The walls are 127,vary warm, causing the air in the room to be almost stifling from the 127,heat. The only exit is a crawl heading west, through which is coming 127,a low rumbling. 128,You are walking along a gently sloping north/south passage lined with 128,oddly shaped limestone formations. 129,You are standing at the entrance to a large, barren room. A sign 129,posted above the entrance reads: "Caution! Bear in room!" 130,You are inside a barren room. The center of the room is completely 130,empty except for some dust. Marks in the dust lead away toward the 130,far end of the room. The only exit is the way you came in. 131,You are in a maze of twisting little passages, all different. 132,You are in a little maze of twisty passages, all different. 133,You are in a twisting maze of little passages, all different. 134,You are in a twisting little maze of passages, all different. 135,You are in a twisty little maze of passages, all different. 136,You are in a twisty maze of little passages, all different. 137,You are in a little twisty maze of passages, all different. 138,You are in a maze of little twisting passages, all different. 139,You are in a maze of little twisty passages, all different. 140,Dead end -1,End 2 1,You're at end of road again. 2,You're at hill in road. 3,You're inside building. 4,You're in valley. 5,You're in forest. 6,You're in forest. 7,You're at slit in streambed. 8,You're outside grate. 9,You're below the grate. 10,You're in cobble crawl. 11,You're in debris room. 13,You're in bird chamber. 14,You're at top of small pit. 15,You're in hall of mists. 17,You're on east bank of fissure. 18,You're in nugget of gold room. 19,You're in hall of Mt king. 23,You're at west end of twopit room. 24,You're in east pit. 25,You're in west pit. 33,You're at "Y2". 35,You're at window on pit. 36,You're in dirty passage. 39,You're in dusty rock room. 41,You're at west end of hall of mists. 57,You're at brink of pit. 60,You're at east end of long hall. 61,You're at west end of long hall. 64,You're at complex junction. 66,You're in swiss cheese room. 67,You're at east end of twopit room. 68,You're in slab room. 71,You're at junction of three secret canyons. 74,You're in secret E/W canyon above tight canyon. 88,You're in narrow corridor. 91,You're at steep incline above large room. 92,You're in giant room. 95,You're in cavern with waterfall. 96,You're in soft room. 97,You're in oriental room. 98,You're in misty cavern. 99,You're in alcove. 100,You're in plover room. 101,You're in dark-room. 102,You're in arched hall. 103,You're in shell room. 106,You're in anteroom. 108,You're at witt's end. 109,You're in mirror canyon. 110,You're at window on pit. 111,You're at top of stalactite. 113,You're at reservoir. 115,You're at NE end. 116,You're at SW end. 117,You're on SW side of chasm. 118,You're in sloping corridor. 122,You're on NE side of chasm. 123,You're in corridor. 124,You're at fork in path. 125,You're at junction with warm walls. 126,You're as breath-taking view. 127,You're in chamber of boulders. 128,You're in limestone passage. 129,You're in front of barren room. 130,You're in barren room. -1,End 3 1,2,2,44,29 1,3,3,12,19,43 1,4,5,13,14,46,30 1,5,6,45,43 1,8,63 2,1,2,12,7,43,45,30 2,5,6,45,46 3,1,3,11,32,44 3,11,62 3,33,65 3,79,5,14 4,1,4,12,45 4,5,6,43,44,29 4,7,5,46,30 4,8,63 5,4,9,43,30 5,50005,6,7,45 5,6,6 5,5,44,46 6,1,2,45 6,4,9,43,44,30 6,5,6,46 7,1,12 7,4,4,45 7,5,6,43,44 7,8,5,15,16,46 7,595,60,14,30 8,5,6,43,44,46 8,1,12 8,7,4,13,45 8,303009,3,19,30 8,593,3 9,303008,11,29 9,593,11 9,10,17,18,19,44 9,14,31 9,11,51 10,9,11,20,21,43 10,11,19,22,44,51 10,14,31 11,303008,63 11,9,64 11,10,17,18,23,24,43 11,12,25,19,29,44 11,3,62 11,14,31 12,303008,63 12,9,64 12,11,30,43,51 12,13,19,29,44 12,14,31 13,303008,63 13,9,64 13,11,51 13,12,25,43 13,14,23,31,44 14,303008,63 14,9,64 14,11,51 14,13,23,43 14,150020,30,31,34 14,15,30 14,16,33,44 15,18,36,46 15,17,7,38,44 15,19,10,30,45 15,150022,29,31,34,35,23,43 15,14,29 15,34,55 16,14,1 17,15,38,43 17,312596,39 17,412021,7 17,412597,41,42,44,69 17,27,41 18,15,38,11,45 19,15,10,29,43 19,311028,45,36 19,311029,46,37 19,311030,44,7 19,32,45 19,35074,49 19,211032,49 19,74,66 20,0,1 21,0,1 22,15,1 23,67,43,42 23,68,44,61 23,25,30,31 23,648,52 24,67,29,11 25,23,29,11 25,724031,56 25,26,56 26,88,1 27,312596,39 27,412021,7 27,412597,41,42,43,69 27,17,41 27,40,45 27,41,44 28,19,38,11,46 28,33,45,55 28,36,30,52 29,19,38,11,45 30,19,38,11,43 30,62,44,29 31,524089,1 31,90,1 32,19,1 33,3,65 33,28,46 33,34,43,53,54 33,35,44 33,159302,71 33,100,71 34,33,30,55 34,15,29 35,33,43,55 35,20,39 36,37,43,17 36,28,29,52 36,39,44 36,65,70 37,36,44,17 37,38,30,31,56 38,37,56,29,11 38,595,60,14,30,4,5 39,36,43,23 39,64,30,52,58 39,65,70 40,41,1 41,42,46,29,23,56 41,27,43 41,59,45 41,60,44,17 42,41,29 42,42,45 42,43,43 42,45,46 42,80,44 43,42,44 43,44,46 43,45,43 44,43,43 44,48,30 44,50,46 44,82,45 45,42,44 45,43,45 45,46,43 45,47,46 45,87,29,30 46,45,44,11 47,45,43,11 48,44,29,11 49,50,43 49,51,44 50,44,43 50,49,44 50,51,30 50,52,46 51,49,44 51,50,29 51,52,43 51,53,46 52,50,44 52,51,43 52,52,46 52,53,29 52,55,45 52,86,30 53,51,44 53,52,45 53,54,46 54,53,44,11 55,52,44 55,55,45 55,56,30 55,57,43 56,55,29,11 57,13,30,56 57,55,44 57,58,46 57,83,45 57,84,43 58,57,43,11 59,27,1 60,41,43,29,17 60,61,44 60,62,45,30,52 61,60,43 61,62,45 61,100107,46 62,60,44 62,63,45 62,30,43 62,61,46 63,62,46,11 64,39,29,56,59 64,65,44,70 64,103,45,74 64,106,43 65,64,43 65,66,44 65,80556,46 65,68,61 65,80556,29 65,50070,29 65,39,29 65,60556,45 65,75072,45 65,71,45 65,80556,30 65,106,30 66,65,47 66,67,44 66,80556,46 66,77,25 66,96,43 66,50556,50 66,97,72 67,66,43 67,23,44,42 67,24,30,31 68,23,46 68,69,29,56 68,65,45 69,68,30,61 69,331120,46 69,119,46 69,109,45 69,113,75 70,71,45 70,65,30,23 70,111,46 71,65,48 71,70,46 71,110,45 72,65,70 72,118,49 72,73,45 72,97,48,72 73,72,46,17,11 74,19,43 74,331120,44 74,121,44 74,75,30 75,76,46 75,77,45 76,75,45 77,75,43 77,78,44 77,66,45,17 78,77,46 79,3,1 80,42,45 80,80,44 80,80,46 80,81,43 81,80,44,11 82,44,46,11 83,57,46 83,84,43 83,85,44 84,57,45 84,83,44 84,114,50 85,83,43,11 86,52,29,11 87,45,29,30 88,25,30,56,43 88,20,39 88,92,44,27 89,25,1 90,23,1 91,95,45,73,23 91,72,30,56 92,88,46 92,93,43 92,94,45 93,92,46,27,11 94,92,46,27,23 94,309095,45,3,73 94,611,45 95,94,46,11 95,92,27 95,91,44 96,66,44,11 97,66,48 97,72,44,17 97,98,29,45,73 98,97,46,72 98,99,44 99,98,50,73 99,301,43,23 99,100,43 100,301,44,23,11 100,99,44 100,159302,71 100,33,71 100,101,47,22 101,100,46,71,11 102,103,30,74,11 103,102,29,38 103,104,30 103,114618,46 103,115619,46 103,64,46 104,103,29,74 104,105,30 105,104,29,11 105,103,74 106,64,29 106,65,44 106,108,43 107,131,46 107,132,49 107,133,47 107,134,48 107,135,29 107,136,50 107,137,43 107,138,44 107,139,45 107,61,30 108,95556,43,45,46,47,48,49,50,29,30 108,106,43 108,626,44 109,69,46 109,113,45,75 110,71,44 110,20,39 111,70,45 111,40050,30,39,56 111,50053,30 111,45,30 112,131,49 112,132,45 112,133,43 112,134,50 112,135,48 112,136,47 112,137,44 112,138,30 112,139,29 112,140,46 113,109,46,11,109 114,84,48 115,116,49 116,115,47 116,593,30 117,118,49 117,233660,41,42,69,47 117,332661,41 117,303,41 117,332021,39 117,596,39 118,72,30 118,117,29 119,69,45,11 119,653,43,7 120,69,45 120,74,43 121,74,43,11 121,653,45,7 122,123,47 122,233660,41,42,69,49 122,303,41 122,596,39 122,124,77 122,126,28 122,129,40 123,122,44 123,124,43,77 123,126,28 123,129,40 124,123,44 124,125,47,36 124,128,48,37,30 124,126,28 124,129,40 125,124,46,77 125,126,45,28 125,127,43,17 126,125,46,23,11 126,124,77 126,610,30,39 127,125,44,11,17 127,124,77 127,126,28 128,124,45,29,77 128,129,46,30,40 128,126,28 129,128,44,29 129,124,77 129,130,43,19,40,3 129,126,28 130,129,44,11 130,124,77 130,126,28 131,107,44 131,132,48 131,133,50 131,134,49 131,135,47 131,136,29 131,137,30 131,138,45 131,139,46 131,112,43 132,107,50 132,131,29 132,133,45 132,134,46 132,135,44 132,136,49 132,137,47 132,138,43 132,139,30 132,112,48 133,107,29 133,131,30 133,132,44 133,134,47 133,135,49 133,136,43 133,137,45 133,138,50 133,139,48 133,112,46 134,107,47 134,131,45 134,132,50 134,133,48 134,135,43 134,136,30 134,137,46 134,138,29 134,139,44 134,112,49 135,107,45 135,131,48 135,132,30 135,133,46 135,134,43 135,136,44 135,137,49 135,138,47 135,139,50 135,112,29 136,107,43 136,131,44 136,132,29 136,133,49 136,134,30 136,135,46 136,137,50 136,138,48 136,139,47 136,112,45 137,107,48 137,131,47 137,132,46 137,133,30 137,134,29 137,135,50 137,136,45 137,138,49 137,139,43 137,112,44 138,107,30 138,131,43 138,132,47 138,133,29 138,134,44 138,135,45 138,136,46 138,137,48 138,139,49 138,112,50 139,107,49 139,131,50 139,132,43 139,133,44 139,134,45 139,135,30 139,136,48 139,137,29 139,138,46 139,112,47 140,112,45,11 -1 4 2,ROAD 2,HILL 3,ENTER 4,UPSTREAM 5,DOWNSTRE 6,FOREST 7,FORWARD 7,CONTINUE 7,ONWARD 8,BACK 8,RETURN 8,RETREAT 9,VALLEY 10,STAIRCAS 11,OUT 11,OUTSIDE 11,EXIT 11,LEAVE 12,BUILDING 12,HOUSE 13,GULLY 14,STREAM 15,ROCK 16,BED 17,CRAWL 18,COBBLES 19,INWARD 19,INSIDE 19,IN 20,SURFACE 21,NULL 21,NOWHERE 22,DARK 23,PASSAGE 23,TUNNEL 24,LOW 25,CANYON 26,AWKWARD 27,GIANT 28,VIEW 29,UPWARD 29,UP 29,U 29,ABOVE 29,ASCEND 30,D 30,DOWNWARD 30,DOWN 30,DESCEND 31,PIT 32,OUTDOORS 33,CRACK 34,STEPS 35,DOME 36,LEFT 37,RIGHT 38,HALL 39,JUMP 40,BARREN 41,OVER 42,ACROSS 43,EAST 43,E 44,WEST 44,W 45,NORTH 45,N 46,SOUTH 46,S 47,NORTHEAS 47,NE 48,SOUTHEAS 48,SE 49,SOUTHWES 49,SW 50,NORTHWES 50,NW 51,DEBRIS 52,HOLE 53,WALL 54,BROKEN 55,Y2 56,CLIMB 57,LOOK 57,EXAMINE 57,TOUCH 57,DESCRIBE 58,FLOOR 59,ROOM 60,SLIT 61,SLAB 62,XYZZY 63,DEPRESSI 64,ENTRANCE 65,PLUGH 66,SECRET 67,CAVE 69,CROSS 70,BEDQUILT 71,PLOVER 72,ORIENTAL 73,CAVERN 74,SHELL 75,RESERVOI 76,MAIN 76,OFFICE 77,FORK 1001,KEYS 1001,KEY 1002,LAMP 1002,HEADLAMP 1002,LANTERN 1003,GRATE 1004,CAGE 1005,ROD 1006,ROD 1007,STEPS 1008,BIRD 1009,DOOR 1010,PILLOW 1010,VELVET 1011,SNAKE 1012,FISSURE 1013,TABLET 1014,CLAM 1015,OYSTER 1016,MAGAZINE 1016,ISSUE 1016,SPELUNKE 1016,'"SPELUNK' 1017,DWARF 1017,DWARVES 1018,KNIFE 1018,KNIVES 1019,FOOD 1019,RATIONS 1020,BOTTLE 1020,JAR 1021,WATER 1021,H2O 1022,OIL 1023,MIRROR 1024,PLANT 1024,BEANSTAL 1025,PLANT 1026,STALACTI 1027,SHADOWY 1027,FIGURE 1028,AXE 1029,DRAWING 1030,PIRATE 1031,DRAGON 1032,CHASM 1033,TROLL 1034,TROLL 1035,BEAR 1036,MESSAGE 1037,VOLCANO 1037,GEYSER 1038,MACHINE 1038,VENDING 1039,BATTERIE 1040,CARPET 1040,MOSS 1050,GOLD 1050,NUGGET 1051,DIAMONDS 1052,SILVER 1052,BARS 1053,JEWELRY 1054,COINS 1055,CHEST 1055,BOX 1055,TREASURE 1056,EGGS 1056,EGG 1056,NEST 1057,TRIDENT 1058,VASE 1058,MING 1058,SHARD 1058,POTTERY 1059,EMERALD 1060,PLATINUM 1060,PYRAMID 1061,PEARL 1062,RUG 1062,PERSIAN 1063,SPICES 1064,CHAIN 2001,CARRY 2001,TAKE 2001,KEEP 2001,CATCH 2001,STEAL 2001,CAPTURE 2001,GET 2001,TOTE 2002,DROP 2002,RELEASE 2002,FREE 2002,DISCARD 2002,DUMP 2003,SAY 2003,CHANT 2003,SING 2003,UTTER 2003,MUMBLE 2004,UNLOCK 2004,OPEN 2005,NOTHING 2006,LOCK 2006,CLOSE 2007,LIGHT 2007,ON 2008,EXTINGUI 2008,OFF 2009,WAVE 2009,SHAKE 2009,SWING 2010,CALM 2010,PLACATE 2010,TAME 2011,WALK 2011,RUN 2011,TRAVEL 2011,GO 2011,PROCEED 2011,CONTINUE 2011,EXPLORE 2011,GOTO 2011,FOLLOW 2011,TURN 2012,ATTACK 2012,KILL 2012,FIGHT 2012,HIT 2012,STRIKE 2013,POUR 2014,EAT 2014,DEVOUR 2015,DRINK 2016,RUB 2017,THROW 2017,TOSS 2018,QUIT 2019,FIND 2019,WHERE 2020,INVENTOR 2021,FEED 2022,FILL 2023,BLAST 2023,DETONATE 2023,IGNITE 2023,BLOWUP 2024,SCORE 2025,FEE 2025,FIE 2025,FOE 2025,FOO 2025,FUM 2026,BRIEF 2027,READ 2027,PERUSE 2028,BREAK 2028,SHATTER 2028,SMASH 2029,WAKE 2029,DISTURB 2030,SUSPEND 2030,PAUSE 2030,SAVE 2031,HOURS 3001,FEE 3002,FIE 3003,FOE 3004,FOO 3005,FUM 3050,SESAME 3050,OPENSESA 3050,ABRACADA 3050,ABRA 3050,SHAZAM 3050,HOCUS 3050,POCUS 3051,HELP 3051,? 3064,TREE 3064,TREES 3066,DIG 3066,EXCAVATE 3068,LOST 3069,MIST 3079,FUCK 3139,STOP 3142,INFO 3142,INFORMAT 3147,SWIM -1,END 5 1,Set of keys 000,There are some keys on the ground here. 2,Brass lantern 000,There is a shiny brass lamp nearby. 100,There is a lamp shining nearby. 3,*Grate 000,The grate is locked. 100,The grate is open. 4,Wicker cage 000,There is a small wicker cage discarded nearby. 5,Black rod 000,A three foot black rod with a rusty star on an end lies nearby. 6,Black rod 000,A three foot black rod with a rusty mark on an end lies nearby. 7,*Steps 000,Rough stone steps lead down the pit. 100,Rough stone steps lead up the dome. 8,Little bird in cage 000,A cheerful little bird is sitting here singing. 100,There is a little bird in the cage. 9,*Rusty door 000,The way north is barred by a massive, rusty, iron door. 100,The way north leads through a massive, rusty, iron door. 10,Velvet pillow 000,A small velvet pillow lies on the floor. 11,*Snake 000,A huge green fierce snake bars the way! 100,>$< 12,*Fissure 000,>$< 100,A crystal bridge now spans the fissure. 200,The crystal bridge has vanished! 13,*Stone tablet 000,A massive stone tablet imbedded in the wall reads: 000,"Congratulations on bringing light into the dark-room!" 14,Giant clam >Grunt!< 000,There is an enormous clam here with its shell tightly closed. 15,Giant oyster >Groan!< 000,There is an enormous oyster here with its shell tightly closed. 100,Interesting. There seems to be something written on the underside of 100,the oyster. 16,"Spelunker Today" 000,There are a few recent issues of "Spelunker Today" magazine here. 19,Tasty food 000,There is food here. 20,Small bottle 000,There is a bottle of water here. 100,There is an empty bottle here 200,There is a bottle of oil here. 21,Water in the bottle 22,Oil in the bottle 23,*Mirror 000,>$< 24,*Plant 000,There is a tiny little plant in the pit, murmuring "water, water, ..." 100,The plant spurts into furious growth for a few seconds. 200,There is a 12-foot-tall beanstalk stretching up out of the pit, 200,bellowing "WATER!! WATER!!" 300,The plant grows explosively, almost filling the bottom of the pit. 400,There is a gigantic beanstalk stretching all the way up to the hole. 500,You've over-watered the plant! It's shriveling up! It's, it's... 25,*Phony plant 000,>$< 100,The top of a 12-foot-tall beanstalk is poking out of the west pit. 200,There is a huge beanstalk growing out of the west pit up to the hole. 26,*Stalactite 000,>$< 27,*Shadowy figure 000,The shadowy figure seems to be trying to attract your attention. 28,Dwarf's axe 000,There is a little axe here. 100,There is a little axe lying beside the bear. 29,*Cave drawings 000,>$< 30,*Pirate 000,>$< 31,*Dragon 000,A huge green fierce dragon bars the way! 100,Congratulations! You have just vanquished a dragon with your bare 100,hands! (Unbelievable, isn't it?) 200,The body of a huge green dead dragon is lying off to one side. 32,*Chasm 000,A rickety wooden bridge extends across the chasm, vanishing into the 000,mist. A sign posted on the bridge reads, "Stop! Pay troll!" 100,The wreckage of a bridge (and a dead bear) can be seen at the bottom 100,of the chasm. 33,*Troll 000,A burly troll stands by the bridge and insists you throw him a 000,treasure before you may cross. 100,The troll steps out from beneath the bridge and blocks your way. 200,>$< 34,*Phony troll 000,The troll is nowhere to be seen. 35,>$< 000,There is a ferocious cave bear eying you from the far end of the room! 100,There is a gentle cave bear sitting placidly in one corner. 200,There is a contented-looking bear wandering about nearby. 300,>$< 36,*Message in second maze 000,There is a message scrawled in the dust in a flowery script, reading: 000,"This is not the maze where the pirate leaves his treasure chest." 37,*Volcano and/or geyser 000,>$< 38,*Vending machine 000,There is a massive vending machine here. The instructions on it read: 000,"Drop coins here to receive fresh batteries." 39,Batteries 000,There are fresh batteries here. 100,Some worn-out batteries have been discarded nearby. 40,*Carpet and/or moss 000,>$< 50,Large gold nugget 000,There is a large sparkling nugget of gold here! 51,Several diamonds 000,There are diamonds here! 52,Bars of silver 000,There are bars of silver here! 53,Precious jewelry 000,There is precious jewelry here! 54,Rare coins 000,There are many coins here! 55,Treasure chest 000,The pirate's treasure chest is here! 56,Golden eggs 000,There is a large nest here, full of golden eggs! 100,The nest of golden eggs has vanished! 200,Done! 57,Jeweled trident 000,There is a jewel-encrusted trident here! 58,Ming vase 000,There is a delicate, precious, Ming vase here! 100,The vase is now resting, delicately, on a velvet pillow. 200,The floor is littered with worthless shards of pottery. 300,The Ming vase drops with a delicate crash. 59,Egg-sized emerald 000,There is an emerald here the size of a plover's egg! 60,Platinum pyramid 000,There is a platinum pyramid here, 8 inches on a side! 61,Glistening pearl 000,Off to one side lies a glistening pearl! 62,Persian rug 000,There is a Persian rug spread out on the floor! 100,The dragon is sprawled out on a Persian rug!! 63,Rare spices 000,There are rare spices here! 64,Golden chain 000,There is a golden chain lying in a heap on the floor! 100,The bear is locked to the wall with a golden chain! 200,There is a golden chain locked to the wall! -1,End 6 1,Somewhere nearby is Colossal Cave, where others have found fortunes in 1,treasure and gold, though it is rumored that some who enter are never 1,seen again. Magic is said to work in the cave. I will be your eyes 1,and hands. Direct me with commands of 1 or 2 words. (Should you get 1,stuck, type "HELP" for some general hints. For information on how 1,to end your adventure, etc., type "INFO".) 1, - - - 1,This program was originally developed by Willie Crowther. Most of the 1,features of the current program were added by Don Woods. The original 1,FORTRAN IV version was translated into BASIC-PLUS by Keith Barnett. 2,A little dwarf with a big knife blocks your way. 3,A little dwarf just walked around a corner, saw you, threw a little 3,axe at you which missed, cursed, and ran away. 4,There is a threatening little dwarf in the room with you! 5,One sharp nasty knife is thrown at you! 6,None of them hit you! 7,One of them gets you! 8,A hollow voice says "PLUGH". 9,There is no way to go that direction. 10,I am unsure how you are facing. Use compass points or nearby objects. 11,I don't know in from out here. Use compass points or name something 11,in the general direction you want to go. 12,I don't know how to apply that word here. 13,I don't understand that! 14,I'm game. Would you care to explain how? 15,Sorry, but I am not allowed to give more detail. I will repeat the 15,long description of your location. 16,It is now pitch dark. If you proceed you will likely fall into a pit. 17,If you prefer, simply type W rather than WEST. 18,Are you trying to catch the bird? 19,The bird is frightened right now and you cannot catch it no matter 19,what you try. Perhaps you might try later. 20,Are you trying to somehow deal with the snake? 21,You can't kill the snake, or drive it away, or avoid it, or anything 21,like that. There is a way to get by, but you don't have the necessary 21,resources right now. 22,Do you really want to quit now? 23,You fell into a pit and broke every bone in your body! 24,You are already carrying it! 25,You can't be serious! 26,The bird was unafraid when you entered, but as you approach it becomes 26,disturbed and you cannot catch it. 27,You can catch the bird, but you cannot carry it. 28,There is nothng here with a lock! 29,You aren't carrying it! 30,The little bird attacks the green snake, and in an astounding flurry 30,drives the snake away. 31,You have no keys! 32,It has no lock. 33,I don't know how to lock or unlock such a thing. 34,It was already locked. 35,The grate is now locked. 36,The grate is now unlocked. 37,It was already unlocked. 38,You have no source of light. 39,Your lamp is now on. 40,Your lamp is now off. 41,There is no way to get past the bear to unlock the chain, which is 41,probably just as well. 42,Nothing happens. 43,Where? 44,There is nothing here to attack. 45,The little bird is now dead. Its body disappears. 46,Attacking the snake both doesn't work and is very dangerous. 47,You killed a little dwarf. 48,You attack a little dwarf, but he dodges out of the way. 49,With what? Your bare hands? 50,Good try, but that is an old worn-out magic word. 51,I know of places, actions, and things. Most of my vocabulary 51,describes places and is used to move you there. To move, try words 51,like FOREST, BUILDING, DOWNSTREAM, ENTER, EAST, WEST, NORTH, SOUTH, 51,UP, or DOWN. I know about a few special objects, like a black rod 51,hidden in the cave. These objects can be manipulated using some of 51,the action words that I know. Usually you will need to give both the 51,object and action words (in either order), but sometimes I can infer 51,the object from the verb alone. Some objects also imply verbs; in 51,particular, "INVENTORY" implies "TAKE INVENTORY", which causes me to 51,give you a list of what you're carrying. The objects have side 51,effects; for instance, the rod scares the bird. Usually people having 51,trouble moving just need to try a few more words. Usually people 51,trying unsuccessfully to manipulate an object are attempting something 51,beyond their (or my!) capabilities and should try a completely 51,different tack. To speed the game you can sometimes move long 51,distances with a single word. For example, "BUILDING" usually gets 51,you to the building from anywhere above ground except when lost in the 51,forest. Also, note that cave passages turn a lot, and that leaving a 51,room to the north does not guarantee entering the next from the south. 51,Good luck! 52,It misses! 53,It gets you! 54,OK 55,You can't unlock the keys. 56,You have crawled around in some little holes and wound up back in the 56,main passage. 57,I don't know where the cave is, but hereabouts no stream can run on 57,the surface for long. I would try the stream. 58,I need more detailed instructions to do that. 59,I can only tell you what you see as you move about and manipulate 59,things. I cannot tell you where remote things are. 60,I don't know that word. 61,What? 62,Are you trying to get into the cave? 63,The grate is very solid and has a hardened steel lock. You cannot 63,enter without a key, and there are no keys nearby. I would recommend 63,looking elsewhere for the keys. 64,The trees of the forest are large hardwood oak and maple, with an 64,occasional grove of pine or spruce. There is quite a bit of under- 64,growth, largely birch and ash saplings plus nondescript bushes of 64,various sorts. This time of year visibility is quite restricted by 64,all the leaves, but travel is quite easy if you detour around the 64,spruce and berry bushes. 65,Welcome to ADVENTURE!! Would you like instructions? 66,Digging without a shovel is quite impractical. Even with a shovel 66,progress is unlikely. 67,Blasting requires dynamite. 68,I'm as confused as you are. 69,Mist is a white vapor, usually water, seen from time to time in 69,caverns. It can be found anywhere but is frequently a sign of a deep 69,pit leading down to water. 70,You're feet are now wet. 71,I think I just lost my appetite. 72,Thank you, it was delicious! 73,You have taken a drink from the stream. The water tastes strongly of 73,minerals, but is not unpleasant. It is extremely cold. 74,The bottle of water is now empty. 75,Rubbing the electric lamp is not particularly rewarding. Anyway, 75,nothing exciting happens. 76,Peculiar. Nothing unexpected happens. 77,Your bottle is empty and the ground is wet. 78,You can't pour that. 79,Watch it! 80,Which way? 81,Oh dear, you seem to have gotten yourself killed. I might be able to 81,help you out, but I've never really done this before. Do you want me 81,to try to reincarnate you? 82,All right. But don't blame me is something goes wr...... 82, --- POOF!! --- 82,You are engulfed in a cloud of orange smoke. Coughing and gasping, 82,you emerge from the smoke and find.... 83,You clumsy oaf, you've done it again! I don't know how long I can 83,keep this up. Do you want me to try reincarnating you again? 84,Okay, now where did I put my orange smoke?.... >POOF!< 84,Everything disappears in a dense cloud of orange smoke. 85,Now you've really done it! I'm out of orange smoke! You don't expect 85,me to do a decent reincarnation without any orange smoke, do you? 86,Okay, if you're so smart, do it yourself! I'm leaving! 90,>>>Messages 81 through 90 are reserved for "obituaries".<<< 91,Sorry, but I no longer seem to remember how it was you got here. 92,You can't carry anything more. You'll have to drop something first. 93,You can't go through a locked steel grate! 94,I believe what you want is right here with you. 95,You don't fit through a two-inch slit! 96,I respectfully suggest that you go across the bridge instead of jumping. 97,There is no way across the fissure. 98,You're not carrying anything. 99,You are currently holding the following: 100,It's not hungry (It's merely pinin' for the fjords). Besides, you 100,have no bird seed. 101,The snake has now devoured your bird. 102,There's nothing here it wants to eat (except perhaps you). 103,You fool, dwarves only eat coal! Now you've made him REALLY mad!! 104,You have nothing in which to carry it. 105,Your bottle is already full. 106,There is nothing here with which to fill the bottle. 107,Your bottle is now full of water. 108,Your bottle is now full of oil. 109,You can't fill that. 110,Don't be ridiculous! 111,The door is extremely rusty and refuses to open. 112,The plant indignantly shakes the oil off its leaves and asks, "Water?" 113,The hinges are quite thoroughly rusted now and won't budge. 114,The oil has freed up the hinges so that the door will now move, 114,although it requires some effort. 115,The plant has exceptionally deep roots and cannot be pulled free. 116,The dwarves' knives vanish as they strike the walls of the cave. 117,Something you're carrying won't fit through the tunnel with you. 117,You'd best take inventory and drop something. 118,You can't fit this five-foot clam through that little passage! 119,You can't fit this five-foot oyster through that little passage! 120,I advise you to put down the clam before opening it. >Strain!< 121,I advise you to put down the oyster before opening it. >Wrench!< 122,You don't have anything strong enough to open the clam. 123,You don't have anything strong enough to open the oyster. 124,A glistening pearl falls out of the clam and rolls away. Goodness, 124,this must really be an oyster. (I never was very good at identifying 124,bivalves.) Whatever it is, it has now snapped shut again. 125,The oyster creaks open, revealing nothing but oyster inside. It 125,promptly snaps shut again. 126,You have crawled around in some little holes and found your way 126,blocked by a recent cave-in. You are now back in the main passage. 127,There are faint rustling noises from the darkness behind you. 128,Out from the shadows behind you pounces a bearded pirate! "Har, har," 128,he chortles, "I'll just take all this booty and hide it away with me 128,chest deep in the maze!" He snatches your treasure and vanishes into 128,the gloom. 129,A sepulchral voice reverberating through the cave says, "Cave closing 129,soon. All adventures exit immediately through main office." 130,A mysterious recorded voice groans into life and announces: 130, "This exit is closed. Please leave via main office." 131,It looks as though you're dead. Well, seeing as how it's so close to 131,closing time anyway, I think we'll just call it a day. 132,The sepulchral voice entones, "The cave is now closed." As the echoes 132,fade, there is a blinding flash of light (And a small puff of orange 132,smoke). . . . As your eyes refocus, you look around and find... 133,There is a loud explosion, and a twenty-foot hole appears in the far 133,wall, burying the dwarves in the rubble. You march through the hole 133,and find yourself in the main office, where a cheering band of 133,friendly elves carry the conquering adventurer off into the sunset. 134,There is a loud explosion, and a twenty-foot hole appears in the far 134,wall, burying the snakes in the rubble. A river of molten lava pours 134,in through the hole, destroying everything in its path, including you! 135,There is a loud explosion, and you are suddenly splashed across the 135,walls of the room. 136,The resulting ruckus has awakened the dwarves. There are now several 136,threatening little dwarves in the room with you! Most of them throw 136,knives at you! All of them hit you! 137,Oh, leave the poor unhappy bird alone. 138,I daresay whatever you want is around here somewhere. 139,I don't know the word "STOP". Use "QUIT" if you want to give up. 140,You can't get there from here. 141,You are being followed by a very large, tame bear. 142,If you want to end your adventure early, say "QUIT". To suspend your 142,adventure such that you can continue later, say "SUSPEND" (or "PAUSE" 142,or "SAVE"). To see what hours the cave is normally open, say "HOURS". 142,To see how well you're doing, say "SCORE". To get full credit for a 142,treasure, you must have left it safely in the building, though you get 142,partial credit just for locating it. You lose points for getting 142,killed, or for quitting, though the former costs you more. There are 142,also points based on how much (if any) of the cave you've managed to 142,explore; in particular, there is a large bonus for just getting in (to 142,distinguish the beginners from the rest of the pack), and there are 142,other ways to determine whether you've been through some of the more 142,harrowing sections. If you think you've found all the treasures, just 142,keep exploring for a while. If nothing interesting happens, you 142,haven't found them all yet. If something interesting DOES happen, 142,it means you're getting a bonus and have an opportunity to garner many 142,more points in the master's section. I may occasionally offer hints 142,if you seem to be having trouble. If I do, I'll warn you in advance 142,how much it will affect your score to accept the hints. Finally, to 142,save paper, you may specify "BRIEF", which tells me never to repeat 142,the full description of a place unless you specifically ask me to. 143,Do you indeed wish to quit now? 144,There is nothing here with which to fill the vase. 145,The sudden change in temperature has delicately shattered the vase. 146,It is beyond your power to do that. 147,I don't know how. 148,It is too far up for you to reach. 149,You killed a little dwarf. The body vanishes in a cloud of greasy 149,black smoke. 150,The shell is very strong and is impervious to attack. 151,What's the matter, can't you read? Now you'd best start over. 152,The axe bounces harmlessly off the dragons thick scales. 153,The dragon looks rather nasty. You'd best not try to get by. 154,The little bird attacks the green dragon, and in an astonishing flurry 154,gets burnt to a cinder. The ashes blow away. 155,On what? 156,Okay, from now on I'll only describe a place in full the first time 156,you come to it. To get the full description, say "LOOK". 157,Trolls are close relatives with the rocks and have skin as tough as 157,that of a rhinoceros. The troll fends off your blows effortlessly. 158,The troll deftly catches the axe, examines it carefully, and tosses it 158,back, declaring, "Good workmanship, but it's not valuable enough." 159,The troll catches your treasure and scurries away out of sight. 160,The troll refuses to let you cross. 161,There is no longer any way across the chasm. 162,Just as you reach the other side, the bridge buckles beneath the 162,weight of the bear, which was still following you around. You 162,scrabble desperately for support, but as the bridge collapses you 162,stumble back and fall into the chasm. 163,The bear lumbers towards the troll, who lets out a startled shriek and 163,scurries away. The bear soon gives up the pursuit and wanders back. 164,The axe misses and lands near the bear where you can't get at it. 165,With what? Your bare hands? Against HIS bear hands?? 166,The bear is confused; he only wants to be your friend. 167,For crying out loud, the poor thing is already dead! 168,The bear eagerly wolfs down your food, after which he seems to calm 168,down considerably and even becomes rather friendly. 169,The bear is still chained to the wall. 170,The chain is still locked. 171,The chain is now unlocked. 172,The chain is now locked. 173,There is nothing here to which the chain can be locked. 174,There is nothing here to eat. 175,Do you want the hint? 176,Do you need help getting out of the maze? 177,You can make the passages look less alike by dropping things. 178,Are you trying to explore beyond the plover room? 179,There is a way to explore that region without having to worry about 179,falling into a pit. Non of the objects available is immediately 179,useful in discovering the secret. 180,Do you need help getting out of here? 181,Don't go west. 182,Gluttony is not one of the trolls vices. Avarice, however, is. 183,Your lamp is getting dim. You'd best start wrapping this up, unless 183,you can find some fresh batteries. I seem to recall there's a vending 183,machine in the maze. Bring some coins with you. 184,Your lamp has run out of power. 185,There's not much point in wandering around out here, and you can't 185,explore the cave without a lamp. So let's just call it a day. 186,There are faint rustling noises from the darkness behind you. As you 186,turn toward them, the beam of your lamp falls across a bearded pirate. 186,He is carrying a large chest. "Shiver me timbers!" he cries, "I've 186,been spotted! I'd best hie meself off to the maze to hide me chest!" 186,With that, he vanishes into the gloom. 187,Your lamp is getting dim. You'd best go back for those batteries. 188,Your lamp is getting dim. I'm taking the liberty of replacing the 188,batteries. 189,Your lamp is getting dim, and you're out of spare batteries. You'd 189,best start wrapping this up. 190,I'm afraid this magazine is written in dwarvish. 191,"This is not the maze where the pirate leaves his treasure chest." 192,Hmmm, this looks like a clue, which means it'll cost you 10 points to 192,read it. Should I go ahead and read it anyway? 193,It says, "There is something strange about this place, such that one 193,of the words I've always known now has a new effect." 194,It says the same thing it did before. 195,I'm afraid I don't understand. 196,"Congratulations on bringing light into the dark-room!" 197,You strike the mirror a resounding blow, whereupon it shatters into a 197,myriad tiny fragments. 198,You have taken the vase and hurled it delicately to the ground. 199,You prod the nearest dwarf, who wakes up grumpily, takes one look at 199,you, curses, and grabs for his axe. 200,Is this acceptable? 201,There's no point in suspending a demonstration game. -1,End 7 1,3 2,3 3,8,9 4,10 5,11 6,0 7,14,15 8,13 9,94,-1 10,96 11,19,-1 12,17,27 13,101,-1 14,103 15,0 16,106 17,0,-1 18,0 19,3 20,3 21,0 22,0 23,109,-1 24,25,-1 25,23,67 26,111,-1 27,35,110 28,0 29,97,-1 30,0,-1 31,119,121 32,117,122 33,117,122 34,0,0 35,130,-1 36,0,-1 37,126,-1 38,140,-1 39,0 40,96,-1 50,18 51,27 52,28 53,29 54,30 55,0 56,92 57,95 58,97 59,100 60,101 61,0 62,119,121 63,127 64,130,-1 -1 8 1,24 2,29 3,0 4,33 5,0 6,33 7,38 8,38 9,42 10,14 11,43 12,110 13,29 14,110 15,73 16,75 17,29 18,13 19,59 20,59 21,174 22,109 23,67 24,13 25,147 26,155 27,195 28,146 29,110 30,13 31,13 -1,0 9 0,1,2,3,4,5,6,7,8,9,10 0,100,115,116,126 2,1,3,4,7,38,95,113,24 1,24 3,46,47,48,54,56,58,82,85,86 3,122,123,124,125,126,127,128,129,130 4,8 5,13 6,19 7,42,43,44,45,46,47,48,49,50,51 7,52,53,54,55,56,80,81,82,86,87 8,99,100,101 9,108 -1 10 35,You are obviously a rank amateur. Better luck next time. 100,Your score qualifies you as a novice class adventurer. 130,You have achieved the rating: "experienced adventurer". 200,You may now consider yourself a "seasoned adventurer". 250,You have reached "junior master" status. 300,Your score puts you in master adventurer class C. 330,Your score puts you in master adventurer class B. 349,Your score puts you in master adventurer class A. 9999,All of adventuredom gives tribute to you, adventurer grandmaster! -1,End 11 2,9999,10,0,0 3,9999,5,0,0 4,4,2,62,63 5,5,2,18,19 6,8,2,20,21 7,75,4,176,177 8,25,5,178,179 9,20,3,180,181 -1 12 1,A large cloud of green smoke appears in front of you. It clears away 1,to reveal a tall wizard, clothed in grey. He fixes you with a steely 1,glare and declares, "This adventure has lasted too long." With that 1,he makes a single pass over you with his hands, and everything around 1,you fades away into a grey nothingness. 2,Even wizards have to wait longer than that! 3,I'm terribly sorry, but Colossal Cave is closed. Our hours are: 4,Only wizards are permitted within the cave right now. 5,We do allow visitors to make short explorations during our off hours. 5,Would you like to do that? 6,Colossal Cave is open to regular adventurers at the following hours: 7,Very well. 8,Only a wizard may continue an adventure this soon. 9,I suggest you resume your adventure at a later time. 10,Do you wish to see the hours? 11,Do yo wish to change the hours? 12,New magic word (null to leave unchanged)? 13,New magic number (null to leave unchanged)? 14,Do you wish to change the message of the day? 15,>$< 16,Are you a wizard? 17,Prove it! Say the magic word! 18,That is not what I thought it was. Do you know what I thought it was? 19,Oh dear, you really ARE a wizard! Sorry to have bothered you . . . 20,Foo, you are nothing but a charlatan! 21,New hours specified by defining "prime time". Give only the hour 21,(e.g. 14, not 14:00 or 2PM). Enter a negative number after the last pair. 22,New hours for colossal cave: 23,End with null line. 24,>$< 25,>$< 26,Do you wish to (re)schedule the next holiday? 27,To begin how many days from today? 28,To last how many days (zero if no holiday)? 29,To be called what (up to 16 characters)? 30,Too small! Assuming minimum value (45 minutes). -1,End 0 00001 PRINT "? Please run ADVENT ?" \GOTO 32730 00010 ! ! ADVeNTuRe -- Game of adventures 00020 ! ! Translated into BASIC-PLUS from the FORTRAN IV program ! developed by Willie Crowther and modified by Don Woods ! 00030 ! Keith Barnett Alexis I. duPont High School 12/24/77 ! 01000 ! ! Set up ! 01010 EXTEND 01020 ON ERROR GOTO 32000 01040 RANDOMIZE 01050 DIM HATH%(12%), TK(22%) \ MAT READ HATH% 01060 OPEN "KB:" FOR INPUT AS FILE 3% 01100 LDN$="GAME:" 01120 DIM #1%, TRAVEL(750%), KTAB%(300%), ATAB$(300%)=8%, LTEXT%(150%), STEXT%(150%), KEYW%(150%), COND0%(150%), PLAC%(100%), FIXD%(100%), PTEXT%(700%), ACTSPK%(35%), RTEXT%(205%), CTEXT%(12%), CVAL%(12%), HINTS%(20%,4%), MTEXT%(35%), WKDAY(0%), WKEND(0%), HOLID(0%), HBEGIN%(0%), HEND%(0%), HNAME$(0%), SHORT%(0%), MAGIC$(0%)=8%, MAGNM%(0%), LATNCY%(0%), MSG%(1%), HANDY%(55%), LINES$(32767%) 01140 DIM #4%, ABB%(150%), ATLOC%(150%), PLACE%(100%), FIXED%(100%), COND%(150%), LINK%(200%), PROP%(100%), HINTLC%(20%), HINTED%(20%), DSEEN%(6%), DLOC%(6%), ODLOC%(6%), HNAME%(4%), OTHER%(35%) 01150 DUM%=FNVARSET% \ GOTO 11000 10000 ! ! Now start ! 10020 DUM%=FNCHAIN%(10020%) 11000 ! ! Describe location; get command ! 11010 GOTO 14020 IF LOC%=0% \ KK%=STEXT%(LOC%) \ LM%=KK%+STEXT%(LOC%-1%)*(LOC%>1%)+LTEXT%(LTEXT%(0%))*(LOC%=1%) \ IF ABB%(LOC%)-ABB%(LOC%)/ABBNUM%*ABBNUM%=0% OR LM%=0% THEN KK%=LTEXT%(LOC%) \ LM%=KK%+LTEXT%(LOC%-1%)*(LOC%>1%) 11020 IF NOT FNFORCED%(LOC%) AND FNDARK% THEN IF WZDARK% AND FNPCT%(35%) THEN 14010 ELSE KK%=RTEXT%(16%) \ LM%=KK%-RTEXT%(15%) 11030 DUM%=FNRSPEAK%(141%) IF FNTOTING%(BEAR%) \ DUM%=FNSPEAK%(KK%,LM%) IF NOT OTHER%(35%) \ K%=1% \ GOTO 12500 IF FNFORCED%(LOC%) \ DUM%=FNRSPEAK%(8%) IF LOC%=33% AND FNPCT%(25%) AND NOT CLOSNG% \ GOTO 11100 IF FNDARK% \ ABB%(LOC%)=ABB%(LOC%)+1% \ I%=ATLOC%(LOC%) 11038 ! Describe objects; tally treasure if applicable; zap lamp if necessary 11040 GOTO 11100 IF I%=0% \ OBJ%=I% \ OBJ%=OBJ%-100% IF OBJ%>100% \ GOTO 11060 IF OBJ%=STEPS% AND FNTOTING%(NUGGET%) \ GOTO 11050 IF PROP%(OBJ%)>=0% \ GOTO 11060 IF CLOSED% \ PROP%(OBJ%)=0% \ PROP%(OBJ%)=1% IF OBJ%=RUG% OR OBJ%=CHAIN.% \ TALLY%=TALLY%-1% \ LIMIT%=35% IF 35%0% 11050 KK%=PROP%(OBJ%) \ KK%=1% IF OBJ%=STEPS% AND LOC%=FIXED%(STEPS%) \ DUM%=FNPSPEAK%(OBJ%,KK%) IF NOT OTHER%(35%) 11060 I%=LINK%(I%) \ GOTO 11040 11070 K%=54% 11080 SPK%=K% 11090 DUM%=FNRSPEAK%(SPK%) 11100 VERB%, OBJ%=0% 11108 ! ! Check for hints ! 11110 FOR HINT%=4% TO HINTS%(0%,0%) \ GOTO 11120 IF HINTED%(HINT%) \ HINTLC%(HINT%)=-1% IF NOT FNBITSET%(LOC%,HINT%) \ HINTLC%(HINT%)=HINTLC%(HINT%)+1% \ GOTO 17000 IF HINTLC%(HINT%)>=HINTS%(HINT%,1%) 11120 NEXT HINT% \ IF CLOSED% THEN DUM%=FNPSPEAK%(OYSTER%,1%) IF PROP%(OYSTER%)<0% AND FNTOTING%(OYSTER%) \ PROP%(I%)=-1%-PROP%(I%) IF FNTOTING%(I%) AND PROP%(I%)<0% FOR I%=1% TO 100% 11130 WZDARK%=FNDARK% \ KNFLOC%=0% IF KNFLOC%>0% AND KNFLOC%<>LOC% \ PRINT \ DUM%=FNGETIN% \ OTHER%(35%)=0% 11138 ! Check 'FOOBAR' flag 11140 FOOBAR%=-FOOBAR% \ FOOBAR%=0% IF FOOBAR%>0% \ GOTO 19150 IF TURNS%=0% AND WD1$="MAGIC" AND WD2$="MODE" \ TURNS%=TURNS%+1% \ GOTO 17270 IF DEMO% AND TURNS%>=SHORT%(0%) \ VERB%=0% IF VERB%=SAY% AND WD2$<>"" \ GOTO 12030 IF VERB%=SAY% \ CLOCK1%=CLOCK1%-1% IF TALLY%=0% AND LOC%>14% AND LOC%<>33% \ GOTO 17200 IF CLOCK1%=0% \ CLOCK2%=CLOCK2%-1% IF CLOCK1%<0% \ GOTO 17220 IF CLOCK2%=0% \ LIMIT%=LIMIT%-1% IF PROP%(LAMP%)=1% \ GOTO 17230 IF LIMIT%<31% AND FNHERE%(BATTER%) AND PROP%(BATTER%)=0% AND FNHERE%(LAMP%) \ GOTO 17250 IF LIMIT%=0% \ GOTO 17260 IF LIMIT%<0% AND LOC%<9% \ GOTO 17240 IF LIMIT%<31% 11150 K%=43% \ K%=70% IF FNLIQLOC%(LOC%)=WATER% \ GOTO 11080 IF WD1$="ENTER" AND (WD2$="STREAM" OR WD2$="WATER") \ GOTO 11180 IF WD1$="ENTER" AND WD2$<>"" \ IF (WD1$="WATER" OR WD1$="OIL") AND (WD2$="PLANT" OR WD2$="DOOR") THEN WD2$="POUR" IF FNAT%(FNVOCAB%(WD2$,-1%)-1000%) 11160 IF WD1$="WEST" THEN IWEST%=IWEST%+1% \ DUM%=FNRSPEAK%(17%) IF IWEST%=10% 11170 I%=FNVOCAB%(LEFT(WD1$,8%),-1%) \ GOTO 11190 IF I%=-1% \ K%=I%-I%/1000%*1000% \ ON I%/1000%+1% GOTO 12500, 12100, 12000, 11080 11178 ! Get second word 11180 WD1$=WD2$ \ WD2$="" \ GOTO 11160 11188 ! Word not in vocabulary 11190 SPK%=60% \ SPK%=61% IF FNPCT%(20%) \ SPK%=13% IF FNPCT%(20%) \ DUM%=FNRSPEAK%(SPK%) \ GOTO 11110 12000 ! ! Analyze a verb ! 12010 VERB%=K% \ SPK%=ACTSPK%(VERB%) \ GOTO 11180 IF WD2$<>"" AND VERB%<>SAY% \ OBJ$=WD2$ IF VERB%=SAY% \ GOTO 12030 IF OBJ%<>0% OR OBJ$<>"" AND VERB%=SAY% 12018 ! Intransitive 12020 ON VERB% GOTO 15050,15000,15000,15300,11070,15300,15450,15500,15000, 15000,11090,15600,15650,15700,15800,15000,15000,16000,15000, 16100,15000,16250,16300,16350,16400,16450,16500,15000,15000, 16700,16750 12022 ! TAKE DROP SAY OPEN NOTHI LOCK ON OFF WAVE ! CALM WALK KILL POUR EAT DRINK RUB THROW QUIT FIND ! INVNT FEED FILL BLAST SCORE FOO BRIEF READ BREAK WAKE ! SUSPN HOURS 12028 ! Transitive 12030 ON VERB% GOTO 15100,15150,15250,15350,11070,15350,15450,15500,15550, 11090,11090,15600,15650,15750,15800,15850,15900,11090,16050, 16050,16150,16250,16300,11090,11090,11090,16550,16600,16650, 11090,11090 12100 OBJ%=K% \ GOTO 12110 IF FIXED%(K%)<>LOC% AND NOT FNHERE%(K%) 12105 GOTO 11180 IF WD2$<>"" \ GOTO 12030 IF VERB%<>0% \ PRINT "What do you want to do with the ";WD1$ \ GOTO 11110 12110 IF K%=GRATE% THEN K%=DPRSSN% IF LOC%=1% OR LOC%=4% OR LOC%=7% \ K%=ENTRNC% IF LOC%>9% AND LOC%<15% \ GOTO 12500 IF K%<>GRATE% 12120 IF K%=DWARF% THEN GOTO 12105 IF DLOC%(I%)=LOC% AND DFLAG%>1% FOR I%=1% TO 5% 12130 GOTO 12105 IF FNLIQ%=K% AND FNHERE%(BOTTLE%) OR K%=FNLIQLOC%(LOC%) \ IF OBJ%=PLANT% AND FNAT%(PLANT2%) AND PROP%(PLANT2%)<>0% THEN OBJ%=PLANT2% \ GOTO 12105 12140 IF OBJ%=KNIFE% AND KNFLOC%=LOC% THEN KNFLOC%=-1% \ SPK%=116% \ GOTO 11090 12150 IF OBJ%=ROD% AND FNHERE%(ROD2%) THEN OBJ%=ROD2% \ GOTO 12105 12160 IF (VERB%=FIND% OR VERB%=INVENT%) AND WD2$="" THEN 12105 ELSE PRINT "I see no ";WD1$;" here" \ GOTO 11100 12500 ! ! Figure out new location ! 12510 KK%=KEYW%(LOC%) \ NEWLOC%=LOC% \ DUM%=FNBUG%(26%) IF KK%=0% \ GOTO 10020 IF K%=NULL% \ GOTO 13100 IF K%=BACK% \ GOTO 13200 IF K%=LOOK% \ GOTO 13300 IF K%=CAVE% \ OLDLC2%=OLDLOC% \ OLDLOC%=LOC% 12520 LL=ABS(TRAVEL(KK%)) \ IF FNMOD%(LL,1000%)<>1% AND FNMOD%(LL,1000%)<>K% THEN GOTO 13400 IF TRAVEL(KK%)<0% \ KK%=KK%+1% \ GOTO 12520 12530 LL=INT(LL/1000%) 12540 NEWLOC%=LL/1000% \ K%=FNMOD%(NEWLOC%,100%) \ GOTO 12560 IF NEWLOC%<301% \ GOTO 12580 IF PROP%(K%)<>NEWLOC%/100%-3% 12550 DUM%=FNBUG%(25%) IF TRAVEL(KK%)<0% \ KK%=KK%+1% \ NEWLOC=ABS(TRAVEL(KK%))/1000% \ IF NEWLOC=LL THEN 12550 ELSE LL=NEWLOC \ GOTO 12540 12560 IF NEWLOC%>100% THEN IF FNTOTING%(K%) OR NEWLOC%>200% AND FNAT%(K%) THEN 12580 ELSE 12550 12570 GOTO 12550 IF NEWLOC%<>0% AND NOT FNPCT%(NEWLOC%) 12580 NEWLOC%=FNMOD%(LL,1000%) \ GOTO 10020 IF NEWLOC%<301% \ GOTO 13000 IF NEWLOC%<501% \ DUM%=FNRSPEAK%(NEWLOC%-500%) \ NEWLOC%=LOC% \ GOTO 10020 13000 ! ! Special motions ! 13010 NEWLOC%=NEWLOC%-300% \ ON NEWLOC% GOTO 13020, 13030, 13040 13018 ! 301 -- Plover-alcove transport 13020 NEWLOC%=199%-LOC% \ GOTO 10020 IF HOLDNG%=0% OR HOLDNG%=1% AND FNTOTING%(EMRALD%) \ NEWLOC%=LOC% \ DUM%=FNRSPEAK%(117%) \ GOTO 10020 13028 ! 302 -- Plover transport 13030 DUM%=FNDROP%(EMRALD%,LOC%) \ GOTO 12550 13038 ! 303 -- Troll bridge 13040 IF PROP%(TROLL%)=1% THEN DUM%=FNPSPEAK%(TROLL%,1%) \ PROP%(TROLL%)=0% \ DUM%=FNMOVE%(TROLL2%,0%) + FNMOVE%(TROLL2%+100%,0%)+ FNMOVE%(TROLL%,PLAC%(TROLL%))+ FNMOVE%(TROLL%+100%,FIXD%(TROLL%))+ FNJUGGLE%(CHASM%) \ NEWLOC%=LOC% \ GOTO 10020 13050 NEWLOC%=PLAC%(TROLL%)+FIXD%(TROLL%)-LOC% \ PROP%(TROLL%)=1% IF PROP%(TROLL%)=0% \ GOTO 10020 IF NOT FNTOTING%(BEAR%) \ DUM%=FNRSPEAK%(162%) \ PROP%(CHASM%)=1% \ PROP%(TROLL%)=2% \ DUM%=FNDROP%(BEAR%,NEWLOC%) \ FIXED%(BEAR%)=-1% \ PROP%(BEAR%)=3% \ TALLY2%=TALLY2%+1% IF PROP%(SPICES%)<0% \ OLDLC2%=NEWLOC% \ GOTO 14020 13100 ! Go back 13110 K%=OLDLOC% \ K%=OLDLC2% IF FNFORCED%(K%) \ OLDLC2%=OLDLOC% \ OLDLOC%=LOC% \ K2%=0% \ IF K%=LOC% THEN DUM%=FNRSPEAK%(91%) \ GOTO 10020 13120 LL%=FNMOD%(ABS(TRAVEL(KK%))/1000%,1000%) \ GOTO 13150 IF LL%=K% \ IF LL%<301% THEN J%=KEYW%(LL%) \ K2%=KK% IF FNFORCED%(LL%) AND FNMOD%(ABS(TRAVEL(K%))/1000%,1000%)=K% 13130 IF TRAVEL(KK%)>=0% THEN KK%=KK%+1% \ GOTO 13120 13140 KK%=K2% \ IF KK%=0% THEN DUM%=FNRSPEAK%(140%) \ GOTO 10020 13150 K%=FNMOD%(ABS(TRAVEL(KK%)),1000%) \ KK%=KEYW%(LOC%) \ GOTO 12520 13200 ! Look 13210 DUM%=FNRSPEAK%(15%) IF DETAIL%<3% \ DETAIL%=DETAIL%+1% \ WZDARK%=0% \ ABB%(LOC%)=0% \ GOTO 10020 13300 ! Cave 13310 DUM%=FNRSPEAK%(57%) IF LOC%<8% \ DUM%=FNRSPEAK%(58%) IF LOC%>7% \ GOTO 10020 13400 ! Non-applicable motion 13405 OTHER%(35%)=-1% 13410 SPK%=12% \ SPK%=9% IF K%>42% AND K%<51% OR K%=29% OR K%=30% \ SPK%=10% IF K%=7% OR K%=36% OR K%=37% \ SPK%=11% IF K%=11% OR K%=19% \ SPK%=59% IF VERB%=FIND% OR VERB%=INVENT% \ SPK%=42% IF K%=62% OR K%=65% \ SPK%=80% IF K%=17% \ DUM%=FNRSPEAK%(SPK%) \ GOTO 10020 14000 ! ! He's dead. Offer reincarnation if possible. Drop objects being ! carried at previous location; put him in building with lamp outside. ! 14010 DUM%=FNRSPEAK%(23%) \ OLDLC2%=LOC% 14020 GOTO 14040 IF CLOSNG% \ YEA%=FNYES%(81%+NUMDIE%*2%,82%+NUMDIE%*2%,54%) \ NUMDIE%=NUMDIE%+1% \ GOTO 17500 IF NUMDIE%=MAXDIE% OR NOT YEA% \ PLACE%(WATER%), PLACE%(OIL%)=0% \ PROP%(LAMP%)=0% IF FNTOTING%(LAMP%) \ FOR I%=100% TO 1% STEP -1% \ IF FNTOTING%(I%) THEN K%=OLDLC2% \ K%=1% IF I%=LAMP% \ DUM%=FNDROP%(I%,K%) 14030 NEXT I% \ LOC%=3% \ OLDLOC%=LOC% \ GOTO 11000 14038 ! No reincarnation if closing 14040 DUM%=FNRSPEAK%(131%) \ NUMDIE%=NUMDIE%+1% \ GOTO 17500 15000 ! ! Routines for action verbs ! ! Random intransitive verbs 15010 PRINT WD1$;" what" \ OBJ%=0% \ GOTO 11110 15050 ! Carry, no object 15060 GOTO 15000 IF ATLOC%(LOC%)=0% OR LINK%(ATLOC%(LOC%))<>0% \ GOTO 15000 IF DLOC%(I%)=LOC% AND DFLAG%>1% FOR I%=1% TO 5% \ OBJ%=ATLOC%(LOC%) 15100 ! Carry an object 15110 GOTO 11090 IF FNTOTING%(OBJ%) \ SPK%=25% \ SPK%=115% IF OBJ%=PLANT% AND PROP%(PLANT%)<=0% \ SPK%=169% IF OBJ%=BEAR% AND PROP%(BEAR%)=1% \ SPK%=170% IF OBJ%=CHAIN.% AND PROP%(BEAR%)<>0% \ GOTO 11090 IF FIXED%(OBJ%)<>0% \ IF OBJ%=WATER% OR OBJ%=OIL% THEN IF FNHERE%(BOTTLE%) AND FNLIQ%=OBJ% THEN OBJ%=BOTTLE% ELSE OBJ%=BOTTLE% \ GOTO 16250 IF FNTOTING%(BOTTLE%) AND PROP%(BOTTLE%)=1% \ SPK%=105% IF PROP%(BOTTLE%)<>1% \ SPK%=104% IF NOT FNTOTING%(BOTTLE%) \ GOTO 11090 15120 IF HOLDNG%>6% THEN DUM%=FNRSPEAK%(92%) \ GOTO 11100 15125 GOTO 15140 IF OBJ%<>BIRD% OR PROP%(BIRD%)<>0% \ IF FNTOTING%(ROD%) THEN DUM%=FNRSPEAK%(26%) \ GOTO 11100 15130 IF FNTOTING%(CAGE%) THEN PROP%(BIRD%)=1% ELSE DUM%=FNRSPEAK%(27%) \ GOTO 11100 15140 DUM%=FNCARRY%(BIRD%+CAGE%-OBJ%,LOC%) IF (OBJ%=BIRD% OR OBJ%=CAGE%) AND PROP%(BIRD%)<>0% \ DUM%=FNCARRY%(OBJ%,LOC%) \ K%=FNLIQ% \ PLACE%(K%)=-1% IF OBJ%=BOTTLE% AND K%<>0% \ GOTO 11070 15150 ! Discard object 15160 OBJ%=ROD2% IF FNTOTING%(ROD2%) AND OBJ%=ROD% AND NOT FNTOTING%(ROD%) \ GOTO 11090 IF NOT FNTOTING%(OBJ%) \ GOTO 15180 IF OBJ%<>BIRD% OR NOT FNHERE%(SNAKE%) \ DUM%=FNRSPEAK%(30%) \ GOTO 17490 IF CLOSED% \ DUM%=FNDSTROY%(SNAKE%) \ PROP%(SNAKE%)=1% 15170 K%=FNLIQ% \ OBJ%=BOTTLE% IF K%=OBJ% \ PLACE%(K%)=0% IF OBJ%=BOTTLE% AND K%<>0% \ DUM%=FNDROP%(BIRD%,LOC%) IF OBJ%=CAGE% AND PROP%(BIRD%)<>0% \ PROP%(BIRD%)=0% IF OBJ%=BIRD% \ DUM%=FNDROP%(OBJ%,LOC%) \ GOTO 11100 15180 IF OBJ%=COINS% AND FNHERE%(VEND%) THEN DUM%=FNDSTROY%(COINS%) + FNDROP%(BATTER%,LOC%)+ FNPSPEAK%(BATTER%,0%) \ GOTO 11100 15190 IF OBJ%=BIRD% AND FNAT%(DRAGON%) AND PROP%(DRAGON%)=0% THEN DUM%=FNRSPEAK%(154%) + FNDSTROY%(BIRD%) \ PROP%(BIRD%)=0% \ TALLY2%=TALLY2%+1% IF PLACE%(SNAKE%)=PLAC%(SNAKE%) \ GOTO 11100 15200 IF OBJ%=BEAR% AND FNAT%(TROLL%) THEN DUM%=FNRSPEAK%(163%) + FNMOVE%(TROLL%,0%)+ FNMOVE%(TROLL%+100%,0%)+ FNMOVE%(TROLL2%,PLAC%(TROLL%))+ FNMOVE%(TROLL2%+100%,FIXD%(TROLL%))+ FNJUGGLE%(CHASM%) \ PROP%(TROLL%)=2% \ GOTO 15170 15210 IF OBJ%<>VASE% OR LOC%=PLAC%(PILLOW%) THEN DUM%=FNRSPEAK%(54%) \ GOTO 15170 15220 PROP%(VASE%)=2% \ PROP%(VASE%)=0% IF FNAT%(PILLOW%) \ DUM%=FNPSPEAK%(VASE%,PROP%(VASE%)+1%) \ FIXED%(VASE%)=-1% IF PROP%(VASE%)<>0% \ GOTO 15170 15250 ! Say 15260 WD1$=WD2$ IF WD2$<>"" \ I%=FNVOCAB%(WD1$,-1%) \ IF I%<>62% AND I%<>65% AND I%<>71% AND I%<>2025% THEN PRINT 'Okay, "';WD1$;'".' \ GOTO 11100 15270 WD2$,OBJ$="" \ OBJ%=0% \ GOTO 11170 15300 ! Lock, unlock, no object 15310 SPK%=28% \ OBJ%=CLAM% IF FNHERE%(CLAM%) \ OBJ%=OYSTER% IF FNHERE%(OYSTER%) \ OBJ%=DOOR% IF FNHERE%(DOOR%) \ OBJ%=GRATE% IF FNHERE%(GRATE%) \ GOTO 15000 IF OBJ%<>0% AND FNHERE%(CHAIN.%) \ OBJ%=CHAIN.% IF FNHERE%(CHAIN.%) \ GOTO 11090 IF OBJ%=0% 15350 ! Lock, unlock object 15360 GOTO 15380 IF OBJ%=CLAM% OR OBJ%=OYSTER% \ SPK%=111% IF OBJ%=DOOR% \ SPK%=54% IF OBJ%=DOOR% AND PROP%(DOOR%)=1% \ SPK%=32% IF OBJ%=CAGE% \ SPK%=55% IF OBJ%=KEYS% \ SPK%=31% IF OBJ%=GRATE% OR OBJ%=CHAIN.% \ GOTO 11090 IF SPK%<>31% OR NOT FNHERE%(KEYS%) \ GOTO 15390 IF OBJ%=CHAIN.% \ IF CLOSNG% THEN K%=130% \ CLOCK2%=15% IF NOT PANIC% \ PANIC%=-1% \ GOTO 11080 15370 K%=34%+PROP%(GRATE%) \ PROP%(GRATE%)=1% \ PROP%(GRATE%)=0% IF VERB%=LOCK% \ K%=K%+2%*PROP%(GRATE%) \ GOTO 11080 15380 K%=0% \ K%=1% IF OBJ%=OYSTER% \ SPK%=124%+K% \ SPK%=120%+K% IF FNTOTING%(OBJ%) \ SPK%=122%+K% IF NOT FNTOTING%(TRIDNT%) \ SPK%=61% IF VERB%=LOCK% \ GOTO 11090 IF SPK%<>124% \ DUM%=FNDSTROY%(CLAM%) + FNDROP%(OYSTER%,LOC%) + FNDROP%(PEARL%,105%) \ GOTO 11090 15390 IF VERB%<>LOCK% THEN SPK%=171% \ SPK%=41% IF PROP%(BEAR%)=0% \ SPK%=37% IF PROP%(CHAIN.%)=0% \ GOTO 11090 IF SPK%<>171% \ PROP%(CHAIN.%), FIXED%(CHAIN.%)=0% \ PROP%(BEAR%)=2% IF PROP%(BEAR%)<>3% \ FIXED%(BEAR%)=2%-PROP%(BEAR%) \ GOTO 11090 15400 SPK%=172% \ SPK%=34% IF PROP%(CHAIN.%)<>0% \ SPK%=173% IF LOC%<>PLAC%(CHAIN.%) \ GOTO 11090 IF SPK%<>172% \ PROP%(CHAIN.%)=2% \ DUM%=FNDROP%(CHAIN.%,LOC%) IF FNTOTING%(CHAIN.%) \ FIXED%(CHAIN.%)=-1% \ GOTO 11090 15450 ! Light lamp 15460 GOTO 11090 IF NOT FNHERE%(LAMP%) \ SPK%=184% \ GOTO 11090 IF LIMIT%<0% \ PROP%(LAMP%)=1% \ DUM%=FNRSPEAK%(39%) \ GOTO 11010 IF WZDARK% \ GOTO 11100 15500 ! Lamp off 15510 GOTO 11090 IF NOT FNHERE%(LAMP%) \ PROP%(LAMP%)=0% \ DUM%=FNRSPEAK%(40%) \ DUM%=FNRSPEAK%(16%) IF FNDARK% \ GOTO 11100 15550 ! Wave 15560 SPK%=29% IF NOT FNTOTING%(OBJ%) AND (OBJ%<>ROD% OR NOT FNTOTING%(ROD2%)) \ GOTO 11090 IF OBJ%<>ROD% OR NOT FNAT%(FISSUR%) OR NOT FNTOTING%(OBJ%) OR CLOSNG% \ PROP%(FISSUR%)=1-PROP%(FISSUR%) \ DUM%=FNPSPEAK%(FISSUR%,2%-PROP%(FISSUR%)) \ GOTO 11100 15600 ! Attack 15610 I%=0% \ I%=J% IF DLOC%(J%)=LOC% AND DFLAG%>1% FOR J%=1% TO 5% \ GOTO 15620 IF OBJ%<>0% \ OBJ=OBJ% \ OBJ=DWARF% IF I%<>0% \ OBJ=OBJ*100%+SNAKE% IF FNHERE%(SNAKE%) \ OBJ=OBJ*100%+DRAGON% IF FNAT%(DRAGON%) AND PROP%(DRAGON%)=0% \ OBJ=OBJ*100%+TROLL% IF FNAT%(TROLL%) \ OBJ=OBJ*100%+BEAR% IF FNHERE%(BEAR%) AND PROP%(BEAR%)=0% \ GOTO 15000 IF OBJ>100% \ OBJ%=OBJ \ GOTO 15620 IF OBJ%<>0% \ OBJ%=BIRD% IF FNHERE%(BIRD%) AND VERB%<>THROW% \ OBJ%=100%*OBJ%+CLAM% IF FNHERE%(CLAM%) OR FNHERE%(OYSTER%) \ GOTO 15000 IF OBJ%>100% 15620 IF OBJ%=BIRD% THEN SPK%=137% \ GOTO 11090 IF CLOSED% \ DUM%=FNDSTROY%(BIRD%) \ PROP%(BIRD%)=0% \ TALLY2%=TALLY2%+1% IF PLACE%(SNAKE%)=PLAC%(SNAKE%) \ SPK%=45% 15630 SPK%=44% IF OBJ%=0% \ SPK%=150% IF OBJ%=CLAM% OR OBJ%=OYSTER% \ SPK%=46% IF OBJ%=SNAKE% \ SPK%=49% IF OBJ%=DWARF% \ GOTO 17490 IF OBJ%=DWARF% AND CLOSED% \ SPK%=167% IF OBJ%=DRAGON% \ SPK%=157% IF OBJ%=TROLL% \ SPK%=165%+(PROP%(BEAR%)+1%)/2% IF OBJ%=BEAR% \ GOTO 11090 IF OBJ%<>DRAGON% OR PROP%(DRAGON%)<>0% 15640 DUM%=FNRSPEAK%(49%) \ VERB%,OBJ%=0% \ DUM%=FNGETIN% \ GOTO 11140 IF LEFT(WD1$,1%)<>"Y" \ DUM%=FNPSPEAK%(DRAGON%,1%) \ PROP%(DRAGON%)=2% \ PROP%(RUG%)=0% \ K%=(PLAC%(DRAGON%)+FIXD%(DRAGON%))/2% \ DUM%=FNMOVE%(DRAGON%+100%,-1%) + FNMOVE%(RUG%+100%,0%)+ FNMOVE%(DRAGON%,K%) + FNMOVE%(RUG%,K%) \ DUM%=FNMOVE%(OBJ%,K%) IF PLACE%(OBJ%)=PLAC%(DRAGON%) OR PLACE%(OBJ%)=FIXD%(DRAGON%) FOR OBJ%=1% TO 100% \ LOC%=K% \ K%=NULL% \ GOTO 12500 15650 ! Pour 15660 OBJ%=FNLIQ% IF OBJ%=BOTTLE% OR OBJ%=0% \ GOTO 15000 IF OBJ%=0% \ GOTO 11090 IF NOT FNTOTING%(OBJ%) \ SPK%=78% \ GOTO 11090 IF OBJ%<>OIL% AND OBJ%<>WATER% \ PROP%(BOTTLE%)=1% \ PLACE%(OBJ%)=0% \ SPK%=77% \ GOTO 11090 IF NOT (FNAT%(PLANT%) OR FNAT%(DOOR%)) \ IF NOT FNAT%(DOOR%) THEN SPK%=112% \ GOTO 11090 IF OBJ%<>WATER% \ DUM%=FNPSPEAK%(PLANT%,PROP%(PLANT%)+1%) \ PROP%(PLANT%)=PROP%(PLANT%)+2%-(PROP%(PLANT%)+2%)/6%*6% \ PROP%(PLANT2%)=PROP%(PLANT2%)/2% \ K%=NULL% \ GOTO 12500 15670 PROP%(DOOR%)=0% \ PROP%(DOOR%)=1% IF OBJ%=OIL% \ SPK%=113%+PROP%(DOOR%) \ GOTO 11090 15700 ! Eat intransitive 15710 GOTO 15000 IF NOT FNHERE%(FOOD%) 15720 DUM%=FNDSTROY%(FOOD%) \ SPK%=72% \ GOTO 11090 15750 ! Eat transitive 15760 GOTO 15720 IF OBJ%=FOOD% \ SPK%=71% IF OBJ%=BIRD% OR OBJ%=SNAKE% OR OBJ%=CLAM% OR OBJ%=OYSTER% OR OBJ%=DWARF% OR OBJ%=DRAGON% OR OBJ%=TROLL% OR OBJ%=BEAR% \ GOTO 11090 15800 ! Drink 15810 GOTO 15000 IF OBJ%=0% AND FNLIQLOC%(LOC%)<>WATER% AND (FNLIQ%<>WATER% OR NOT FNHERE%(BOTTLE%)) \ SPK%=110% IF OBJ%<>0% AND OBJ%<>WATER% \ GOTO 11090 IF SPK%=110% OR FNLIQ%<>WATER% OR NOT FNHERE%(BOTTLE%) \ PROP%(BOTTLE%)=1% \ PLACE%(WATER%)=0% \ SPK%=74% \ GOTO 11090 15850 ! Rub 15860 SPK%=76% IF OBJ%<>LAMP% \ GOTO 11090 15900 ! Throw 15910 OBJ%=ROD2% IF FNTOTING%(ROD2%) AND OBJ%=ROD% AND NOT FNTOTING%(ROD%) \ GOTO 11090 IF NOT FNTOTING%(OBJ%) \ GOTO 15960 IF OBJ%>49% AND OBJ%<=MAXTRS% AND FNAT%(TROLL%) \ GOTO 15950 IF OBJ%=FOOD% AND FNHERE%(BEAR%) \ GOTO 15150 IF OBJ%<>AXE% \ GOTO 15920 IF DLOC%(I%)=LOC% FOR I%=1% TO 5% \ SPK%=152% \ GOTO 15930 IF FNAT%(DRAGON%) AND PROP%(DRAGON%)=0% \ SPK%=158% \ GOTO 15930 IF FNAT%(TROLL%) \ GOTO 15940 IF FNHERE%(BEAR%) AND PROP%(BEAR%)=0% \ OBJ%=0% \ GOTO 15600 15920 SPK%=48% \ GOTO 15930 IF INT(3%*RND)=0% OR SAVED%<>-1% \ DSEEN%(I%)=FALSE% \ DLOC%(I%)=0% \ SPK%=47% \ DKILL%=DKILL%+1% \ SPK%=149% IF DKILL%=1% 15930 DUM%=FNRSPEAK%(SPK%) + FNDROP%(AXE%,LOC%) \ K%=NULL% \ GOTO 12500 15940 SPK%=164% \ DUM%=FNDROP%(AXE%,LOC%) \ FIXED%(AXE%)=-1% \ PROP%(AXE%)=1% \ DUM%=FNJUGGLE%(BEAR%) \ GOTO 11090 15950 OBJ%=BEAR% \ GOTO 16150 15960 SPK%=159% \ DUM%=FNDROP%(OBJ%,0%) + FNMOVE%(TROLL%,0%) + FNMOVE%(TROLL%+100%,0%)+ FNDROP%(TROLL2%,PLAC%(TROLL%)) + FNDROP%(TROLL2%+100%,FIXD%(TROLL%)) + FNJUGGLE%(CHASM%) \ GOTO 11090 16000 ! Quit 16010 GAVEUP%=FNYES%(22%,54%,54%) 16020 GOTO 17500 IF GAVEUP% \ GOTO 11100 16050 ! Find 16060 SPK%=94% IF FNAT%(OBJ%) OR FNLIQ%=OBJ% AND FNAT%(BOTTLE%) OR K%=FNLIQLOC%(LOC%) \ SPK%=94% IF DLOC%(I%)=LOC% AND DFLAG%>1% AND OBJ%=DWARF% FOR I%=1% TO 5% \ SPK%=138% IF CLOSED% \ SPK%=24% IF FNTOTING%(OBJ%) \ GOTO 11090 16100 ! Inventory 16110 SPK%=98% \ FOR I%=1% TO 100% \ GOTO 16120 IF I%=BEAR% OR NOT FNTOTING%(I%) \ DUM%=FNRSPEAK%(99%) IF SPK%=98% \ BLKLIN%=0% \ DUM%=FNPSPEAK%(I%,-1%) \ BLKLIN%=-1% \ SPK%=0% 16120 NEXT I% \ SPK%=141% IF FNTOTING%(BEAR%) \ GOTO 11090 16150 ! Feed 16160 IF OBJ%=BIRD% THEN SPK%=100% \ GOTO 11090 16170 GOTO 16180 IF OBJ%<>SNAKE% AND OBJ%<>DRAGON% AND OBJ%<>TROLL% \ SPK%=102% \ SPK%=110% IF OBJ%=DRAGON% AND PROP%(DRAGON%)<>0% \ SPK%=182% IF OBJ%=TROLL% \ GOTO 11090 IF OBJ%<>SNAKE% OR CLOSED% OR NOT FNHERE%(BIRD%) \ SPK%=101% \ DUM%=FNDSTROY%(BIRD%) \ PROP%(BIRD%)=0% \ TALLY2%=TALLY2%+1% \ GOTO 11090 16180 IF OBJ%=DWARF% THEN GOTO 11090 IF NOT FNHERE%(FOOD%) \ SPK%=103% \ DFLAG%=DFLAG%+1% \ GOTO 11090 16190 IF OBJ%=BEAR% THEN SPK%=102% IF PROP%(BEAR%)=0% \ SPK%=110% IF PROP%(BEAR%)=3% \ GOTO 11090 IF NOT FNHERE%(FOOD%) \ DUM%=FNDSTROY%(FOOD%) \ PROP%(BEAR%)=1% \ FIXED%(AXE%), PROP%(AXE%)=0% \ SPK%=168% \ GOTO 11090 16200 SPK%=14% \ GOTO 11090 16250 ! Fill 16260 GOTO 16270 IF OBJ%=VASE% \ GOTO 11090 IF OBJ%<>0% AND OBJ%<>BOTTLE% \ GOTO 15000 IF OBJ%=0% AND NOT FNHERE%(BOTTLE%) \ SPK%=107% \ SPK%=106% IF FNLIQLOC%(LOC%)=0% \ SPK%=105% IF FNLIQ%<>0% \ GOTO 11090 IF SPK%<>107% \ PROP%(BOTTLE%)=(COND%(LOC%)-COND%(LOC%)/4%*4%)/2%*2% \ K%=FNLIQ% \ PLACE%(K%)=-1% IF FNTOTING%(BOTTLE%) \ SPK%=108% IF K%=OIL% \ GOTO 11090 16270 SPK%=29% \ SPK%=144% IF FNLIQLOC%(LOC%)=0% \ GOTO 11090 IF FNLIQLOC%(LOC%)=0% OR NOT FNTOTING%(VASE%) \ DUM%=FNRSPEAK%(145%) \ PROP%(VASE%)=2% \ FIXED%(VASE%)=-1% \ GOTO 15180 16300 ! Blast 16310 GOTO 11090 IF PROP%(ROD2%)<0% OR NOT CLOSED% \ BONUS%=133% \ BONUS%=134% IF LOC%=115% \ BONUS%=135% IF FNHERE%(ROD2%) \ DUM%=FNRSPEAK%(BONUS%) \ GOTO 17500 16350 ! Score 16360 SCORNG%=-1% \ GOTO 17500 16370 SCORNG%=0% \ PRINT "If you were to quit now, you would score";SCORE%; "out of a possible";MXSCOR% \ GAVEUP%=FNYES%(143%,54%,54%) \ GOTO 16020 16400 ! Fee-fie-foe-foo-fum 16410 K%=FNVOCAB%(WD1$,3%) \ SPK%=42% \ IF FOOBAR%<>1%-K% THEN SPK%=151% IF FOOBAR%<>0% \ GOTO 11090 16420 FOOBAR%=K% \ GOTO 11070 IF K%<>4% \ FOOBAR%=0% \ GOTO 11090 IF PLACE%(EGGS%)=PLAC%(EGGS%) OR FNTOTING%(EGGS%) AND LOC%=PLAC%(EGGS%) \ PROP%(TROLL%)=1% IF PLACE%(EGGS%)=0% AND PLACE%(TROLL%)=0% AND PROP%(TROLL%)=0% \ K%=2% \ K%=1% IF FNHERE%(EGGS%) \ K%=0% IF LOC%=PLAC%(EGGS%) \ DUM%=FNMOVE%(EGGS%,PLAC%(EGGS%)) + FNPSPEAK%(EGGS%,K%) \ GOTO 11100 16450 ! Brief 16460 SPK%=156% \ ABBNUM%=10000% \ DETAIL%=3% \ GOTO 11090 16500 ! Read 16510 OBJ=OBJ% \ OBJ=MAGZIN% IF FNHERE%(MAGZIN%) \ OBJ=OBJ*100%+MESSAG% IF FNHERE%(MESSAG%) \ OBJ=OBJ*100%+TABLET% IF FNHERE%(TABLET%) \ OBJ=OYSTER% IF CLOSED% AND FNTOTING%(OYSTER%) \ GOTO 15000 IF OBJ>100% OR OBJ=0% OR FNDARK% \ OBJ%=OBJ 16550 ! Read object 16560 GOTO 12160 IF FNDARK% \ SPK%=190% IF OBJ%=MAGZIN% \ SPK%=196% IF OBJ%=TABLET% \ SPK%=191% IF OBJ%=MESSAG% \ SPK%=194% IF OBJ%=OYSTER% AND HINTED%(2%) AND FNTOTING%(OYSTER%) \ GOTO 11090 IF OBJ%<>OYSTER% OR HINTED%(2%) OR NOT FNTOTING%(OYSTER%) OR NOT CLOSED% \ HINTED%(2%)=FNYES%(192%,193%,54%) \ GOTO 11100 16600 ! Break 16610 SPK%=148% IF OBJ%=MIRROR% \ GOTO 16620 IF OBJ%=VASE% AND PROP%(VASE%)=0% \ GOTO 11090 IF OBJ%<>MIRROR% OR NOT CLOSED% \ DUM%=FNRSPEAK%(197%) \ GOTO 17490 16620 SPK%=198% \ DUM%=FNDROP%(VASE%,LOC%) IF FNTOTING%(VASE%) \ PROP%(VASE%)=2% \ FIXED%(VASE%)=-1% \ GOTO 11090 16650 ! Wake 16660 GOTO 11090 IF OBJ%<>DWARF% OR NOT CLOSED% \ DUM%=FNRSPEAK%(199%) \ GOTO 17490 16700 ! Suspend 16710 SPK%=201% \ GOTO 11090 IF DEMO% \ PRINT "I can suspend your adventure for you so that you can "; "resume later, but" \ PRINT "you will have to wait at least";LATNCY%(0%);"minutes "; "before continuing." \ GOTO 11090 IF NOT FNYES%(200%,54%,54%) \ SAVEDT%=FNDATIME% \ SAVED%=DAY% \ SETUP%=-1% \ DEMO%=1% \ DUM%=FNCIAO% 16750 ! Hours 16760 DUM%=FNMSPEAK%(6%) + FNHOURS% \ GOTO 11100 17000 ! ! Hints ! 17010 ON HINT%-3% GOTO 17040,17050,17060,17070,17080,17090 17020 HINTLC%(HINT%)=0% \ GOTO 11120 IF NOT FNYES%(HINTS%(HINT%,3%),0%,54%) \ PRINT "I am prepared to give you a hint, but it will cost you"; HINTS%(HINT%,2%);"points." \ HINTED%(HINT%)=FNYES%(175%,HINTS%(HINT%,4%),54%) \ LIMIT%=LIMIT%+30%*HINTS%(HINT%,2%) IF HINTED%(HINT%) AND LIMIT%>30% 17030 HINTLC%(HINT%)=0% \ GOTO 11120 17040 GOTO 17020 IF PROP%(GRATE%)=0% AND NOT FNHERE%(KEYS%) \ GOTO 17030 17050 GOTO 17020 IF FNHERE%(BIRD%) AND FNTOTING%(ROD%) AND OBJ%=BIRD% \ GOTO 11120 17060 GOTO 17020 IF FNHERE%(SNAKE%) AND NOT FNHERE%(BIRD%) \ GOTO 17030 17070 GOTO 17020 IF ATLOC%(LOC%)=0% AND ATLOC%(OLDLOC%)=0% AND ATLOC%(OLDLC2%)=0% AND HOLDNG%>1% \ GOTO 17030 17080 GOTO 17020 IF PROP%(EMRALD%)<>-1% AND PROP%(PYRAM%)=-1% \ GOTO 17030 17090 GOTO 17020 17200 ! ! Cave closing ! 17210 PROP%(GRATE%), PROP%(FISSUR%)=0% \ DSEEN%(I%), DLOC%(I%)=0% FOR I%=1% TO 6% \ DUM%=FNMOVE%(TROLL%,0%) + FNMOVE%(TROLL%+100%,0%)+ FNMOVE%(TROLL2%,PLAC%(TROLL%))+ FNMOVE%(TROLL2%+100%,FIXD%(TROLL%)) + FNJUGGLE%(CHASM%) \ DUM%=FNDSTROY%(BEAR%) IF PROP%(BEAR%)<>3% \ PROP%(CHAIN.%), FIXED%(CHAIN.%), PROP%(AXE%), FIXED%(AXE%)=0% \ DUM%=FNRSPEAK%(129%) \ CLOCK1%, CLOSNG%=-1% \ GOTO 11150 17220 PROP%(BOTTLE%)=FNPUT%(BOTTLE%,115%,1%) \ PROP%(PLANT%)=FNPUT%(PLANT%,115%,0%) \ PROP%(OYSTER%)=FNPUT%(OYSTER%,115%,0%) \ PROP%(LAMP%)=FNPUT%(LAMP%,115%,0%) \ PROP%(ROD%)=FNPUT%(ROD%,115%,0%) \ PROP%(DWARF%)=FNPUT%(DWARF%,115%,0%) \ LOC%, OLDLOC%, NEWLOC%=115% \ FOO%=FNPUT%(GRATE%,116%,0%) \ PROP%(SNAKE%)=FNPUT%(SNAKE%,116%,1%) \ PROP%(BIRD%)=FNPUT%(BIRD%,116%,1%) \ PROP%(CAGE%)=FNPUT%(CAGE%,116%,0%) \ PROP%(ROD2%)=FNPUT%(ROD2%,116%,0%) \ PROP%(PILLOW%)=FNPUT%(PILLOW%,116%,0%) \ PROP%(MIRROR%)=FNPUT%(MIRROR%,115%,0%) \ FIXED%(MIRROR%)=116% \ DUM%=FNDSTROY%(I%) IF FNTOTING%(I%) FOR I%=1% TO 100% \ DUM%=FNRSPEAK%(132%) \ CLOSED%=-1% \ GOTO 10020 17230 DUM%=FNRSPEAK%(188%) \ PROP%(BATTER%)=1% \ DUM%=FNDROP%(BATTER%,LOC%) IF FNTOTING%(BATTER%) \ LIMIT%=LIMIT%+2500% \ LMWARN%=0% \ GOTO 11150 17240 GOTO 11150 IF LMWARN% OR NOT FNHERE%(LAMP%) \ LMWARN%=-1% \ SPK%=187% \ SPK%=183% IF PLACE%(BATTER%)=0% \ SPK%=189% IF PROP%(BATTER%)=1% \ DUM%=FNRSPEAK%(SPK%) \ GOTO 11150 17250 LIMIT%=-1% \ PROP%(LAMP%)=0% \ DUM%=FNRSPEAK%(184%) IF FNHERE%(LAMP%) \ GOTO 11150 17260 DUM%=FNRSPEAK%(185%) \ GAVEUP%=-1% \ GOTO 17500 17270 DUM%=FNMSPEAK%(1%) \ GOTO 17500 17490 DUM%=FNRSPEAK%(136%) 17500 ! ! Scoring ! 17510 SCORE%, MXSCOR%=0% \ FOR I%=50% TO MAXTRS% \ IF PTEXT%(I%*7%-6%)-PTEXT%(I%*7%-7%)<>0% THEN K%=12% \ K%=14% IF I%=CHEST% \ K%=16% IF I%>CHEST% \ SCORE%=SCORE%+2% IF PROP%(I%)>=0% \ SCORE%=SCORE%+K%-2% IF PLACE%(I%)=3% AND PROP%(I%)=0% \ MXSCOR%=MXSCOR%+K% 17520 NEXT I% \ MXSCOR%=MXSCOR%+MAXDIE%*10%+4%+25%+25%+45%+1%+2% \ SCORE%=SCORE%+(MAXDIE%-NUMDIE%)*10%-4%*(NOT (SCORNG% OR GAVEUP%))- 25%*(DFLAG%<>0%)-25%*CLOSNG%+CLOSED%*(10%*(BONUS%=0%)+ 25%*(BONUS%=135%)+30%*(BONUS%=134%)+45%*(BONUS%=133%))- (PLACE%(MAGZIN%)=108%)+2% \ SCORE%=SCORE%+HINTS%(I%,2%)*HINTED%(I%) FOR I%=1% TO HINTS%(0%,0%) \ GOTO 16370 IF SCORNG% 17530 PRINT "You scored";SCORE%;"out of a possible";MXSCOR%; ", using";TURNS%;"turns." \ GOTO 17540 IF CVAL%(I%)>=SCORE% FOR I%=1% TO CTEXT%(0%) \ PRINT "You just went off my scale!!" \ GOTO 17570 17540 DUM%=FNSPEAK%(CTEXT%(I%),CTEXT%(I%)+(CTEXT%(I%-1%)*(I%>1%)+ RTEXT%(RTEXT%(0%))*(I%=1%))) \ IF I%<>CTEXT%(0%) THEN K%=CVAL%(I%)+1%-SCORE% \ PRINT "To achieve the next higher rating, you need";K%; "more point";CHR$(115%*-(K%<>1%));"." \ GOTO 17570 17550 PRINT "To achieve the next higher rating would be a neat trick!" \ PRINT "Congratulations!!" 17570 GOTO 32700 19000 ! ! Chain entries ! 19110 DUM%=FNVARSET% \ GOTO 11000 19140 DUM%=FNVARSET% \ GOTO 14020 19150 ! Magic mode 19160 DUM%=FNCHAIN%(10100%) 20000 ! ! Functions ! ! I/O functions (SPEAK, GETIN, YES) 20100 ! SPEAK 20110 DEF FNSPEAK%(SUBSC%,LNGTH%) \ IF SUBSC%>0% THEN IF LEFT(LINES$(SUBSC%-LNGTH%+1%),3%)<>">$<" THEN PRINT IF BLKLIN% \ PRINT LINES$(F0%); FOR F0%=SUBSC%-LNGTH%+1% TO SUBSC% 20120 FNEND 20200 ! PSPEAK 20210 DEF FNPSPEAK%(MSG%,SKIP%) \ SUBSC%=MSG%*7%+SKIP%-5% \ BLKLIN%=0% \ FDUM%=FNSPEAK%(PTEXT%(SUBSC%),PTEXT%(SUBSC%)+(PTEXT%(SUBSC%-1%)* (SUBSC%>1%)+STEXT%(LTEXT%(0%))*(SUBSC%=1%))) IF SUBSC%>0% \ BLKLIN%=-1% \ FNEND 20300 ! RSPEAK 20310 DEF FNRSPEAK%(I%) \ FDUM%=FNSPEAK%(RTEXT%(I%),RTEXT%(I%)+(RTEXT%(I%-1%)*(I%>1%)+ PTEXT%(PTEXT%(0%)*7%)*(I%=1%))) IF I%>0% \ FNEND 20400 ! MSPEAK 20410 DEF FNMSPEAK%(I%) \ FDUM%=FNSPEAK%(MTEXT%(I%),MTEXT%(I%)+(MTEXT%(I%-1%)*(I%>1%)+ CTEXT%(CTEXT%(0%))*(I%=1%))) IF I%>0% \ FNEND 20500 ! GETIN 20510 DEF FNGETIN% \ INPUT #3%, IN$ \ IN$=CVT$$(IN$,252%) \ SPAC%=INSTR(1%,IN$+" "," ") \ WD1$=LEFT(IN$,SPAC%-1%) \ WD2$=RIGHT(IN$,SPAC%+1%) \ FNEND 20600 ! YES 20610 DEF FNYES%(X%,Y%,Z%) \ FDUM%=FNRSPEAK%(X%) \ ANSWER%=FNYESX% \ FDUM%=FNRSPEAK%(Y%) IF ANSWER% \ FDUM%=FNRSPEAK%(Z%) IF NOT ANSWER% \ FNYES%=ANSWER% \ FNEND 20700 ! YESM 20710 DEF FNYESM%(X%,Y%,Z%) \ FDUM%=FNMSPEAK%(X%) \ ANSWER%=FNYESX% \ FDUM%=FNMSPEAK%(Y%) IF ANSWER% \ FDUM%=FNMSPEAK%(Z%) IF NOT ANSWER% \ FNYESM%=ANSWER% \ FNEND 20800 ! YESX 20810 DEF FNYESX% 20820 FDUM%=FNGETIN% \ IF LEFT(WD1$,1%)="Y" THEN FNYESX%=-1% ELSE IF LEFT(WD1$,1%)="N" THEN FNYESX%=0% ELSE PRINT "Please answer the question." \ GOTO 20820 20830 FNEND 21000 ! ! Data structure functions (VOCAB, DSTROY, JUGGLE, MOVE, ! PUT, CARRY, DROP) 21100 ! VOCAB 21110 DEF FNVOCAB%(ID$,INIT%) \ FOR I%=1% TO KTAB%(0%) \ IF ATAB$(I%)=ID$ THEN FNVOCAB%=KTAB%(I%) \ GOTO 21140 21130 NEXT I% \ FNVOCAB%=-1% \ GOTO 21150 21140 IF INIT%>0% THEN FDUM%=KTAB%(I%)-INIT%*1000% \ IF FDUM%<1% THEN 21130 ELSE FNVOCAB%=FDUM% 21150 FNEND 21200 ! DSTROY 21210 DEF FNDSTROY%(OBJECT%) \ FDUM%=FNMOVE%(OBJECT%,0%) \ FNEND 21300 ! JUGGLE 21310 DEF FNJUGGLE%(OBJECT%) \ I%=PLACE%(OBJECT%) \ J%=FIXED%(OBJECT%) \ FDUM%=FNMOVE%(OBJECT%,I%) \ FDUM%=FNMOVE%(OBJECT%+100%,J%) \ FNEND 21400 ! MOVE 21410 DEF FNMOVE%(OBJECT%,WHERE%) \ IF OBJECT%>100% THEN FROM%=FIXED%(OBJECT%-100%) ELSE FROM%=PLACE%(OBJECT%) 21420 FDUM%=FNCARRY%(OBJECT%,FROM%) IF FROM%>0% AND FROM%<301% \ FDUM%=FNDROP%(OBJECT%,WHERE%) \ FNEND 21500 ! PUT 21510 DEF FNPUT%(OBJECT%,WHERE%,PVAL%) \ FDUM%=FNMOVE%(OBJECT%,WHERE%) \ FNPUT%=-1%-PVAL% \ FNEND 21600 ! CARRY 21610 DEF FNCARRY%(OBJECT%,WHERE%) \ IF OBJECT%<101% THEN GOTO 21660 IF PLACE%(OBJECT%)=-1% \ PLACE%(OBJECT%)=-1% \ HOLDNG%=HOLDNG%+1% 21620 IF ATLOC%(WHERE%)=OBJECT% THEN ATLOC%(WHERE%)=LINK%(OBJECT%) \ GOTO 21660 21630 TEMP%=ATLOC%(WHERE%) 21640 IF LINK%(TEMP%)<>OBJECT% THEN TEMP%=LINK%(TEMP%) \ GOTO 21640 21650 LINK%(TEMP%)=LINK%(OBJECT%) 21660 FNEND 21700 ! DROP 21710 DEF FNDROP%(OBJECT%,WHERE%) \ IF OBJECT%>100% THEN FIXED%(OBJECT%-100%)=WHERE% ELSE HOLDNG%=HOLDNG%-1% IF PLACE%(OBJECT%)=-1% \ PLACE%(OBJECT%)=WHERE% 21720 IF WHERE%>0% THEN LINK%(OBJECT%)=ATLOC%(WHERE%) \ ATLOC%(WHERE%)=OBJECT% 21730 FNEND 22000 ! ! Wizardry functions (START, MAINT, WIZARD, HOURS, NEWHRS, MOTD, POOF) 22400 ! HOURS 22410 DEF FNHOURS% \ FDUM%=FNHOURSX%(WKDAY(0%),"MON - FRI:")+ FNHOURSX%(WKEND(0%),"SAT - SUN:")+ FNHOURSX%(HOLID(0%),"Holidays:") + FNDATIME% \ GOTO 22420 IF HEND%(0%)1%));", namely ";HNAME$(0%) 22420 FNEND 22500 ! HOURSX 22510 DEF FNHOURSX%(H,DAY$) \ FIRST%=-1% \ FROM%=0% \ IF H=0% THEN PRINT " ";DAY$;" Open all day" \ GOTO 22550 22520 FROM%=FROM%+1% UNTIL FNSHIFT%(H,FROM%) \ GOTO 22530 IF FROM%>23% AND FIRST% \ GOTO 22550 IF FROM%>23% \ TILL%=FROM% \ TILL%=TILL%+1% UNTIL NOT FNSHIFT%(H,TILL%) OR TILL%>23% \ PRINT USING " \ \ ##:00 TO ##:00", DAY$,FROM%,TILL% IF FIRST% \ PRINT USING " ##:00 TO ##:00", FROM%,TILL% IF NOT FIRST% \ FIRST%=0% \ FROM%=TILL% \ GOTO 22550 IF TILL%>23% \ GOTO 22520 22530 PRINT " ";DAY$;" Closed all day" 22550 FNEND 23000 ! ! Utility functions (SHIFT, DATIME, CIAO, BUG) 23100 ! SHIFT 23110 DEF FNSHIFT%(VALUE,BIT%) \ FDUM=INT(VALUE/2^BIT%) \ FNSHIFT%=-1-INT(VALUE/2^(BIT%+1%))*2%+FDUM \ FNEND 23200 ! DATIME 23210 DEF FNDATIME% \ D0$=DATE$(0%) \ MON%=INSTR(1%," JanFebMarAprMayJunJulAugSepOctNovDec", MID(D0$,4%,3%))/3% \ YEAR%=VAL(RIGHT(D0$,8%))-77% \ DAY%=-(YEAR%=(YEAR%+1%)/4%*4%-1% AND MON%>2%) \ DAY%=DAY%+HATH%(I%) FOR I%=1% TO MON%-1% \ DAY%=DAY%+VAL(LEFT(D0$,2%)) \ DAY%=DAY%+YEAR%*365%+YEAR%/4% 23220 FNDATIME%=TIME(0%)/60% \ FNEND 23300 ! CIAO 23310 DEF FNCIAO% \ DUM%=FNSETVAR% \ GOTO 32720 \ FNEND 23400 ! BUG 23410 DEF FNBUG%(NUMB%) \ PRINT "Fatal error";NUMB%; \ PRINT "(";NUM1$(ERR);",";NUM1$(ERL);")"; IF NUMB%=10% \ PRINT \ GOTO 32700 \ FNEND 24000 ! ! Other functions (TOTING, HERE, AT, LIQ2, LIQ, LIQLOC, ! BITSET, FORCED, DARK, PCT) 24100 ! TOTING 24110 DEF FNTOTING%(OBJ%)=PLACE%(OBJ%)=-1% 24200 ! HERE 24210 DEF FNHERE%(OBJ%)=PLACE%(OBJ%)=LOC% OR FNTOTING%(OBJ%) 24300 ! AT 24310 DEF FNAT%(OBJ%)=PLACE%(OBJ%)=LOC% OR FIXED%(OBJ%)=LOC% 24400 ! LIQ2 24410 DEF FNLIQ2%(PBOTL%)=(1%-PBOTL%)*WATER%+(PBOTL%/2%)*(WATER%+OIL%) 24450 ! LIQ 24460 DEF FNLIQ% \ FDUM%=PROP%(BOTTLE%) \ IF FDUM%>-1%-FDUM% THEN FNLIQ%=FNLIQ2%(FDUM%) ELSE FNLIQ%=FNLIQ2%(-1%-FDUM%) 24470 FNEND 24500 ! LIQLOC 24510 DEF FNLIQLOC%(LOC%) \ FNLIQLOC%=FNLIQ2%((COND%(LOC%)/2%*2%-COND%(LOC%)/16%*16%-5%)* (COND%(LOC%)/4%-COND%(LOC%)/8%*2%)+1%) \ FNEND 24600 ! BITSET 24610 DEF FNBITSET%(L%,N%)=(COND%(L%) AND 2%^N%)<>0% 24700 ! FORCED 24710 DEF FNFORCED%(LOC%)=COND%(LOC%)=2% 24800 ! DARK 24810 DEF FNDARK% \ FNDARK%=COND%(LOC%)-COND%(LOC%)/2%*2%=0% AND (PROP%(LAMP%)=0% OR NOT FNHERE%(LAMP%)) \ FNEND 24900 ! PCT 24910 DEF FNPCT%(N%)=100%*RND0% FOR I%=0% TO 4% 25390 FNEND 25400 ! SETVAR 25410 DEF FNSETVAR% 25420 OTHER%(2%)=DFLAG% \ OTHER%(4%)=TURNS% \ OTHER%(5%)=LMWARN% \ OTHER%(6%)=IWEST% \ OTHER%(7%)=KNFLOC% \ OTHER%(8%)=DETAIL% \ OTHER%(9%)=NUMDIE% \ OTHER%(10%)=HOLDNG% \ OTHER%(11%)=DKILL% \ OTHER%(12%)=FOOBAR% \ OTHER%(13%)=BONUS% \ OTHER%(14%)=SAVED% \ OTHER%(15%)=CLOSNG% \ OTHER%(16%)=PANIC% \ OTHER%(17%)=CLOSED% \ OTHER%(20%)=SAVEDT% \ OTHER%(21%)=ABBNUM% \ OTHER%(22%)=CLOCK1% \ OTHER%(23%)=CLOCK2% 25430 OTHER%(24%)=TALLY% \ OTHER%(25%)=TALLY2% \ OTHER%(26%)=SETUP% \ OTHER%(27%)=DEMO% \ OTHER%(28%)=LOC% \ OTHER%(29%)=OLDLOC% \ OTHER%(30%)=OLDLC2% \ OTHER%(31%)=NEWLOC% \ OTHER%(32%)=LIMIT% \ OTHER%(33%)=BLKLIN% \ OTHER%(34%)=DETAIL% 25440 CLOSE 1%,4% \ FNEND 31000 ! ! Data ! 31100 ! Date 31110 DATA 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 32000 ! ! Error routine ! 32010 IF ERR=5% THEN CHAIN LDN$+"ADVENT" 32020 IF ERR=10% THEN PRINT "Sorry, no adventures now." \ RESUME 32700 32030 IF ERR=58% THEN DUM%=FNBUG%(20%) 32040 RESUME 32090 32090 DUM%=FNBUG%(10%) 32700 ! Finish up 32710 KILL "ADVENT.ADV" 32720 CLOSE 1%,2%,3%,4% 32730 END