Oregon (video game) - Source

From TheAlmightyGuru
Jump to: navigation, search

This pages lists source code for different versions of Oregon, the original version of The Oregon Trail.

1975-03-27

8  REM       MINNESOTA EDUCATIONAL COMPUTING CONSORTIUM STAFF
9  REM  PROGRAMMING REVISIONS BY DON RAWITSCH - 1975
11  REM  CURRENT VERSION - 3/27/75
15  REM  **FOR THE MEANING OF THE VARIABLES USED, LIST LINES 4900-4960**
25  PRINT "DO YOU NEED INSTRUCTIONS  (YES/NO)";
30  DIM C$[5]
35  INPUT C$
40  IF C$="NO" THEN 400
45  PRINT LIN(2)
59  REM ***INSTRUCTIONS***
60  PRINT "THIS PROGRAM SIMULATES A TRIP OVER THE OREGON TRAIL FROM"
65  PRINT "INDEPENDENCE, MISSOURI TO OREGON CITY, OREGON IN 1847."
70  PRINT "YOUR FAMILY OF FIVE WILL COVER THE 2000 MILE OREGON TRAIL"
75  PRINT "IN 5-6 MONTHS --- IF YOU MAKE IT ALIVE."
80  PRINT
85  PRINT "YOU HAD SAVED $900 TO SPEND FOR THE TRIP, AND YOU'VE JUST"
90  PRINT "   PAID $200 FOR A WAGON."
95  PRINT "YOU WILL NEED TO SPEND THE REST OF YOUR MONEY ON THE"
100  PRINT "   FOLLOWING ITEMS:"
105  PRINT
110  PRINT "     OXEN - YOU CAN SPEND $200-$300 ON YOUR TEAM"
115  PRINT "            THE MORE YOU SPEND, THE FASTER YOU'LL GO"
120  PRINT "               BECAUSE YOU'LL HAVE BETTER ANIMALS"
125  PRINT
130  PRINT "     FOOD - THE MORE YOU HAVE, THE LESS CHANCE THERE"
135  PRINT "               IS OF GETTING SICK"
140  PRINT
145  PRINT "     AMMUNITION - $1 BUYS A BELT OF 50 BULLETS"
150  PRINT "            YOU WILL NEED BULLETS FOR ATTACKS BY ANIMALS"
155  PRINT "               AND BANDITS, AND FOR HUNTING FOOD"
160  PRINT
165  PRINT "     CLOTHING - THIS IS ESPECIALLY IMPORTANT FOR THE COLD"
170  PRINT "               WEATHER YOU WILL ENCOUNTER WHEN CROSSING"
175  PRINT "               THE MOUNTAINS"
180  PRINT
185  PRINT "     MISCELLANEOUS SUPPLIES - THIS INCLUDES MEDICINE AND"
190  PRINT "               OTHER THINGS YOU WILL NEED FOR SICKNESS"
195  PRINT "               AND EMERGENCY REPAIRS"
205  PRINT LIN(2)
210  PRINT "YOU CAN SPEND ALL YOUR MONEY BEFORE YOU START YOUR TRIP -"
215  PRINT "OR YOU CAN SAVE SOME OF YOUR CASH TO SPEND AT FORTS ALONG"
220  PRINT "THE WAY WHEN YOU RUN LOW.  HOWEVER, ITEMS COST MORE AT"
225  PRINT "THE FORTS.  YOU CAN ALSO GO HUNTING ALONG THE WAY TO GET"
230  PRINT "MORE FOOD."
235  PRINT "WHENEVER YOU HAVE TO USE YOUR TRUSTY RIFLE ALONG THE WAY,"
240  PRINT "YOU WILL SEE THE WORDS: TYPE BANG.  THE FASTER YOU TYPE"
245  PRINT "IN THE WORD 'BANG' AND HIT THE 'RETURN' KEY, THE BETTER"
250  PRINT "LUCK YOU'LL HAVE WITH YOUR GUN."
260  PRINT
262  PRINT "WHEN ASKED TO ENTER MONEY AMOUNTS, DON'T USE A '$'."
263  PRINT
265  PRINT "GOOD LUCK!!!"
399  REM ***INITIAL PURCHASES***
400  X1=-1
405  K8=S4=F1=F2=M=M9=D3=0
410  PRINT LIN(2)
415  PRINT "HOW MUCH DO YOU WANT TO SPEND ON YOUR OXEN TEAM";
420  INPUT A
425  IF A >= 200 THEN 440
430  PRINT "NOT ENOUGH"
435  GOTO 415
440  IF A <= 300 THEN 455
445  PRINT "TOO MUCH"
450  GOTO 415
455  PRINT "HOW MUCH DO YOU WANT TO SPEND ON FOOD";
460  INPUT F
470  IF F >= 0 THEN 485
475  PRINT "IMPOSSIBLE"
480  GOTO 455
485  PRINT "HOW MUCH DO YOU WANT TO SPEND ON AMMUNITION";
490  INPUT B
495  IF B >= 0 THEN 510
500  PRINT "IMPOSSIBLE"
505  GOTO 485
510  PRINT "HOW MUCH DO YOU WANT TO SPEND ON CLOTHING";
515  INPUT C
520  IF C >= 0 THEN 535
525  PRINT "IMPOSSIBLE"
530  GOTO 510
535  PRINT "HOW MUCH DO YOU WANT TO SPEND ON MISCELANEOUS SUPPLIES";
540  INPUT M1
545  IF M1 >= 0 THEN 560
550  PRINT "IMPOSSIBLE"
555  GOTO 535
560  T=700-A-F-B-C-M1
565  IF T >= 0 THEN 580
570  PRINT "YOU OVERSPENT--YOU ONLY HAD $700 TO SPEND.  BUY AGAIN"
575  GOTO 410
580  B=50*B
585  PRINT "AFTER ALL YOUR PURCHASES, YOU NOW HAVE";T;"DOLLARS LEFT"
590  PRINT
595  PRINT "MONDAY MARCH 29 1847"
600  PRINT
605  GOTO 1000
700  IF M >= 2040 OR D3>17 THEN 4000
709  REM ***SETTING DATE***
710  D3=D3+1
715  PRINT
720  PRINT "MONDAY ";
725  IF D3>10 THEN 735
730  GOTO D3 OF 740,750,760,770,780,790,800,810,820,830
735  GOTO D3-10 OF 840,850,860,870,880,890,900
740  PRINT "APRIL 12 ";
744  GOTO 910
750  PRINT "APRIL 26 ";
755  GOTO 910
760  PRINT "MAY 10 ";
765  GOTO 910
770  PRINT "MAY 24 ";
775  GOTO 910
780  PRINT "JUNE 7 ";
785  GOTO 910
790  PRINT "JUNE 21 ";
795  GOTO 910
800  PRINT "JULY 5 ";
805  GOTO 910
810  PRINT "JULY 19 ";
815  GOTO 910
820  PRINT "AUGUST 2 ";
825  GOTO 910
830  PRINT "AUGUST 16 ";
835  GOTO 910
840  PRINT "AUGUST 31 ";
845  GOTO 910
850  PRINT "SEPTEMBER 13 ";
855  GOTO 910
860  PRINT "SEPTEMBER 27 ";
865  GOTO 910
870  PRINT "OCTOBER 11 ";
875  GOTO 910
880  PRINT "OCTOBER 25 ";
885  GOTO 910
890  PRINT "NOVEMBER 8 ";
895  GOTO 910
900  PRINT "NOVEMBER 22 ";
910  PRINT "1847"
915  PRINT
999  REM ***BEGINNING EACH TURN***
1000  IF F >= 0 THEN 1015
1010  F=0
1015  IF B >= 0 THEN 1025
1020  B=0
1025  IF C >= 0 THEN 1035
1030  C=0
1035  IF M1 >= 0 THEN 1045
1040  M1=0
1045  IF F >= 12 THEN 1055
1050  PRINT "YOU'D BETTER DO SOME HUNTING OR BUY FOOD AND SOON!!!!"
1055  F=INT(F)
1060  B=INT(B)
1065  C=INT(C)
1070  M1=INT(M1)
1075  T=INT(T)
1080  M=INT(M)
1085  M2=M
1090  IF S4=1 THEN 1105
1095  IF K8=1 THEN 1105
1100  GOTO 1130
1105  T=T-20
1110  IF T<0 THEN 3520
1115  PRINT "DOCTOR'S BILL IS $20"
1120  LET K8=S4=0
1130  IF M9=1 THEN 1145
1135  PRINT "TOTAL MILEAGE IS";M
1140  GOTO 1160
1145  PRINT "TOTAL MILEAGE IS 950"
1150  M9=0
1160  PRINT "FOOD","BULLETS","CLOTHING","MISC. SUPP.","CASH"
1165  PRINT F,B,C,M1,T
1300  IF X1=-1 THEN 1350
1305  X1=X1*-1
1310  PRINT "DO YOU WANT TO (1) STOP AT THE NEXT FORT, (2) HUNT, ";
1315  PRINT "OR (3) CONTINUE"
1320  INPUT X
1325  IF X>2 THEN 1340
1330  IF X<1 THEN 1340
1332  LET X=INT(X)
1335  GOTO 1400
1340  LET X=3
1345  GOTO 1400
1350  PRINT "DO YOU WANT TO (1) HUNT, OR (2) CONTINUE"
1355  INPUT X
1360  IF X=1 THEN 1370
1365  LET X=2
1370  LET X=X+1
1375  IF X=3 THEN 1395
1380  IF B>39 THEN 1395
1385  PRINT "TOUGH---YOU NEED MORE BULLETS TO GO HUNTING"
1390  GOTO 1350
1395  X1=X1*-1
1400  GOTO X OF 1500,1700,1800
1499  REM ***STOPPING AT FORT***
1500  PRINT "ENTER WHAT YOU WISH TO SPEND ON THE FOLLOWING"
1505  PRINT "FOOD";
1510  GOSUB 1520
1515  GOTO 1555
1520  INPUT P
1525  IF P<0 THEN 1550
1530  T=T-P
1535  IF T >= 0 THEN 1550
1537  PRINT "YOU DON'T HAVE THAT MUCH--KEEP YOUR SPENDING DOWN"
1540  T=T+P
1545  P=0
1550  RETURN
1555  F=F+2/3*P
1560  PRINT "AMMUNITION";
1565  GOSUB 1520
1570  LET B=INT(B+2/3*P*50)
1575  PRINT "CLOTHING";
1580  GOSUB 1520
1585  C=C+2/3*P
1590  PRINT "MISCELLANEOUS SUPPLIES";
1595  GOSUB 1520
1600  M1=M1+2/3*P
1605  M=M-45
1610  GOTO 1800
1699  REM ***HUNTING***
1700  IF B>39 THEN 1715
1705  PRINT "TOUGH---YOU NEED MORE BULLETS TO GO HUNTING"
1710  GOTO 1310
1715  M=M-45
1720  GOSUB 4500
1725  IF B1 <= 1 THEN 1755
1730  IF 100*RND(0)<13*B1 THEN 1780
1735  F=F+48-2*B1
1740  PRINT "NICE SHOT--RIGHT THROUGH THE NECK--FEAST TONIGHT!!"
1745  B=B-10-3*B1
1750  GOTO 1800
1752  REM **BELLS IN LINE 1755**
1755  PRINT "RI"'7"GHT BETWEE"'7"N THE EYE"'7"S---YOU GOT A"'7" BIG ONE!!"'7"!!"
1765  F=F+52+RND(0)*6
1770  B=B-10-RND(0)*4
1775  GOTO 1800
1780  PRINT "SORRY---NO LUCK TODAY"
1800  IF F >= 13 THEN 1900
1805  GOTO 3500
1899  REM ***EATING***
1900  PRINT "DO YOU WANT TO EAT (1) POORLY  (2) MODERATELY"
1902  PRINT "OR (3) WELL";
1905  INPUT E
1910  IF E>3 THEN 1900
1915  IF E<1 THEN 1900
1920  LET E=INT(E)
1930  LET F=F-8-5*E
1935  IF F >= 0 THEN 2000
1940  F=F+8+5*E
1945  PRINT "YOU CAN'T EAT THAT WELL"
1950  GOTO 1900
2000  LET M=M+200+(A-220)/5+10*RND(0)
2005  L1=C1=0
2099  REM ***RIDERS ATTACK***
2100  IF RND(0)*10>((M/100-4)^2+72)/((M/100-4)^2+12)-1 THEN 2500
2105  PRINT "RIDERS AHEAD.  THEY ";
2110  S5=0
2115  IF RND(0)<.8 THEN 2130
2120  PRINT "DON'T ";
2125  S5=1
2130  PRINT "LOOK HOSTILE"
2135  PRINT "TACTICS"
2140  PRINT "(1) RUN  (2) ATTACK  (3) CONTINUE  (4) CIRCLE WAGONS"
2145  PRINT "IF YOU RUN YOU'LL GAIN TIME BUT WEAR DOWN YOUR OXEN"
2150  PRINT "IF YOU CIRCLE YOU'LL LOSE TIME"
2155  IF RND(0)>.2 THEN 2165
2160  S5=1-S5
2165  INPUT T1
2170  IF T1<1 THEN 2140
2175  IF T1>4 THEN 2140
2180  T1=INT(T1)
2185  IF S5=1 THEN 2330
2190  IF T1>1 THEN 2220
2195  M=M+20
2200  M1=M1-15
2205  B=B-150
2210  A=A-40
2215  GOTO 2395
2220  IF T1>2 THEN 2285
2225  GOSUB 4500
2230  B=B-B1*40-80
2235  IF B1>1 THEN 2250
2240  PRINT "NICE SHOOTING---YOU DROVE THEM OFF"
2245  GOTO 2395
2250  IF B1 <= 4 THEN 2275
2255  PRINT "LOUSY SHOT---YOU GOT KNIFED"
2260  K8=1
2265  PRINT "YOU HAVE TO SEE OL' DOC BLANCHARD"
2270  GOTO 2395
2275  PRINT "KINDA SLOW WITH YOUR COLT .45"
2280  GOTO 2395
2285  IF T1>3 THEN 2310
2290  IF RND(0)>.8 THEN 2390
2295  LET B=B-150
2300  M1=M1-15
2305  GOTO 2395
2310  GOSUB 4500
2315  B=B-B1*30-80
2320  M=M-25
2325  GOTO 2235
2330  IF T1>1 THEN 2350
2335  M=M+15
2340  A=A-10
2345  GOTO 2395
2350  IF T1>2 THEN 2370
2355  M=M-5
2360  B=B-100
2365  GOTO 2395
2370  IF T1>3 THEN 2380
2375  GOTO 2395
2380  M=M-20
2385  GOTO 2395
2390  PRINT "THEY DID NOT ATTACK"
2392  GOTO 2500
2395  IF S5=0 THEN 2410
2400  PRINT "RIDERS WERE FRIENDLY, BUT CHECK FOR POSSIBLE LOSSES"
2405  GOTO 2500
2410  PRINT "RIDERS WERE HOSTILE--CHECK FOR LOSSES"
2415  IF B >= 0 THEN 2500
2420  PRINT "YOU RAN OUT OF BULLETS AND GOT MASSACRED BY THE RIDERS"
2425  GOTO 3600
2499  REM ***SELECTION OF EVENTS***
2500  LET D1=0
2505  RESTORE
2510  R1=100*RND(TIM(0))
2515  LET D1=D1+1
2520  IF D1=16 THEN 3020
2525  READ D
2530  IF R1>D THEN 2515
2535  DATA 6,11,13,15,17,22,32,35,37,42,44,54,64,69,95
2537  IF D1>10 THEN 2545
2540  GOTO D1 OF 2550,2570,2590,2615,2630,2645,2660,2690,2785,2810
2545  GOTO D1-10 OF 2825,2860,2885,2970,2990,3020
2550  PRINT "WAGON BREAKS DOWN--LOSE TIME AND SUPPLIES FIXING IT"
2555  LET M=M-15-5*RND(0)
2560  LET M1=M1-8
2565  GOTO 3100
2570  PRINT "OX INJURES LEG---SLOWS YOU DOWN REST OF TRIP"
2575  LET M=M-25
2580  LET A=A-20
2585  GOTO 3100
2590  PRINT "BAD LUCK---YOUR DAUGHTER BROKE HER ARM"
2595  PRINT "YOU HAD TO STOP AND USE SUPPLIES TO MAKE A SLING"
2600  M=M-5-4*RND(0)
2605  M1=M1-2-3*RND(0)
2610  GOTO 3100
2615  PRINT "OX WANDERS OFF---SPEND TIME LOOKING FOR IT"
2620  M=M-17
2625  GOTO 3100
2630  PRINT "YOUR SON GETS LOST---SPEND HALF THE DAY LOOKING FOR HIM"
2635  M=M-10
2640  GOTO 3100
2645  PRINT "UNSAFE WATER--LOSE TIME LOOKING FOR CLEAN SPRING"
2650  LET M=M-10*RND(0)-2
2655  GOTO 3100
2660  IF M>950 THEN 2935
2665  PRINT "HEAVY RAINS---TIME AND SUPPLIES LOST"
2670  F=F-10
2672  B=B-500
2675  M1=M1-15
2680  M=M-10*RND(0)-5
2685  GOTO 3100
2690  PRINT "BANDITS ATTACK"
2700  GOSUB 4500
2705  B=B-20*B1
2715  IF B >= 0 THEN 2735
2720  PRINT "YOU RAN OUT OF BULLETS---THEY GET LOTS OF CASH"
2725  T=T/3
2730  GOTO 2740
2735  IF B1 <= 1 THEN 2770
2740  PRINT "YOU GOT SHOT IN THE LEG AND THEY TOOK ONE OF YOUR OXEN"
2745  K8=1
2750  PRINT "BETTER HAVE A DOC LOOK AT YOUR WOUND"
2755  M1=M1-5
2760  A=A-20
2765  GOTO 3100
2770  PRINT "QUICKEST DRAW OUTSIDE OF DODGE CITY!!!"
2775  PRINT "YOU GOT 'EM!"
2780  GOTO 3100
2785  PRINT "THERE WAS A FIRE IN YOUR WAGON--FOOD AND SUPPLIES DAMAGED"
2790  F=F-40
2792  B=B-400
2795  LET M1=M1-RND(0)*8-3
2800  M=M-15
2805  GOTO 3100
2810  PRINT "LOSE YOUR WAY IN HEAVY FOG---TIME IS LOST"
2815  M=M-10-5*RND(0)
2820  GOTO 3100
2825  PRINT "YOU KILLED A POISONOUS SNAKE AFTER IT BIT YOU"
2830  B=B-10
2835  M1=M1-5
2840  IF M1 >= 0 THEN 2855
2845  PRINT "YOU DIE OF SNAKEBITE SINCE YOU HAVE NO MEDICINE"
2850  GOTO 3600
2855  GOTO 3100
2860  PRINT "WAGON GETS SWAMPED FORDING RIVER--LOSE FOOD AND CLOTHES"
2865  F=F-30
2870  C=C-20
2875  M=M-20-20*RND(0)
2880  GOTO 3100
2885  PRINT "WILD ANIMALS ATTACK!"
2887  GOSUB 4500
2889  IF B>39 THEN 2895
2890  PRINT "YOU WERE TOO LOW ON BULLETS--"
2891  PRINT "THE WOLVES OVERPOWERED YOU"
2892  K8=1
2893  GOTO 3555
2895  IF B1>2 THEN 2910
2900  PRINT "NICE SHOOTIN' PARDNER---THEY DIDN'T GET MUCH"
2905  GOTO 2915
2910  PRINT "SLOW ON THE DRAW---THEY GOT AT YOUR FOOD AND CLOTHES"
2915  B=B-20*B1
2920  C=C-B1*4
2925  F=F-B1*8
2930  GOTO 3100
2935  PRINT "COLD WEATHER---BRRRRRRR!---YOU ";
2940  IF C>22+4*RND(0) THEN 2955
2945  PRINT "DON'T ";
2950  C1=1
2955  PRINT "HAVE ENOUGH CLOTHING TO KEEP YOU WARM"
2960  IF C1=0 THEN 3100
2965  GOTO 4700
2970  PRINT "HAIL STORM---SUPPLIES DAMAGED"
2975  M=M-5-RND(0)*10
2977  B=B-200
2980  M1=M1-4-RND(0)*3
2985  GOTO 3100
2990  IF E=1 THEN 4700
2995  IF E=3 THEN 3010
3000  IF RND(0)>.25 THEN 4700
3005  GOTO 3100
3010  IF RND(0)<.5 THEN 4700
3015  GOTO 3100
3020  PRINT "HELPFUL INDIANS SHOW YOU WHERE TO FIND MORE FOOD"
3025  F=F+14
3030  GOTO 3100
3099  REM ***MOUNTAINS***
3100  IF M <= 950 THEN 700
3105  IF RND(0)*10>9-((M/100-15)^2+72)/((M/100-15)^2+12) THEN 3175
3110  PRINT "RUGGED MOUNTAINS"
3115  IF RND(0)>.1 THEN 3135
3120  PRINT "YOU GOT LOST---LOSE VALUABLE TIME TRYING TO FIND TRAIL!"
3125  M=M-60
3130  GOTO 3175
3135  IF RND(0)>.11 THEN 3160
3140  PRINT "WAGON DAMAGED!---LOSE TIME AND SUPPLIES"
3145  M1=M1-5
3147  B=B-200
3150  M=M-20-30*RND(0)
3155  GOTO 3175
3160  PRINT "THE GOING GETS SLOW"
3165  M=M-45-RND(0)/.02
3175  IF F1=1 THEN 3195
3180  F1=1
3185  IF RND(0)<.8 THEN 3300
3190  PRINT "YOU MADE IT SAFELY THROUGH SOUTH PASS--NO SNOW"
3195  IF M<1700 THEN 3215
3200  IF F2=1 THEN 3215
3205  F2=1
3210  IF RND(0)<.7 THEN 3300
3215  IF M>950 THEN 700
3220  M9=1
3225  GOTO 700
3300  PRINT "BLIZZARD IN MOUNTAIN PASS--TIME AND SUPPLIES LOST"
3305  L1=1
3310  F=F-25
3315  M1=M1-10
3317  B=B-300
3320  M=M-30-40*RND(0)
3325  IF C<18+2*RND(0) THEN 4700
3330  GOTO 3215
3499  REM ***DYING***
3500  PRINT "YOU RAN OUT OF FOOD AND STARVED TO DEATH"
3505  GOTO 3600
3520  LET T=0
3525  PRINT "YOU CAN'T AFFORD A DOCTOR"
3530  GOTO 3555
3550  PRINT "YOU RAN OUT MEDICAL SUPPLIES"
3555  PRINT "YOU DIED OF ";
3560  IF K8=1 THEN 3575
3565  PRINT "PNEUMONIA"
3570  GOTO 3600
3575  PRINT "INJURIES"
3600  PRINT
3602  PRINT "DO TO YOUR UNFORTUNATE SITUATION, THERE ARE A FEW"
3605  PRINT "FORMALITIES WE MUST GO THROUGH"
3610  PRINT
3615  PRINT "WOULD YOU LIKE A MINISTER?"
3620  INPUT C$
3630  PRINT "WOULD YOU LIKE A FANCY FUNERAL?"
3635  INPUT C$
3650  PRINT "WOULD YOU LIKE US TO INFORM YOUR NEXT OF KIN?"
3652  INPUT C$
3654  IF C$="YES" THEN 3670
3656  PRINT "YOUR AUNT NELLIE IN ST. LOUIS IS ANXIOUS TO HEAR"
3658  PRINT
3670  PRINT "WE THANK YOU FOR THIS INFORMATION AND WE ARE SORRY YOU"
3675  PRINT "DIDN'T MAKE IT TO THE GREAT TERRITORY OF OREGON"
3680  PRINT "BETTER LUCK NEXT TIME"
3685  PRINT
3690  PRINT
3695  PRINT TAB(30);"SINCERELY"
3700  PRINT
3705  PRINT TAB(17);"THE OREGON CITY CHAMBER OF COMMERCE"
3710  STOP
3999  REM ***FINAL TURN***
4000  F9=(2040-M2)/(M-M2)
4005  F=F+(1-F9)*(8+5*E)
4010  PRINT
4012  REM *BELLS IN LINES 4015, 4020*
4015  PRINT "YOU"'7" FINALLY ARRI"'7"VED AT ORE"'7"GON CITY"'7
4020  PRINT "AFTER"'7" 2040 LONG MILES"'7"---HOORAY!!"'7"!!!"
4025  PRINT
4030  F9=INT(F9*14)
4035  D3=D3*14+F9
4040  F9=F9+1
4045  IF F9<8 THEN 4055
4050  F9=F9-7
4055  GOTO F9 OF 4060,4070,4080,4090,4100,4110,4120
4060  PRINT "MONDAY ";
4065  GOTO 4125
4070  PRINT "TUESDAY ";
4075  GOTO 4125
4080  PRINT "WEDNESDAY ";
4085  GOTO 4125
4090  PRINT "THURSDAY ";
4095  GOTO 4125
4100  PRINT "FRIDAY ";
4105  GOTO 4125
4110  PRINT "SATURDAY ";
4115  GOTO 4125
4120  PRINT "SUNDAY ";
4125  IF D3>124 THEN 4145
4130  D3=D3-93
4135  PRINT "JULY ";D3;" 1847"
4140  GOTO 4215
4145  IF D3>155 THEN 4165
4150  D3=D3-124
4155  PRINT "AUGUST ";D3;" 1847"
4160  GOTO 4215
4165  IF D3>185 THEN 4185
4170  D3=D3-155
4175  PRINT "SEPTEMBER ";D3;" 1847"
4180  GOTO 4215
4185  IF D3>216 THEN 4205
4190  D3=D3-185
4195  PRINT "OCTOBER ";D3;" 1847"
4200  GOTO 4215
4205  D3=D3-216
4210  PRINT "NOVEMBER ";D3;" 1847"
4215  PRINT
4220  PRINT "FOOD","BULLETS","CLOTHING","MISC. SUPP.","CASH"
4230  IF B>0 THEN 4240
4235  LET B=0
4240  IF C>0 THEN 4250
4245  LET C=0
4250  IF M1>0 THEN 4260
4255  LET M1=0
4260  IF T>0 THEN 4270
4265  LET T=0
4270  IF F>0 THEN 4285
4275  LET F=0
4285  PRINT INT(F),INT(B),INT(C),INT(M1),INT(T)
4290  PRINT
4295  PRINT "PRESIDENT JAMES K. POLK SENDS YOU HIS"
4297  PRINT "      HEARTIEST CONGRATULATIONS"
4300  PRINT
4305  PRINT TAB(11);"AND WISHES YOU A PROSPEROUS LIFE AHEAD"
4310  PRINT
4315  PRINT TAB(22);"AT YOUR NEW HOME"
4320  STOP
4499  REM ***SHOOTING SUB-ROUTINE***
4500  PRINT "TYPE BANG";
4505  B2=7
4510  C$=""
4515  ENTER #P,B2,B1,C$
4520  PRINT
4525  IF C$="BANG" THEN 4535
4530  B1=7
4535  RETURN
4699  REM ***ILLNESS SUB-ROUTINE***
4700  IF 100*RND(0)<10+35*(E-1) THEN 4740
4705  IF 100*RND(0)<100-(40/4^(E-1)) THEN 4760
4715  PRINT "SERIOUS ILLNESS---"
4720  PRINT "YOU MUST STOP FOR MEDICAL ATTENTION"
4725  M1=M1-10
4730  S4=1
4735  GOTO 4780
4740  PRINT "MILD ILLNESS---MEDICINE USED"
4745  M=M-5
4750  M1=M1-2
4755  GOTO 4780
4760  PRINT "BAD ILLNESS---MEDICINE USED"
4765  M=M-5
4770  M1=M1-5
4780  IF M1<0 THEN 3550
4785  IF L1=1 THEN 3215
4790  GOTO 3100
4900  REM ***IDENDIFICATION OF VARIABLES IN THE PROGRAM***
4902  REM A = AMOUNT SPENT ON ANIMALS
4904  REM B = AMOUNT SPENT ON AMMUNITION
4906  REM B1 = ACTUAL RESPONSE TIME FOR INPUTING 'BANG'
4908  REM B2 = MAXIMUM RESPONSE TIME FOR INPUTING 'BANG'
4910  REM C = AMOUNT SPENT ON CLOTHING
4912  REM C1 = FLAG FOR INSUFFICIENT CLOTHING IN COLD WEATHER
4914  REM C$ = YES/NO RESPONSE TO QUESTIONS
4916  REM D1 = COUNTER IN GENERATING EVENTS
4918  REM D3 = TURN NUMBER FOR SETTING DATE
4920  REM D4 = CURRENT DATE
4922  REM E = CHOICE OF EATING
4924  REM F = AMOUNT SPENT ON FOOD
4926  REM F1 = FLAG FOR CLEARING SOUTH PASS
4928  REM F2 = FLAG FOR CLEARING BLUE MOUNTAINS
4930  REM F9 = FRACTION OF 2 WEEKS TRAVELED ON FINAL TURN
4932  REM K8 = FLAG FOR INJURY
4934  REM L1 = FLAG FOR BLIZZARD
4936  REM M = TOTAL MILEAGE WHOLE TRIP
4938  REM M1 = AMOUNT SPENT ON MISCELLANEOUS SUPPLIES
4940  REM M2 = TOTAL MILEAGE UP THROUGH PREVIOUS TURN
4942  REM M9 = FLAG FOR CLEARING SOUTH PASS IN SETTING MILEAGE
4944  REM P = AMOUNT SPENT ON ITEMS AT FORT
4946  REM R1 = RANDOM NUMBER IN CHOOSING EVENTS
4948  REM S4 = FLAG FOR ILLNESS
4950  REM S5 = 'HOSTILITY OF RIDERS' FACTOR
4952  REM T = CASH LEFT OVER AFTER INITIAL PURCHASES
4954  REM T1 = CHOICE OF TACTICS WHEN ATTACKED
4956  REM X = CHOICE OF ACTION FOR EACH TURN
4958  REM X1 = FLAG FOR FORT OPTION
5000  END

