-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathACK01.PAS
1739 lines (1566 loc) · 54.3 KB
/
ACK01.PAS
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
{ AckFinder, ConfigEdit}
{$m 32000,64000,264000}
uses u_io,u_vars,u_graph,graph,u_adv,crt2,dos,u_fonts,u_graps,u_help,u_sound;
{$I I_MSTREC.PAS}
{$I I_SNDEFF.PAS}
var i,i1:integer;
ss:string;
crc:^crcarray;
b:Byte;
savedexitproc:pointer;
quittime:boolean;
objok:boolean;
Ack:masterrec;
passwordok:byte;
systemdir:String;
pgsub:byte; {1..3 for page 2}
mapcolors:array[0..255] of byte;
function upcase_sync(r: char): char; forward;
function version(v:byte):ittystring;
var s:ittystring;
begin
s:='V'+strnum(v DIV 10)+'.'+strnum(v MOD 10);
version:=s;
end;
procedure loadcreatures;
var cf:file of creaturerec;
i:byte;
begin
assign(cf,ADVNAME+CREATUREFILE);
{$I-} reset(cf); {$I+}
if ioresult<>0 then exit;
for i:=1 to 64 do read(cf,crc^[i]);
if not eof(cf) then
for i:=65 to MAXCRCS do read(cf,crc^[i])
else
begin
for i:=65 to MAXCRCS do crc^[i].t:=0;
end;
close(cf);
end;
{$I I_MAPED2.PAS}
(*
procedure mixpalette;
var
j:char;
done:boolean;
i1,i2,i3,i4:byte;
thiscolor,thisplane:byte;
{ procedure refreshcolors;
var c:byte;
begin
with ack do for c:=5 to 10 do
setrgbpalette(245+c,phasecolors[c,1],phasecolors[c,2],phasecolors[c,3]);
end; }
begin
helpindex:=57;
clearscreen;
{ refreshcolors; }
for i1:=0 to 2 do for i2:=0 to 1 do
for i3:=2 to 7 do for i4:=4 to 7 do
begin
putthing( i1*16+i3+4, i2*40+i4*4+20, 250+i2*3+i1 );
say( i1*16+6, i2*40+27, 1, strnum(250+i2*3+i1) );
end;
done:=false;
thiscolor:=5;thisplane:=1;
say(40,158,4,'ESCÛ1 TO EXIT');
repeat
setrgbpalette(245+thiscolor,ack.phasecolors[thiscolor,1],
ack.phasecolors[thiscolor,2],ack.phasecolors[thiscolor,3]);
say(5,158,5,' - Û1 #'+strnum(thiscolor+245)+' Û5 + ');
say(1,170,0,' R ');
say(1,180,0,' G ');
say(1,190,0,' B ');
say(2,160+10*thisplane,4,'<');
say(8,160+10*thisplane,4,'>');
drawh(58,173,58+63,18);
if ack.phasecolors[thiscolor,1]<>0 then
drawh(58,173,58+ack.phasecolors[thiscolor,1],12);
drawh(58,183,58+63,18);
if ack.phasecolors[thiscolor,2]<>0 then
drawh(58,183,58+ack.phasecolors[thiscolor,2],10);
drawh(58,193,58+63,18);
if ack.phasecolors[thiscolor,3]<>0 then
drawh(58,193,58+ack.phasecolors[thiscolor,3],9);
case upcase_sync(readkey) of
'+':if thiscolor<10 then inc(thiscolor);
'-':if thiscolor>5 then dec(thiscolor);
#0:case readkey of
#59:help;
#71,#73:ack.phasecolors[thiscolor,thisplane]:=0;
#72:if thisplane>1 then dec(thisplane);
#75:if ack.phasecolors[thiscolor,thisplane]>0 then
dec(ack.phasecolors[thiscolor,thisplane]);
#77:if ack.phasecolors[thiscolor,thisplane]<63 then
inc(ack.phasecolors[thiscolor,thisplane]);
#79,#81:ack.phasecolors[thiscolor,thisplane]:=63;
#80:if thisplane<3 then inc(thisplane);
end;
#27:done:=true;
end; {case}
until done;
helpindex:=35;
end;
*)
{$I I_ACK01.PAS}
{$I I_SNDNAM.PAS}
procedure ScreenSetup(page:byte);
function no(w:word):string;
var s:string;
begin
if w=0 then s:='NO ' else s:=strnum(w)+' ';
no:=s;
end;
function noobjnam(b:byte):string;
begin
if b=0 then noobjnam:='NONE' else noobjnam:=objnam(b);
end;
function noname(n:string):string;
begin
if n='PROMPT' then noname:='(ASK PLAYER)' else noname:=n;
end;
var level:byte;
var s:string;
begin
clearscreen;
drawh(0,181,319,3);
say(1,183,0,'Û5‡UpÛ0 Û5‡DnÛ0: SELECT PAGE (1-5) Û5FÛ0: EXIT');
say(1,191,0,' ');
{getdir(0,s);say(1,10,0,s+'\ '+ADVNAME);}
{drawh(0,18,319,3);}
case page of
1:begin
{ say(0,2,6, ' ADVENTURE CREATION KIT - CONFIGURATION '); }
say(0,2,6, ' PAGE 1: GAME BASICS. INFO ON THIS PAGE');
say(0,10,6, ' DETERMINES HOW YOUR ADVENTURE STARTS. ');
say(1,28,5,'TITLE SEQUENCE (RUNS EVERY TIME) ');
say(2,38,5, '1 Û0PICTURE:Û1'+no(ack.titlepic)+'Û52 Û0MESSAGE:Û1'+
no(ack.titlemsg)+'Û53 Û0MACRO:Û1'+no(ack.titlemacro));
say(1,58,5,'INTRO SEQUENCE (RUNS FOR NEW PLAYER) ');
say(2,68,5, '4 Û0PICTURE:Û1'+no(ack.intropic)+'Û55 Û0MESSAGE:Û1'+
no(ack.intromsg)+'Û56 Û0MACRO:Û1'+no(ack.intromacro));
say(1,88,5,'PLAYER STARTING INFORMATION ');
say(2,98,5,' I Û0 ITEMS AND WEAPONS...');
say(2,108,5,' M Û0 MONEY: Û1'+strnum(ack.pcash));
say(2,118,5,' V Û0 VEHICLE: Û1'+noobjnam(ack.plvehicle));
if ack.playername='UNUSED' then ack.playername:='';
if ack.playername='ASK' then ack.playername:='PROMPT';
if ack.playername='(ASK PLAYER)' then ack.playername:='PROMPT';
say(2,128,5,' N Û0 NAME: Û1'+noname(ack.playername));
s:=strnum(ack.minute);if length(s)=1 then s:='0'+s;
s:=strnum(ack.hour)+':'+s;
say(2,138,5,' T Û0 TIME: Û1'+s+' (24HR TIME)');
say(2,148,5, ' L Û0 STARTING LOCATION:');
with ack do begin
if plregion=0 then s:=' ...NOT SET YET!' else
begin
if plych=255 then s:=' ' else s:='';
s:=s+'REGION '+strnum(plregion);
if PLych=255 then
begin
s:=s+', ROOM '+strnum(plxch);
s:=s+', AT ('+strnum(plxloc)+','+strnum(plyloc)+')';
end else
begin
s:=s+', AT ('+strnum((plxch-1)*16+plxloc)+
','+strnum((plych-1)*16+plyloc)+')';
end;
end;
end;
say(6,158,1,'...'+s);
end;
2:begin
say(0,2,6, ' PAGE 2: PLAYER DATA. INFO ON THIS PAGE');
say(0,10,6, ' DETERMINES STARTING ABILITY SCORES. ');
if ack.copytype<2 then begin
say(1,191,0, 'SELECT SETS 1-3, TOGGLE ON/OFF WITH [T]');
say(3,30,0, '#1: Û5 N Û0AME:');
say(61,30,6,' G Û0:');
say(3,39,5, ' H Û0P: Û5ƒ„HÛ0P: Û5 S Û0TR:');
say(3,48,5, ' M Û0P: Û5ƒ„MÛ0P: Û5 I Û0NT:');
say(3,57,5, ' W Û0P.SK: Û5 R Û0W.SK:');
say(3,66,5, ' A Û0: Û5 B Û0: Û5 C Û0: Û5 D Û0: ');
drawh(0,76,319,3);
say(3,78,0, '#2: Û5 N Û0AME:');
say(61,78,6,' G Û0:');
say(3,87,5, ' H Û0P: Û5ƒ„HÛ0P: Û5 S Û0TR:');
say(3,96,5, ' M Û0P: Û5ƒ„MÛ0P: Û5 I Û0NT:');
say(3,105,5, ' W Û0P.SK: Û5 R Û0W.SK:');
say(3,114,5, ' A Û0: Û5 B Û0: Û5 C Û0: Û5 D Û0: ');
drawh(0,124,319,3);
say(3,126,0, '#3: Û5 N Û0AME:');
say(61,126,6,' G Û0:');
say(3,135,5, ' H Û0P: Û5ƒ„HÛ0P: Û5 S Û0TR:');
say(3,144,5, ' M Û0P: Û5ƒ„MÛ0P: Û5 I Û0NT:');
say(3,153,5, ' W Û0P.SK: Û5 R Û0W.SK:');
say(3,162,5, ' A Û0: Û5 B Û0: Û5 C Û0: Û5 D Û0: ');
if pgsub=0 then pgsub:=1;
case pgsub of
1:say(3,30,6,'#1:');
2:say(3,78,6,'#2:');
3:say(3,126,6,'#3:');
end;
end {new player}
else
begin
say(5,35,0,'EDITING SAVED GAME!');
pgsub:=0;
drawh(0,85,319,3);
say(61,78,6,' G Û0:');
say(3,87,5, ' H Û0P: Û5ƒ„HÛ0P: Û5 S Û0TR:');
say(3,96,5, ' M Û0P: Û5ƒ„MÛ0P: Û5 I Û0NT:');
say(3,105,5, ' W Û0P.SK: Û5 R Û0W.SK:');
say(3,114,5, ' A Û0: Û5 B Û0: Û5 C Û0: Û5 D Û0: ');
drawh(0,124,319,3);
end; {game in progress}
end;
3:begin
say(0,2,6, ' PAGE 3: LEVEL SETUP. INFO ON THIS PAGE');
say(0,10,6, ' DETERMINES HOW EXP AND LEVELS ARE USED.');
if ack.ackversion>24 then
begin
say(0,38,0, ' LEVEL EXP MACRO');
for level:=2 to 10 do
begin
say(3,28+(level*10),5,' '+strnum(level MOD 10)+' ');
say(18,28+(level*10),level MOD 2,strnum(level));
say(36,28+(level*10),level MOD 2,strnum(ack.levelexp[level]));
say(58,28+(level*10),level MOD 2,strnum(ack.levelmacro[level]));
end;
end else
begin
say(6,70,0, 'LEVELS AND EXPERIENCE CAN ONLY BE');
say(6,80,0, 'USED IN AN ADVENTURE SET TO V3.0');
say(6,90,0, 'OR HIGHER. (SET THIS ON PAGE 5)');
end;
end;
4:begin
say(0,2,6, ' PAGE 4: GAME SETUP. INFO ON THIS PAGE ');
say(0,10,6, ' DETERMINES YOUR ADVENTURE DETAILS. ');
say(1,25,6, 'VIDEO OPTIONS ');
{ say(2,48,5, ' P Û0: MIX PALETTE COLORS...'); }
if ack.time_cycle<>0 then s:='ON ' else s:='OFF';
say(2,35,5, ' V Û0: DAY/NIGHT VIEW SIZING: Û1'+s);
say(1,50,6, 'SOUND OPTIONS ');
say(2,60,5, ' B Û0: BUMP SOUND: Û1'+soundname(ack.bumpsound));
say(2,70,5, ' S Û0: STEP SOUND: Û1'+soundname(ack.stepsound));
if ack.ackversion>24 then
begin
say(2,80,5, ' T Û0: HIT SOUND: Û1'+soundname(ack.hitsound));
say(2,90,5, ' I Û0: MISS SOUND: Û1'+soundname(ack.misssound));
end else
say(2,85,2,'(HIT/MISS SOUNDS REQUIRE V3.0)');
if ack.ackversion<25 then ack.hourmacro:=0;
say(1,105,6,'EVENT MACROS ');
say(2,115,5,' X Û0: DEATH: Û1'+no(ack.deathmacro)+' Û5 M Û0: STEP: Û1'+no(ack.stepmacro));
if ack.ackversion>24 then
say(2,125,5,' H Û0: HOURLY: Û1'+no(ack.hourmacro)+' Û5 D Û0: MIDNIGHT: Û1'+no(ack.day_macro))
else say(2,125,5,' D Û0: MIDNIGHT: Û1'+no(ack.day_macro));
if ack.extracommand[1]=#27 then
begin
ack.extracommand:='&CHSZ';
ack.extracommand1:=0;
ack.extracommand2:=0;
ack.extracommand3:=0;
ack.extracommand4:=0;
end;
if ack.extracommand[1]<>'&' then
begin
say(2,135,0,'LEGACY EXTRACOMMAND SETTINGS...');
say(2,145,0,'PRESS ALT-E TO RESET THEM');
end else
begin
say(2,135,5,' 1 Û0: KEY "'+ack.extracommand[2]+'": Û1'+no(ack.extracommand1)+
' Û5 2 Û0: KEY "'+ack.extracommand[3]+'": Û1'+no(ack.extracommand2));
say(2,145,5,' 3 Û0: KEY "'+ack.extracommand[4]+'": Û1'+no(ack.extracommand3)+
' Û5 4 Û0: KEY "'+ack.extracommand[5]+'": Û1'+no(ack.extracommand4));
end;
if ack.ackversion>24 then
if ack.splituse=0 then
say(2,155,5,' U Û1: "USE" KEY ALSO READY/CAST')
else say(2,155,5,' U Û1: SEPARATE USE/READY/CAST KEYS');
end;
5:with ack do begin
say(0,2,6, ' PAGE 5: ADVANCED. INFO ON THIS PAGE ');
say(0,10,6, ' LETS YOU ADJUST SPECIFIC GAME ELEMENTS.');
say(2,28,0, 'TEXT COLORS: [0]Û1[1]Û2[2]Û4[4]Û5[5]Û6[6]');
say(1,38,5,' D Û0: DARKNESS COLOR: Û1'+strnum(darkforeground));
fputthing(50,38,darkbackground);fputthing(51,38,darkforeground);
fputthing(52,38,darkforeground);fputthing(53,38,darkbackground);
say(1,48,5,' B Û0: DARKNESS BACKGROUND: Û1'+strnum(darkbackground));
if ack.ackversion>24 then
begin
case showmenu of
1:s:='YES';
17:s:='YES';
16:s:='NO';
else s:='NO';
end;
say(1,58,5,' K Û0: BMP SKIN:Û1'+s); {70}
case ack.showclock of
1:s:='CLOCK';
2:s:='SKIN ';
else s:='NONE ';
end;
say(1,68,5,' T Û0: TIME DISPLAY: Û1'+s);
end else
say(1,60,2,'(SKIN SETTINGS REQUIRE V3.0+)');
if anim_speed=0 then s:='(NO ANIMATION)'
else
begin
s:=strnum(anim_speed DIV 10)+'.'+strnum(anim_speed MOD 10);
s:=s+' SEC.';
end;
say(1,78,5,' V Û0: MODIFY VERSION Û1(NOW '+version(ackversion)+')');
say(1,88,5,' A Û0: ANIMATION SPEED: Û1'+s);
say(1,98,5, ' H Û0: HP REGEN SPEED: Û1'+strnum(regen_hp));
say(1,108,5, ' M Û0: MP REGEN SPEED: Û1'+strnum(regen_mp));
if ack.password=#27 then s:='NO PASSWORD.'
else s:='"'+ack.password+'"';
say(1,118,5, ' P Û0: PASSWORD: Û1'+s);
say(1,128,5,' E Û0: DAYS ELAPSED: Û1'+strnum(days));
case ack.cheat of
99:s:='CHEAT MODE';
123:s:='DEBUG MODE';
else s:='DISABLED';
end;
say(1,138,5, ' C Û0: ENABLE CHEATS: Û1'+s);
say(1,150,1,' USE THIS TO SWITCH THIS EDITOR TO ');
say(1,158,1,' EDIT THE SAVED GAME DATA INSTEAD... ');
if CopyType=0 then s:='MASTER ('+MASTERFILE+')'
else s:='SAVEGAME ('+MASTERFILE+')';
say(1,168,5, ' G Û0: EDITING COPY: Û1'+s);
end;
end;
end;
procedure ScreenFilldata(page:byte);
var s:string[25];
pty,pt1,pt2,ptc:byte;
begin
case page of
2:begin
if ack.copytype<2 then begin;pt1:=1;pt2:=3;end
else begin;pt1:=0;pt2:=0;end;
for ptc:=pt1 to pt2 do
begin
if ptc=0 then pty:=1 else
if ack.race[ptc]<>#255 then pty:=1 else pty:=0;
with ack do if pty=1 then
begin
case ptc of
1:pty:=30;
2,0:pty:=78;
3:pty:=126;
end;
if ptc=0 then say(26,pty,1,playername)
else say(26,pty,1,race[ptc]);
if ptc<>0 then putgrap(70,pty,Icon[ptc])
else putgrap(70,pty,playericon);
say(14,pty+9,1,strnum(hpmax[ptc]));
say(36,pty+9,1,strnum(hp[ptc]));
say(60,pty+9,1,strnum(strength[ptc]));
say(14,pty+18,1,strnum(mpmax[ptc]));
say(36,pty+18,1,strnum(mp[ptc]));
say(60,pty+18,1,strnum(intelligence[ptc]));
say(20,pty+27,1,strnum(weapskill[ptc]));
say(48,pty+27,1,strnum(rweapskill[ptc]));
if ptc<>0 then
begin
say(12,pty+36,1,strnum(vara[ptc]));
say(30,pty+36,1,strnum(varb[ptc]));
say(48,pty+36,1,strnum(varc[ptc]));
say(66,pty+36,1,strnum(vard[ptc]));
end else
begin
say(12,pty+36,1,strnum(variables[1]));
say(30,pty+36,1,strnum(variables[2]));
say(48,pty+36,1,strnum(variables[3]));
say(66,pty+36,1,strnum(variables[4]));
end;
end;
end;
end;
end;
end;
procedure startlocation(var rr,xc,yc,xx,yy:byte);
var old_rr:byte;
begin
old_rr:=rr;
gotolocation:=true;
if rr=0 then begin;rr:=1;gotolocation:=false;end;
rr:=menuselectregion(rr);
if rr=0 then exit;
if rr<>old_rr then gotolocation:=false;
thisregion:=rr;loadmap(rr);
if region.rooms>20 then
begin
if (xc>32) or (yc>32) or (xc<1) or (yc<1) then gotolocation:=false
else if region.room.wmap[xc,yc]=0 then gotolocation:=false;
otherwalkworldmap(xc,yc,xx,yy);
end
else if region.rooms>0 then
begin
if xc>20 then gotolocation:=false;
if region.rooms<xc then gotolocation:=false else
begin
if region.room.x2[xc]-region.room.x1[xc]+1<xx then gotolocation:=false;
if region.room.y2[xc]-region.room.y1[xc]+1<xx then gotolocation:=false;
end;
otherwalkroom(xc,xx,yy);yc:=255;
end;
end;
procedure clearbottom;
begin
say(0,183,0,' ');
say(0,191,0,' ');
end;
procedure CfgEdit;
var pg:byte;
done:boolean;
j,j0:char;
s:string;
b,b1:byte;
sr:searchrec;
i,i1:integer;
w,w1:word;
exkey:char;
yp2:array[0..3] of byte; {y-coords for pg 2}
procedure settext(n:byte);
begin
if n=3 then n:=0;
clearbottom;
say(13,183,0,'TEXT COLOR '+strnum(n)+': FG='+strnum(hi(ack.textcolors[n]))+
', BKG='+strnum(lo(ack.textcolors[n])));
say(13,191,0,'NEW FOREGROUND COLOR:');
s:=readlin(56,191,3,1);
val(s,i,i1);if (i1=0) and (s<>'') then
ack.textcolors[n]:=(ack.textcolors[n] AND $ff) + i*256;
say(13,183,0,'TEXT COLOR '+strnum(n)+': FG='+strnum(hi(ack.textcolors[n]))+
', BKG='+strnum(lo(ack.textcolors[n])));
say(13,191,0,'NEW BACKGROUND COLOR:');
s:=readlin(56,191,3,1);
val(s,i,i1);if (i1=0) and (s<>'') then
ack.textcolors[n]:=(ack.textcolors[n] AND $ff00) + i;
end;
begin
pg:=1;done:=false;pgsub:=1;
yp2[0]:=78;yp2[1]:=30;yp2[2]:=78;yp2[3]:=126;
screensetup(pg);screenfilldata(pg);
repeat
case pg of
1:helpindex:=3;
2:helpindex:=34;
3:helpindex:=35;
4:helpindex:=79;
5:helpindex:=3;
end;
j:=upcase_sync(readkey);
if j=#0 then begin;j0:=readkey;
case j0 of
#59:help;
#120..#124:begin;pg:=ord(j0)-119;screensetup(pg);screenfilldata(pg);end;
#75,#73:if pg>1 then begin;dec(pg);screensetup(pg);screenfilldata(pg);end;
#77,#81:if pg<5 then begin;inc(pg);screensetup(pg);screenfilldata(pg);end;
#68:done:=true;
end;end;
case pg of
1:case j of
(* 'C':begin;if ack.copytype=1 then ack.copytype:=0 else
if ack.copytype=0 then ack.copytype:=1;
if ack.copytype>1 then
begin
say(1,174,0,' MAPS WILL NOT BE CHANGED. ');
say(1,182,0,' ONLY PLAYER RECORD WILL BE ERASED. ');
say(1,190,0,' PRESS [Y] TO PROCEED. ');
j0:=upcase(readkey);
if j0='Y' then ack.copytype:=1;
screensetup(pg);screenfilldata(pg);
end;
case ack.CopyType of
0:s:='MASTER COPY ';
1:s:='READY TO PLAY';
else s:='GAME IN PROGRESS';
end;say(32,42,1,s);
end; {c}
*)
'1':begin
clearbottom;
say(1,183,0,'ENTER THE TITLE PICTURE (BMP) NUMBER');
say(42,191,0,'#');
s:=readlin(44,191,3,1);
val(s,i,i1);if i1<>0 then i:=0;
if s<>#27 then ack.titlepic:=i;
screensetup(pg);screenfilldata(pg);
end;
'2':begin
clearbottom;
say(1,183,0,'ENTER THE TITLE LONG-MESSAGE NUMBER');
say(42,191,0,'#');
s:=readlin(44,191,3,1);
val(s,i,i1);if i1<>0 then i:=0;
if s<>#27 then ack.titlemsg:=i;
screensetup(pg);screenfilldata(pg);
end;
'3':begin
clearbottom;
say(1,183,0,'ENTER THE TITLE MACRO NUMBER');
say(42,191,0,'#');
s:=readlin(44,191,3,1);
val(s,i,i1);if i1<>0 then i:=0;
if s<>#27 then ack.titlemacro:=i;
screensetup(pg);screenfilldata(pg);
end;
'4':begin
clearbottom;
say(1,183,0,'ENTER THE NEW-PLAYER INTRO PICTURE #');
say(42,191,0,'#');
s:=readlin(44,191,3,1);
val(s,i,i1);if i1<>0 then i:=0;
if s<>#27 then ack.intropic:=i;
screensetup(pg);screenfilldata(pg);
end;
'5':begin
clearbottom;
say(1,183,0,'ENTER THE NEW-PLAYER INTRO MESSAGE #');
say(42,191,0,'#');
s:=readlin(44,191,3,1);
val(s,i,i1);if i1<>0 then i:=0;
if s<>#27 then ack.intromsg:=i;
screensetup(pg);screenfilldata(pg);
end;
'6':begin
clearbottom;
say(1,183,0,'ENTER THE NEW-PLAYER INTRO MACRO #');
say(42,191,0,'#');
s:=readlin(44,191,3,1);
val(s,i,i1);if i1<>0 then i:=0;
if s<>#27 then ack.intromacro:=i;
screensetup(pg);screenfilldata(pg);
end;
'I':begin
clearbottom;
say(1,181,0,' EDIT PLAYER INVENTORY');
say(1,189,0,' CHANGE WITH [+] AND [-], [ESC] TO EXIT');
i:=selectobj(123,0,0);
screensetup(pg);screenfilldata(pg);
end;
'M':begin
clearbottom;
say(1,183,0,'ENTER THE MONEY THE PLAYER STARTS WITH');
say(42,191,0,'#');
s:=readlin(44,191,5,1);
val(s,w,i1);if i1<>0 then w:=0;
if s<>#27 then ack.pcash:=w;
screensetup(pg);screenfilldata(pg);
end;
'V':begin
clearbottom;
say(1,183,0,'SELECT THE VEHICLE THE PLAYER STARTS');
say(1,191,0,'WITH, OR [ESC] FOR NO VEHICLE');
ack.plvehicle:=selectobj(10,ack.plvehicle,0);
screensetup(pg);screenfilldata(pg);
end;
'N':begin
clearbottom;
say(1,183,0,'ENTER THE PLAYER NAME, OR "PROMPT"');
say(1,191,0,'TO HAVE THE GAME ASK:');
s:=readlin(43,191,11,0);
ack.playername:=s;
screensetup(pg);
screenfilldata(pg);
end;
'T':begin
clearbottom;
say(1,183,0,'ENTER THE STARTING ACK CLOCK TIME');
say(10,191,0,'HOUR [0-23]:');
s:=readlin(38,191,2,1);
val(s,i,i1);if i1=0 then ack.hour:=i;
say(10,191,0,'MINUTE [0-59]: ');
s:=readlin(42,191,2,1);
val(s,i,i1);if i1=0 then ack.minute:=i;
screensetup(pg); screenfilldata(pg);
end;
'L':with Ack do begin
startlocation(PLregion,PLxch,PLych,PLxloc,PLyloc);
if PLxloc=0 then PLregion:=0;
screensetup(pg);screenfilldata(pg);
end;
end; {j case}
2:case j of
#0:case j0 of
'H':if pgsub<>0 then
begin;if pgsub>1 then dec(pgsub);
say(3,30,0,'#1:');
say(3,78,0,'#2:');
say(3,126,0,'#3:');
case pgsub of
1:say(3,30,6,'#1:');
2:say(3,78,6,'#2:');
3:say(3,126,6,'#3:');
end;end;
'P':if pgsub<>0 then
begin;if pgsub<>0 then if pgsub<3 then inc(pgsub);
say(3,30,0,'#1:');
say(3,78,0,'#2:');
say(3,126,0,'#3:');
case pgsub of
1:say(3,30,6,'#1:');
2:say(3,78,6,'#2:');
3:say(3,126,6,'#3:');
end;end;
#35:with ack do begin;s:=readlin(36,yp2[pgsub]+9,3,1);val(s,i,i1);
if i1=0 then begin;hp[pgsub]:=i;end;
say(36,yp2[pgsub]+9,1,' ');
say(36,yp2[pgsub]+9,1,strnum(hp[pgsub]));end;
#50:with ack do begin;s:=readlin(36,yp2[pgsub]+18,3,1);val(s,i,i1);
if i1=0 then begin;mp[pgsub]:=i;end;
say(36,yp2[pgsub]+18,1,' ');
say(36,yp2[pgsub]+18,1,strnum(mp[pgsub]));end;
end;
'1'..'3':if pgsub<>0 then
begin;if pgsub<>0 then pgsub:=ord(j)-48;
say(3,30,0,'#1:');
say(3,78,0,'#2:');
say(3,126,0,'#3:');
case pgsub of
1:say(3,30,6,'#1:');
2:say(3,78,6,'#2:');
3:say(3,126,6,'#3:');
end;end;
'T':if pgsub>1 then
begin
if ack.race[pgsub]=#255 then
ack.race[pgsub]:='CHARACTER CLASS'
else ack.race[pgsub]:=#255;
screensetup(pg);
screenfilldata(pg);
end;
'N':begin;s:=readlin(26,yp2[pgsub],16,0);if s<>#27 then
ack.race[pgsub]:=s;say(26,yp2[pgsub],0,' ');
say(26,yp2[pgsub],1,ack.race[pgsub]);end;
'H':with ack do begin;s:=readlin(14,yp2[pgsub]+9,3,1);val(s,i,i1);
if i1=0 then begin;hpmax[pgsub]:=i;hp[pgsub]:=i;end;
say(14,yp2[pgsub]+9,1,' ');
say(36,yp2[pgsub]+9,1,' ');
say(14,yp2[pgsub]+9,1,strnum(hpmax[pgsub]));
say(36,yp2[pgsub]+9,1,strnum(hp[pgsub]));end;
'M':with ack do begin;s:=readlin(14,yp2[pgsub]+18,3,1);val(s,i,i1);
if i1=0 then begin;mpmax[pgsub]:=i;mp[pgsub]:=i;end;
say(14,yp2[pgsub]+18,1,' ');
say(36,yp2[pgsub]+18,1,' ');
say(14,yp2[pgsub]+18,1,strnum(mpmax[pgsub]));
say(36,yp2[pgsub]+18,1,strnum(mp[pgsub]));end;
'I':with ack do begin;s:=readlin(60,yp2[pgsub]+18,3,1);val(s,i,i1);
if i1=0 then begin;intelligence[pgsub]:=i;end;
say(60,yp2[pgsub]+18,1,' ');
say(60,yp2[pgsub]+18,1,strnum(intelligence[pgsub]));end;
'S':with ack do begin;s:=readlin(60,yp2[pgsub]+9,3,1);val(s,i,i1);
if i1=0 then begin;strength[pgsub]:=i;end;
say(60,yp2[pgsub]+9,1,' ');
say(60,yp2[pgsub]+9,1,strnum(strength[pgsub]));end;
'W':with ack do begin;s:=readlin(20,yp2[pgsub]+27,3,1);val(s,i,i1);
if i1=0 then begin;weapskill[pgsub]:=i;end;
say(20,yp2[pgsub]+27,1,' ');
say(20,yp2[pgsub]+27,1,strnum(weapskill[pgsub]));end;
'R':with ack do begin;s:=readlin(48,yp2[pgsub]+27,3,1);val(s,i,i1);
if i1=0 then begin;rweapskill[pgsub]:=i;end;
say(48,yp2[pgsub]+27,1,' ');
say(48,yp2[pgsub]+27,1,strnum(rweapskill[pgsub]));end;
'G':with ack do begin;icon[pgsub]:=grap_select_window(icon[pgsub]);
if (icon[pgsub]>240) or (icon[pgsub]<1) then icon[pgsub]:=1;
screensetup(pg);screenfilldata(pg);
if pgsub=0 then playericon:=icon[pgsub];
end;
'A'..'D':with ack do begin
s:=readlin((18*(ord(j)-64))-6,yp2[pgsub]+36,3,1);val(s,i,i1);
if i1=0 then if pgsub=0 then variables[ord(j)-64]:=i
else case j of
'A':vara[pgsub]:=i;
'B':varb[pgsub]:=i;
'C':varc[pgsub]:=i;
'D':vard[pgsub]:=i;
end;
say((18*(ord(j)-64))-6,yp2[pgsub]+36,1,' ');
say((18*(ord(j)-64))-6,yp2[pgsub]+36,1,strnum(i));end;
end; {j case}
3:case j of
'0','2'..'9':
begin
if j='0' then i:=10 else i:=ord(j)-48;
i1:=28+(i*10);
say(3,i1,6,' '+strnum(i MOD 10)+' ');
clearbottom;
say(1,183,0,'ENTER THE EXP REQUIRED FOR LEVEL');
say(1,191,0,'(PRESS ESC TO LEAVE VALUE ALONE)');
s:=readlin(36,i1,5,1);
if s='' then s:=#27;
val(s,w,i1);if i1<>0 then w:=0;
if w<100 then w:=100;
if i>2 then if w<=ack.levelexp[i-1] then w:=ack.levelexp[i-1]+1;
if s<>#27 then ack.levelexp[i]:=w;
i1:=28+(i*10);
clearbottom;
say(1,183,0,'ENTER THE MACRO TO RUN AT LEVEL UP');
say(1,191,0,'(ENTER ''0'' TO RUN NO MACRO');
s:=readlin(58,i1,3,1);
if s='' then s:=#27;
val(s,w,i1);if i1<>0 then w:=0;
if s<>#27 then ack.levelmacro[i]:=w;
screensetup(pg);screenfilldata(pg);
end;
end; {case, 3}
4:case j of
#0:if j0=#18 then
begin
ack.extracommand:='&'+ack.extracommand[1]+'2HS';
ack.extracommand3:=0;
ack.extracommand4:=0;
screensetup(pg);screenfilldata(pg);
end;
'U':begin
if ack.splituse=0 then ack.splituse:=1 else ack.splituse:=0;
screensetup(pg);screenfilldata(pg);
end;
'B':begin
clearbottom;
say(1,183,0,'SELECT THE "BUMP" SOUND EFFECT');
repeat
say(10,191,2,'ˆ'+soundname(ack.bumpsound)+' ');
until updown(ack.bumpsound,0,NUMSOUNDS)>0;
soundeffect(ack.bumpsound,1);
screensetup(pg);screenfilldata(pg);
end;
'S':begin
clearbottom;
say(1,183,0,'SELECT THE "STEP" SOUND EFFECT');
repeat
say(10,191,2,'ˆ'+soundname(ack.stepsound)+' ');
until updown(ack.stepsound,0,NUMSOUNDS)>0;
soundeffect(ack.stepsound,1);
screensetup(pg);screenfilldata(pg);
end;
'T':begin
clearbottom;
say(1,183,0,'SELECT THE "HIT" SOUND EFFECT');
repeat
say(10,191,2,'ˆ'+soundname(ack.hitsound)+' ');
until updown(ack.hitsound,0,NUMSOUNDS)>0;
soundeffect(ack.hitsound,1);
screensetup(pg);screenfilldata(pg);
end;
'I':begin
clearbottom;
say(1,183,0,'SELECT THE "MISS" SOUND EFFECT');
repeat
say(10,191,2,'ˆ'+soundname(ack.misssound)+' ');
until updown(ack.misssound,0,NUMSOUNDS)>0;
soundeffect(ack.misssound,1);
screensetup(pg);screenfilldata(pg);
end;
'1':begin
clearbottom;
say(1,183,0,'PRESS A KEY FOR EXTRA COMMAND 1');
exkey:=upcase(readkey); if exkey=#0 then
begin;exkey:=readkey;exkey:=#27;end;
if exkey<>#27 then
begin
clearbottom;
say(1,183,0,'KEY "'+exkey+'", ENTER A MACRO# FOR THIS KEY');
say(42,191,0,'#');
s:=readlin(37,191,3,1);
val(s,i,i1);if i1<>0 then i:=0;
if s<>#27 then
begin
ack.extracommand1:=i;
ack.extracommand[2]:=exkey;
end;
end;
screensetup(pg);screenfilldata(pg);
end;
'2':begin
clearbottom;
say(1,183,0,'PRESS A KEY FOR EXTRA COMMAND 2');
exkey:=upcase(readkey); if exkey=#0 then
begin;exkey:=readkey;exkey:=#27;end;
if exkey<>#27 then
begin
clearbottom;
say(1,183,0,'KEY "'+exkey+'", ENTER A MACRO# FOR THIS KEY');
say(42,191,0,'#');
s:=readlin(37,191,3,1);
val(s,i,i1);if i1<>0 then i:=0;
if s<>#27 then
begin
ack.extracommand2:=i;
ack.extracommand[3]:=exkey;
end;
end;
screensetup(pg);screenfilldata(pg);
end;
'3':begin
clearbottom;
say(1,183,0,'PRESS A KEY FOR EXTRA COMMAND 3');
exkey:=upcase(readkey); if exkey=#0 then
begin;exkey:=readkey;exkey:=#27;end;
if exkey<>#27 then
begin
clearbottom;
say(1,183,0,'KEY "'+exkey+'", ENTER A MACRO# FOR THIS KEY');
say(42,191,0,'#');
s:=readlin(37,191,3,1);
val(s,i,i1);if i1<>0 then i:=0;
if s<>#27 then
begin
ack.extracommand3:=i;
ack.extracommand[4]:=exkey;
end;
end;
screensetup(pg);screenfilldata(pg);
end;
'4':begin
clearbottom;
say(1,183,0,'PRESS A KEY FOR EXTRA COMMAND 4');
exkey:=upcase(readkey); if exkey=#0 then
begin;exkey:=readkey;exkey:=#27;end;
if exkey<>#27 then
begin
clearbottom;
say(1,183,0,'KEY "'+exkey+'", ENTER A MACRO# FOR THIS KEY');
say(42,191,0,'#');
s:=readlin(37,191,3,1);
val(s,i,i1);if i1<>0 then i:=0;
if s<>#27 then
begin
ack.extracommand4:=i;
ack.extracommand[5]:=exkey;
end;
end;
screensetup(pg);screenfilldata(pg);
end;
'H':begin
clearbottom;
say(1,183,0,'ENTER A MACRO# TO RUN EVERY HOUR');
say(42,191,0,'#');
s:=readlin(44,191,3,1);
val(s,i,i1);if i1<>0 then i:=0;
if s<>#27 then ack.hourmacro:=i;
screensetup(pg);screenfilldata(pg);
end;
'X':begin
clearbottom;
say(1,183,0,'ENTER A MACRO# TO RUN ON DEATH');
say(42,191,0,'#');
s:=readlin(44,191,3,1);
val(s,i,i1);if i1<>0 then i:=0;
if s<>#27 then ack.deathmacro:=i;
screensetup(pg);screenfilldata(pg);
end;
'M':begin
clearbottom;
say(1,183,0,'ENTER A MACRO# TO RUN ON EVERY STEP');
say(42,191,0,'#');
s:=readlin(44,191,3,1);
val(s,i,i1);if i1<>0 then i:=0;
if s<>#27 then ack.stepmacro:=i;
screensetup(pg);screenfilldata(pg);
end;
'D':begin
clearbottom;
say(1,183,0,'ENTER A MACRO# TO RUN ONCE PER DAY');
say(42,191,0,'#');
s:=readlin(44,191,3,1);
val(s,i,i1);if i1<>0 then i:=0;
if s<>#27 then ack.day_macro:=i;
screensetup(pg);screenfilldata(pg);
end;
'V':begin
if ack.time_cycle=0 then ack.time_cycle:=1
else ack.time_cycle:=0;
screensetup(pg);screenfilldata(pg);
end;
end; {j case}
5:case j of
'0'..'6':begin
settext(ord(j)-48);
TEXTC0:=ack.textcolors[0];
TEXTC1:=ack.textcolors[1];
TEXTC2:=ack.textcolors[2];
TEXTC4:=ack.textcolors[4];
TEXTC5:=ack.textcolors[5];
TEXTC6:=ack.textcolors[6];
screensetup(pg);screenfilldata(pg);
end; {g}
'H':begin
clearbottom;
say(1,183,0,'ENTER THE HP REGEN (SEE MANUAL)');
say(42,191,0,'#');
s:=readlin(44,191,3,1);
val(s,i,i1);if i1<>0 then i:=0;
if s<>#27 then ack.regen_hp:=i;
screensetup(pg);screenfilldata(pg);