This repository has been archived by the owner on May 3, 2019. It is now read-only.
/
listing.bas
1465 lines (1240 loc) · 37.8 KB
/
listing.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
20 init_values()
clr_scrn()
set_border_color(BLACK)
set_inner_color(RED)
prepare_consts_to_load()
REM maybe_draw_logo() TODO check during runtime
30 for b=1 to 3
40 print_white_on_black(" ")
print_black_on_white(" ")
print_white_on_black(" ")
print_black_on_white(" ")
print_white_on_black(" ")
print_black_on_white(" ")
print_white_on_black() REM <- restore default mode
50 next b:
for b=1 to 7
60 print " "
print_black_on_white(" ")
print_white_on_black(" ")
print_black_on_white(" ")
print_white_on_black(" ")
print_black_on_white(" ")
print_white_on_black(" ")
print_black_on_white(" ")
print_white_on_black() REM <- restore default mode
70 next b
for b=1 to 3
80 print " "
print_black_on_white(" ")
print_white_on_black(" ")
print_black_on_white(" ")
print_white_on_black(" ")
print_black_on_white(" ")
print_white_on_black(" ")
print_black_on_white(" ")
print_white_on_black() REM <- restore default mode
90 next b
for b=1 to 7
100 print " "
print_black_on_white(" ")
print_white_on_black(" ")
print_black_on_white(" ")
print_white_on_black(" ")
print_black_on_white(" ")
print_white_on_black(" ")
print_black_on_white(" ")
print_white_on_black() REM <- restore default mode
110 next b:
for b=1 to 3
120 next b REM <- NOTICE: dead code? TODO check it! (delay?)
for b=1 to 3
130 print " "
print_black_on_white(" ")
print_white_on_black(" ")
print_black_on_white(" ")
print_white_on_black(" ")
print_black_on_white(" ")
print_white_on_black() REM <- restore default mode
140 next b
REM probably showing menu
200 v=1
unknown_dowithmem()
maybe_wait_2sec()
260 screen_move_down_6times()
280 print " The big game for big money."
screen_move_down_6times()
300 maybe_wait_2sec_2:screen_move_down_6times()
REM get amount of players
320 print " How many want to pump (2-6 pumper)?"
screen_move_down_6times()
340 get players_count
if players_count>1 && players_count<7
then goto(450)
360 mov_cursor_upp_left()
mov_cursor_down(13)
mov_cursor_rght(7)
print_black_on_white("?")
380 terminate_prev_early_exit_loop()
400 mov_cursor_upp_left()
mov_cursor_down(13)
mov_cursor_rght(7)
print_black_on_white(" ")
420 terminate_prev_early_exit_loop()
440 goto 340 REM retry get correct number of players
450 print allign_print2column(9)
mov_cursor_up(1)
print "one moment please"
REM init game values (string)
460 dim ab(13), bd(13), bm(13), bf$(13), bp(13), bt(13), fb(13), f(13), fm(13), pa(13)
480 dim ta(13), rp(37), gf(12), gg(12)
500 bf$(1)="Petrol station "
520 bf$(2)="?sparkling water ?"
540 bf$(3)="deep-frozen"
560 bf$(4)="dollars "
580 bf$(5)="heavy pump "
600 bf$(6)="pipelines "
620 bf$(7)="happybohr " REM TODO translate later
640 bf$(8)="immerdruck "
660 bf$(9)="lucky hole "
680 bf$(10)="black gold "
700 bf$(11)="overbubble "
720 bf$(12)="dauersprit "
740 vg$(1)="denvercream"
760 vg$(2)="ewingoil "
780 vg$(3)="sell & hopp "
800 vg$(4)="never & again "
820 vg$(5)="sala to il inc "
840 vg$(6)="swimminoil inc"
860 pf$(1)="bay. pumpe eg "
880 pf$(2)="dt.pumpenglueck"
900 ra$="bohr & pump & sohn"
920 tg$(1)="raff und gier "
940 tg$(2)="knaltex gmbh "
960 tg$(3)="never come back"
980 tg$(4)="oil on the road"
REM randomize initial values of products?, TODO check in game
1000 for t=1 to 12
1020 bp(t)=int(rnd(1)*70000)+30000
1040 fm(t)=int((bp(t)-(rnd(1)*9999)+1)*10)
1060 next t
1080 for t=1 to 12:
bt(t)=int(rnd(1)*3666)+1:
next t:
REM assign some single variables, partially random
start_money=int(rnd(1)*100000)+100000
1100 l1=int(rnd(1)*6)+1
1120 fm(l1*2)=1200:fm(l1*2-1)=1400
1140 for t=1 to 2
1160 pf(t)=int(rnd(1)*80000)+20000
1180 next t
1200 for t=1 to 4
1220 tp(t)=int(rnd(1)*55000)+25000
1240 tw(t)=int(tp(t)/10000)*3:
next t
1260 rp(1)=int(rnd(1)*7)+7
REM init, assign values?
1280 for t=2 to 34
1300 rp(t)=rp(t-1)+(int(rnd(1)*14)-7)
1320 if rp(t)<0 then
rp(t)=1:
goto 1300 REM <- inner loop
REM max value eq 20 TODO check in game
1340 if rp(t)>20
then rp(t)=20
1360 next t:
for t=1 to 34 REM probably empty loop
1380 a1$= (mov_cursor_down() " They unfortunately have to put it on")
1400 a2$= (mov_cursor_down() " ihr or aben ist gelungen!")
1420 a3$="% get "
REM func z(x)
1440 def fn z(x)=int(rnd(1)*x)+1:
goto 1520
REM: func init_values()
1460 si=54272:
fl=si:
fh=si+1:
tl=si+2
1480 th=si+3:
w=si+4:
a=si+5:
h=si+6
1500 l=si+24:
current_year=1983:
return
1520 screen_move_down_6times()
screen_move_down_6times()
1540
print " We are in the year":
screen_move_down_6times():
maybe_wait_2sec()
REM TODO absolutely unknown, print float number format? CBM disk? CBM char display codes?
1560 print tab(13)"{cbm-+} {3 cbm-+} {3 cbm-+} {3 cbm-+}"
1580 print tab(13)"{cbm-+} {cbm-+} {cbm-+} {cbm-+} {cbm-+} {cbm-+}"
1600 print tab(13)"{cbm-+} {3 cbm-+} {3 cbm-+} {2 cbm-+}"
1620 print tab(13)"{cbm-+} {cbm-+} {cbm-+} {cbm-+} {cbm-+}"
1640 print tab(13)"{cbm-+} {3 cbm-+} {3 cbm-+} {3 cbm-+}"
1660
screen_move_down_6times():
maybe_wait_2sec():
screen_move_down_6times()
1680
print " The game ends in 2017":
screen_move_down_6times():
maybe_wait_2sec_2
REM main game loop?
1700 company_name(1)="deep throat inc. "
1720 company_name(2)="deep and fast ag"
1740 company_name(3)="turbo & drill gmbh "
1760 for t=1 to 3
1780 maybe_company_cost(t)=int(rnd(1)*50000)+10000
1800 next t
1820
a4$= (mov_cursor_down(2) "Which is to be sold"):
goto 2000
REM: func prepare_consts_to_load()
1900 data 8, 180, 600, 13, 10, 600, 10, 247, 300, 9, 196, 150, 10, 247, 150, 8, 180, 300
1920 data 6, 133, 300, 8, 180, 300, 14, 162, 300, 13, 10, 300, 10, 247, 150, 11, 158, 150
1940 data 13, 10, 900, -1, -1, 0
1960 return
REM print players count
2000 mov_cursor_upp_left()
mov_cursor_down(13)
mov_cursor_rght(9)
print_white_on_black(" ")
mov_cursor_left(5)
print players_count
print "Pumper play with "
REM get names of players
2020
mov_cursor_down()
print "Now the names (max 12 letters):"
mov_cursor_down()
2040 for t=1 to players_count
2060
input " "; player_name(t):
if len(player_name(t))>15 then
print "{down} zu lang{down}":
goto 2060 REM try again enter name
2080 player_money(t)=start_money:
next t:
screen_move_down_6times():
v=2
2100 print "Much fun with money and lose":
unknown_dowithmem():
screen_move_down_6times()
2120 print "Every player has %d starting money" start_money:
screen_move_down_6times():
maybe_wait_2sec_2
2220 clear_screen(YELLOW):
set_border_color(VIOLET):
set_inner_color(LIGHT_BLUE)
REM print main menu (main loop)
2240 print " They are open to the following:":
print :
k=0
2260 print " {blk}1. oelfelder erwerben.{down}"
2280 print " 2. pumpenhersteller werden.{down}"
2300 print " 3. tankwagenhersteller werden.{down}"
2310 print " 4. bohrgesellschafter werden.{down}"
2320 print " 5. sabotage betreiben.{down}"
2340 print " 6. und natuerlich alles zusammen.{down}"
2360 print " 7. oder gar nichts von allem.{down}"
2400 print " {yel} sieger ist logischer weise der"
2420 print " mit dem meisten kapital am ende"
2440 print " des spiels."
2460 print "{down}";:
make_menu_choice()
2500
clear_screen(YELLOW);:
set_border_color(WHITE):
set_inner_color(RED)
REM print market schemes
2520 print_black_on_white(" The refinery price development ");
2530 print " Trend of the next few years (round) ";:maybe_wait_2sec()
2560 for t=1 to 34:
poke l, 15:
REM draw & set some values?
for b=1 to rp(t)
2580 poke a, 21:
poke 56218+t-(b*40), 4 REM color ram mem
2600 poke h, 255:
poke 1946+t-(b*40), 224 REM smthng with starting year? scrn mem
2620 poke th, 8:
poke tl, 0:
poke fh, 41-t
2640 poke fl, 101-t:
poke w, 17
2660 next b,
next t:
poke w, 0
2680
print ;:
make_menu_choice():
for t=1 to 34:
rp(t)=rp(t)/10:
next t
3000 round_num=round_num+1:
REM turn for each player
for s=1 to players_count
3100 clear_screen()
mov_cursor_down():
set_border_color(VIOLET):
set_inner_color(VIOLET)
3120 mov_cursor_rght(3)
print_black_on_white("Decision - making", WHITE):
unknown_set_values()
3140 mov_cursor_rght(3)
mov_cursor_down()
print_white_on_black("Player %s $= %d", player_name(s), player_money(s), CYAN):
mov_cursor_down()
print_black_on_white("Shopping of ", BLUE)
print_white_on_black()
REM print description for selection menu
3160 mov_cursor_down()
print "{blk} a = Drilling company"
3180 print "{wht} b = pumpengesellschaft"
3200 print "{blk} c = tankwagenfirma"
3220 print "{wht} d = oelfeld"
3240 print "{blk} e = bohrgestaenge"
3260 print "{wht} f = pumpe"
3280 print "{blk} g = tankwagen":
mov_cursor_down()
print_black_on_white(" Others ", BLUE)
print_white_on_black()
3300 mov_cursor_down()
print "{wht} h = naechster spieler"
3320 print "{blk} i = sabotage betreiben"
3340 print "{wht} j = preisfestlegung"
3360 print "{blk} k = weitermachen{down}"
3400 make_menu_choice():
z2=asc(menu_choice):
z2=z2-64 REM chars from 2 to 12 (a to k)
3410 if z2<2 or z2>12 then
goto 3400 REM retry correct menu choice
REM select correct location and jump to proper menu window (jump table)
3420 on z2
gosub menu_drill_company(),
menu_pump_company(),
menu_tanks_company(),
menu_oil_fields(),
menu_drill_rigging(),
menu_pumps(),
menu_tanks(),
menu_next_player(),
menu_sabotage_operation(),
menu_price_fix(),
menu_next_player()
3440 next s:
goto 4000 REM go to summary?
3500 return
4000 for s=1 to players_count
4200 for i=1 to 12:
unknown_print_magic():
next i
4300 player_money(s)=int(player_money(s)):
next s
4400 print "{clr}":
callback_from_drill_rigging2()
4500 maybe_buy_something():
current_year=current_year+1:
if current_year=2017 then
goto 6000
4600 goto 3000
6000 print "{clr}":
set_inner_color(BLACK):
set_border_color(BLACK)
REM: summary, game over
6100 print " das"
6200 print " spiel"
6300 print " ist"
6400 print " or ueber"
6500 print "{2 down}{lblu} hier das gesamtergebnis:"
6700 print "{2 down} spieler bankkredit kapital"
6800 print " {37 cbm-u}"
6900 for z0=1 to players_count
7000 print " "player_name(z0);:
print tab(15)player_bankloan(z0);:
print tab(28)int(player_money(z0)-(player_bankloan(z0)*1.6))
7100 next z0
7200 print "{2 down} ich hoffe sie hatten viel freude und"
7300 print " verbleibe als ihr oely.{blk}":
v=1:unknown_dowithmem():
end REM game over, close program
REM callback from func below
10000 print "{clr}":set_inner_color(ORANGE):set_border_color(BLACK)
10020 print "{gry1} print_black_on_white(){shif t-pound}print_white_on_black(){blk}{cbm-r}{gry1}print_black_on_white()_print_white_on_black(){blu} print_black_on_white()UCCC{cbm-r}I print_white_on_black() print_black_on_white(){blk} o e l f e l d print_white_on_black()"
10040 print "{gry1} print_black_on_white() print_white_on_black(){blk}]{gry1}print_black_on_white() print_white_on_black(){blu} print_black_on_white(){cbm-q}{wht}CCC{cbm-x}{blu}JIprint_white_on_black()";:print tab(22)bf$(i)
10060 print "{gry1} print_black_on_white() print_white_on_black(){blk}]{gry1}print_black_on_white() print_white_on_black(){blu} print_black_on_white(){cbm-y}{blk}WW{blu}CC{blk}W{blu}Kprint_white_on_black() {blk}{17 cbm-t}"
10080 print tab(20)"print_black_on_white(){blk} b e s i t z e r print_white_on_black()"
10090 if gg(i)<fm(i) then gf(i)=gf(i)+(8000*(pa(i)))
10100 print tab(22)player_name(s):gg(i)=gg(i)+(8000*(pa(i)))
10120 print " jahr {wht}"current_year;
10140 print tab(20)"{blk}{17 cbm-t}"
10160 print "{down} {blu}"ra$" -":print " raffinerieabnahmepreis = "rp(r)"${down}"
10400 print "{blk} pumpenanzahl :"pa(i)
10420 print "{lgrn} versandmenge :"gf(i)
10440 print "{blk} tankwagen :"ta(i)
10460 print "{lgrn} lkwkapazitaet:"ta(i)*7000
10480 print "{blk} kapital :"player_money(s)
10500 if gg(i)>fm(i) then print "{down} quelle erschoepft!"
10505 if gf(i)<=0 then print "{down}";:make_menu_choice():return
10510 if ta(i)= or a(i)=0 then print "{down}";:make_menu_choice():return
10520 print :input" wieviel liter sollen weg";m
10540 if m>gf(i)orm>ta(i)*7000 then print " zuviel{3 up}":goto 10520
10560 player_money(s)=player_money(s)+(m*(rp(r))):gf(i)=gf(i)-m
10580 print "{blu} kapital :"player_money(s)" $"
10600 print "{down}";:make_menu_choice():return
REM: func unknown_print_magic()
12000 if fb(i)<>s then
return
12005 if f(i)=1 then
goto 10000
12010 print "{clr}":
set_border_color(BLACK):
set_inner_color(WHITE)
12040 print " {blu} print_black_on_white(){shif t-pound} _print_white_on_black(){gry2}{cbm-i}{blk}{2 cbm-@}"
12060 print " {blu} print_black_on_white() print_white_on_black(){shif t-pound}{gry2}print_black_on_white(){cbm-i}print_white_on_black(){blk}{2 cbm-t}";
12080 print tab(17)"{red}bohrung auf feld"
12100 print " {blu} print_black_on_white() print_white_on_black(){lred}{cbm-k}{blu} {cbm-k}{lgrn}";
12120 print tab(17)bf$(i)
12140 print " {blu} print_black_on_white() print_white_on_black() {cbm-v} "
12160 print " {blk} UK";
12180 print tab(12)"{lblu}besitzer:{blk}"player_name(s)
12200 print " {blk}CK"
12220 print " ihr oelfeldlagerverwalter teilt ihnen"
12240 print " folgende daten mit:{down}"
12260 if bm(i)<=0 then
print "{red} bohrung unmoeglich, da kein gestaenge"
12280 if bm(i)<=0 then
print " mehr or anden. wir brauchen nachschub!":
goto 12320
12300 bm(i)=bm(i)-500:
ab(i)=ab(i)+500-fnz(30)
12320 print " {grn}bisherige bohrtiefe :"ab(i)"m"
12340 print "{down} bohrgestaenge noch fuer:"bm(i)"m"
12360 if ab(i)>=bt(i) then
print "{2 down} wir sind fuendig.":
f(i)=1:v=3:
unknown_dowithmem()
12460 print "{down}";:
make_menu_choice():
return
REM: func callback_from_drill_rigging() TODO rewrite
28000 print :
for dd=1 to 12:
print dd;
28100 if fb(dd)=s then
print tab(10)bf$(dd):
goto 28300
28200 print
28300 next dd
28400 print :
input"fuer welches oelfeld";d
28500 if d=0 then
return
28600 if fb(d)<>s then
goto 28400
28700 return
REM: func callback_from_drill_rigging2() TODO rewrite
29000 print "jahr:"current_year:
print :
for z8=1 to players_count
29100 print player_name(z8);
29200 print tab(20)"kapital:"player_money(z8)
29300 next z8
29400 print "{down}";
29500 make_menu_choice():
return
REM: func menu_oil_fields TODO rewrite
30000 print "{clr}";:
set_border_color(VIOLET):
set_inner_color(WHITE)4
30020 print "{yel}print_black_on_white() print_white_on_black()";
30040 print "print_black_on_white() o e l f e l d a n g e b o t e print_white_on_black()";
30060 print "{yel}print_black_on_white() print_white_on_black()";
30080 print "{down} {red}gesellschaft oelfeld preis ${down}"
30100 for t=1 to 6:
print vg$(t)
30120 print :
next t
30140 print "mov_cursor_upp_left(){5 down}"
30160 for t=1 to 12:
print tab(15)"{wht}"chr$(64+t);:
print tab(17)"{blu}"bf$(t)
30180 next t:
print "mov_cursor_upp_left(){5 down}{blk}"
30200 for t=1 to 12:
if fb(t)>0 then
print tab(31)"{cyn}verkauft{blk}":
goto 30240
30220 print tab(32)bp(t)
30240 next t
30260 print "{down}{wht} "player_name(s)"{down}"
30280 print "{blk}welches feld soll gekauft werden? {cbm-@}"
30300 print "{down}{blu}liquides kapital:"player_money(s)"$"
30320 get menu_choice:
if s$="" then 30320
30340 b=asc(menu_choice)-64:
if b>9 or <0 then
goto 30320
30360 if b>12 then
return
30380 if fb(b)>0 then
30320
30400 fb(b)=s:
player_money(s)=player_money(s)-bp(b)
30420 print "{3 up}{yel}"tab(35)menu_choice"{down}"
30440 print tab(17)" {8 left}"player_money(s)
30460 for t=1 to 1500: next t
30480 return
REM: func menu_drill_company() TODO rewrite
31000 clear_screen();:
set_inner_color(BLUE):
set_border_color(RED)
31020 unknown_dowithmem():
print "{yel}print_black_on_white() pumpe ";
31040 print "print_black_on_white() & pumpenvereinigungsgesellschaft";
31060 print "{yel}print_black_on_white() pumpe "
31080 print " betr. pumpenfabrikanfrage"
31100 print " EEEEEEEEEEEEEEEEEEEEEEEEEE"
31120 if pp(1)>0andpp(2)>0 then
goto 31280
31140 print "{down} wir koennen ihnen folgende angebote"
31160 print " unterbreiten.{down}"
31180 print " 1 "pf$(1);:
if pp(1)>0 then
print tab(30)"verkauft":
goto 31220
31200 print tab(28)pf(1)
31220 print " 2 "pf$(2);:
if pp(2)>0 then
print tab(30)"{wht}verkauft{yel}":
goto 31260
31240 print tab(28)pf(2)
31260 goto 31360
31280 print "{down}leider muessen wir ihnen mitteilen, dass";
31300 print " zur zeit keine pumpenherstellungsfirma"
31320 print "zum verkauf ansteht."
31340 make_menu_choice():
return
31360 print "{down} wenn sie eine fabrik kaufen wollen;"
31380 print " druecken sie die betreffende zahl. wenn";
31400 print " sie nicht wollen druecken sie 'x'"
31420 get menu_choice:
if s$="" then
goto 31420
31440 if menu_choice="1" and pp(1)=0 then
player_money(s)=player_money(s)-pf(1):
pp(1)=s:screen_move_down_6times():
goto 31520
31460 if menu_choice="2" and pp(2)=0 then
player_money(s)=player_money(s)-pf(2):
pp(2)=s:screen_move_down_6times():
goto 31620
31480 print "{3 down} schade - das wir nicht ins geschaeft":
print " kommen"
31500 maybe_wait_2sec_2:
return
31520 screen_move_down_6times():
print "mov_cursor_upp_left(){5 down}"
31540 print "{lgrn} sie sind nun besitzer der firma:{down}":
print " "pf$(1)".{down}"
31560 input" legen sie den pumpenpreis fest";p(1)
31580 if p(1)>60000 then
print "zu hoch!":
goto 31560
31600 goto 31700
31620 screen_move_down_6times():
print "mov_cursor_upp_left(){6 down}"
31640 print "{lgrn} sie sind nun besitzer der firma:{down}":
print " "pf$(2)".{down}"
31660 input"legen sie den pumpenpreis fest";p(2)
31680 if p(2)>60000 then
print "zu hoch!":
goto 31660
31700 print "{2 down} {yel}alles klar!":
maybe_wait_2sec_2:
return
REM: func menu_tanks_company() TODO rewrite
32000 print "{clr}";:
set_border_color(BLACK):
set_inner_color(WHITE)4:
unknown_dowithmem()
32020 print_black_on_white(" ", BLUE)
print_white_on_black();
32040 print_black_on_white(" t a n k w a g e n f i r m e n ")
print_white_on_black();
32060 print_black_on_white(" ", BLUE)
print_white_on_black();
32080 print_black_on_white(" v e r k a u f ")
print_white_on_black();
32100 print_black_on_white(" ", BLUE)
print_white_on_black();
32120 print_black_on_white(" nr f i r m a lkw preis ")
print_white_on_black()
mov_cursor_upp_left()
mov_cursor_down(6)
32140 for t=1 to 4
32160 print :
print t" "tg$(t):
next t
32180 print "mov_cursor_upp_left(){6 down}"
32200 for t=1 to 4
32220 if tb(t)>0 then
print tab(30)"{down}{red}verkauft{blu}":
goto 32260
32240 print :
print tab(24)tw(t);:
print tab(29)tp(t)
32260 next t
32280 print "{down} kein kauf = 'x'"
32300 get menu_choice:
if s$="" then
goto 32300
32320 b=val(menu_choice):
if tb(b)>0 then
return
32340 if b> or =0 then
return
32360 player_money(s)=player_money(s)-tp(b):tb(b)=s
32380 print "{down} ihr kapital betraegt jetzt"player_money(s)"{down}"
32400 input" ihr tankwagenpreis";lp(b)
32420 if lp(b)>60000 then
print "{clr}{3 down} unrealistisch!{down}":
goto 32400
32440 return
REM: func maybe_change_prices()
33000 print "{clr}{wht}":
set_border_color(BLACK):
set_inner_color(BLACK)
33020 print " hier faellt die entscheidung !{2 down}{wht}"
33040 w3=int(rnd(1)*10)+1
33060 print tab(15)"print_black_on_white() + 50 % print_white_on_black()"
33080 print tab(15)"print_black_on_white() - 20 % print_white_on_black()"
33100 print tab(15)"print_black_on_white() + 40 % print_white_on_black()"
33120 print tab(15)"print_black_on_white() - 10 % print_white_on_black()"
33140 print tab(15)"print_black_on_white() + 30 % print_white_on_black()"
33160 print tab(15)"print_black_on_white() - 30 % print_white_on_black()"
33180 print tab(15)"print_black_on_white() + 10 % print_white_on_black()"
33200 print tab(15)"print_black_on_white() - 40 % print_white_on_black()"
33220 print tab(15)"print_black_on_white() + 20 % print_white_on_black()"
33240 print tab(15)"print_black_on_white() - 50 % print_white_on_black()"
33260 print "{3 down} druecken sie im richtigen moment 'f1'":e=0
33280 for t=1207 to 1567 step 40
33300 poke t, 31:
terminate_prev_early_exit_loop(b, 1, 3)
33320 e=e+1:
get menu_choice
33340 if menu_choice=chr$(133)
then 33380
33360 poke t, 224:
next t:
e=0:
goto 33280
33380 print "{down} sie haben die ";
33400 on e
goto 33420,
33440,
33460,
33480,
33500,
33520,
33540,
33560,
33580,
33600
33420 print "+50"a3$a1$:
e=50:
goto 33620
33440 print "-20"a3$a2$:
e=-20:
goto 33620
33460 print "+40"a3$a1$:
e=40:
goto 33620
33480 print "-10"a3$a2$:
e=-10:
goto 33620
33500 print "+30"a3$a1$:
e=30:
goto 33620
33520 print "-30"a3$a2$:
e=-30:
goto 33620
33540 print "+10"a3$a1$:
e=10:
goto 33620
33560 print "-40"a3$a2$:
e=-40:
goto 33620
33580 print "+20"a3$a1$:
e=20:
goto 33620
33600 print "-50"a3$a2$:
e=-50
33620 print "{down}";:
make_menu_choice():
return
REM: func menu_sabotage_operation() TODO rewrite
35000 print "{clr}{wht}":
set_inner_color(WHITE)1:
set_border_color(BLACK)
35020 for t=1 to 23
35040 unknown_set_values2()
35060 print "{rght}"spc(t)"sabotageaktion"
35080 next t
35100 screen_move_down_6times():
screen_move_down_6times()
35120 print "{clr}":
print tab(12)
player_name(s)
35140 print "{down} folgende sabotagemoeglichkeiten"
35160 print " stehen zur verfuegung:{down}"
35180 print "{lblu} agenten anwerben und fremdes oel-"
35200 print " feld durch ihn unbrauchbar machen"
35220 print " lassen. = f1"
35240 print "{yel} pumpenfirma durch sabotage ausser"
35260 print " betrieb setzen. = f3"
35280 print "{lblu} tankwagenfirma durch bestechhung"
35300 print " der kreditgeber konkurs gehen "
35320 print " lassen. = f5":w4=fnz(40000)
35325 print "{yel} bohrfirma durch oelueberschwemmung"
35330 print " ausser kraft setzen. = f7"
35340 print "{lblu} lieber doch nichts machen. = 'x'":w3=int(rnd(1)*40000)+40000
35360 make_menu_choice()
35380 if menu_choice=chr$(136) then
goto 45000
35400 if menu_choice=chr$(133) then
goto 35480
35420 if menu_choice=chr$(134) then
goto 43000
35440 if menu_choice=chr$(135) then
goto 44000
35460 return
35480 screen_move_down_6times():screen_move_down_6times()
35500 print "{clr}{lred} hey, hier ist agent diabolo huggi baer"
35520 print " welches oelfeld soll ich sabotieren?{down}{gry2}"
35540 for t=1 to 12:print " "t, bf$(t): next t
35560 print :input" oelfeldnummer";n
35580 if n< or >12 then return
35600 print "{down}{lred} so. fuer die sabotage des oelfeldes"
35620 print " fallen folgende unkosten an:"
35680 print " {wht}spesen, schmiergelder etc = "w3
35700 print " or en, sprengs to ff etc = "w4
35720 print " gesamt = "w3+w4
35740 print " {blk}die chancen einer erfolgreichen"
35760 print " durchfuehrung liegen bei 33% .";:maybe_wait_2sec_2:screen_move_down_6times()
35780 print "{5 down}"
35800 print "mov_cursor_upp_left(){8 down}{wht} soll ich zur tat schreiten?"
35820 get menu_choice:if s$="" then 35820:if s$="n" then return
35830 if menu_choice="n" then return
35840 if menu_choice="j" then 35880
35860 goto 35820
35880 player_money(s)=player_money(s)-w3-w4:w3=0:w4=0
35900 w3=fnz(3):t1=0
35920 if w3=1 then bp(n)=fnz(50000)+30000:w4=fnz(200000):fm(n)=w4:t1=2:f(n)=0
35940 if w3=1 then bt(n)=fnz(4500):fb(n)=0:pa(n)=0:ta(n)=0:ab(n)=0:bm(n)=0:gf(n)=0
35950 if w3=1 then gg(n)=0
35960 print "{down} {lblu} sabotageergebnis durch tastendruck{5 down}"
35980 get menu_choice:if s$="" then 35980
36000 for k=1 to 30:poke l, 15
36020 poke a, 190:poke th, 8:poke fh, k
36040 print tab(13)"{yel} gelungen {up}"
36060 poke fl, k:poke w, 33:for t=1 to 100: next t
36080 print tab(13)"{lblu} misslungen{up}":for t1=1 to 100: next t1:poke w, 0: next k
36100 if w3=1 then print tab(13)"{wht} gelungen "
36120 if w3<>1 then print tab(13)"{2 down}{blk}pech gehabt"
36140 poke w, 0
36160 if w3<>1 then maybe_wait_2sec():return
36180 for t=16 to 0 step -1
36200 poke l, t:poke a, 15:poke h, 0
36220 poke fh, 40:poke fl, 200:poke w, 129
36240 for ts=1 to 100: next ts
36260 next t
36300 poke l, 15:poke a, 190:poke h, 64
36320 poke fh, 1:poke fl, 95
36340 poke w, 129
36360 for tt=1 to 1000: next tt
36380 poke w, 0:return
REM: func menu_drill_company() TODO rewrite
37000 print "{clr}{wht}":
set_border_color(BLUE):
set_inner_color(BLUE)
37020 unknown_dowithmem()
37040 print "print_black_on_white() ";
37060 print " bohrgesellschaftskaufangebote ";
37080 print "print_black_on_white() {2 down}"
37100 for t=1 to 3:
if bb(t)=0 then
goto 37140
37120 next t:
print "keine mehr da":
maybe_wait_2sec_2:
return
37140 t=0:for t=1 to 3
37160 if bb(t)>0 then 37200
37180 print "print_black_on_white()"t;" "company_name(t), maybe_company_cost(t)" $"
37200 next t
37220 print "{2 down} welche gesellschaft wollen sie kaufen?{down}"
37240 make_menu_choice()
37260 z1=val(menu_choice):if z1= or b(z1)>0 then return
37280 print "sie sind nun inhaber der gesellschaft":print company_name(z1)". legen sie nun"
37300 print "ihren bohrgestaengepreis fuer 500 m fest"
37320 inputbd(z1)
37340 player_money(s)=player_money(s)-maybe_company_cost(z1):bb(z1)=s:return
REM: func menu_drill_rigging() TODO rewrite
38000 print "{clr}{wht}":
set_inner_color(ORANGE):
set_border_color(ORANGE)
38020 print "folgende bohrgestaenge werden angeboten:"
38040 print "{blu}firma";spc(15)"preis fuer 500 meter"spc(20)"bohrgestaenge"
38060 for z=1 to 40:
print "D";:
next z:
z=0
38080 for z=1 to 3:
print z" "company_name(z);
38100 if bb(z)>0 then
print tab(26)bd(z)"$":
goto 38140
38120 print tab(26)"{blk}kein angebot{blu}"
38140 next z
38160 if bb(1)=0 and bb(2)=0 and bb(3)=0 then
print "{2 down}{wht}es gibt noch keine firma die"
38180 if bb(1)=0 and bb(2)=0 and bb(3)=0 then
print "die gestaenge verkauft!"
38200 if bb(1)=0 and bb(2)=0 and bb(3)=0 then
maybe_wait_2sec_2:
maybe_wait_2sec():
return
38220 print "{2 down}{red}"
38240 input"einkauf bei welcher firma";cc:
if cc=0 then
return
38260 if bd(cc)=0 then
print "{2 down}{blk} liegt noch kein angebot vor":
goto 38240
38280 input "wieviel 500m einheiten wollen sie";c:
if c=0 then
return
38300 callback_from_drill_rigging()
38320 if d=0 then
return
38340 player_money(s)=player_money(s)-(c*(bd(cc)))
38350 for k=1 to players_count:
if bb(cc)=s then
player_money(s)=player_money(s)+(.2*(c*(bd(cc)))):
goto 38380
38360 if bb(cc)=k then
player_money(k)=player_money(k)+(c*(bd(cc)))
38380 next k:
bm(d)=bm(d)+c*500:
gosub callback_from_drill_rigging2()
38400 d=0:
dd=0:
c=0:
cc=0:
k=0:
return
REM: func menu_pumps() TODO rewrite
39000 print "{clr}{wht}";:
set_inner_color(WHITE)2:
set_border_color(WHITE)
39020 print "print_black_on_white() ** pumpenverkaeuferangebote ** print_white_on_black()"
39040 print " gesellschaft pumpenpreis in ${down}"
39060 for b=0 to 39:
print "{cbm-u}";:
next b:
print
39080 for z=1 to 2:
print z;pf$(z);