1978-08-??

The source is written in an updated form of Control Data BASIC.

1 REM The program that follows is a reconstruction
2 REM of the Oregon Trail game written for HP time-shared
3 REM BASIC by Don Rawitsch and Bill Heinemann and Paul Dillenberger
4 REM in 1971. Its source is an updated version published in the
5 REM July-August 1978 issue of Creative Computing.
6
7
8
9
10 REM PROGRAM NAME - 0REGON        VERSION:01/01/78
20 REM ORIGINAL PROGRAMMING BY BILL HEINEMANN - 1971
30 REM SUPPORT RESEARCH AND MATERIALS BY DON RAVITSCH
40 REM MINNESOTA EDUCATIONAL COMPUTING CONSORTIUM STAFF
50 REM CDC CYBER 70/73-26 BASIC 3-1
60 REM DOCUMENTATION BOOKLET 'OREGON' AVAILABLE FROM
61 REM    MECC SUPPORT SERVICES
62 REM    2520 BROADWAY DRIVE
63 REM    ST. PAUL, MN  55113
80 REM
91 DIM S$(5)
150 REM  *FOR THE MEANING OF THE VARIABLES USED, LIST LINES 6470-6790*
155 REM
156 LET C$ = ""
157 INPUT "DO YOU NEED INSTRUCTIONS  (y/n)"; C$
200 IF C$="n" THEN 690
210 PRINT
220 PRINT

