Source:Village

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 program Village.

Source

Eamon Master

Date

April 1989

Author

Donald Brown, John Nelson

License

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

1  REM MAIN HALL
2  REM 
3  REM BY DONALD BROWN
4  REM 
5  REM 
6  REM 
7  REM REV 12/84
8  REM  EXTENDED CHARACTER FILE MODIFICATION ADDED 4/89 (REV 8/85)
9  REM 
10  PRINT  CHR$ (4);"MAXFILES 3"
15 DK$ =  CHR$ (4)
20  ONERR  GOTO 17000
30  PRINT DK$;"OPEN THE ADVENTURER": PRINT DK$;"READ THE ADVENTURER": INPUT NAME$: INPUT REC: PRINT DK$;"CLOSE"
35  PRINT DK$;"OPEN REC.NUM": PRINT DK$;"READ REC.NUM": INPUT REC: PRINT DK$;"CLOSE"
40  ONERR  GOTO 100
50  PRINT DK$;"OPEN CHARACTERS.EXT,L256": PRINT DK$;"READ CHARACTERS.EXT,R";REC: INPUT NAME$: INPUT HD,AG,CH: FOR X = 1 TO 4: INPUT SA%(X): NEXT : FOR X = 1 TO 5: INPUT WA%(X): NEXT : INPUT AE
60  INPUT SEX$
70  INPUT GOLD,BANK: INPUT AC: FOR W = 1 TO 4: INPUT WNAME$(W),WTYPE%(W),WODDS%(W),WDICE%(W),WSIDES%(W): NEXT W: PRINT DK$;"CLOSE"
80  DEF  FN P(X) =  INT (X * RTIO + .5)
100  PRINT : PRINT "IN THE MAIN HALL, YOU DISCOVER": PRINT "YOU CAN DO ONE OF THESE THINGS:": PRINT : PRINT "  1.  GO ON AN ADVENTURE.": PRINT "  2.  VISIT THE WEAPON SHOP FOR WEAPONS       AND/OR ARMOUR."
110  PRINT "  3.  HIRE A WIZARD TO TEACH YOU SOME         SPELLS.": PRINT "  4.  FIND THE BANKER TO DEPOSIT OR": PRINT "      WITHDRAW SOME GOLD.": PRINT "  5.  EXAMINE YOUR ABILITIES."
115  PRINT "  6.  TEMPORARILY LEAVE THE UNIVERSE.": PRINT "  7.  TAKE SOME WEAPON TRAINING."
120  PRINT : PRINT "(HIT THE KEY FOR YOUR CHOICE, 1-7)";
130  GET A$:CMD =  VAL (A$): IF CMD < 1 OR CMD > 7 THEN 130
140  PRINT CMD: PRINT : ON CMD GOTO 1000,2000,3000,4000,5000,6000,7000
200  PRINT NAME$: PRINT HD: PRINT AG: PRINT CH: FOR X = 1 TO 4: PRINT SA%(X): NEXT : FOR X = 1 TO 5: PRINT WA%(X): NEXT : PRINT AE: PRINT SEX$
210  PRINT GOLD: PRINT BANK: PRINT AC: FOR W = 1 TO 4: PRINT WNAME$(W): PRINT WTYPE%(W): PRINT WOODS%(W): PRINT WDICE%(W): PRINT WSIDES%(W): NEXT W
220  RETURN 
1000  REM      PRINT DK$;"OPEN CHARACTERS.EXT,L256": PRINT DK$;"WRITE CHARACTERS.EXT,R";REC: PRINT : PRINT DK$;"CLOSE":REM  CHANGED TO 'REM' TO PREVENT CHARACTER FROM BEING ERASED   
1005  PRINT DK$;"OPEN REC.NUM": PRINT DK$;"WRITE REC.NUM": PRINT REC: PRINT DK$;"CLOSE"
1010  HOME : VTAB 5: PRINT "NOW REMOVE THE EAMON MASTER AND": PRINT : PRINT "INSERT THE DISKETTE WITH THE ADVENTURE": PRINT : PRINT "OF YOUR CHOICE.": PRINT : PRINT "PRESS 'C' TO CONTINUE.";: POKE  - 16368,0
1020  GET A$: IF A$ <  > "C" THEN 1020
1030  PRINT 
1040  PRINT DK$;"OPEN EAMON.NAME": PRINT DK$;"READ EAMON.NAME": INPUT ADNAME$: PRINT DK$;"CLOSE"
1050  HOME : VTAB 5: PRINT "YOU ARE ABOUT TO ADVENTURE IN": PRINT : INVERSE : PRINT ADNAME$: NORMAL : PRINT : PRINT 
1060  PRINT DK$;"OPEN FRESH MEAT": PRINT DK$;"WRITE FRESH MEAT": PRINT 1: GOSUB 200: PRINT DK$;"CLOSE": PRINT DK$;"RUN ";ADNAME$
2000  HOME : PRINT : PRINT "AS YOU ENTER THE WEAPON SHOP, MARCOS": PRINT "CAVIELLI (THE OWNER) COMES FROM OUT OF": PRINT "THE BACK ROOM AND SAYS, 'WELL, AS I"
2010  PRINT "LIVE AND BREATHE, IF IT ISN'T MY OLD PAL": PRINT NAME$;"!  SO, YOU WANT TO": PRINT "BUY A WEAPON, SELL A WEAPON, OR GET": PRINT "SOME BETTER ARMOUR?": PRINT : PRINT "(HIT THE KEY, B S OR A)   ";
2020 C2 = CH +  INT (11 *  RND (1) - 5):C2 = C2 + (C2 = 0):RTIO = 10 / C2
2030  GET A$: FOR TR = 1 TO 3: IF A$ <  >  MID$ ("BSA",TR,1) THEN  NEXT : GOTO 2030
2040  PRINT A$: PRINT : ON TR GOTO 2050,2220,2490
2050  IF WN$(4) <  > "NONE" THEN  PRINT "MARCOS SMILES AT YOU AND SAYS, 'THATSA": PRINT "GOOD, BUT FIRST YOU GOTTA SELL ME A": PRINT "WEAPON. YOU KNOW THE LAW--NO MORE THAN": PRINT "FOUR WEAPONS PER PERSON!'": PRINT : GOTO 2220
2060  PRINT "MARCOS SMILES AT YOU AND SAYS, 'GOOD.": PRINT "I GOTTA THE BEST. YOU WANTA AXE, BOW,": PRINT "MACE, SPEAR, SWORD, OR UNUSUAL WEAPON?": GOSUB 2650
2070  PRINT : PRINT "MARCOS SAYS, 'WELL, I JUST HAPPEN TO": PRINT "HAVE THREE ";N$;"S IN, OF VARYING": PRINT "QUALITY. I'VE GOT A VERY GOOD ONE FOR": PRINT  FN P(2 * BP);" GP, A FAIR ONE FOR "; FN P(BP);" GP,"
2080  PRINT "AND A KINDA SHABBY ONE FOR "; FN P(BP / 2): PRINT "WHICH DO YOU WANT?'": PRINT : PRINT "(HIT THE KEY, G F OR P)   ";
2090  GET A$: FOR Q = 1 TO 3: IF A$ <  >  MID$ ("GFP",Q,1) THEN  NEXT : GOTO 2090
2100  PRINT A$:P = BP + BP * (Q = 1) - BP / 2 * (Q = 3):P =  FN P(P)
2110  IF P > GOLD THEN  PRINT : PRINT "MARCOS SHAKES A FINGER AT YOU AND SAYS,": PRINT "'YOU SHOULDN'T PLAY TRICKS ON AN OLD": PRINT "FRIEND! COME BACK WHEN YOU GOTTA MORE": PRINT "GOLD OR YOU WANT SOMETHING YOU CAN": PRINT "AFFORD.' HE THEN SHOOS YOU OUT THE": PRINT "DOOR.": PRINT : GOTO 100
2120  FOR W = 1 TO 4: IF WN$(W) = N$ THEN N$ = N$ + "#": GOTO 2120
2130  NEXT W: FOR W = 1 TO 4: IF WN$(W) <  > "NONE" THEN  NEXT 
2132  IF  LEFT$ (N$,3) <  > "AXE" AND  LEFT$ (N$,3) <  > "BOW" AND  LEFT$ (N$,4) <  > "MACE" AND  LEFT$ (N$,5) <  > "SPEAR" AND  LEFT$ (N$,5) <  > "SWORD" THEN U =  INT ((( RND (1) ^ 2) * 4.5) + 1.9): GOTO 2140
2135 U = 2
2140 WN$(W) = N$:WT%(W) = TP:WO%(W) = (5 * U) * (2 - Q):WD%(W) = DICE:WS%(W) = SIDES:GOLD = GOLD - P
2150  PRINT "MARCOS HANDS YOU YOUR WEAPON AND TAKES": PRINT "THE PRICE FROM YOU.": PRINT 
2160  IF GOLD <  FN P(50) THEN 2210
2170  PRINT "HE NOW ASKS YOU, 'NOW HOW ABOUT SOME": PRINT "ARMOUR?'": PRINT : PRINT "(HIT Y OR N)   ";
2180  GET A$: IF A$ = "N" THEN  PRINT A$: PRINT : GOTO 2210
2190  IF A$ <  > "Y" THEN 2180
2200  PRINT A$: GOTO 2490
2210  PRINT "MARCOS SMILES AND SAYS, 'COME BACK": PRINT "AGAIN SOON!' AS HE SHOOS YOU OUT OF HIS": PRINT "SHOP.": PRINT : GOTO 100
2220  PRINT : PRINT "MARCOS ASKS YOU, 'IS THIS WEAPON YOU": PRINT "WANT TO SELL ME A STANDARD WEAPON LIKE": PRINT "I SELL?  (HIT 'Y' OR 'N')  ";
2230  GET A$: IF A$ = "Y" THEN 2350
2240  IF A$ <  > "N" THEN 2230
2250  PRINT A$: PRINT :P =  INT (50 / RTIO + .5): PRINT "MARCOS SAYS, 'THEN I CAN ONLY GIVE YOU": PRINT P;" GOLD PIECES FOR IT, TAKE IT OR": PRINT "LEAVE IT!'": PRINT : PRINT "(HIT T OR L)   ";
2260  GET A$: IF A$ = "L" THEN  PRINT A$: PRINT : GOTO 2210
2270  IF A$ <  > "T" THEN 2260
2280  PRINT A$: PRINT : PRINT "MARCOS SAYS, 'OKAY, WHAT'VE YOU GOT?": PRINT : INPUT "(ENTER THE WEAPON NAME)";W$: FOR WW = 1 TO 4: IF WN$(WW) <  > W$ THEN  NEXT : PRINT : PRINT "MARCOS FROWNS AT YOU AND SAYS, 'YOU": PRINT "CAN'T SELL A WEAPON YOU DON'T OWN!'": PRINT : GOTO 2210
2285  IF W$ = "NONE" THEN  PRINT : PRINT "MARCOS FROWNS AND SAYS 'THEN WHY DO YOU WASTE MY TIME?'": PRINT : PRINT "MARCOS SHOOS YOU OUT OF HIS STORE.": GOTO 100
2290 L =  LEFT$ (W$,5) = "SWORD" OR  LEFT$ (W$,5) = "SPEAR" OR  LEFT$ (W$,4) = "MACE" OR  LEFT$ (W$,3) = "BOW" OR  LEFT$ (W$,3) = "AXE": IF L THEN  PRINT "MARCOS FROWNS AT YOU AND SAYS, 'THIS IS": PRINT "A WEAPON LIKE I SELL, REMEMBER!'": GOTO 2420
2292  FOR U = 1 TO 4: IF UW$(U) = W$ THEN P =  INT (P / 4.2):Q =  INT ( RND (1) * 25) + 11: PRINT : PRINT "AS YOU TRY TO GIVE THE WEAPON TO MARCOS": PRINT "HE SHOWS YOU A SHELF BULGING WITH": PRINT W$;"S AND SAYS, 'I'M SORRY": GOTO 2294
2293  NEXT : GOTO 2300
2294  PRINT "BUT I JUSTA GOT ";Q;" OF THOSE IN A COUPLE"
2295  PRINT "A MINUTES AGO AND I DON'T NEED MORE.": PRINT : PRINT "BUT, BECAUSE I LIKE'A YOU, I'LL STILLA": PRINT "GIVE YOU ";P;" GOLD PIECES FOR IT;": PRINT : PRINT "TAKE IT OR LEAVE IT!'": PRINT : PRINT "(HIT T OR L)   ";
2296  GET A$: IF A$ = "L" THEN  PRINT A$: PRINT : GOTO 2210
2297  IF A$ <  > "T" THEN 2296
2298  PRINT A$
2300  PRINT "MARCOS GIVES YOU YOUR MONEY AND TAKES": PRINT "YOUR WEAPON.": PRINT :UW$(U) = "":GOLD = GOLD + P: FOR W2 = W TO 4:WN$(W2) = WN$(W2 + 1):WT%(W2) = WT%(W2 + 1):WO%(W2) = WO%(W2 + 1):WD%(W2) = WD%(W2 + 1):WS%(W2) = WS%(W2 + 1): NEXT :WN$(4) = "NONE
2310  PRINT : PRINT "MARCOS ASKS YOU, 'HOW ABOUT BUYING A": PRINT "WEAPON?'": PRINT : PRINT "(HIT Y OR N)   ";
2320  GET A$: IF A$ = "Y" THEN  PRINT A$: PRINT : GOTO 2050
2330  IF A$ <  > "N" THEN 2320
2340  PRINT A$: PRINT : GOTO 2160
2350  PRINT : PRINT "MARCOS ASKS, 'WELL, WHAT WEAPON YOU": PRINT "WANTA RETURN'?": PRINT : GOSUB 2635: PRINT 
2360 W2 = W: FOR W = 1 TO 4: IF  LEFT$ (WN$(W), LEN (N$)) <  > N$ THEN  NEXT : PRINT "MARCOS LAUGHS AND SAYS, 'YOU NEVER": PRINT "BOUGHT ONE FROM ME, REMEMBER?'": PRINT : GOTO 2210
2370 BP = BP + BP * (WO%(T) > 5) - BP / 2 * (WO%(T) <  - 5):P =  INT (BP / RTIO + .5): IF P > BP / 4 THEN P =  INT (BP / 4 + .5)
2380  PRINT "MARCOS EXAMINES YOUR WEAPONS AND SAYS,": PRINT "'WELL, YOU'VE BANGED IT UP A BIT, BUT": PRINT "I CAN GIVE YOU ";P;" GOLD PIECES": PRINT "FOR IT, TAKE IT OR LEAVE IT.'": PRINT : PRINT "(HIT T OR L)  ";
2390  GET A$: IF A$ = "L" THEN  PRINT A$: PRINT : GOTO 2210
2400  IF A$ <  > "T" THEN 2390
2410  PRINT A$: PRINT : GOTO 2300
2420  PRINT : FOR WW = 1 TO 4: IF  MID$ ("ABMS",WW,1) =  LEFT$ (W$,1) THEN  ON WW GOTO 2440,2450,2460,2470
2430  NEXT WW
2440 BP = 25: GOTO 2370
2450 BP = 40: GOTO 2370
2460 BP = 20: GOTO 2370
2470  IF  MID$ (W$,2,1) = "P" THEN BP = 25: GOTO 2370
2480 BP = 50: GOTO 2370
2490 A2 =  INT (AC / 2):SH = AC - A2 * 2:B1 = 25 * (A2 = 1) + 60 * (A2 = 2) + 100 * (A2 = 3):TI =  INT (B1 / RTIO + .5): PRINT "MARCOS TAKES YOU TO THE ARMOUR SECTION": PRINT "OF HIS SHOP AND SHOWS YOU SUITS OF": PRINT "LEATHER ARMOUR, CHAIN ARMOUR, AND PLATE.": IF TI > B1 * 2 THEN TI = B1 * 2
2500  PRINT : PRINT "HE SAYS, 'I CAN PUT YOU IN ANY OF THESE": PRINT "VERY CHEAPLY.  I NEED "; FN P(100);" GOLD": PRINT "PIECES FOR THE LEATHER, "; FN P(250);" FOR": PRINT "THE CHAIN, AND "; FN P(500);" FOR THE PLATE.": PRINT 
2510  IF TI THEN  PRINT "ALSO, I CAN GIVE YOU A TRADE-IN ON YOUR": PRINT "OLD ARMOUR OF ";TI;" GOLD PIECES.": PRINT 
2520  PRINT "WELL, WHAT WILL IT BE?'": PRINT : PRINT "(HIT N FOR NOTHING OR L C OR P)  ";
2530  GET A$: FOR A = 1 TO 4: IF A$ <  >  MID$ ("NLCP",A,1) THEN  NEXT : GOTO 2530
2540  PRINT A$: PRINT : IF A = 1 THEN 2570
2550 P =  FN P(100 * (A = 2) + 250 * (A = 3) + 500 * (A = 4)) - TI: IF P > GOLD THEN  PRINT "MARCOS FROWNS WHEN HE SEES THAT YOU DO": PRINT "NOT HAVE ENOUGH TO PAY FOR YOUR ARMOUR": PRINT "AND SAYS, 'I DON'T GIVE CREDIT!'": PRINT : GOTO 2570
2560  PRINT "MARCOS TAKES YOUR OLD ARMOUR AND YOUR": PRINT "GOLD AND HELPS YOU INTO YOUR NEW": PRINT "ARMOUR.": PRINT :GOLD = GOLD - P:A2 = A - 1
2570  IF SH THEN 2630
2580  PRINT "MARCOS SMILES AND SAYS, 'NOW HOW ABOUT": PRINT "A SHIELD?  I CAN LET YOU HAVE ONE FOR": PRINT "ONLY "; FN P(50);" GOLD PIECES!'": PRINT : PRINT "(HIT Y OR N)";
2590  GET A$: IF A$ = "N" THEN  PRINT A$: PRINT : GOTO 2630
2600  IF A$ <  > "Y" THEN 2590
2610  PRINT A$: PRINT : IF GOLD <  FN P(50) THEN  PRINT "WHEN HE SEES THAT YOU DO NOT HAVE": PRINT "ENOUGH GOLD TO BUY THE SHIELD, MARCOS": PRINT "FROWNS AND SAYS, 'I'M SORRY, BUT I": PRINT "DON'T GIVE CREDIT!'": PRINT : GOTO 2630
2620 GOLD = GOLD -  FN P(50):SH = 1: PRINT "MARCOS TAKES YOUR GOLD AND GIVES YOU": PRINT "A SHIELD.": PRINT 
2630 AC = A2 * 2 + SH: PRINT : GOTO 100
2632  END 
2635  PRINT "(HIT THE KEY(S), A B M SP OR SW)  ";:
2640  GET A$: FOR W = 1 TO 4: IF A$ <  >  MID$ ("ABMS",W,1) THEN  NEXT : GOTO 2640
2645  ON W GOTO 2680,2690,2700,2710
2650  PRINT "PRESS KEY(S): A B M SP SW OR U :";
2660  GET A$: FOR W = 1 TO 5: IF A$ <  >  MID$ ("ABMSU",W,1) THEN  NEXT : GOTO 2660
2670  ON W GOTO 2680,2690,2700,2710,2800
2680  PRINT "AXE":BP = 25:N$ = "AXE":TP = 1:SIDE = 6: GOTO 2750
2690  PRINT "BOW":BP = 40:N$ = "BOW":TP = 2:SIDE = 6: GOTO 2750
2700  PRINT "MACE":BP = 20:N$ = "MACE":TP = 3:SIDE = 4: GOTO 2750
2710  PRINT A$;:
2720  GET A$: IF A$ = "P" THEN  PRINT "PEAR":BP = 25:N$ = "SPEAR":TP = 4:SIDE = 5: GOTO 2750
2730  IF A$ <  > "W" THEN 2720
2740  PRINT "WORD":BP = 50:N$ = "SWORD":TP = 5:SIDE = 8
2750 DICE = 1: RETURN 
2800  REM   ///UNUSUAL WEAPONS BY BOB LINDEN
2810  PRINT "UNUSUAL"
2820  PRINT : PRINT "'WHATSA THIS UNUSUAL WEAPON CALLED?'": PRINT 
2830  INPUT "YOU NAME THE WEAPON (TYPE IT IN NOW)    ==> ";N$
2840  PRINT : IF N$ = "" THEN  PRINT "MARCOS SAYS, 'YOUR LIPS MOVED BUT I      DIDN'T CATCH THE NAME.'": PRINT : PRINT : GOTO 2830
2850  IF  LEN (N$) > 18 THEN  PRINT "THAT SOUNDS LIKE A STRANGE WEAPON.  ALL MY WEAPONS HAVE NAMES OF 18 LETTERS OR  LESS. PERHAPS THIS WEAPON IS KNOWN BY   ANOTHER NAME?": PRINT : PRINT : GOTO 2830
2853  IF  LEFT$ (N$,4) = "NONE" THEN  GOTO 2210
2855  IF  RIGHT$ (N$,1) = " " THEN N$ =  LEFT$ (N$,( LEN (N$) - 1)): GOTO 2855
2856  FOR U = 1 TO 4: IF UW$(U) = N$ THEN N$ = N$ + "#": GOTO 2856
2857  NEXT U: FOR U = 1 TO 4: IF UW$(U) <  > "" THEN  NEXT 
2858 UW$(U) = N$
2860  PRINT : PRINT " 'HMMM...', SAYS MARCOS, 'THE": PRINT ;N$;" IS NOT THE TYPE OF": PRINT "WEAPON I USUALLY GET REQUESTS FOR."
2870  PRINT : PRINT " 'WHATSA THE CLASS OF THIS WEAPON THAT  YOU FIGURE YOU CAN AFFORD?',MARCOS SAYS,'I GOT AVERAGE, SUPERIOR, AND MATCHLESS'"
2880  PRINT : PRINT "(HIT THE KEY, A S OR M) :";
2890  GET A$: FOR W = 1 TO 3: IF A$ <  >  MID$ ("ASM",W,1) THEN  NEXT : GOTO 2890
2900  ON W GOTO 2910,2920,2930
2910  PRINT "AVERAGE":DICE =  INT (( RND (1) * 1.1) + 1):SIDE =  INT ((((6 *  RND (1)) + (6 *  RND (1)) + (6 *  RND (1)) + 6) / 2) /  SQR (DICE)):BP = 30: GOTO 2950
2920  PRINT "SUPERIOR":DICE =  INT ((((.46 *  RND (1)) ^ 2) * 10) + 1):SIDE =  INT ((((6 *  RND (1)) + (6 *  RND (1)) + (6 *  RND (1)) + (6 *  RND (1)) + 5) / 2) /  SQR (DICE)):BP = 100: GOTO 2950
2930  PRINT "MATCHLESS":DICE =  INT ((((.55 *  RND (1)) ^ 2) * 10) + 1):SIDE =  INT ((((8 *  RND (1)) + (8 *  RND (1)) + (8 *  RND (1)) + (6 *  RND (1)) + 6) / 2) /  SQR (DICE)):BP = 250: GOTO 2950
2950  PRINT : PRINT " 'OK', SAYS MARCOS, 'I GOTTA LOOK INNA  BACK ROOM TO SEE IF I GOT ANY OF THESE  IN STOCK. YOU CAN HELP ME BY TELLING ME WHICH WEAPON YOUR UNUSUAL WEAPON IS MOSTLIKE: AXE, BOW, MACE, SPEAR, OR SWORD?"
2955  PRINT "(HIT THE KEY(S), A B M SP OR SW): ";:
2960  GET A$: FOR W = 1 TO 4: IF A$ <  >  MID$ ("ABMS",W,1) THEN  NEXT : GOTO 2960
2965  ON W GOTO 2970,2975,2980,2985
2970  PRINT "AXE":BP = (BP * 5):TP = 1: GOTO 2997
2975  PRINT "BOW":BP = (BP * 8):TP = 2: GOTO 2997
2980  PRINT "MACE":BP = (BP * 4):SIDE = (SIDE - 2):TP = 3: GOTO 2997
2985  PRINT A$;:
2988  GET A$: IF A$ = "P" THEN  PRINT "PEAR":BP = (BP * 5):SIDE = (SIDE - 1):TP = 4: GOTO 2997
2990  IF A$ <  > "W" THEN 2988
2995  PRINT "WORD":BP = (BP * 10):SIDE = (SIDE + 1):TP = 5
2997  IF SIDE < 3 THEN SIDE = 3
2998  PRINT : PRINT "MARCOS DISAPPEARS INTO THE BACK ROOM.   YOU HEAR THINGS BEING DRAGGED ABOUT AND THE RATTLING OF CONTAINERS. FINALLY, YOUHERE A MUFFLED 'AHA!' AND MARCOS EMERGESWITH HIS ARMS FULL."
2999  RETURN 
3000  HOME : PRINT : PRINT "AFTER A FEW MINUTES DILIGENT SEARCHING,": PRINT "YOU FIND HOKAS TOKAS, THE OLD MAGE. HE": PRINT "LOOKS AT YOU AND SAYS, 'SO YOU WANT OLD": PRINT "TOKEY TO TEACH YOU A MAGIC SPELL?'"
3010  PRINT : PRINT "'WELL, IT'LL COST YOU.  MY FEES ARE:":C2 = CH +  INT (11 *  RND (1) - 5):C2 = C2 + (C2 = 0):RTIO = 10 / C2
3020  PRINT : PRINT "     BLAST ";:KK =  FN P(3000): PRINT  SPC( 5 -  LEN ( STR$ (KK)));KK;: PRINT " GOLD PIECES"
3022  PRINT "     HEAL  ";:KK =  FN P(1000): PRINT  SPC( 5 -  LEN ( STR$ (KK)));KK;: PRINT " GOLD PIECES"
3024  PRINT "     SPEED ";:KK =  FN P(5000): PRINT  SPC( 5 -  LEN ( STR$ (KK)));KK;: PRINT " GOLD PIECES"
3026  PRINT "     POWER ";:KK =  FN P(100): PRINT  SPC( 5 -  LEN ( STR$ (KK)));KK;: PRINT " GOLD PIECES": PRINT 
3030  PRINT "WHICH WILL IT BE?'": PRINT : PRINT "(PRESS B, H, S OR P FOR YOUR SPELL,": PRINT "OR PRESS N FOR NONE.) ";
3040  GET A$: FOR SP = 1 TO 5: IF A$ <  >  MID$ ("BHSPN",SP,1) THEN  NEXT : GOTO 3040
3050  ON SP GOTO 3060,3070,3080,3090,3200
3060  PRINT "BLAST":P =  FN P(3000): GOTO 3100
3070  PRINT "HEAL":P =  FN P(1000): GOTO 3100
3080  PRINT "SPEED":P =  FN P(5000): GOTO 3100
3090  PRINT "POWER":P =  FN P(100)
3100  HOME : PRINT : IF P > GOLD THEN  PRINT "WHEN HOKAS SEES THAT YOU DON'T HAVE": PRINT "ENOUGH TO PAY HIM, HE STALKS TO THE": PRINT "BAR, MUTTERING ABOUT ADVENTURERS WHO": PRINT "SHOULD BE TURNED INTO FROGS.": PRINT : GOTO 100
3110  IF SA%(SP) THEN  PRINT "HOKAS SAYS, 'I OUGHT TO TAKE YOUR": PRINT "GOLD ANYWAY, BUT HAVEN'T YOU FORGOTTEN": PRINT "SOMETHING?  I ALREADY TAUGHT YOU THAT": PRINT "SPELL!'": PRINT : PRINT "SHAKING HIS HEAD SADLY, HE RETURNS TO": PRINT "BAR.": PRINT : GOTO 100
3120 GOLD = GOLD - P:SA%(SP) =  INT (50 *  RND (1) + 26): PRINT "HOKAS TEACHES YOU YOUR SPELL, TAKES": PRINT "HIS FEE, AND RETURNS TO HIS STOOL ON": PRINT "THE BAR.  AS YOU WALK AWAY YOU HEAR"
3130  PRINT "HIM ORDER A DOUBLE DRAGON BLOMB.": PRINT : GOTO 100
3140  END 
3200  HOME : PRINT : PRINT : PRINT "AS YOU LEAVE, YOU HEAR HOKAS MUTTERING": PRINT "ABOUT 'CHEAPSKATE ADVENTURERS": PRINT "WHO CAN'T MAKE UP THEIR MINDS.'": PRINT : PRINT : GOTO 100
4000  PRINT : PRINT "YOU HAVE NO TROUBLE SPOTTING SHYLOCK": PRINT "MCFENNEY, THE LOCAL BANKER, DUE TO HIS": PRINT "LARGE BELLY.": PRINT : PRINT "YOU ATTRACT HIS ATTENTION, AND HE COMES": PRINT "OVER TO YOU AND SAYS, 'WELL,"
4010  PRINT NAME$;", MY DEAR "; MID$ ("GIRLBOY",(SEX$ = "M") * 4 + 1,4);",": PRINT "WHAT A PLEASURE TO SEE YOU! DO YOU WANT"
4020  PRINT "TO MAKE A DEPOSIT OR A WITHDRAWL?'": PRINT : PRINT "(HIT 'D' FOR DEPOSIT, 'W' FOR WITHDRAWL)   ";
4030  GET A$: IF A$ = "D" THEN  PRINT A$: PRINT : GOTO 4090
4040  IF A$ <  > "W" THEN 4030
4050  PRINT A$: PRINT : PRINT "SHYLOCK SAYS, 'WELL, YOU HAVE ";BANK: PRINT "GOLD PIECES STORED WITH ME.  HOW MANY": PRINT "DO YOU WANT TO TAKE BACK?'": PRINT 
4060  PRINT "(ENTER THE NUMBER OF GOLD PIECES TO": INPUT "   WITHDRAW)  ";A$:MNY =  VAL (A$): IF MNY < 0 OR MNY <  >  INT (MNY) OR  STR$ (MNY) <  > A$ THEN  PRINT : PRINT "THE BANKER SCOWLS AND SAYS,'COME, COME,": PRINT "YOU'RE NOT MAKING SENSE!  TRY AGAIN.'": PRINT : GOTO 4060
4070  IF MNY > BANK THEN  PRINT : PRINT "THE BANKER THROWS YOU A TERRIBLE GLANCE": PRINT "AND SAYS, 'THAT'S MORE THAN YOU'VE GOT!": PRINT "YOU KNOW I DON'T MAKE LOANS TO YOUR": PRINT "KIND!'  WITH THAT HE LOSES HIMSELF IN": PRINT "THE CROWD.": PRINT : GOTO 100
4080 GOLD = GOLD + MNY:BANK = BANK - MNY: PRINT : PRINT "THE BANKER HANDS YOU YOUR GOLD AND": PRINT "SAYS, 'THAT LEAVES YOU WITH ";BANK: PRINT "PIECES IN MY CARE.'  HE SHAKES YOUR": PRINT "HAND AND WALKS AWAY.": PRINT : GOTO 100
4090  PRINT "SHYLOCK GETS A WIDE GRIN ON HIS FACE": PRINT "AND SAYS, 'GOOD FOR YOU!  HOW MUCH DO": PRINT "YOU WANT TO DEPOSIT?'"
4100  PRINT : PRINT "(ENTER THE AMOUNT YOU WANT TO DEPOSIT)": INPUT "      ";A$:MNY =  VAL (A$): IF MNY < 0 OR MNY <  >  INT (MNY) OR  STR$ (MNY) <  > A$ THEN  PRINT : PRINT "THE BANKER SCOWLS AT YOU AND SAYS,": PRINT "'COME, COME, YOU'RE NOT MAKING SENSE!": PRINT "TRY AGAIN.'": PRINT : GOTO 4100
4110  IF MNY > GOLD THEN  PRINT : PRINT "THE BANKER WAS VERY PLEASED WHEN YOU": PRINT "TOLD HIM THE SUM, BUT WHEN HE DISCOVEREDTHAT YOU DIDN'T HAVE THAT MUCH ON YOU,": PRINT "HE WALKED AWAY, SHOUTING ABOUT FOOLS": PRINT "WHO PLAY TRICKS ON A KINDLY BANKER.": PRINT : GOTO 100
4120 GOLD = GOLD - MNY:BANK = BANK + MNY: PRINT "SHYLOCK TAKES YOUR MONEY, PUTS IT IN": PRINT "HIS BAG, LISTENS TO IT JINGLE, THEN": PRINT "THANKS YOU AND WALKS AWAY.": PRINT : GOTO 100
4130  END 
5000  HOME : PRINT "YOU ARE THE "; MID$ ("MIGHTY FAIR ",1 + 7 * (SEX$ = "F"),7);NAME$: PRINT : PRINT "YOUR ATTRIBUTES ARE:": PRINT "  HD=";HD;"  AG=";AG;"  CH=";CH: PRINT 
5010  PRINT "YOU KNOW THE FOLLOWING SPELLS--":SM = 0: FOR S = 1 TO 4: IF SA%(S) THEN  PRINT  MID$ ("BLASTHEAL SPEEDPOWER",(S - 1) * 5 + 1,5);"  ";:SM = 1
5020  NEXT S: IF  NOT SM THEN  PRINT "   NO SPELLS";
5030  PRINT : PRINT : PRINT "YOUR WEAPON ABILITIES ARE--": PRINT "  AXE   BOW   CLUB  SPEAR SWORD": PRINT " ";: FOR W = 1 TO 5: PRINT  SPC( 1 - (WA%(W) < 0) + ( ABS (WA%(W)) < 10) + ( ABS (WA%(WA)) < 100));WA%(W);"% ";: NEXT : PRINT 
5040  PRINT :A2 =  INT (AC / 2): PRINT "ARMOUR: "; MID$ ("SKIN   LEATHERCHAIN  PLATE  ",A2 * 7 + 1,7);: IF AC > A2 * 2 THEN  PRINT " AND SHIELD";
5050  PRINT  TAB( 30);"AE=";AE;"%": PRINT : PRINT "GOLD IN HAND=";GOLD;", BANK=";BANK"
5060  PRINT : PRINT "WEAPONS"; TAB( 19);"CMPLX    DAM": FOR W = 1 TO 4: IF W > 1 AND WN$(W) = "NONE" THEN 5090
5070  IF WN$(W) = "NONE" THEN  PRINT : PRINT "        NO WEAPONS": GOTO 5090
5080  PRINT WN$(W); TAB( 20 - (WO%(W) < 0) + ( ABS (WO%(W)) < 10) + ( ABS (WO%(W)) < 100));WO%(W);"%    ";WD%(W);" D ";WS%(W)
5090  NEXT W: VTAB 23: POKE  - 16368,0: PRINT "(HIT ANY KEY TO CONTINUE)  ";: GET A$: PRINT : GOTO 100
5100  END 
6000  HOME : PRINT "AS YOU LEAVE THE HALL, THE IRISHMAN": PRINT "COMES UP TO YOU, SLAPS YOU ON THE BACK": PRINT "AND SAYS, 'Y'ALL COME BACK REAL SOON,": PRINT "YA HEAH?'"
6010  PRINT DK$;"OPEN CHARACTERS.EXT,L256": PRINT DK$;"WRITE CHARACTERS.EXT,R";REC: GOSUB 200: PRINT DK$;"CLOSE"
6020  PRINT DK$;"DELETE THE ADVENTURER"
6030  END 
7000  REM  ///TRAINING CENTER BY JOHN NELSON
7010  HOME : PRINT "AS YOU ENTER THE TRAINING CENTER, THE": PRINT "SMELL OF SWEAT GREETS YOU AT THE DOOR.": PRINT : PRINT "AN ATTENDANT COMES OVER AND ASKS IF YOU"
7020  PRINT "WOULD LIKE TRAINING ON THE AXE, BOW,    MACE, SPEAR OR SWORD. ENTER 'A' 'B' 'M' 'SP' OR 'SW' ";
7030  GOSUB 2660
7050 C2 = CH +  INT (11 *  RND (1) - 5):C2 = C2 + (C2 = 0):RTIO = 10 / C2
7060 PR =  FN P(BP * 20): PRINT : PRINT "THE ATTENDANT SAYS THAT WILL BE ";PR: PRINT "GOLD PIECES.": PRINT : PRINT "DO YOU WANT TO TAKE THE TRAINING?"
7070  PRINT "ENTER (Y OR N) ";
7080  GET A$: IF A$ <  > "Y" AND A$ <  > "N" THEN 7080
7090  PRINT A$: IF A$ = "N" THEN 100
7100  IF PR > GOLD THEN  PRINT : PRINT "THE ATTENDANT IS IRRITATED WHEN HE SEES": PRINT "YOU DO NOT HAVE THE GOLD AND STARTS TO": PRINT "GRUMBLE ABOUT USING YOU FOR PRACTICE": PRINT "TARGET.": GOTO 100
7120 GOLD = GOLD - PR
7150 WA%(TP) = WA%(TP) +  INT ( RND (1) * 15): PRINT : PRINT "THE TRAINING INSTRUCTOR DRILLS YOU ON": PRINT "THE FINE ARTS OF THE ";N$;"."
7190  GOTO 100
15000  INPUT "PRESS [RETURN] TO CONTINUE ...";A$: GOTO 100
17000  IF  PEEK (222) = 5 THEN  PRINT  CHR$ (4);"RUN THE WONDERFUL WORLD OF EAMON"
17020  END