Source:Advanced Bench

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 source code of the Eamon utility program Advanced Bench. (See also Source:Test Bench.)

Source

EAG Utilities Disk

Date

2 August 1984

Author

John Nelson

License

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

1  REM      ADVANCED BENCH
2  REM      BY JOHN NELSON
3  REM 
4  REM 
7  REM  8-24-84
10 DK$ =  CHR$ (4)
20  FOR X = 1 TO 4: READ SN$(X): NEXT : FOR X = 1 TO 5: READ WT$(X): NEXT 
100  HOME : PRINT "DO YOU WANT TO USE STANDARD?";
150  GET ST$: IF ST$ <  > "N" AND ST$ <  > "Y" THEN 150
200  PRINT ST$: IF ST$ = "Y" THEN 15000
220  GOSUB 15000
230  HOME : PRINT "NAME OF CHARACTER:";NA$;: HTAB  PEEK (36) -  LEN (NA$) + 1: INPUT "";A$: IF A$ = "" THEN A$ = NA$: VTAB 1: HTAB 19: PRINT A$
240 NA$ = A$
250  PRINT "HARDINESS:";HD;: HTAB 11: INPUT "";HD$: IF HD$ = "" THEN HD$ =  STR$ (HD): VTAB  PEEK (37): HTAB 11: PRINT HD
300  PRINT "AGILITY:";AG;: HTAB 9: INPUT "";AG$: IF AG$ = "" THEN AG$ =  STR$ (AG): VTAB  PEEK (37): HTAB 9: PRINT AG
350  PRINT "CHARISMA:";CH;: HTAB 10: INPUT "";CH$: IF CH$ = "" THEN CH$ =  STR$ (CH): VTAB  PEEK (37): HTAB 10: PRINT CH
370 HD =  VAL (HD$):AG =  VAL (AG$):CH =  VAL (CH$)
400  FOR X = 1 TO 4
420  PRINT SN$(X);" ABILITY (%): ";SP%(X);: HTAB  PEEK (36) -  LEN ( STR$ (SP%(X))) + 1: INPUT "";A$: IF  VAL (A$) < 0 OR  VAL (A$) > 100 THEN  VTAB  PEEK (37): GOTO 420
430  IF A$ = "" THEN A$ =  STR$ (SP%(X)): VTAB  PEEK (37): HTAB  LEN (SN$(X)) + 15: PRINT A$
450 SP%(X) =  VAL (A$): NEXT 
460  PRINT "ARMOUR TYPE:": PRINT "  1. SHIELD ONLY": PRINT "  2. LEATHER": PRINT "  3. LEATHER AND SHIELD": PRINT "  4. CHAIN MAIL": PRINT "  5. CHAIN AND SHIELD"
465  PRINT "  6. PLATE ARMOUR": PRINT "  7. PLATE AND SHIELD": PRINT "INPUT NUMBER 1-7 : ";AC; CHR$ (8);
470  GET A$: IF (A$ < "1" OR A$ > "7") AND A$ <  >  CHR$ (13) THEN 470
480  IF A$ =  CHR$ (13) THEN A$ =  STR$ (AC)
490  VTAB 9: HTAB 13: CALL  - 958::AC =  VAL (A$): PRINT AC
500  FOR X = 1 TO 5
510  VTAB 9 + X: CALL  - 958: PRINT WT$(X);" EXPERTISE (0-100%) ";WA%(X);: HTAB  PEEK (36) -  LEN ( STR$ (WA%(X))) + 1: INPUT "";A$: IF  VAL (A$) < 0 OR  VAL (A$) > 100 THEN 510
520  IF A$ = "" THEN A$ =  STR$ (WA%(X)): VTAB  PEEK (37): HTAB  LEN (WT$(X)) + 21: PRINT A$
550 WA%(X) =  VAL (A$): NEXT 
600  PRINT : INVERSE : PRINT "  IS THIS ACCEPTABLE? (Y/N)   ";: NORMAL : PRINT " ";
610  GET A$: IF A$ <  > "Y" AND A$ <  > "N" THEN 610
620  IF A$ = "Y" THEN 14500
650  GOTO 230
10010  DATA  BLAST,HEAL,SPEED,POWER
10020  DATA  AXE,BOW,MACE,SPEAR,SWORD
10030  DATA   TESTOR: REM  NAME
10040  DATA   20,18,16: REM  HARDINESS/AGILITY/CHARISMA
10050  DATA   50,90,60,50: REM  BLAST/HEAL/SPEED/POWER
10060  DATA  30 : REM  ARMOUR EXPERTISE
10070  DATA  4: REM  ARMOUR CLASS
10080  DATA  40,10,55,15,40: REM  WEAPON ABIL: AXE/BOW/MACE/SPEAR/SWORD
10090  DATA  MACE,3,10,1,4: REM  1ST WEAPON
10100  DATA  SWORD,5,10,1,8: REM  2ND WEAPON
10110  DATA  EXCALIBUR,5,25,2,8: REM  3RD WEAPON
10120  DATA   NONE,0,0,0,0 : REM   4TH WEAPON
10130  DATA  M,2000,4000
14500  REM   === GO ON ADVENTURE ===
14510  HOME : VTAB 5: PRINT "INSERT ADVENTURE TO TEST AND PRESS ANY": PRINT : PRINT "          KEY TO CONTINUE"
14520  GET A$: PRINT : PRINT DK$;"OPEN FRESH MEAT": PRINT DK$;"WRITE FRESH MEAT"
14530  PRINT  - 1: PRINT NA$: PRINT HD: PRINT AG: PRINT CH: FOR X = 1 TO 4: PRINT SP%(X): NEXT : FOR X = 1 TO 5: PRINT WA%(X): NEXT 
14540  PRINT AE: PRINT SEX$: PRINT GOLD: PRINT BANK: PRINT AC: FOR X = 1 TO 4: PRINT WN$(X): PRINT WT%(X): PRINT WC%(X): PRINT WD%(X): PRINT WS%(X): NEXT 
14590  PRINT DK$"CLOSE": PRINT DK$"OPEN EAMON.NAME": PRINT DK$"READ EAMON.NAME": INPUT AD$: PRINT DK$"CLOSE"
14600  PRINT DK$"RUN ";AD$
15000  READ NAME$: READ HD,AG,CH: FOR X = 1 TO 4: READ SP%(X): NEXT : READ AE: READ AC: FOR X = 1 TO 5: READ WA%(X): NEXT : FOR X = 1 TO 4: READ WN$(X),WT%(X),WC%(X),WD%(X),WS%(X): NEXT 
15010  READ SEX$,GOLD,BANK
15020 NM$ = NA$
15100  IF STD$ = "Y" THEN 14500
15150  RETURN