REM ***INSTRUCTIONS***
240 PRINT "THIS PROGRAM SIMULATES A TRIP OVER THE OREGON TRAIL FROM"
250 PRINT "INDEPENDENCE, MISSOURI TO OREGON CITY, OREGON IN 1847."
260 PRINT "YOUR FAMILY OF FIVE WILL COVER THE 2040 MILE OREGON TRAIL"
270 PRINT "IN 5-6 MONTHS --- IF YOU MAKE IT ALIVE."
280 PRINT
290 PRINT "YOU HAD SAVED $900 TO SPEND FOR THE TRIP, AND YOU'VE JUST"
300 PRINT "   PAID $200 FOR A WAGON ."
310 PRINT "YOU WILL NEED TO SPEND THE REST OF YOUR MONEY ON THE"
320 PRINT "   FOLLOWING ITEMS:"
330 PRINT
340 PRINT "     OXEN - YOU CAN SPEND $200-$300 ON YOUR TEAM"
350 PRINT "            THE MORE YOU SPEND, THE FASTER YOU'LL GO"
360 PRINT "               BECAUSE YOU'LL HAVE BETTER ANIMALS"
370 PRINT
380 PRINT "     FOOD - THE MORE YOU HAVE, THE LESS CHANCE THERE"
390 PRINT "               IS OF GETTING SICK"
400 PRINT
410 PRINT "     AMMUNITION - $1 BUYS A BELT OF 50 BULLETS"
420 PRINT "            YOU WILL NEED BULLETS FOR ATTACKS BY ANIMALS"
430 PRINT "               AND BANDITS, AND FOR HUNTING FOOD"
440 PRINT
450 PRINT "     CLOTHING - THIS IS ESPECIALLY IMPORTANT FOR THE COLD"
460 PRINT "               WEATHER YOU WILL ENCOUNTER WHEN CROSSING"
470 PRINT "               THE MOUNTAINS"
480 PRINT
490 PRINT "     MISCELLANEOUS SUPPLIES - THIS INCLUDES MEDICINE AND"
500 PRINT "               OTHER THINGS YOU WILL NEED FOR SICKNESS"
510 PRINT "               AND EMERGENCY REPAIRS"
520 PRINT
530 PRINT
540 PRINT "YOU CAN SPEND ALL YOUR MONEY BEFORE YOU START YOUR TRIP -"
550 PRINT "OR YOU CAN SAVE SOME OF YOUR CASH TO SPEND AT FORTS ALONG"
560 PRINT "THE WAY WHEN YOU RUN LOW. H0WEVER, ITEMS COST MORE AT"
570 PRINT "THE FORTS. YOU CAN ALSO GO HUNTING ALONG THE WAY TO GET"
580 PRINT "MORE FOOD."
590 PRINT "WHENEVER YOU HAVE TO USE YOUR TRUSTY RIFLE ALONG THE WAY,"
600 PRINT "YOU WILL BE TOLD TO TYPE IN A WORD (ONE THAT SOUNDS LIKE A"
610 PRINT "GUN SHOT). THE FASTER YOU TYPE IN THAT WORD AND HIT THE"
620 PRINT "**RETURN** KEY, THE BETTER LUCK YOU'LL HAVE WITH YOUR GUN."
630 PRINT
640 PRINT "AT EACH TURN, ALL ITEMS ARE SHOWN IN DOLLAR AMOUNTS"
650 PRINT "EXCEPT BULLETS"
660 PRINT "WHEN ASKED TO ENTER MONEY AMOUNTS, DON'T USE A **$**."
670 PRINT
680 PRINT "GOOD LUCK!!!"
690 PRINT
700 PRINT

710 PRINT "HOW GOOD A SHOT ARE YOU WITH YOUR RIFLE?"
720 PRINT "  (1) ACE MARKSMAN,  (2) GOOD SHOT,  (3) FAIR TO MIDDLIN'"
730 PRINT "         (4) NEED MORE PRACTICE,  (5) SHAKY KNEES"
740 PRINT "ENTER ONE OF THE ABOVE -- THE BETTER YOU CLAIM YOU ARE, THE"
750 PRINT "FASTER YOU'LL HAVE TO BE WITH YOUR GUN TO BE SUCCESSFUL."
751 LET D9 = 0
760 INPUT D9
770 IF D9>5 THEN 790
780 GOTO 810
790 LET D9=0

REM *** INITIAL PURCHASES***
810 LET X1=-1
820 LET K8=0
821 LET S4=0
822 LET F1=0
823 LET F2=0
824 LET M=0
825 LET M9=0
826 LET D3=0
830 PRINT
840 PRINT
850 PRINT "HOW MUCH DO YOU WANT TO SPEND ON YOUR OXEN TEAM";
851 LET A = 0
860 INPUT A
870 IF A >= 200 THEN 900
880 PRINT "NOT ENOUGH"
890 GOTO 850
900 IF A <= 300 THEN 930
910 PRINT "TOO MUCH"
920 GOTO 850
930 PRINT "HOW MUCH DO YOU WANT TO SPEND ON FOOD";
931 LET F = 0
940 INPUT F
950 IF F >= 0 THEN 980
960 PRINT "IMPOSSIBLE"
970 GOTO 930
980 PRINT "HOW MUCH DO YOU WANT TO SPEND ON AMMUNITION";
981 LET B = 0
990 INPUT B
1000 IF B >= 0 THEN 1030
1010 PRINT "IMPOSSIBLE"
1020 GOTO 980
1030 PRINT "HOW MUCH DO YOU WANT TO SPEND ON CLOTHING";
1031 LET C = 0
1040 INPUT C
1050 IF C >= 0 THEN 1080
1060 PRINT "IMPOSSIBLE"
1070 GOTO 1030
1080 PRINT "HOW MUCH DO YOU WANT TO SPEND ON MISCELLANEOUS SUPPLIES";
1081 LET M1 = 0
1090 INPUT M1
1100 IF M1 >= 0 THEN 1130
1110 PRINT "IMPOSSIBLE"
1120 GOTO 1080
1130 LET T=700-A-F-B-C-M1
1140 IF T >= 0 THEN 1170
1150 PRINT "YOU OVERSPENT--YOU ONLY HAD $700 TO SPEND.  BUY AGAIN."
1160 GOTO 830
1170 LET B=50*B
1180 PRINT "AFTER ALL YOUR PURCHASES, YOU NOW HAVE ";T;" DOLLARS LEFT"
1190 PRINT
1200 PRINT "MONDAY MARCH 29 1847"
1210 PRINT
1220 GOTO 1750
1230 IF M >= 2040 THEN 5430

