Source:Universal Check Files

From Eamon Wiki
Jump to navigation Jump to search
This page is a verbatim reproduction of original source material and should not be edited except for maintenance.
Description

The Applesoft BASIC source code of the Eamon utility program Universal Check Files.

Source

EAG Utilities Disk

Date

23 June 1995

Author

Tom Zuchowski

License

The use of this item is permitted on the grounds that it's free or in the public domain.

1  REM 

EAMON UNIVERSAL CHECK FILES PROGRAM

3  REM 6/23/95

7  REM 

EAMON ADVENTURERS GUILD
7625 HAWKHAVEN DR.
CLEMMONS, NC 27012

10  HOME : VTAB 5: PRINT "   UNIVERSAL EAMON FILE CHECK PROGRAM": HTAB 15: PRINT "VERSION 2.0"
15  VTAB 10: PRINT "INSERT ADVENTURE TO BE TESTED FOR VALID TEXT FILES AND PRESS ANY KEY TO CONTINUE": VTAB 23: GET A$: PRINT 
20 D$ =  CHR$ (4)
25  PRINT D$"OPEN EAMON.NAME": PRINT D$"READ EAMON.NAME": INPUT DU$
30 DV = 4:LT = 0:LT$ = "NO"
33  ONERR  GOTO 47
35  INPUT ND
37 DV = 0
45  INPUT DV:DV$ =  STR$ (DV): IF DV > 5 THEN LT = 1:LT$ = "YES":A8 = 1: GOTO 60
47  IF  NOT ND THEN DV = 4:LT = 0:LT$ = "NO"
50  IF ND AND  NOT DV THEN DV = 5
60  POKE 216,0: PRINT D$"CLOSE":DL = 256:RO = 0:AO = 100:EO = 200:MO = 300:LR = 64:LN = 64:LA = 128:LM = 128:D7 = (DV =  > 7):DV$ =  STR$ (DV): IF D7 THEN DL = 242:RO = 0:AO = 200:EO = 400:MO = 600
65  IF  NOT ND THEN ND = 6
68  IF DU$ = "SANCTUARY" THEN SR = 1:D7 = 1:DL = 242:RO = 0:AO = 200:EO = 400:MO = 600:DV$ = "7.0R":ND = 6: PRINT  CHR$ (7)"INSERT DISK 2": INPUT " AND PRESS <RETURN> TO CONTINUE";Z$
70  PRINT D$"OPEN EAMON.DESC,L"DL: PRINT D$"READ EAMON.DESC,R0": INPUT NR,NA,NE,NM: IF D7 THEN  INPUT LR,LM,LA
80  POKE 216,0: PRINT D$"CLOSE": GOTO 2000
99  REM PRINT INFO SCREEN
100  PRINT D$: HOME : INVERSE : PRINT DU$: NORMAL : PRINT : PRINT "MAIN.PGM VERSION: ";DV$: PRINT "DIRECTIONS:       ";ND: PRINT "ROOM LIGHTING:    ";LT$
115  PRINT : HTAB 22: PRINT "EAMON.DESC"
120  PRINT "NO. OF RECORDS:";: HTAB 22: PRINT "RECORD OFFSETS:"
122  PRINT "   ROOMS:      ";NR;: HTAB 25: PRINT "ROOMS:      ";RO
124  PRINT "   ARTIFACTS:  ";NA;: HTAB 25: PRINT "ARTIFACTS:  ";AO
126  PRINT "   EFFECTS:    ";NE;: HTAB 25: PRINT "EFFECTS:    ";EO
128  PRINT "   MONSTERS    ";NM;: HTAB 25: PRINT "MONSTERS:   ";MO
130  PRINT : PRINT "RECORD LENGTHS:": PRINT "   EAMON.DESC:       ";DL: IF  NOT D7 THEN  PRINT "   EAMON.ROOM NAMES: ";LN$
140  PRINT "   EAMON.ROOMS:      ";LR$: PRINT "   EAMON.ARTIFACTS:  ";LA$: PRINT "   EAMON.MONSTERS    ";LM$
160  VTAB 22: POKE  - 16338,0: HTAB 7: PRINT "HIT ANY KEY TO CONTINUE:";: GET A$: PRINT A$: IF A$ =  CHR$ (3) THEN  END 
199  REM VERIFY EAMON.DESC
200  PRINT D$: HOME : PRINT "VERIFYING:": PRINT "   ";: INVERSE : PRINT DU$: NORMAL 
210  ONERR  GOTO 1000
220  PRINT D$"OPEN EAMON.DESC,L"DL: PRINT : PRINT "EAMON.DESC:     ROOM ": FOR X = 1 TO NR: VTAB 4: HTAB 22: PRINT X: PRINT D$"READ EAMON.DESC,R";X + RO: INPUT DE$: NEXT 
230  VTAB 6: HTAB 13: PRINT "ARTIFACT ": FOR X = 1 TO NA: VTAB 6: HTAB 22: PRINT X: PRINT D$"READ EAMON.DESC,R";X + AO: INPUT DE$: NEXT 
240  VTAB 8: HTAB 15: PRINT "EFFECT "
250  IF NE = 0 THEN  VTAB 8: HTAB 22: PRINT "(NONE)": GOTO 270
260  FOR X = 1 TO NE: VTAB 8: HTAB 22: PRINT X: PRINT D$"READ EAMON.DESC,R";X + EO: INPUT DE$: NEXT 
270  VTAB 10: HTAB 14: PRINT "MONSTER ": IF  NOT SB THEN  FOR X = 1 TO NM: VTAB 10: HTAB 22: PRINT X: PRINT D$"READ EAMON.DESC,R";X + MO: INPUT DE$: NEXT 
275  IF SB THEN  FOR X = 1 TO 7: VTAB 10: HTAB 22: PRINT X: PRINT D$"READ EAMON.DESC,R";X + MO: INPUT DE$: NEXT : FOR X = 53 TO 99: VTAB 10: HTAB 22: PRINT X: PRINT D$"READ EAMON.DESC,R";X + MO: INPUT DE$: NEXT 
280  PRINT D$"CLOSE"
299  REM VERIFY DATA FILES
300  IF  NOT D7 THEN  PRINT D$"OPEN EAMON.ROOM NAMES,L"LN: VTAB 13: PRINT "   EAMON.ROOM NAMES:": FOR R = 1 TO NR: VTAB 13: HTAB 22: PRINT R: PRINT D$"READ EAMON.ROOM NAMES,R";R: INPUT RN$: NEXT : PRINT D$"CLOSE"
310  IF  NOT D7 THEN VT = 17: PRINT D$"OPEN EAMON.ROOMS,L"LR: VTAB 15: HTAB 9: PRINT "EAMON.ROOMS:": FOR R = 1 TO NR: VTAB 15: HTAB 22: PRINT R: PRINT D$"READ EAMON.ROOMS,R";R: FOR D = 1 TO ND + LT: INPUT RD%: NEXT : NEXT : PRINT D$"CLOSE"
320  IF D7 THEN VT = 15: PRINT D$"OPEN EAMON.ROOMS,L"LR: VTAB 13: HTAB 9: PRINT "EAMON.ROOMS:": FOR R = 1 TO NR: VTAB 13: HTAB 22: PRINT R: PRINT D$"READ EAMON.ROOMS,R";R: INPUT RN$: FOR D = 1 TO ND + LT: INPUT RD%: NEXT : NEXT : PRINT D$"CLOSE"
321  IF D3 THEN 400
322  IF SR THEN  VTAB VT: HTAB 5: PRINT  CHR$ (7)"INSERT DISK 1": INPUT " AND PRESS <RETURN> TO CONTINUE";Z$
323  IF SA = 0 THEN 330
325  PRINT D$"OPEN EAMON.ARTIFACTS": PRINT D$"READ EAMON.ARTIFACTS": VTAB VT: HTAB 5: PRINT "EAMON.ARTIFACTS:": INPUT NA: FOR M = 1 TO NA: VTAB VT: HTAB 22: PRINT M: INPUT AN$: FOR X = 1 TO 4: INPUT A%: IF X = 2 THEN T% = A%
326  NEXT : IF T% > 1 OR D7 OR A8 THEN  FOR X = 1 TO 4: INPUT A%: NEXT 
327  NEXT : PRINT D$"CLOSE": GOTO 352
330  PRINT D$"OPEN EAMON.ARTIFACTS,L"LA: VTAB VT: HTAB 5: PRINT "EAMON.ARTIFACTS:": FOR M = 1 TO NA: VTAB VT: HTAB 22: PRINT M: PRINT D$"READ EAMON.ARTIFACTS,R";M: INPUT AN$: FOR X = 1 TO 4: INPUT A%: IF X = 2 THEN T% = A%
340  NEXT : IF T% > 1 OR D7 OR A8 THEN  FOR X = 1 TO 4: INPUT A%: NEXT 
350  NEXT : PRINT D$"CLOSE"
352  IF SM = 0 THEN 360
355 VT = VT + 2: PRINT D$"OPEN EAMON.MONSTERS": PRINT D$"READ EAMON.MONSTERS": VTAB VT: HTAB 6: PRINT "EAMON.MONSTERS:": INPUT NM: FOR M = 1 TO NM: VTAB VT: HTAB 22: PRINT M: INPUT MN$: FOR F = 1 TO 12 - D7: INPUT X: NEXT : NEXT : GOTO 370
360 VT = VT + 2: PRINT D$"OPEN EAMON.MONSTERS,L"LM: VTAB VT: HTAB 6: PRINT "EAMON.MONSTERS:": FOR M = 1 TO NM: VTAB VT: HTAB 22: PRINT M: PRINT D$"READ EAMON.MONSTERS,R";M: INPUT MN$: FOR F = 1 TO 12 - D7: INPUT X: NEXT : NEXT 
370  PRINT D$"CLOSE"
400  PRINT : PRINT : PRINT "VERIFICATION COMPLETE.": END 
1000  REM  VERIFICATION ERROR
1010  POKE 216,0: PRINT D$"CLOSE"
1020  PRINT  CHR$ (7): INVERSE : PRINT "VERIFICATION ERROR!": NORMAL 
1030  PRINT : PRINT "IT IS POSSIBLE THAT THIS ADVENTURE USES DIFFERENT RECORD LENGTHS THAN THE ONES  LISTED ON THE FIRST SCREEN OF THIS      PROGRAM."
1040  PRINT : PRINT "IT IS RECOMMENDED THAT YOU LIST THE     MAIN.PGM TO VERIFY THESE RECORD LENGTHS.IF THEY ARE IN FACT CORRECT, THEN YOU   HAVE A BAD FILE."
1050  END 
2000  REM CHECK FOR NON-STANDARD FILES
2005 MV$ = DV$ + " (MODIFIED)"
2010  IF DU$ = "THROR'S RING" THEN DV$ = MV$:LR = 32:LN = LR: GOTO 2900
2020  IF DU$ = "DUNGEON OF DOOM" THEN DV$ = MV$:LR = 30:LN = 40:RO = 0:AO = 161:EO = 322:MO = 483:SA = 1:SM = 1:LR$ =  STR$ (LR):LN$ =  STR$ (LN):LA$ = "SEQUENTIAL":LM$ = LA$:OF = 1: GOTO 100
2030  IF DU$ = "THE ALTERNATE ZONE" THEN DV$ = MV$:RO = 0:AO = 99:EO = 199:MO = 299:OF = 1: GOTO 2900
2040  IF DU$ = "THE LAST DRAGON" THEN DV$ = MV$:LR = 32:LN = 32: GOTO 2900
2050  IF DU$ = "OPERATION ENDGAME" THEN DV$ = MV$:LR = 32:LN = 64:LA = 90:LM = 100:EO = 300:MO = 200: GOTO 3100
2060  IF DU$ = "ANIMAL FARM" THEN DV$ = MV$:LR = 32:LN = 64:LA = 90:LM = 90:AO = 149:OF = 1: GOTO 2900
2070  IF DU$ = "THE BOY AND THE BARD" THEN DV$ = MV$:LR = 32:LN = 40:LA = 64:LM = 80: GOTO 2900
2080  IF DU$ = "CAVERNS OF LANST" THEN ND = 10: GOTO 2900
2090  IF DU$ = "BUCCANEER!" THEN DV$ = MV$: GOTO 3000
2100  IF DU$ = "A TRIP TO FORT SCOTT" THEN DV = 5:LT = 0:LT$ = "NO"
2110  IF DU$ = "TOMB OF THE VAMPIRE" THEN DV = 5:LT = 0:LT$ = "NO"
2120  IF DU$ = "BEGINNER'S CAVE II" THEN DV = 6:D7 = 0:DL = 256:RO = 0:AO = 100:EO = 200:MO = 300:LR = 64:LN = 64:LA = 128:LM = 128: GOTO 2900
2130  IF DU$ = "MEAN STREETS" THEN DV$ = MV$:LR = 32: GOTO 2900
2150  IF DU$ = "B I Z A R R O" THEN DV = 5:LT = 0:LT$ = "NO"
2160  IF DU$ = "STORM BREAKER" THEN DV$ = MV$: GOTO 3200
2170  IF DU$ = "THE BEGINNERS CAVE" THEN NE = 6: GOTO 2900
2900 LR$ =  STR$ (LR):LN$ =  STR$ (LN):LA$ =  STR$ (LA):LM$ =  STR$ (LM): GOTO 100
3000  REM BUCCANEER!
3010  PRINT D$: HOME 
3020  PRINT "'BUCCANEER!' IS A TWO-DISK ADVENTURE.   HOWEVER, THE SECOND ADVENTURE ON SIDE   TWO USES NON-STANDARD FILE NAMES!"
3030  PRINT "SIDE ONE CAN BE CHECKED NORMALLY, BUT TOCHECK SIDE TWO, YOU MUST FOLLOW THESE   STEPS:"
3040  PRINT : PRINT "MAKE A COPY OF SIDE TWO TO A BLANK DISK.YOU *MUST* MAKE A COPY BECAUSE YOU ARE  GOING TO MAKE CHANGES TO IT FOR TESTING."
3050  PRINT "RENAME THESE FILES ON THE COPY:"
3060  PRINT : PRINT "E.1   EAMON.NAMES": PRINT "E.2   EAMON.ROOMS": PRINT "E.3   EAMON.ROOM NAMES": PRINT "E.4   EAMON.MONSTERS": PRINT "E.5   EAMON.ARTIFACTS": PRINT "E.6   EAMON.DESC"
3070  PRINT : PRINT "RUN THIS PROGRAM ON THE MODIFIED COPY."
3080  PRINT : PRINT "HIT 'C' TO CONTINUE OR 'S' TO STOP.";: GET Z$: PRINT Z$: IF Z$ = "C" THEN  POKE  - 16368,0: GOTO 2900
3100  REM OPERATION ENDGAME
3110  ONERR  GOTO 3130
3120 DT$ = "OPERATION ENDGAME - DISK TWO": PRINT D$"VERIFY"DT$:DU$ = DT$: POKE 216,0: GOTO 2900
3130  POKE 216,0
3140 DT$ = "OPERATION ENDGAME - DISK THREE": PRINT D$"VERIFY"DT$:DU$ = DT$:D3 = 1: GOTO 2900
3200  REM STORM BREAKER
3210  ONERR  GOTO 3230
3220 DT$ = "DISK 2": PRINT D$"VERIFY"DT$:DU$ = DU$ + " - " + DT$: POKE 216,0: GOTO 2900
3230  POKE 216,0
3240 DT$ = "DISK 3": PRINT D$"VERIFY"DT$:DU$ = DU$ + " - " + DT$:D3 = 1:SB = 1:NA = 49: GOTO 2900