1240 REM ***SETTING DATE***
1250 LET D3=D3+1
1260 PRINT
1270 PRINT "MONDAY ";
1280 IF D3>10 THEN 1300
1290 ON D3 GO TO 1310, 1330, 1350, 1370, 1390, 1410, 1430, 1450, 1470, 1490
1300 ON D3-10 GO TO 1510, 1530, 1550, 1570, 1590, 1610, 1630, 1650, 1670, 1690
1310 PRINT "APRIL 12 ";
1320 GOTO 1720
1330 PRINT "APRIL 26 ";
1340 GOTO 1720
1350 PRINT "MAY 10 ";
1360 GOTO 1720
1370 PRINT "MAY 24 ";
1380 GOTO 1720
1390 PRINT "JUNE 7 ";
1400 GOTO 1720
1410 PRINT "JUNE 21 ";
1420 GOTO 1720
1430 PRINT "JULY 5 ";
1440 GOTO 1720
1450 PRINT "JULY 19 ";
1460 GOTO 1720
1470 PRINT "AUGUST 2 ";
1480 GOTO 1720
1490 PRINT "AUGUST 16 ";
1500 GOTO 1720
1510 PRINT "AUGUST 31 ";
1520 GOTO 1720
1530 PRINT "SEPTEMBER 13 ";
1540 GOTO 1720
1550 PRINT "SEPTEMBER 27 ";
1560 GOTO 1720
1570 PRINT "OCTOBER 11 ";
1580 GOTO 1720
1590 PRINT "OCTOBER 25 ";
1600 GOTO 1720
1610 PRINT "NOVEMBER 8 ";
1620 GOTO 1720
1630 PRINT "NOVEMBER 22 ";
1640 GOTO 1720
1650 PRINT "DECEMBER 6 ";
1660 GOTO 1720
1670 PRINT "DECEMBER 20 ";
1680 GOTO 1720
1690 PRINT "YOU HAVE BEEN ON THE TRAIL TOO LONG ------"
1700 PRINT "YOUR FAMILY DIES IN THE FIRST BLIZZARD OF WINTER"
1710 GOTO 5170
1720 PRINT "1847"
1730 PRINT

1740 REM ***BEGINNING EACH TURN***
1750 IF F >= 0 THEN 1770
1760 LET F=0
1770 IF B >= 0 THEN 1790
1780 LET B=0
1790 IF C >= 0 THEN 1810
1800 LET C=0
1810 IF M1 >= 0 THEN 1830
1820 LET M1=0
1830 IF F >= 13 THEN 1850
1840 PRINT "YOU'D BETTER DO SOME HUNTING OR BUY FOOD AND SOON!!!!"
1850 LET F=INT(F)
1860 LET B=INT(B)
1870 LET C=INT(C)
1880 LET M1=INT(M1)
1890 LET T=INT(T)
1900 LET M=INT(M)
1910 LET M2=M
1920 IF S4=1 THEN 1950
1930 IF K8=1 THEN 1950
1940 GOTO 1990
1950 LET T=T-20
1960 IF T<0 THEN 5080
1970 PRINT "DOCTOR'S BILL IS $20"
1980 LET K8=0
1981 LET S4=0
1990 IF M9=1 THEN 2020
2000 PRINT "TOTAL MILEAGE IS ";M
2010 GOTO 2040
2020 PRINT "TOTAL MILEAGE IS 950"
2030 LET M9=0
2040 PRINT "FOOD","BULLETS","CLOTHING","MISC. SUPP.","CASH"
2050 PRINT F,B,C,M1,T
2060 IF X1=-1 THEN 2170
2070 LET X1=X1*(-1)

2080 PRINT "DO YOU WANT TO (1) STOP AT THE NEXT FORT, (2) HUNT, ";
2090 PRINT "OR (3) CONTINUE"
2091 LET X = 0
2100 INPUT X
2110 IF X>2 THEN 2150
2120 IF X<1 THEN 2150
2130 LET X=INT(X)
2140 GOTO 2270
2150 LET X=3
2160 GOTO 2270

2170 PRINT "DO YOU WANT TO (1) HUNT, OR (2) CONTINUE"
2181 LET X = 0
2180 INPUT X
2190 IF X=1 THEN 2210
2200 LET X=2
2210 LET X=X+1
2220 IF X=3 THEN 2260
2230 IF B>39 THEN 2260
2240 PRINT "TOUGH YOU NEED MORE BULLETS TO GO HUNTING"
2250 GOTO 2170
2260 LET X1=X1*(-1)
2270 ON X GO TO 2290,2540,2720

REM ***STOPPING AT FORT***
2290 PRINT "ENTER WHAT YOU WISH TO SPEND ON THE FOLLOWING"
2300 PRINT "FOOD";
2310 GOSUB 2329
2320 GOTO 2410
2329 LET P = 0
2330 INPUT P
2340 IF P<0 THEN 2400
2350 LET T=T-P
2360 IF T >= 0 THEN 2400
2370 PRINT "YOU DON'T HAVE THAT MUCH--KEEP YOUR SPENDING DOWN"
2375 PRINT "YOU MISS YOUR CHANCE TO SPEND ON THAT ITEM"
2380 LET T=T+P
2390 LET P=0
2400 RETURN
2410 LET F=F+2/3*P
2420 PRINT "AMMUNITION";
2430 GOSUB 2330
2440 LET B=INT(B+2/3*P*50)
2450 PRINT "CLOTHING";
2460 GOSUB 2330
2470 LET C=C+2/3*P
2480 PRINT "MISCELLANEOUS SUPPLIES";
2490 GOSUB 2330
2500 LET M1=M1+2/3*P
2510 LET M=M-45
2520 GOTO 2720

REM ***HUNTING***
2540 IF B>39 THEN 2570
2550 PRINT "TOUGH---YOU NEED M0RE BULLETS TO GO HUNTING"
2560 GOTO 2080
2570 LET M=M-45
2580 GOSUB 6140
2590 IF B1 <= 1 THEN 2660
2600 IF 100*RND()<13*B1 THEN 2710
2610 LET F=F+48-2*B1
2620 PRINT "NICE SHOT--RIGHT ON TARGET--GOOD EATIN' TONIGHT!!"
2630 LET B=B-10-3*B1
2640 GOTO 2720

REM **BELLS IN LINE 2660**
2660 PRINT "RIGHT BETWEEN THE EYES---YOU GOT A BIG ONE!!!!"
2670 PRINT "FULL BELLIES TONIGHT!"
2680 LET F=F+52+RND()*6
2690 LET B=B-10-RND()*4
2700 GOTO 2720
2710 PRINT "YOU MISSED---AND YOUR DINNER GOT AWAY....."
2720 IF F >= 13 THEN 2750
2730 GOTO 5060

REM ***EATING***
2750 PRINT "DO YOU WANT TO EAT (1) POORLY   (2) MODERATELY"
2760 PRINT "OR (3) WELL";
2770 LET E = 0
2771 INPUT E
2780 IF E>3 THEN 2750
2790 IF E<1 THEN 2750
2800 LET E=INT(E)
2810 LET F=F-8-5*E
2820 IF F >= 0 THEN 2860
2830 LET F=F+8+5*E
2840 PRINT "YOU CAN'T EAT THAT WELL"
2850 GOTO 2750
2860 LET M=M+200+(A-220)/5+10*RND()
2870 LET L1=0
2871 LET C1=0

REM ***RIDERS ATTACK***
2890 IF RND()*10>((M/100-4)^2+72)/((M/100-4)^2+12)-1 THEN 3550
2900 PRINT "RIDERS AHEAD.   THEY ";
2910 LET S5=0
2920 IF RND()<.8 THEN 2950
2930 PRINT "DON'T ";
2940 LET S5=1
2950 PRINT "LOOK HOSTILE"
2960 PRINT "TACTICS"
2970 PRINT "(1) RUN  (2) ATTACK  (3) CONTINUE  (4) CIRCLE WAGONS"
2980 IF RND()>.2 THEN 3000
2990 LET S5=1-S5
3000 LET T1 = 0
3001 INPUT T1
3010 IF T1<1 THEN 2970
3020 IF T1>4 THEN 2970
3030 LET T1=INT(T1)
3040 IF S5=1 THEN 3330
3050 IF T1>1 THEN 3110
3060 LET M=M+20
3070 LET M1=M1-15
3080 LET B=B-150
3090 LET A=A-40
3100 GOTO 3470
3110 IF T1>2 THEN 3240
3120 GOSUB 6140
3130 LET B=B-B1*40-80
3140 IF B1>1 THEN 3170
3150 PRINT "NICE SHOOTING---YOU DROVE THEM OFF"
3160 GOTO 3470
3170 IF B1 <= 4 THEN 3220
3180 PRINT "LOUSY SHOT---YOU GOT KNIFED"
3190 LET K8=1
3200 PRINT "YOU HAVE TO SEE OL' DOC BLANCHARD"
3210 GOTO 3470
3220 PRINT "KINDA SLOW WITH YOUR COLT .45"
3230 GOTO 3470
3240 IF T1>3 THEN 3290
3250 IF RND()>.8 THEN 3450
3260 LET B=B-150
3270 LET M1=M1-15
3280 GOTO 3470
3290 GOSUB 6140
3300 LET B=B-B1*30-80
3310 LET M=M-25
3320 GOTO 3140
3330 IF T1>1 THEN 3370
3340 LET M=M+15
3350 LET A=A-10
3360 GOTO 3470
3370 IF T1>2 THEN 3410
3380 LET M=M-5
3390 LET B=B-100
3400 GOTO 3470
3410 IF T1>3 THEN 3430
3420 GOTO 3470
3430 LET M=M-20
3440 GOTO 3470
3450 PRINT "THEY DID NOT ATTACK"
3460 GOTO 3550
3470 IF S5=0 THEN 3500
3480 PRINT "RIDERS WERE FRIENDLY, BUT CHECK FOR POSSIBLE LOSSES"
3490 GOTO 3550
3500 PRINT "RIDERS WERE HOSTILE--CHECK FOR LOSSES"
3510 IF B >= 0 THEN 3550
3520 PRINT "YOU RAN OUT OF BULLETS AND GOT MASSACRED BY THE RIDERS"
3530 GOTO 5170

REM ***SELECTION OF EVENTS***
3550 LET D1=0
3560 RESTORE
3570 LET R1=100*RND()
3580 LET D1=D1+1
3590 IF D1=16 THEN 4670
3595 LET D = 0
3600 READ D
3610 IF R1>D THEN 3580
3620 DATA 6, 11, 13, 15, 17, 22, 32, 35, 37, 42, 44, 54, 64, 69, 95
3630 IF D1>10 THEN 3650
3640 ON D1 GO TO 3660, 3700, 3740, 3790, 3820, 3850, 3880, 3960, 4130, 4190
3650 ON D1-10 GO TO 4220, 4290, 4340, 4560, 4610, 4670
3660 PRINT "WAGON BREAKS DOWN--LOSE TIME AND SUPPLIES FIXING IT"
3670 LET M=M-15-5*RND()
3680 LET M1=M1-8
3690 GOTO 4710
3700 PRINT "OX INJURES LEG--SLOWS YOU DOWN REST OF TRIP"
3710 LET M=M-25
3720 LET A=A-20
3730 GOTO 4710
3740 PRINT "BAD LUCK--YOUR DAUGHTER BROKE HER ARM"
3750 PRINT "YOU HAD TO STOP AND USE SUPPLIES TO MAKE A SLING"
3760 LET M=M-5-4*RND()
3770 LET M1=M1-2-3*RND()
3780 GOTO 4710
3790 PRINT "OX WANDERS OFF--SPEND TIME LOOKING FOR IT"
3800 LET M=M-17
3810 GOTO 4710
3820 PRINT "YOUR SON GETS LOST---SPEND HALF THE DAY LOOKING FOR HIM"
3830 LET M=M-10
3840 GOTO 4710
3850 PRINT "UNSAFE WATER--LOSE TIME LOOKING FOR CLEAN SPRING"
3860 LET M=M-10*RND()-2
3870 GOTO 4710
3880 IF M>950 THEN 4490
3890 PRINT "HEAVY RAINS---TIME AND SUPPLIES LOST"
3910 LET F=F-10
3920 LET B=B-500
3930 LET M1=M1-15
3940 LET M=M-10*RND()-5
3950 GOTO 4710
3960 PRINT "BANDITS ATTACK"
3970 GOSUB 6140
3980 LET B=B-20*B1
3990 IF B >= 0 THEN 4030
4000 PRINT "YOU RAN OUT OF BULLETS---THEY GET LOTS OF CASH"
4010 LET T=T/3
4020 GOTO 4040
4030 IF B1 <= 1 THEN 4100
4040 PRINT "YOU GOT SHOT IN THE LEG AND THEY TOOK ONE OF YOUR OXEN"
4050 LET K8=1
4060 PRINT "BETTER HAVE A DOC LOOK AT YOUR WOUND"
4070 LET M1=M1-5
4080 LET A=A-20
4090 GOTO 4710
4100 PRINT "QUICKEST DRAW OUTSIDE OF DODGE CITY!!!"
4110 PRINT "YOU GOT 'EM!"
4120 GOTO 4710
4130 PRINT "THERE WAS A FIRE IN YOUR WAGON--FOOD AND SUPPLIES DAMAGE!"
4140 LET F=F-40
4150 LET B=B-400
4160 LET M1=M1-RND()*8-3
4170 LET M=M-15
4180 GOTO 4710
4190 PRINT "LOSE YOUR WAY IN HEAVY FOG---TIME IS LOST"
4200 LET M=M-10-5*RND()
4210 GOTO 4710
4220 PRINT "YOU KILLED A POISONOUS SNAKE AFTER IT BIT YOU"
4230 LET B=B-10
4240 LET M1=M1-5
4250 IF M1 >= 0 THEN 4280
4260 PRINT "YOU DIE OF SNAKEBITE SINCE YOU HAVE NO MEDICINE"
4270 GOTO 5170
4280 GOTO 4710
4290 PRINT "WAGON GETS SWAMPED FORDING RIVER--LOSE FOOD AND CLOTHES"
4300 LET F=F-30
4310 LET C=C-20
4320 LET M=M-20-20*RND()
4330 GOTO 4710
4340 PRINT "WILD ANIMALS ATTACK!"
4350 GOSUB 6140
4360 IF B>39 THEN 4410
4370 PRINT "YOU WERE TOO LOW ON BULLETS--"
4380 PRINT "THE WOLVES OVERPOWERED YOU"
4390 LET K8=1
4400 GOTO 5120
4410 IF B1>2 THEN 4440
4420 PRINT "NICE SHOOTIN' PARDNER---THEY DIDN'T GET MUCH"
4430 GOTO 4450
4440 PRINT "SLOW ON THE DRAW---THEY GOT AT YOUR FOOD AND CLOTHES"
4450 LET B=B-20*B1
4460 LET C=C-B1*4
4470 LET F=F-B1*8
4480 GOTO 4710
4490 PRINT "COLD WEATHER---BRRRRRRR!---YOU ";
4500 IF C>22+4*RND() THEN 4530
4510 PRINT "DON'T ";
4520 LET C1=1
4530 PRINT "HAVE ENOUGH CLOTHING TO KEEP YOU WARM"
4540 IF C1=0 THEN 4710
4550 GOTO 6300
4560 PRINT "HAIL STORM---SUPPLIES DAMAGED"
4570 LET M=M-5-RND()*10
4580 LET B=B-200
4590 LET M1=M1-4-RND()*3
4600 GOTO 4710
4610 IF E=1 THEN 6300
4620 IF E=3 THEN 4650
4630 IF RND()>.25 THEN 6300
4640 GOTO 4710
4650 IF RND()<.5 THEN 6300
4660 GOTO 4710
4670 PRINT "HELPFUL INDIANS SHOW YOU WERE TO FIND MORE FOOD"
4680 LET F=F+14
4690 GOTO 4710

4700 REM ***MOUNTAINS***
4710 IF M <= 950 THEN 1230
4720 IF RND()*10>9-((M/100-15)^2+72)/((M/100-15)^2+12) THEN 4860
4730 PRINT "RUGGED MOUNTAINS"
4740 IF RND()>.1 THEN 4780
4750 PRINT "YOU GOT LOST---LOSE VALUABLE TIME TRYING TO FIND TRAIL!"
4760 LET M=M-60
4770 GOTO 4860
4780 IF RND()>.11 THEN 4840
4790 PRINT "WAGON DAMAGED!-LOSE TIME AND SUPPLIES"
4800 LET M1=M1-5
4810 LET B=B-200
4820 LET M=M-20-30*RND()
4830 GOTO 4860
4840 PRINT "THE GOING GETS SLOW"
4850 LET M=M-45-RND()/.02
4860 IF F1=1 THEN 4900
4870 LET F1=1
4880 IF RND()<.8 THEN 4970
4890 PRINT "YOU MADE IT SAFELY THROUGH SOUTH PASS--NO SNOW"
4900 IF M<1700 THEN 4940
4910 IF F2=1 THEN 4940
4920 LET F2=1
4930 IF RND()<.7 THEN 4970
4940 IF M>950 THEN 1230
4950 LET M9=1
4960 GOTO 1230
4970 PRINT "BLIZZARD IN MOUNTAIN PASS--TIME AND SUPPLIES LOST"
4980 LET L1=1
4990 LET F=F-25
5000 LET M1=M1-10
5010 LET B=B-300
5020 LET M=M-30-40*RND()
5030 IF C<18+2*RND() THEN 6300
5040 GOTO 4940

REM ***DYING***
5060 PRINT "YOU RAN OUT OF FOOD AND STARVED TO DEATH"
5070 GOTO 5170
5080 LET T=0
5090 PRINT "YOU CAN'T AFFORD A DOCTOR"
5100 GOTO 5120
5110 PRINT "YOU RAN OUT OF MEDICAL SUPPLIES"
5120 PRINT "YOU DIED OF ";
5130 IF K8=1 THEN 5160
5140 PRINT "PNEUMONIA"
5150 GOTO 5170
5160 PRINT "INJURIES"
5170 PRINT
5180 PRINT "DUE TO YOUR UNFORTUNATE SITUATION, THERE ARE A FEW"
5190 PRINT "FORMALITIES WE MUST GO THROUGH"
5200 PRINT
5210 PRINT "WOULD YOU LIKE A MINISTER?"
5220 INPUT C$
5230 PRINT "WOULD YOU LIKE A FANCY FUNERAL?"
5240 INPUT C$
5250 PRINT "WOULD YOU LIKE US TO INFORM YOUR NEXT OF KIN?"
5260 INPUT C$
5270 IF C$="y" THEN 5310
5280 PRINT "BUT YOUR AUNT SADIE IN ST. LOUIS IS REALLY WORRIED ABOUT YOU"
8290 PRINT
8300 GOTO 5330
5310 PRINT "THAT WILL BE $4.50 FOR THE TELEGRAPH CHARGE."
5320 PRINT
5330 PRINT "WE THANK YOU FOR THIS INFORMATION AND WE ARE SORRY YOU"
5340 PRINT "DIDN'T MAKE IT TO THE GREAT TERRITORY OF OREGON"
5350 PRINT "BETTER LUCK NEXT TIME"
5360 PRINT
5370 PRINT
5380 PRINT TAB(30);"SINCERELY"
5390 PRINT
5400 PRINT TAB(17);"THE OREGON CITY CHAMBER OF COMMERCE"
5410 GOTO 9999

REM ***FINAL TURN***
5430 LET F9=(2040-M2)/(M-M2)
5440 LET F=F+(1-F9)*(8*5*E)
5450 PRINT

REM **BELLS IN LINES 5470, 5480**
5470 PRINT "YOU FINALLY ARRIVED AT OREGON CITY"
5480 PRINT "AFTER 2040 LONG MILES---HOORAY !!!!!"
5490 PRINT "A REAL PIONEER!"
5500 PRINT
5510 LET F9=INT(F9*14)
5520 LET D3=D3*14+F9
5530 LET F9=F9+1
5540 IF F9<8 THEN 5560
5550 LET F9=F9-7
5560 ON F9 GO TO 5570,5590,5630,5650,5670,5690
5570 PRINT "MONDAY ";
5580 GOTO 5700
5590 PRINT "TUESDAY ";
5600 GOTO 5700
5610 PRINT "WEDNESDAY ";
5620 GOTO 5700
5630 PRINT "THURSDAY ";
5640 GOTO 5700
5650 PRINT "FRIDAY ";
5660 GOTO 5700
5670 PRINT "SATURDAY ";
5680 GOTO 5700
5690 PRINT "SUNDAY ";
5700 IF D3>124 THEN 5740
5710 LET D3=D3-93
5720 PRINT "JULY ";D3;" 1847"
5730 GOTO 5920
5740 IF D3>155 THEN 5780
5750 LET D3=D3-124
5760 PRINT "AUGUST ";D3;" 1847"
5770 GOTO 5920
5780 IF D3>155 THEN 5820
5790 LET D3=D3-155
5800 PRINT "SEPTEMBER ";D3;" 1847"
5810 GOTO 5920
5820 IF D3>216 THEN 5860
5830 LET D3=D3-155
5840 PRINT "OCTOBER ";D3;" 1847"
5850 GOTO 5920
5860 IF D3>246 THEN 5900
5870 LET D3=D3-246
5880 PRINT "NOVEMBER ";D3;" 1847"
5890 GOTO 5920
5900 LET D3=D3-246
5910 PRINT "DECEMBER ";D3;" 1847"
5920 PRINT
5930 PRINT "FOOD","BULLETS","CLOTHING","MISC. SUPP.","CASH"
5940 IF B>0 THEN 5960
5950 LET B=0
5960 IF C>0 THEN 5980
5970 LET C=0
5980 IF M1>0 THEN 6000
5990 LET M1=0
6000 IF T>0 THEN 6020
6010 LET T=0
6020 IF F>0 THEN 6040
6030 LET F=0
6040 PRINT INT(F),INT(B),INT(C),INT(M1),INT(T)
6050 PRINT
6060 PRINT TAB(11); "PRESIDENT JAMES K. POLK SENDS YOU HIS"
6070 PRINT TAB(17); "HEARTIEST CONGRATULATIONS"
6080 PRINT
6090 PRINT TAB(11);"AND WISHES YOU A PROSPEROUS LIFE AHEAD"
6100 PRINT
6110 PRINT TAB(22);"AT YOUR NEW HOME"
6120 GOTO 9999

REM ***SHOOTING SUB-ROUTINE***
6131 REM THE METHOD OF TIMING THE SHOOTING
6132 REM WILL VARY FROM SYSTEM TO SYSTEM.
6133 REM USERS WILL PROBABLY PREFER TO USE
6134 REM IF TIMING ON THE USER'S SYSTEM IS HIGHLY SUSCEPTIBLE
6135 REM TO SYSTEM RESPONSE TIME, THE FORMULA IN LINE 6240 CAN
6136 REM BE TAILORED TO ACCOMODATE THIS BY EITHER INCREASING
6137 REM OR DECREASING THE 'SHOOTING' TIME RECORDED BY THE SYSTEM.
6140 REM MOVED TO TOP OF PROGRAM DIM S$(5)
6150 LET S$(1)="bang"
6160 LET S$(2)="blam"
6170 LET S$(3)="pow"
6180 LET S$(4)="wham"
6190 LET S6=INT(RND()*4+1)
6200 PRINT "TYPE "; S$(S6)
6210 LET B3 = CLK(0)
6220 INPUT C$
6230 LET B1 = CLK(0)
6240 LET B1=((B1-B3)*2)-(D9-1)
6250 PRINT
6252 REM PRINT "B1 = " ; B1
6255 IF B1>0 THEN 6260
6257 LET B1=0
6260 IF C$=S$(S6) THEN 6280
6270 LET B1=9
6280 RETURN

REM ***ILLNESS SUB-ROUTINE***
6300 IF 100*RND()<10+35*(E-1) THEN 6370
6310 IF 100*RND()<100-(40/4^(E-1)) THEN 6410
6320 PRINT "SERIOUS ILLNESS"
6330 PRINT "YOU MUST STOP FOR MEDICAL ATTENTION"
6340 LET M1=M1-10
6350 LET S4=1
6360 GOTO 6440
6370 PRINT "MILD ILLNESS---MEDICINE USED"
6380 LET M=M-5
6390 LET M1=M1-2
6400 GOTO 6440
6410 PRINT "BAD ILLNESS---MEDICINE USED"
6420 LET M=M-5
6430 LET M1=M1-5
6440 IF M1<0 THEN 5110
6450 IF L1=1 THEN 4940
6460 GOTO 4710

REM ***IDENTIFICATION OF VARIABLES IN THE PROGRAM***
6480 REM A = AMOUNT SPENT ON ANIMALS
6490 REM B = AMOUNT SPENT ON AMMUNITION
6500 REM B1 = ACTUAL RESPONSE TIME FOR INPUTTING "BANG"
6510 REM B3 = CLOCK TIME AT START OF INPUTTING "BANG"
6520 REM C = AMOUNT SPENT ON CLOTHING
6530 REM C1 = FLAG FOR INSUFFICIENT CLOTHING IN COLD WEATHER
6540 REM C$ = YES/NO RESPONSE TO QUESTIONS
6550 REM D1 = COUNTER IN GENERATING EVENTS
6560 REM D3 = TURN NUMBER FOR SETTING DATE
6570 REM D4 = CURRENT DATE
6580 REM D9 = CHOICE OF SHOOTING EXPERTISE LEVEL
6590 REM E = CHOICE OF EATING
6600 REM F = AMOUNT SPENT ON FOOD
6610 REM F1 = FLAG FOR CLEARING SOUTH PASS
6620 REM F2 = FLAG FOR CLEARING BLUE MOUNTAINS
6630 REM F9 = FRACTION OF 2 WEEKS TRAVELED ON FINAL TURN
6640 REM K8 = FLAG FOR INJURY
6650 REM L1 = FLAG FOR BLIZZARD
6660 REM M = TOTAL MILEAGE WHOLE TRIP
6670 REM M1 = AMOUNT SPENT ON MISCELLANEOUS SUPPLIES
6680 REM M2 = TOTAL MILEAGE UP THROUGH PREVIOUS TURN
6690 REM M9 = FLAG FOR CLEARING SOUTH PASS IN SETTING MILEAGE
6700 REM P = AMOUNT SPENT ON ITEMS AT FORT
6710 REM R1 = RANDOM NUMBER IN CHOOSING EVENTS
6720 REM S4 = FLAG FOR ILLNESS
6730 REM S5 = ""HOSTILITY OF RIDERS"" FACTOR
6740 REM S6 = SHOOTING WORD SELECTOR
6750 REM S$ = VARIATIONS OF SHOOTING WORD
6760 REM T = CASH LEFT OVER AFTER INITIAL PURCHASES
6770 REM T1 = CHOICE OF TACTICS WHEN ATTACKED
6780 REM X = CHOICE OF ACTION FOR EACH TURN
6790 REM X1 = FLAG FOR FORT OPTION
9999 END

2015-04-??

This source is a port to Applesoft BASIC by Chris Torrence and is based on the 1975 version of the original.

4  REM APPLESOFT BASIC VERSION BY CHRIS TORRENCE
5  REM CODE DOWNLOADED APRIL 2015 FROM INTERNET ARCHIVE:
6  REM HTTPS://ARCHIVE.ORG/DETAILS/200106-TOPS10-IN-A-BOX
7  REM
8  REM       MINNESOTA EDUCATIONAL COMPUTING CONSORTIUM STAFF
9  REM  PROGRAMMING REVISIONS BY DON RAWITSCH - 1975
11  REM  CURRENT VERSION - 3/27/75
15  REM  **FOR THE MEANING OF THE VARIABLES USED, LIST LINES 4900-4960**
20  SPEED = 180 : REM [CT] SLOW DOWN TO TERMINAL SPEED
25  PRINT "DO YOU NEED INSTRUCTIONS  (YES/NO)";
30  REM [CT] DIM C$[5]
35  INPUT C$
40  IF C$="NO" OR C$="N" THEN 400
45  PRINT: PRINT
59  REM ***INSTRUCTIONS***
60  PRINT "THIS PROGRAM SIMULATES A TRIP OVER"
62  PRINT "THE OREGON TRAIL FROM INDEPENDENCE,"
64  PRINT "MISSOURI TO OREGON CITY, OREGON"
66  PRINT "IN 1847. YOUR FAMILY OF FIVE WILL"
70  PRINT "COVER THE 2000 MILE OREGON TRAIL"
75  PRINT "IN 5-6 MONTHS --- IF YOU MAKE IT ALIVE."
80  PRINT
85  PRINT "YOU HAD SAVED $900 TO SPEND FOR THE"
87  PRINT "TRIP, AND YOU'VE JUST PAID $200 FOR"
90  PRINT "A WAGON."
95  PRINT "YOU WILL NEED TO SPEND THE REST OF YOUR"
100  PRINT "MONEY ON THE FOLLOWING ITEMS:"
105  PRINT : INPUT "PRESS <RETURN>..."; C$
110  PRINT "OXEN - YOU CAN SPEND $200-$300 ON YOUR"
115  PRINT "       TEAM. THE MORE YOU SPEND, THE"
117  PRINT "       FASTER YOU'LL GO BECAUSE YOU'LL"
120  PRINT "       HAVE BETTER ANIMALS."
125  PRINT
130  PRINT "FOOD - THE MORE YOU HAVE, THE LESS"
135  PRINT "       CHANCE THERE IS OF GETTING SICK."
140  PRINT
145  PRINT "AMMUNITION - $1 BUYS A BELT OF 50"
150  PRINT "       BULLETS. YOU WILL NEED BULLETS"
152  PRINT "       FOR ATTACKS BY ANIMALS AND"
155  PRINT "       BANDITS, AND FOR HUNTING FOOD."
160  PRINT
165  PRINT "CLOTHING - THIS IS ESPECIALLY IMPORTANT"
170  PRINT "       FOR THE COLD WEATHER YOU WILL"
175  PRINT "       ENCOUNTER WHEN CROSSING THE"
177  PRINT "       MOUNTAINS."
180  PRINT
185  PRINT "MISCELLANEOUS SUPPLIES - THIS INCLUDES"
190  PRINT "       MEDICINE AND OTHER THINGS YOU"
195  PRINT "       WILL NEED FOR SICKNESS AND"
197  PRINT "       EMERGENCY REPAIRS."
205  PRINT : INPUT "PRESS <RETURN>..."; C$
207  PRINT : PRINT
210  PRINT "YOU CAN SPEND ALL YOUR MONEY BEFORE YOU"
215  PRINT "START YOUR TRIP - OR YOU CAN SAVE SOME"
217  PRINT "OF YOUR CASH TO SPEND AT FORTS ALONG"
220  PRINT "THE WAY WHEN YOU RUN LOW. HOWEVER,"
225  PRINT "ITEMS COST MORE AT THE FORTS. YOU CAN"
227  PRINT "ALSO GO HUNTING ALONG THE WAY TO GET"
230  PRINT "MORE FOOD."
235  PRINT "WHENEVER YOU HAVE TO USE YOUR TRUSTY"
237  PRINT "RIFLE ALONG THE WAY, YOU WILL SEE THE"
240  PRINT "WORDS: 'TYPE BANG'. THE FASTER YOU TYPE"
245  PRINT "IN THE WORD 'BANG' AND HIT THE 'RETURN'"
247  PRINT "KEY, THE BETTER LUCK YOU'LL HAVE WITH"
250  PRINT "YOUR GUN."
260  PRINT
261  PRINT "WHEN ASKED TO ENTER MONEY AMOUNTS,"
262  PRINT "DON'T USE A '$'."
263  PRINT
265  PRINT "GOOD LUCK!!!"
399  REM ***INITIAL PURCHASES***
400  X1=-1
405  K8=0:S4=0:F1=0:F2=0:M=0:M9=0:D3=0
407  G$ = CHR$(7)
408  GOSUB 4800
410  PRINT
415  PRINT: PRINT "HOW MUCH DO YOU WANT TO SPEND"
420  INPUT "ON YOUR OXEN TEAM (200-300)? "; A
425  IF A >= 200 THEN 440
430  PRINT "NOT ENOUGH"
435  GOTO 415
440  IF A <= 300 THEN 455
445  PRINT "TOO MUCH"
450  GOTO 415
455  PRINT: PRINT "HOW MUCH DO YOU WANT TO SPEND"
460  INPUT "ON FOOD? "; F
470  IF F >= 0 THEN 485
475  PRINT "IMPOSSIBLE"
480  GOTO 455
485  PRINT: PRINT "HOW MUCH DO YOU WANT TO SPEND"
490  INPUT "ON AMMUNITION? "; B
495  IF B >= 0 THEN 510
500  PRINT "IMPOSSIBLE"
505  GOTO 485
510  PRINT: PRINT "HOW MUCH DO YOU WANT TO SPEND"
515  INPUT "ON CLOTHING? "; C
520  IF C >= 0 THEN 535
525  PRINT "IMPOSSIBLE"
530  GOTO 510
535  PRINT: PRINT "HOW MUCH DO YOU WANT TO SPEND"
540  INPUT "ON MISCELLANEOUS SUPPLIES? "; M1
545  IF M1 >= 0 THEN 560
550  PRINT "IMPOSSIBLE"
555  GOTO 535
560  T=700-A-F-B-C-M1
565  IF T >= 0 THEN 580
570  PRINT: PRINT "YOU OVERSPENT--YOU ONLY HAD"
572  PRINT "$700 TO SPEND.  BUY AGAIN"
575  GOTO 410
580  B=50*B
585  PRINT: PRINT "AFTER ALL YOUR PURCHASES,"
587  PRINT "YOU NOW HAVE ";T;" DOLLARS LEFT"
590  PRINT
595  PRINT "MONDAY MARCH 29 1847"
600  PRINT
605  GOTO 1000
700  IF M >= 2040 OR D3>=17 THEN 4000
709  REM ***SETTING DATE***
710  D3=D3+1
715  PRINT
720  PRINT "MONDAY ";
725  IF D3>10 THEN 735
730  ON D3 GOTO 740,750,760,770,780,790,800,810,820,830
735  ON D3-10 GOTO 840,850,860,870,880,890,900
740  PRINT "APRIL 12 ";
744  GOTO 910
750  PRINT "APRIL 26 ";
755  GOTO 910
760  PRINT "MAY 10 ";
765  GOTO 910
770  PRINT "MAY 24 ";
775  GOTO 910
780  PRINT "JUNE 7 ";
785  GOTO 910
790  PRINT "JUNE 21 ";
795  GOTO 910
800  PRINT "JULY 5 ";
805  GOTO 910
810  PRINT "JULY 19 ";
815  GOTO 910
820  PRINT "AUGUST 2 ";
825  GOTO 910
830  PRINT "AUGUST 16 ";
835  GOTO 910
840  PRINT "AUGUST 31 ";
845  GOTO 910
850  PRINT "SEPTEMBER 13 ";
855  GOTO 910
860  PRINT "SEPTEMBER 27 ";
865  GOTO 910
870  PRINT "OCTOBER 11 ";
875  GOTO 910
880  PRINT "OCTOBER 25 ";
885  GOTO 910
890  PRINT "NOVEMBER 8 ";
895  GOTO 910
900  PRINT "NOVEMBER 22 ";
910  PRINT "1847"
915  PRINT
999  REM ***BEGINNING EACH TURN***
1000  IF F >= 0 THEN 1015
1010  F=0
1015  IF B >= 0 THEN 1025
1020  B=0
1025  IF C >= 0 THEN 1035
1030  C=0
1035  IF M1 >= 0 THEN 1045
1040  M1=0
1045  IF F >= 12 THEN 1055
1050  PRINT "YOU'D BETTER DO SOME HUNTING OR"
1052  PRINT "BUY FOOD AND SOON!!!!"
1055  F=INT(F)
1060  B=INT(B)
1065  C=INT(C)
1070  M1=INT(M1)
1075  T=INT(T)
1080  M=INT(M)
1085  M2=M
1090  IF S4=1 THEN 1105
1095  IF K8=1 THEN 1105
1100  GOTO 1130
1105  T=T-20
1110  IF T<0 THEN 3520
1115  PRINT "DOCTOR'S BILL IS $20"
1120  K8=0:S4=0
1130  IF M9=1 THEN 1145
1135  PRINT "TOTAL MILEAGE IS ";M
1140  GOTO 1160
1145  PRINT "TOTAL MILEAGE IS 950"
1150  M9=0
1160  PRINT "FOOD  BULLETS  CLOTHING  SUPPLIES  CASH"
1165  PRINT " ";INT(F);: HTAB 9: PRINT INT(B);: HTAB 19: PRINT INT(C);
1166  HTAB 29: PRINT INT(M1);: HTAB 37: PRINT INT(T): PRINT
1300  IF X1=-1 THEN 1350
1305  X1=X1*-1
1310  PRINT "DO YOU WANT TO"
1312  PRINT "  (1) STOP AT THE NEXT FORT"
1313  PRINT "  (2) HUNT"
1315  PRINT "  (3) CONTINUE"
1320  INPUT X
1325  IF X>2 THEN 1340
1330  IF X<1 THEN 1340
1332  X=INT(X)
1335  GOTO 1400
1340  X=3
1345  GOTO 1400
1350  PRINT "DO YOU WANT TO (1) HUNT OR (2) CONTINUE"
1355  INPUT X
1360  IF X=1 THEN 1370
1365  X=2
1370  X=X+1
1375  IF X=3 THEN 1395
1380  IF B>39 THEN 1395
1385  PRINT "TOUGH---YOU NEED MORE BULLETS"
1387  PRINT "TO GO HUNTING"
1390  GOTO 1350
1395  X1=X1*-1
1400  ON X GOTO 1500,1700,1800
1499  REM ***STOPPING AT FORT***
1500  PRINT "ENTER WHAT YOU WISH TO SPEND"
1502  PRINT "ON THE FOLLOWING"
1505  PRINT "FOOD";
1510  GOSUB 1520
1515  GOTO 1555
1520  INPUT "? ";P
1525  IF P<0 THEN 1550
1530  T=T-P
1535  IF T >= 0 THEN 1550
1537  PRINT "YOU DON'T HAVE THAT MUCH--"
1538  PRINT "KEEP YOUR SPENDING DOWN"
1540  T=T+P
1545  P=0
1550  RETURN
1555  F=F+2/3*P
1560  PRINT "AMMUNITION";
1565  GOSUB 1520
1570  B=INT(B+2/3*P*50)
1575  PRINT "CLOTHING";
1580  GOSUB 1520
1585  C=C+2/3*P
1590  PRINT "MISCELLANEOUS SUPPLIES";
1595  GOSUB 1520
1600  M1=M1+2/3*P
1605  M=M-45
1610  GOTO 1800
1699  REM ***HUNTING***
1700  IF B>39 THEN 1715
1705  PRINT "TOUGH---YOU NEED MORE BULLETS"
1707  PRINT "TO GO HUNTING"
1710  GOTO 1310
1715  M=M-45
1720  GOSUB 4500
1725  IF B1 <= 1 THEN 1755
1730  IF 100*RND(1)<13*B1 THEN 1780
1735  F=F+48-2*B1
1740  PRINT "NICE SHOT--RIGHT THROUGH THE NECK"
1742  PRINT "--FEAST TONIGHT!!"
1745  B=B-10-3*B1
1750  GOTO 1800
1752  REM **BELLS IN LINE 1755**
1755  PRINT "RI";G$;"GHT BETWEE";G$;"N THE EYE";G$;"S"
1757  PRINT "---YOU GOT A";G$;" BIG ONE!!";G$;"!!"
1765  F=F+52+RND(1)*6
1770  B=B-10-RND(1)*4
1775  GOTO 1800
1780  PRINT "SORRY---NO LUCK TODAY"
1800  IF F >= 13 THEN 1900
1805  GOTO 3500
1899  REM ***EATING***
1900  PRINT : PRINT "DO YOU WANT TO EAT"
1902  PRINT "(1) POORLY (2) MODERATELY OR (3) WELL"
1905  INPUT E
1910  IF E>3 THEN 1900
1915  IF E<1 THEN 1900
1920  E=INT(E)
1930  F=F-8-5*E
1935  IF F >= 0 THEN 2000
1940  F=F+8+5*E
1945  PRINT "YOU CAN'T EAT THAT WELL"
1950  GOTO 1900
2000  M=M+200+(A-220)/5+10*RND(1)
2005  L1=0:C1=0
2099  REM ***RIDERS ATTACK***
2100  IF RND(1)*10>((M/100-4)^2+72)/((M/100-4)^2+12)-1 THEN 2500
2102  PRINT
2105  PRINT "RIDERS AHEAD. THEY ";
2110  S5=0
2115  IF RND(1)<.8 THEN 2130
2120  PRINT "DON'T ";
2125  S5=1
2130  PRINT "LOOK HOSTILE."
2135  PRINT "TACTICS:"
2140  PRINT "(1) RUN       (2) ATTACK"
2142  PRINT "(3) CONTINUE  (4) CIRCLE WAGONS"
2145  PRINT "IF YOU RUN YOU'LL GAIN TIME BUT"
2147  PRINT "WEAR DOWN YOUR OXEN."
2150  PRINT "IF YOU CIRCLE YOU'LL LOSE TIME."
2155  IF RND(1)>.2 THEN 2165
2160  S5=1-S5
2165  INPUT T1
2170  IF T1<1 THEN 2140
2175  IF T1>4 THEN 2140
2180  T1=INT(T1)
2185  IF S5=1 THEN 2330
2190  IF T1>1 THEN 2220
2195  M=M+20
2200  M1=M1-15
2205  B=B-150
2210  A=A-40
2215  GOTO 2395
2220  IF T1>2 THEN 2285
2225  GOSUB 4500
2230  B=B-B1*40-80
2235  IF B1>1 THEN 2250
2240  PRINT "NICE SHOOTING---YOU DROVE THEM OFF"
2245  GOTO 2395
2250  IF B1 <= 4 THEN 2275
2255  PRINT "LOUSY SHOT---YOU GOT KNIFED"
2260  K8=1
2265  PRINT "YOU HAVE TO SEE OL' DOC BLANCHARD"
2270  GOTO 2395
2275  PRINT "KINDA SLOW WITH YOUR COLT .45"
2280  GOTO 2395
2285  IF T1>3 THEN 2310
2290  IF RND(1)>.8 THEN 2390
2295  B=B-150
2300  M1=M1-15
2305  GOTO 2395
2310  GOSUB 4500
2315  B=B-B1*30-80
2320  M=M-25
2325  GOTO 2235
2330  IF T1>1 THEN 2350
2335  M=M+15
2340  A=A-10
2345  GOTO 2395
2350  IF T1>2 THEN 2370
2355  M=M-5
2360  B=B-100
2365  GOTO 2395
2370  IF T1>3 THEN 2380
2375  GOTO 2395
2380  M=M-20
2385  GOTO 2395
2390  PRINT "THEY DID NOT ATTACK"
2392  GOTO 2500
2395  IF S5=0 THEN 2410
2400  PRINT "RIDERS WERE FRIENDLY, BUT CHECK"
2402  PRINT "FOR POSSIBLE LOSSES"
2405  GOTO 2500
2410  PRINT "RIDERS WERE HOSTILE--CHECK FOR LOSSES"
2415  IF B >= 0 THEN 2500
2420  PRINT "YOU RAN OUT OF BULLETS AND GOT"
2422  PRINT "MASSACRED BY THE RIDERS"
2425  GOTO 3600
2499  REM ***SELECTION OF EVENTS***
2500  D1=0
2502  PRINT
2505  RESTORE
2510  R1=100*RND(1)
2515  D1=D1+1
2520  IF D1=16 THEN 3020
2525  READ D
2530  IF R1>D THEN 2515
2535  DATA 6,11,13,15,17,22,32,35,37,42,44,54,64,69,95
2537  IF D1>10 THEN 2545
2540  ON D1 GOTO 2550,2570,2590,2615,2630,2645,2660,2690,2785,2810
2545  ON D1-10 GOTO 2825,2860,2885,2970,2990,3020
2550  PRINT "WAGON BREAKS DOWN--LOSE TIME AND"
2552  PRINT "SUPPLIES FIXING IT"
2555  M=M-15-5*RND(1)
2560  M1=M1-8
2565  GOTO 3100
2570  PRINT "OX INJURES LEG---SLOWS YOU DOWN"
2572  PRINT "REST OF TRIP"
2575  M=M-25
2580  A=A-20
2585  GOTO 3100
2590  PRINT "BAD LUCK---YOUR DAUGHTER BROKE HER ARM"
2595  PRINT "YOU HAD TO STOP AND USE SUPPLIES TO"
2597  PRINT "MAKE A SLING"
2600  M=M-5-4*RND(1)
2605  M1=M1-2-3*RND(1)
2610  GOTO 3100
2615  PRINT "OX WANDERS OFF---SPEND TIME"
2617  PRINT "LOOKING FOR IT"
2620  M=M-17
2625  GOTO 3100
2630  PRINT "YOUR SON GETS LOST---SPEND HALF"
2632  PRINT "THE DAY LOOKING FOR HIM"
2635  M=M-10
2640  GOTO 3100
2645  PRINT "UNSAFE WATER--LOSE TIME LOOKING FOR"
2647  PRINT "CLEAN SPRING"
2650  M=M-10*RND(1)-2
2655  GOTO 3100
2660  IF M>950 THEN 2935
2665  PRINT "HEAVY RAINS---TIME AND SUPPLIES LOST"
2670  F=F-10
2672  B=B-500
2675  M1=M1-15
2680  M=M-10*RND(1)-5
2685  GOTO 3100
2690  PRINT "BANDITS ATTACK"
2700  GOSUB 4500
2705  B=B-20*B1
2715  IF B >= 0 THEN 2735
2720  PRINT "YOU RAN OUT OF BULLETS---THEY GET"
2722  PRINT "LOTS OF CASH"
2725  T=T/3
2730  GOTO 2740
2735  IF B1 <= 1 THEN 2770
2740  PRINT "YOU GOT SHOT IN THE LEG AND THEY"
2742  PRINT "TOOK ONE OF YOUR OXEN"
2745  K8=1
2750  PRINT "BETTER HAVE A DOC LOOK AT YOUR WOUND"
2755  M1=M1-5
2760  A=A-20
2765  GOTO 3100
2770  PRINT "QUICKEST DRAW OUTSIDE OF DODGE CITY!!!"
2775  PRINT "YOU GOT 'EM!"
2780  GOTO 3100
2785  PRINT "THERE WAS A FIRE IN YOUR WAGON--"
2787  PRINT "FOOD AND SUPPLIES DAMAGED"
2790  F=F-40
2792  B=B-400
2795  M1=M1-RND(1)*8-3
2800  M=M-15
2805  GOTO 3100
2810  PRINT "LOSE YOUR WAY IN HEAVY FOG---"
2812  PRINT "TIME IS LOST"
2815  M=M-10-5*RND(1)
2820  GOTO 3100
2825  PRINT "YOU KILLED A POISONOUS SNAKE"
2827  PRINT "AFTER IT BIT YOU"
2830  B=B-10
2835  M1=M1-5
2840  IF M1 >= 0 THEN 2855
2845  PRINT "YOU DIE OF SNAKEBITE SINCE YOU"
2847  PRINT "HAVE NO MEDICINE"
2850  GOTO 3600
2855  GOTO 3100
2860  PRINT "WAGON GETS SWAMPED FORDING RIVER--"
2862  PRINT "LOSE FOOD AND CLOTHES"
2865  F=F-30
2870  C=C-20
2875  M=M-20-20*RND(1)
2880  GOTO 3100
2885  PRINT "WILD ANIMALS ATTACK!"
2887  GOSUB 4500
2889  IF B>39 THEN 2895
2890  PRINT "YOU WERE TOO LOW ON BULLETS--"
2891  PRINT "THE WOLVES OVERPOWERED YOU"
2892  K8=1
2893  GOTO 3555
2895  IF B1>2 THEN 2910
2900  PRINT "NICE SHOOTIN' PARDNER---"
2902  PRINT "THEY DIDN'T GET MUCH"
2905  GOTO 2915
2910  PRINT "SLOW ON THE DRAW---THEY GOT AT"
2912  PRINT "YOUR FOOD AND CLOTHES"
2915  B=B-20*B1
2920  C=C-B1*4
2925  F=F-B1*8
2930  GOTO 3100
2935  PRINT "COLD WEATHER---BRRRRRRR!---YOU ";
2940  IF C>22+4*RND(1) THEN 2955
2945  PRINT "DON'T ";
2950  C1=1
2955  PRINT: PRINT "HAVE ENOUGH CLOTHING TO KEEP YOU WARM"
2960  IF C1=0 THEN 3100
2965  GOTO 4700
2970  PRINT "HAIL STORM---SUPPLIES DAMAGED"
2975  M=M-5-RND(1)*10
2977  B=B-200
2980  M1=M1-4-RND(1)*3
2985  GOTO 3100
2990  IF E=1 THEN 4700
2995  IF E=3 THEN 3010
3000  IF RND(1)>.25 THEN 4700
3005  GOTO 3100
3010  IF RND(1)<.5 THEN 4700
3015  GOTO 3100
3020  PRINT "HELPFUL INDIANS SHOW YOU WHERE"
3022  PRINT "TO FIND MORE FOOD"
3025  F=F+14
3030  GOTO 3100
3099  REM ***MOUNTAINS***
3100  IF M <= 950 THEN 700
3105  IF RND(1)*10>9-((M/100-15)^2+72)/((M/100-15)^2+12) THEN 3175
3110  PRINT "RUGGED MOUNTAINS"
3115  IF RND(1)>.1 THEN 3135
3120  PRINT "YOU GOT LOST---LOSE VALUABLE TIME"
3122  PRINT "TRYING TO FIND TRAIL!"
3125  M=M-60
3130  GOTO 3175
3135  IF RND(1)>.11 THEN 3160
3140  PRINT "WAGON DAMAGED!---LOSE TIME AND SUPPLIES"
3145  M1=M1-5
3147  B=B-200
3150  M=M-20-30*RND(1)
3155  GOTO 3175
3160  PRINT "THE GOING GETS SLOW"
3165  M=M-45-RND(1)/.02
3175  IF F1=1 THEN 3195
3180  F1=1
3185  IF RND(1)<.8 THEN 3300
3190  PRINT "YOU MADE IT SAFELY THROUGH"
3192  PRINT "SOUTH PASS--NO SNOW"
3195  IF M<1700 THEN 3215
3200  IF F2=1 THEN 3215
3205  F2=1
3210  IF RND(1)<.7 THEN 3300
3215  IF M>950 THEN 700
3220  M9=1
3225  GOTO 700
3300  PRINT "BLIZZARD IN MOUNTAIN PASS--"
3302  PRINT "TIME AND SUPPLIES LOST"
3305  L1=1
3310  F=F-25
3315  M1=M1-10
3317  B=B-300
3320  M=M-30-40*RND(1)
3325  IF C<18+2*RND(1) THEN 4700
3330  GOTO 3215
3499  REM ***DYING***
3500  PRINT: PRINT "YOU RAN OUT OF FOOD AND STARVED TO DEATH"
3505  GOTO 3600
3520  T=0
3525  PRINT: PRINT "YOU CAN'T AFFORD A DOCTOR"
3530  GOTO 3555
3550  PRINT: PRINT "YOU RAN OUT MEDICAL SUPPLIES"
3555  PRINT "YOU DIED OF ";
3560  IF K8=1 THEN 3575
3565  PRINT "PNEUMONIA"
3570  GOTO 3600
3575  PRINT "INJURIES"
3600  PRINT
3602  PRINT "DUE TO YOUR UNFORTUNATE SITUATION,"
3603  PRINT "THERE ARE A FEW FORMALITIES"
3605  PRINT "WE MUST GO THROUGH"
3610  PRINT
3615  PRINT "WOULD YOU LIKE A MINISTER";
3620  INPUT "? ";C$
3630  PRINT "WOULD YOU LIKE A FANCY FUNERAL";
3635  INPUT "? ";C$
3650  PRINT "WOULD YOU LIKE US TO INFORM YOUR"
3651  PRINT "NEXT OF KIN";
3652  INPUT "? ";C$
3654  IF C$="YES" OR C$="Y" THEN 3670
3656  PRINT "YOUR AUNT NELLIE IN ST. LOUIS IS"
3657  PRINT "ANXIOUS TO HEAR"
3670  PRINT: PRINT "WE THANK YOU FOR THIS INFORMATION"
3672  PRINT "AND WE ARE SORRY YOU DIDN'T MAKE"
3675  PRINT "IT TO THE GREAT TERRITORY OF OREGON."
3680  PRINT "BETTER LUCK NEXT TIME."
3685  PRINT
3690  PRINT
3695  PRINT "    SINCERELY,"
3700  PRINT
3705  PRINT "    THE OREGON CITY CHAMBER OF COMMERCE"
3707  SPEED = 255
3710  END
3999  REM ***FINAL TURN***
4000  F9=(2040-M2)/(M-M2)
4005  F=F+(1-F9)*(8+5*E)
4010  PRINT
4012  REM *BELLS IN LINES 4015, 4020*
4015  PRINT "YOU";G$;" FINALLY ARRI";G$;"VED AT ORE";G$;"GON CITY";G$
4020  PRINT "AFTER";G$;" 2040 LONG MILES";G$;"---HOORAY!!";G$;"!!!"
4025  PRINT
4030  F9=INT(F9*14)
4035  D3=D3*14+F9
4040  F9=F9+1
4045  IF F9<8 THEN 4055
4050  F9=F9-7
4055  ON F9 GOTO 4060,4070,4080,4090,4100,4110,4120
4060  PRINT "MONDAY ";
4065  GOTO 4125
4070  PRINT "TUESDAY ";
4075  GOTO 4125
4080  PRINT "WEDNESDAY ";
4085  GOTO 4125
4090  PRINT "THURSDAY ";
4095  GOTO 4125
4100  PRINT "FRIDAY ";
4105  GOTO 4125
4110  PRINT "SATURDAY ";
4115  GOTO 4125
4120  PRINT "SUNDAY ";
4125  IF D3>124 THEN 4145
4130  D3=D3-93
4135  PRINT "JULY ";D3;" 1847"
4140  GOTO 4215
4145  IF D3>155 THEN 4165
4150  D3=D3-124
4155  PRINT "AUGUST ";D3;" 1847"
4160  GOTO 4215
4165  IF D3>185 THEN 4185
4170  D3=D3-155
4175  PRINT "SEPTEMBER ";D3;" 1847"
4180  GOTO 4215
4185  IF D3>216 THEN 4205
4190  D3=D3-185
4195  PRINT "OCTOBER ";D3;" 1847"
4200  GOTO 4215
4205  D3=D3-216
4210  PRINT "NOVEMBER ";D3;" 1847"
4215  PRINT
4220  PRINT "FOOD  BULLETS  CLOTHING  SUPPLIES  CASH"
4230  IF B>0 THEN 4240
4235  B=0
4240  IF C>0 THEN 4250
4245  C=0
4250  IF M1>0 THEN 4260
4255  M1=0
4260  IF T>0 THEN 4270
4265  T=0
4270  IF F>0 THEN 4285
4275  F=0
4285  PRINT " ";INT(F);: HTAB 9: PRINT INT(B);: HTAB 19: PRINT INT(C);
4286  HTAB 29: PRINT INT(M1);: HTAB 37: PRINT INT(T): PRINT
4290  PRINT
4295  PRINT "PRESIDENT JAMES K. POLK SENDS YOU HIS"
4297  PRINT "      HEARTIEST CONGRATULATIONS"
4300  PRINT
4305  PRINT "AND WISHES YOU A PROSPEROUS LIFE AHEAD"
4315  PRINT "          AT YOUR NEW HOME"
4317  SPEED = 255
4320  END
4499  REM ***SHOOTING SUB-ROUTINE***
4500  PRINT "TYPE BANG: " +  CHR$(7);
4510  & "BANG",A%
4520 B1 = A% * 0.001: REM  MILLISECONDS TO SECONDS
4530  IF B1 > 7 THEN B1 = 7
4535  RETURN
4699  REM ***ILLNESS SUB-ROUTINE***
4700  IF 100*RND(1)<10+35*(E-1) THEN 4740
4705  IF 100*RND(1)<100-(40/4^(E-1)) THEN 4760
4715  PRINT "SERIOUS ILLNESS---"
4720  PRINT "YOU MUST STOP FOR MEDICAL ATTENTION"
4725  M1=M1-10
4730  S4=1
4735  GOTO 4780
4740  PRINT "MILD ILLNESS---MEDICINE USED"
4745  M=M-5
4750  M1=M1-2
4755  GOTO 4780
4760  PRINT "BAD ILLNESS---MEDICINE USED"
4765  M=M-5
4770  M1=M1-5
4780  IF M1<0 THEN 3550
4785  IF L1=1 THEN 3215
4790  GOTO 3100
4799  REM [CT] SET UP MACHINE LANGUAGE TIMER
4800  RESTORE: FOR D1=1 TO 15: READ D: NEXT: REM SKIP EVENT TABLE
4801 DATA 32,123,221,32,253,229,168,169
4802 DATA 141,153,160,3,152,240,12,136
4803 DATA 177,94,9,128,153,160,3,192
4804 DATA 0,208,244,169,0,133,6,133
4805 DATA 7,133,8,133,9,230,6,208
4806 DATA 15,230,7,208,11,230,8,208
4807 DATA 7,169,0,164,9,153,160,3
4808 DATA 173,0,192,201,128,144,230,141
4809 DATA 16,192,32,237,253,201,141,240
4810 DATA 12,164,9,217,160,3,208,213
4811 DATA 230,9,24,144,208,164,9,185
4812 DATA 160,3,201,141,240,10,169,255
4813 DATA 133,6,133,7,169,31,133,8
4814 DATA 6,6,38,7,38,8,6,6
4815 DATA 38,7,38,8,32,190,222,32
4816 DATA 227,223,32,249,234,32,106,221
4817 DATA 160,0,165,8,145,131,200,165
4818 DATA 7,145,131,96
4830  FOR D1=0 TO 139: READ D: POKE 768+D1,D: NEXT
4840  POKE 1014,0: POKE 1015,3 : REM [CT] SET UP AMPERSAND CALL
4850  RETURN
4860  REM [CT] USED TO PRINT OUT THE BYTES FOR THE ROUTINE AT $300
4870  FOR I = 0 TO 17: PRINT STR$(4801+I)+" DATA "; : FOR J = 0 TO 6: PRINT  PEEK(768 + 8*I + J);",";: NEXT : PRINT PEEK(768 + 8*I + 7): NEXT
4900  REM ***IDENDIFICATION OF VARIABLES IN THE PROGRAM***
4902  REM A = AMOUNT SPENT ON ANIMALS
4904  REM B = AMOUNT SPENT ON AMMUNITION
4906  REM B1 = ACTUAL RESPONSE TIME FOR INPUTING 'BANG'
4908  REM B2 = MAXIMUM RESPONSE TIME FOR INPUTING 'BANG'
4910  REM C = AMOUNT SPENT ON CLOTHING
4912  REM C1 = FLAG FOR INSUFFICIENT CLOTHING IN COLD WEATHER
4914  REM C$ = YES/NO RESPONSE TO QUESTIONS
4916  REM D1 = COUNTER IN GENERATING EVENTS
4918  REM D3 = TURN NUMBER FOR SETTING DATE
4920  REM D4 = CURRENT DATE
4922  REM E = CHOICE OF EATING
4924  REM F = AMOUNT SPENT ON FOOD
4926  REM F1 = FLAG FOR CLEARING SOUTH PASS
4928  REM F2 = FLAG FOR CLEARING BLUE MOUNTAINS
4930  REM F9 = FRACTION OF 2 WEEKS TRAVELED ON FINAL TURN
4932  REM K8 = FLAG FOR INJURY
4934  REM L1 = FLAG FOR BLIZZARD
4936  REM M = TOTAL MILEAGE WHOLE TRIP
4938  REM M1 = AMOUNT SPENT ON MISCELLANEOUS SUPPLIES
4940  REM M2 = TOTAL MILEAGE UP THROUGH PREVIOUS TURN
4942  REM M9 = FLAG FOR CLEARING SOUTH PASS IN SETTING MILEAGE
4944  REM P = AMOUNT SPENT ON ITEMS AT FORT
4946  REM R1 = RANDOM NUMBER IN CHOOSING EVENTS
4948  REM S4 = FLAG FOR ILLNESS
4950  REM S5 = 'HOSTILITY OF RIDERS' FACTOR
4952  REM T = CASH LEFT OVER AFTER INITIAL PURCHASES
4954  REM T1 = CHOICE OF TACTICS WHEN ATTACKED
4956  REM X = CHOICE OF ACTION FOR EACH TURN
4958  REM X1 = FLAG FOR FORT OPTION
5000  END