-
Notifications
You must be signed in to change notification settings - Fork 1
/
casktown.bas
2256 lines (2126 loc) · 60.8 KB
/
casktown.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
DECLARE SUB loadmap (mm AS INTEGER)
DECLARE SUB clr ()
DECLARE SUB whitesay (say$)
DECLARE SUB LoadGame (x!, y!, mx!, my!, autotime!, runstep!)
DECLARE SUB SaveGame (x!, y!, mx!, my!, autotime!, runstep!)
DECLARE SUB autorun ()
DECLARE SUB findsth ()
DECLARE SUB map16 ()
DECLARE SUB map15 ()
DECLARE SUB map14 ()
DECLARE SUB map13 ()
DECLARE SUB map12 ()
DECLARE SUB map11 ()
DECLARE SUB cg1 ()
DECLARE SUB map10 ()
DECLARE SUB map8 ()
DECLARE SUB map9 ()
DECLARE SUB map6 ()
DECLARE SUB room9 ()
DECLARE SUB debug ()
DECLARE SUB pal ()
DECLARE SUB room2 ()
DECLARE SUB readmap (a)
DECLARE SUB readhouse ()
DECLARE SUB map5 ()
DECLARE SUB room1 ()
DECLARE SUB map4 ()
DECLARE SUB map3 ()
DECLARE SUB endgame ()
DECLARE SUB clcon ()
DECLARE SUB map2 ()
DECLARE SUB clk ()
DECLARE SUB rpgsay ()
DECLARE FUNCTION object! ()
DECLARE SUB map1 ()
DECLARE SUB initstore ()
DECLARE SUB drawmap ()
DIM SHARED action(99) AS INTEGER
DIM SHARED act(99) AS INTEGER
DIM SHARED man1(246)
DIM SHARED autoMan1(246)
DIM SHARED man2(246)
DIM SHARED autoMan2(246)
DIM SHARED man3(246)
DIM SHARED autoMan3(246)
DIM SHARED man4(246)
DIM SHARED autoMan4(246)
DIM SHARED people1(246)
DIM SHARED people2(4 + INT((40 * 1 + 7) / 8) * 40 * 4)
DIM SHARED people3(4 + INT((40 * 1 + 7) / 8) * 40 * 4)
DIM SHARED people4(4 + INT((40 * 1 + 7) / 8) * 40 * 4)
DIM SHARED people5(4 + INT((40 * 1 + 7) / 8) * 40 * 4) '睡仙
DIM SHARED people6(4 + INT((40 * 1 + 7) / 8) * 40 * 4) 'teacher
DIM SHARED people9(4 + INT((40 * 1 + 7) / 8) * 40 * 4) 'pal-main
DIM SHARED space(4 + INT((40 * 1 + 7) / 8) * 40 * 4)
DIM SHARED tree(4 + INT((40 * 1 + 7) / 8) * 40 * 4)
DIM SHARED door(4 + INT((40 * 1 + 7) / 8) * 40 * 4)
DIM SHARED yun(4 + INT((40 * 1 + 7) / 8) * 40 * 4)
DIM SHARED house(4 + INT((79 * 1 + 7) / 8) * 79 * 4)
DIM SHARED house1(4 + INT((40 * 1 + 7) / 8) * 40 * 4)
DIM SHARED house2(4 + INT((40 * 1 + 7) / 8) * 40 * 4)
DIM SHARED house3(4 + INT((40 * 1 + 7) / 8) * 40 * 4)
DIM SHARED house4(4 + INT((40 * 1 + 7) / 8) * 40 * 4)
DIM SHARED house5(4 + INT((40 * 1 + 7) / 8) * 40 * 4)
DIM SHARED house9(4 + INT((40 * 1 + 7) / 8) * 40 * 4)
DIM SHARED disk(4 + INT((40 * 1 + 7) / 8) * 40 * 4)
DIM SHARED wall(4 + INT((40 * 1 + 7) / 8) * 40 * 4)
DIM SHARED myst(4 + INT((40 * 1 + 7) / 8) * 40 * 4)
DIM SHARED m(10) AS STRING
DIM SHARED o(10) AS STRING
DIM SHARED s(99) AS STRING
DIM SHARED l(99) AS INTEGER, start(99) AS INTEGER
DIM SHARED up$
DIM SHARED down$
DIM SHARED lef$
DIM SHARED righ$
DIM SHARED in AS STRING 'inkey$
DIM SHARED into AS INTEGER 'true--in the house else out of house
DIM SHARED whichhouse
DIM SHARED loadxy AS INTEGER
DIM SHARED manname AS STRING
DIM SHARED display AS INTEGER 'display the map name
DIM SHARED nextmap AS INTEGER
DIM SHARED x, y, mx, my
DIM SHARED say AS INTEGER
DIM SHARED toward AS STRING
DIM SHARED who AS INTEGER
DIM SHARED map AS INTEGER
DIM SHARED mapname AS STRING
DIM SHARED retn AS INTEGER, retn1 AS INTEGER
DIM SHARED maythough(9) AS STRING
DIM SHARED find AS INTEGER
DIM SHARED Search AS STRING
DIM SHARED active AS INTEGER
DIM SHARED autotime
maythough(1) = "0"
maythough(2) = "F"
maythough(3) = "e"
maythough(4) = "i"
maythough(5) = "o"
maythough(6) = "E"
maythough(7) = "G"
maythough(8) = "g"
maythough(9) = "R"
CONST total = 9
CONST false = 0
CONST true = -1
loadxy = true
retn = 0
up$ = CHR$(0) + CHR$(72): down$ = CHR$(0) + CHR$(80)
lef$ = CHR$(0) + CHR$(75): righ$ = CHR$(0) + CHR$(77)
shot$ = CHR$(0) + CHR$(42) 'right shift
man$ = CHR$(1)
everystep = 10
map = 1
initstore
CLS
'map1
loadmap (1)
drawmap
mx = 2: my = 3
x = mx * 40 - 40: y = my * 40 - 40 'is important
who = 1
PUT (x + 1, y + 1), man4
wartime = TIMER
into = true
'map = 3'''
runstep = false 'run step by step
autotime = TIMER
DO
in = INKEY$
IF in <> "" THEN autotime = TIMER
IF TIMER - autotime > 2 THEN CALL autorun: autotime = TIMER
IF in = "S" AND into = true THEN SaveGame x, y, mx, my, autotime, runstep
IF in = "L" THEN GOSUB LoadGame
IF in = CHR$(0) + CHR$(45) OR in = CHR$(0) + CHR$(68) THEN END
IF in = up$ THEN
'IF toward = "up" THEN
'PUT (x + 1, y + 1), man1, PSET
toward = "up"
IF NOT object AND my > 1 THEN
IF runstep THEN
FOR tmp = y TO y - 40 STEP -1
PUT (x + 1, tmp + 1), man1, PSET: PUT (x + 1, tmp + 1), man1, XOR
IF tmp > y - 40 THEN PUT (x + 1, tmp), man1, PSET
NEXT
ELSE
PUT (x + 1, y + 1), man1, PSET: PUT (x + 1, y + 1), man1, XOR
END IF
clk
my = my - 1
x = mx * 40 - 40: y = my * 40 - 40
PUT (x + 1, y + 1), man1
END IF
say = 0
'ELSE
toward = "up"
PUT (x + 1, y + 1), man1, PSET
'END IF
END IF
IF in = down$ THEN
'IF toward = "down" THEN
'PUT (x + 1, y + 1), man2, PSET
toward = "down"
IF NOT object AND my < 8 THEN
IF runstep THEN
FOR tmp = y TO y + 40
PUT (x + 1, tmp + 1), man2, PSET: PUT (x + 1, tmp + 1), man2, XOR
IF tmp < y + 40 THEN PUT (x + 1, tmp + 2), man2, PSET
NEXT
ELSE
PUT (x + 1, y + 1), man2, PSET: PUT (x + 1, y + 1), man2
END IF
clk
my = my + 1
x = mx * 40 - 40: y = my * 40 - 40
PUT (x + 1, y + 1), man2
END IF
say = 0
'ELSE
toward = "down"
PUT (x + 1, y + 1), man2, PSET
'END IF
END IF
IF in = lef$ THEN
'IF toward = "left" THEN
'PUT (x + 1, y + 1), Man3, PSET
toward = "left"
IF NOT object AND mx > 1 THEN
IF runstep THEN
FOR tmp = x TO x - 40 STEP -1
PUT (tmp + 1, y + 1), man3, PSET: PUT (tmp + 1, y + 1), man3, XOR
IF tmp > x - 40 THEN PUT (tmp, y + 1), man3, PSET
NEXT
ELSE
PUT (x + 1, y + 1), man3, PSET: PUT (x + 1, y + 1), man3
END IF
clk
mx = mx - 1
x = mx * 40 - 40: y = my * 40 - 40
PUT (x + 1, y + 1), man3
END IF
say = 0
'ELSE
toward = "left"
PUT (x + 1, y + 1), man3, PSET
'END IF
END IF
IF in = righ$ THEN
'IF toward = "right" THEN
'PUT (x + 1, y + 1), man4, PSET
toward = "right"
IF NOT object AND mx < 15 THEN
IF runstep THEN
FOR tmp = x TO x + 40 STEP 1
PUT (tmp + 1, y + 1), man4, PSET: PUT (tmp + 1, y + 1), man4, XOR
IF tmp < x + 40 THEN PUT (tmp + 2, y + 1), man4, PSET
NEXT
ELSE
PUT (x + 1, y + 1), man4, PSET: PUT (x + 1, y + 1), man4
END IF
clk
mx = mx + 1
x = mx * 40 - 40: y = my * 40 - 40
PUT (x + 1, y + 1), man4
END IF
say = 0
'ELSE
toward = "right"
PUT (x + 1, y + 1), man4, PSET
'END IF
END IF
IF in = " " OR in = "z" OR in = CHR$(13) THEN
temp = object
IF NOT say THEN IF find THEN findsth
IF say THEN rpgsay
END IF
IF LCASE$(MID$(m(my), mx, 1)) = "i" THEN
clcon
loadxy = false
IF into THEN
mx0 = mx: my0 = my + 1
readhouse
drawmap
into = NOT into
ELSE
readmap (map)
mx = mx0: my = my0
drawmap
into = true
END IF
END IF
IF LCASE$(MID$(m(my), mx, 1)) = "e" THEN
CALL clcon
IF MID$(m(my), mx, 1) = "e" THEN map = map + 1: retn = false ELSE map = map - 1: retn = true
readmap (map)
drawmap
END IF
IF LCASE$(MID$(m(my), mx, 1)) = "g" THEN
CALL clcon
IF MID$(m(my), mx, 1) = "g" THEN
readmap (nextmap)
retn1 = false
ELSE
nextmap = nextmap - 1
retn1 = true
readmap (nextmap)
END IF
drawmap
END IF
IF LCASE$(MID$(m(my), mx, 1)) = "r" THEN
retn1 = true
CALL clcon
readmap (map)
drawmap
retn1 = false
END IF
IF MID$(m(my), mx, 1) = "F" THEN endgame
pal
'debug
'action(1) = -1
'action(2) = -1
LOOP
LoadGame:
LOCATE 22, 30: PRINT "正在读取... "
OPEN "T1.rpg" FOR INPUT AS #1
INPUT #1, x, y, mx, my, autotime, runstep, into, who, map, whichhouse
INPUT #1, nextmap
INPUT #1, toward
INPUT #1, manname
FOR i = 1 TO 99
INPUT #1, action(i), act(i)
NEXT
CLOSE
display = false
tempx = x: tempy = y
tempmx = mx: tempmy = my
'IF nextmap <> 0 THEN readmap (nextmap) ELSE readmap (map)
readmap (map)
x = tempx: y = tempy
mx = tempmx: my = tempmy
drawmap
LOCATE 22, 30: PRINT "读取完毕. "
a$ = INPUT$(1)
LOCATE 22, 30: PRINT " "
RETURN
SUB autorun
SELECT CASE toward
CASE "up"
CASE "down"
FOR i = 1 TO 2
PUT (x + 1, y + 1), autoMan2, PSET
t = TIMER
WHILE TIMER - t < .04: WEND
PUT (x + 1, y + 1), man2, PSET
t = TIMER
WHILE TIMER - t < .3: WEND
NEXT
PUT (x + 1, y + 1), autoMan1, PSET
't = TIMER
'WHILE TIMER - t < 1: WEND
CASE "left"
FOR i = 1 TO 2
PUT (x + 1, y + 1), autoMan3, PSET
t = TIMER
WHILE TIMER - t < .04: WEND
PUT (x + 1, y + 1), man3, PSET
t = TIMER
WHILE TIMER - t < .3: WEND
NEXT
CASE "right"
FOR i = 1 TO 2
PUT (x + 1, y + 1), autoMan4, PSET
t = TIMER
WHILE TIMER - t < .04: WEND
PUT (x + 1, y + 1), man4, PSET
t = TIMER
WHILE TIMER - t < .3: WEND
NEXT
CASE ELSE
END SELECT
END SUB
SUB cg1
CLS
PALETTE 0, 0
PALETTE 15, 0
VIEW SCREEN (1, 1)-(599, 319)
FOR i = 1 TO 500 STEP 10
CIRCLE (300, 150), i, 15
NEXT
PUT (x, y), man4
FOR i = 0 TO 45
PALETTE 15, i + 256 * i + 65535 * i
t = TIMER
WHILE TIMER - t < .01: WEND
NEXT
clk
t = TIMER
DO WHILE TIMER - t < 5
FOR i = 1 TO 500 STEP 10
CIRCLE (300, 150), i, INT(RND * 15)
NEXT
IF INKEY$ <> "" THEN EXIT DO
LOOP
i0 = 1
i = 1
t = TIMER
DO
IF TIMER - t > .01 THEN i0 = i0 + 10: t = TIMER
FOR i = 1 TO i0
CIRCLE (300, 150), i, 0
NEXT
PUT (x, y), man4, PSET
FOR i = i0 TO 360 STEP 20
CIRCLE (300, 150), i, INT(RND * 15)
NEXT
PUT (x, y), man4, PSET
LOOP UNTIL i0 > 360
VIEW
CLS
whitesay manname + "穿过一条神奇的隧道,到达了幻界...."
PALETTE 15, 0
COLOR 15
LOCATE 12, 30
PRINT "不久以后..."
FOR i = 0 TO 45
PALETTE 15, i + 256 * i + 65535 * i
t = TIMER
WHILE TIMER - t < .01: WEND
NEXT
FOR i = 45 TO 0 STEP -1
PALETTE 15, i + 256 * i + 65535 * i
t = TIMER
WHILE TIMER - t < .01: WEND
NEXT
CLS
'LINE (1, 1)-(599, 319), 0, BF
'LINE (639, 479)-(0, 319), 15, BF
FOR i = 0 TO 30
PALETTE 0, 65536 * i + 256 * i + i
t = TIMER
WHILE TIMER - t < .03: WEND
NEXT
map = 10
display = false
mx = 9: my = 6
drawmap
x = mx * 40 - 40: y = my * 40 - 40
clk
PUT (x + 1, y + 1), man1, PSET
t = TIMER
WHILE TIMER - t < 1: WEND
PUT (x + 1, y + 1), man2, PSET
t = TIMER
WHILE TIMER - t < .8: WEND
FOR i = 1 TO 2
PUT (x + 1, y + 1), man4, PSET
t = TIMER
WHILE TIMER - t < .8: WEND
PUT (x + 1, y + 1), man3, PSET
t = TIMER
WHILE TIMER - t < .5: WEND
NEXT
clk
who = 1
rpgsay
display = false
clk
END SUB
SUB clcon
'FOR clx = 0 TO 639
' LINE (clx, 0)-(clx, 479), 0
' FOR tmp = 0 TO 400: NEXT
'NEXT
'CLS
END SUB
SUB clk
WHILE INKEY$ <> "": WEND
END SUB
SUB clr
FOR i = POS(0) TO 80
PRINT " ";
NEXT
END SUB
SUB debug
'LOCATE 21, 1: PRINT "who="; who; " l(who)="; l(who)
'LOCATE 22, 1: PRINT "sayline="; sayline; " start(who)="; start(who)
LOCATE 22, 1: PRINT "mx="; mx; " my="; my
LOCATE 20, 1: PRINT "map="; map
LOCATE 21, 1: PRINT "Nextmap="; nextmap
'LOCATE 20, 1: PRINT retn
END SUB
SUB drawmap '--------------dim man(4 + INT((x*1 + 7) / 8) * y * 4) when screen 12
FOR cx = 0 TO 600 STEP 40
' LINE (cx, 0)-(cx, 320), 3
NEXT
FOR cy = 0 TO 320 STEP 40
' LINE (0, cy)-(600, cy), 3
NEXT
COLOR 3
LINE (0, 0)-(600, 320), 1, B
FOR i = 1 TO 15
FOR dy = 8 TO 1 STEP -1
m$ = MID$(m(dy), i, 1)
dmx = i * 40 - 40: dmy = dy * 40 - 40
SELECT CASE LCASE$(m$)
CASE "t"
PUT (dmx + 1, dmy + 1), tree, PSET
CASE "1"
PUT (dmx + 1, dmy + 1), people1, PSET
CASE "2"
PUT (dmx + 1, dmy + 1), people2, PSET
CASE "3"
PUT (dmx + 1, dmy + 1), people3, PSET
CASE "4"
PUT (dmx + 1, dmy + 1), people4, PSET
CASE "5"
PUT (dmx + 1, dmy + 1), people5, PSET
CASE "6"
PUT (dmx + 1, dmy + 1), people6, PSET
CASE "9"
PUT (dmx + 1, dmy + 1), people9, PSET
CASE "b"
PUT (dmx + 1, dmy + 1), myst, PSET
CASE "d"
PUT (dmx + 1, dmy + 1), disk, PSET
CASE "w"
PUT (dmx + 1, dmy + 1), wall, PSET
CASE "y"
PUT (dmx + 1, dmy + 1), yun, PSET
CASE "h"
PUT (dmx + 1, dmy + 1), house, PSET
CASE "!"
PUT (dmx + 1, dmy + 1), house1, PSET
CASE "@"
PUT (dmx + 1, dmy + 1), house2, PSET
CASE "#"
PUT (dmx + 1, dmy + 1), house3, PSET
CASE "$"
PUT (dmx + 1, dmy + 1), house4, PSET
CASE "%"
PUT (dmx + 1, dmy + 1), house5, PSET
CASE "0", "i", "z", "e", "g", "r", "f"
PUT (dmx, dmy), space, PSET
CASE ELSE
END SELECT
LINE (0, 0)-(600, 320), 1, B
NEXT
'FOR temp = 0 TO 49999: NEXT
NEXT
x = mx * 40 - 40: y = my * 40 - 40
SELECT CASE toward
CASE "up"
PUT (x + 1, y + 1), man1, PSET': PUT (x + 1, y + 1), man1, XOR
CASE "down"
PUT (x + 1, y + 1), man2, PSET': PUT (x + 1, y + 1), man2
CASE "left"
PUT (x + 1, y + 1), man3, PSET': PUT (x + 1, y + 1), man3
CASE "right"
PUT (x + 1, y + 1), man4, PSET': PUT (x + 1, y + 1), man4
CASE ELSE
END SELECT
LINE (0, 0)-(600, 320), 1, B
IF NOT display THEN display = true: EXIT SUB
FOR saybox = 225 TO 500
LINE (saybox, 370)-(saybox, 400), 1, B
LINE (500 - saybox, 370)-(500 - saybox, 400), 1, B
LINE (saybox - 1, 370)-(saybox - 1, 400), 0, B
LINE (500 - saybox + 1, 370)-(500 - saybox + 1, 400), 0, B
LINE (saybox, 370)-(500 - saybox, 370), 1, B
LINE (saybox, 400)-(500 - saybox, 400), 1, B
NEXT
'LINE (50, 370)-(500, 400), 1, B'
LOCATE 22, 30
PRINT mapname
clk
a$ = INPUT$(1)
FOR saybox = 500 TO 225 STEP -1
LINE (saybox, 370)-(saybox, 400), 1, B
LINE (500 - saybox, 370)-(500 - saybox, 400), 1, B
LINE (saybox + 1, 370)-(saybox + 1, 400), 0, B
LINE (500 - saybox - 1, 370)-(500 - saybox - 1, 400), 0, B
LINE (saybox, 370)-(500 - saybox, 370), 1, B
LINE (saybox, 400)-(500 - saybox, 400), 1, B
NEXT
LINE (50, 370)-(500, 400), 0, BF
'drawscore
END SUB
SUB drawscore
VIEW PRINT
COLOR 5
LINE (0, 0)-(520, 320), , B
'FOR i = o TO 520 STEP 40
' LINE (i, 0)-(i, 320)
'NEXT
'FOR i = 0 TO 320 STEP 40
' LINE (0, i)-(520, i)
'NEXT
COLOR 2
LOCATE 1, 68
PRINT "生命力:"
LOCATE 3, 72
PRINT "9999"
LOCATE 5, 68
PRINT "体 力:"
LOCATE 7, 72
PRINT "9999"
LOCATE 9, 68
PRINT "经验值:"
LOCATE 11, 72
PRINT "9999"
LOCATE 13, 68
PRINT "所需经验值:"
LOCATE 15, 72
PRINT "9999"
LINE (530, 0)-(630, 320), 12, B
END SUB
SUB endgame
l(1) = 0: start(1) = 1: who = 1
s(1) = manname + ":跑喽!ss"
rpgsay
VIEW PRINT
CLS
PALETTE 15, 0
PALETTE 13, 0
PALETTE 4, 0
PALETTE 0, 65536 * 20 + 256 * 20 + 20
pal
clcon
COLOR 4
LOCATE 17, 15
PRINT "联系地址 : 100083 北京科技大学8712信箱 98-3班 P.Y.W.收"
LOCATE 18, 15
PRINT "TEL : (010) 62394625"
LOCATE 19, 15
PRINT "E-mail : [email protected]"
pal
COLOR 15
LOCATE 11, 15
PRINT "内部测试版 V56.8"
COLOR 13
LOCATE 14, 15
PRINT "我们的故事暂时到此结束."
FOR i = 1 TO 45
PALETTE 15, 65535 * i + 256 * i + i
t = TIMER
pal
WHILE TIMER - t < .1: WEND
NEXT
FOR i = 1 TO 45
PALETTE 13, 65535 * i + 256 * i + i
t = TIMER
pal
WHILE TIMER - t < .1: WEND
NEXT
FOR i = 45 TO 1 STEP -1
PALETTE 13, 65535 * i + 256 * i + i
PALETTE 15, 65535 * i + 256 * i + i
t = TIMER
pal
WHILE TIMER - t < .05: WEND
NEXT
l(1) = 1: start(1) = 1
s(1) = "导演:这剧本谁写的?ss"
s(2) = "策划:不知道。ss"
CLS
toward = "right"
LOCATE 13, 2: PRINT "?"
rpgsay
clk
pal
CLS
PALETTE 15, 0
PALETTE 13, 0
COLOR 3
cc = 10
't
LINE (43, 71)-(73, 77), cc, BF
LINE (53, 77)-(63, 105), cc, BF
'o
'LOCATE 12, 12: PRINT "o"
FOR i = 5 TO 15
CIRCLE (91, 93), i, cc, , , 1.3
'CIRCLE (91, 93), 5, cc, , , 1.3
NEXT
'y
LINE (109, 80)-(118, 80), cc
LINE (109, 80)-(118, 105), cc
LINE (118, 105)-(110, 124), cc
LINE (118, 80)-(123, 95), cc
LINE (123, 95)-(129, 80), cc
LINE (128, 80)-(137, 80), cc
LINE (137, 80)-(119, 124), cc
LINE (119, 124)-(110, 124), cc
PAINT (111, 81), cc
's
'LOCATE 12, 20: PRINT "s"
LINE (140, 80)-(165, 106), cc, BF
LINE (149, 85)-(165, 90), 0, BF
LINE (140, 96)-(158, 100), 0, BF
'h
LINE (171, 65)-(178, 105), cc, BF
LINE (171, 82)-(195, 88), cc, BF
LINE (188, 88)-(195, 105), cc, BF
'o
'LOCATE 12, 28: PRINT "o"
FOR i = 5 TO 15
CIRCLE (217, 93), i, cc, , , 1.3
'CIRCLE (217, 93), 5, cc, , , 1.3
NEXT
'p
LINE (238, 80)-(265, 105), cc, BF
LINE (238, 80)-(245, 124), cc, BF
LINE (245, 87)-(258, 98), 0, BF
LINE (45, 125)-(259, 145), cc, BF
LOCATE 8, 7: COLOR 10: PRINT "s t u d i o"
LOCATE 9, 35: PRINT "PRESENT"
LOCATE 19, 50: PRINT " ART : G.W."
LOCATE 20, 50: PRINT "Program : P.Y.W.(FFB)"
LOCATE 21, 50: PRINT " Main : 1998.11-1999.2"
LOCATE 22, 48: PRINT "最后修改于1999年08月17日."
FOR toyi = 1 TO 42
PALETTE 15, 65535 * toyi + 256 * toyi + toyi
IF INKEY$ <> "" THEN toyi = 40
B = TIMER
WHILE TIMER - B < .01: WEND
NEXT
FOR i = 20 TO 0 STEP -1
PALETTE 0, 65536 * i + 256 * i + i
B = TIMER
WHILE TIMER - B < .01: WEND
NEXT
a$ = INPUT$(1)
FOR toyi = 52 TO 0 STEP -1
PALETTE 10, 65535 * toyi + 256 * toyi + toyi
B = TIMER
WHILE TIMER - B < .01: WEND
NEXT
CLS : END
END SUB
SUB findsth
LOCATE 22, 10: PRINT "发现" + Search
a$ = INPUT$(1)
LOCATE 22, 10: clr
find = false
END SUB
SUB initstore
addjin = 20
jin = 1
KEY 1, CHR$(27) + "马宇驰"
KEY 2, CHR$(27) + "曾昕宗"
KEY 3, CHR$(27) + "韩佳里"
KEY 4, CHR$(27) + "李洪志"
KEY 5, CHR$(27) + "希特勒"
KEY 6, CHR$(27) + "韦小宝"
KEY 7, CHR$(27) + "机器猫"
KEY 8, CHR$(27) + "野比"
KEY 9, CHR$(27) + "强夫"
KEY 10, CHR$(27) + "呆瓜"
pause = false
manname = "乐乐"
CLS
COLOR 3
LOCATE 9, 15
PRINT "主人公:";
COLOR 10
PRINT manname
COLOR 3
LOCATE 11, 15
PRINT "是否更改?(y/n)";
clk
a$ = INPUT$(1)
IF a$ = "y" OR a$ = "Y" THEN
DO
LOCATE 12, 15
INPUT "请输入姓名:", B$
IF LEN(B$) < 10 THEN EXIT DO
LOCATE 15, 1: PRINT "不合要求,人名应小于四个汉字."
LOOP
IF LEN(B$) >= 1 THEN manname = B$
END IF
SCREEN 12
PALETTE 7, 65536 * 60 + 256 * 60 + 60
PALETTE 14, 65535 * 40 + 256 * 40 + 40
FOR i = 1 TO 15
PALETTE i, 0
NEXT
display = true
COLOR 14 'name color
FOR i = 1 TO 99
action(i) = false '未发生 事件
act(i) = false '未发生 对话etc.
NEXT
' FOR cx = 0 TO 600 STEP 40
' LINE (cx, 0)-(cx, 320), 3
' NEXT
' FOR cy = 0 TO 320 STEP 40
' LINE (0, cy)-(600, cy), 3
' NEXT
'map=15x8 box=40x40
COLOR 14
'----------------------------------------------------men4
jin = jin + addjin: GOSUB add
FOR i = 10 TO 25: CIRCLE (20, 10), i, 6: NEXT
FOR i = 10 TO 23: CIRCLE (20, 12), i, 6: NEXT
FOR i = 1 TO 5: CIRCLE (6, 26), i, 0: NEXT
FOR i = 1 TO 3: CIRCLE (6, 28), i, 0: NEXT
FOR i = 1 TO 3: CIRCLE (6, 24), i, 0: NEXT
FOR i = 1 TO 5: CIRCLE (34, 26), i, 0: NEXT
FOR i = 1 TO 3: CIRCLE (34, 28), i, 0: NEXT
FOR i = 1 TO 3: CIRCLE (34, 24), i, 0: NEXT
LINE (0, 0)-(40, 24), 0, BF
FOR i = 1 TO 12: CIRCLE (20, 16), i, 7: NEXT
FOR i = 1 TO 10: CIRCLE (20, 14), i, 7: NEXT
FOR i = 1 TO 10: CIRCLE (20, 18), i, 7: NEXT
FOR i = 1 TO 12: CIRCLE (20, 0), i, 0: NEXT
FOR i = 1 TO 10: CIRCLE (20, 2), i, 0: NEXT
CIRCLE (20, 16), 12, 7: CIRCLE (26, 16), 2, 0, 1, 2
LINE (25, 18)-(26, 19), 0, B
CIRCLE (25, 27), 2, 0, 1.5, 2
LINE (19, 31)-(21, 33), 0, BF
CIRCLE (20, 32), 2, 7
CIRCLE (8, 35), 1, 7: CIRCLE (32, 35), 1, 7: CIRCLE (20, 37), 1, 7
LINE (13, 36)-(14, 37), 7, B: LINE (26, 36)-(27, 37), 7, B
CIRCLE (16, 20), 2, 0, -1.5, -.1
IF pause THEN a$ = INPUT$(1)
GET (1, 1)-(39, 39), man4
LINE (25, 18)-(26, 19), 7, B
LINE (24, 19)-(27, 19), 0, B
GET (1, 1)-(39, 39), autoMan4
'----------------------------------------------------men3
jin = jin + addjin: GOSUB add
FOR i = 10 TO 25: CIRCLE (20, 10), i, 6: NEXT
FOR i = 10 TO 23: CIRCLE (20, 12), i, 6: NEXT
FOR i = 1 TO 5: CIRCLE (6, 26), i, 0: NEXT
FOR i = 1 TO 3: CIRCLE (6, 28), i, 0: NEXT
FOR i = 1 TO 3: CIRCLE (6, 24), i, 0: NEXT
FOR i = 1 TO 5: CIRCLE (34, 26), i, 0: NEXT
FOR i = 1 TO 3: CIRCLE (34, 28), i, 0: NEXT
FOR i = 1 TO 3: CIRCLE (34, 24), i, 0: NEXT
LINE (0, 0)-(40, 24), 0, BF
FOR i = 1 TO 12: CIRCLE (20, 16), i, 7: NEXT
FOR i = 1 TO 10: CIRCLE (20, 14), i, 7: NEXT
FOR i = 1 TO 10: CIRCLE (20, 18), i, 7: NEXT
FOR i = 1 TO 12: CIRCLE (20, 0), i, 0: NEXT
FOR i = 1 TO 10: CIRCLE (20, 2), i, 0: NEXT
CIRCLE (20, 16), 12, 7: CIRCLE (14, 16), 2, 0, 1, 2: CIRCLE (15, 27), 2, 0, 1, 2
IF pause THEN a$ = INPUT$(1)
LINE (13, 18)-(14, 19), 0, B
LINE (19, 31)-(21, 33), 0, BF
IF pause THEN a$ = INPUT$(1)
CIRCLE (20, 32), 2, 7
CIRCLE (8, 35), 1, 7: CIRCLE (32, 35), 1, 7: CIRCLE (20, 37), 1, 7: CIRCLE (20, 16), 12, 7
LINE (13, 36)-(14, 37), 7, B: LINE (26, 36)-(27, 37), 7, B
CIRCLE (24, 20), 2, 0, -2, -1.5: PSET (22, 19), 15: PSET (23, 18), 7
PSET (23, 20), 0
GET (1, 1)-(39, 39), man3
LINE (13, 18)-(14, 19), 7, B
LINE (12, 19)-(15, 19), 0, B
GET (1, 1)-(39, 39), autoMan3
IF pause THEN a$ = INPUT$(1)
'----------------------------------------------------men1
jin = jin + addjin: GOSUB add
FOR i = 10 TO 25: CIRCLE (20, 10), i, 6: NEXT
FOR i = 10 TO 23: CIRCLE (20, 12), i, 6: NEXT
FOR i = 1 TO 5: CIRCLE (6, 26), i, 0: NEXT
FOR i = 1 TO 3: CIRCLE (6, 28), i, 0: NEXT
FOR i = 1 TO 3: CIRCLE (6, 24), i, 0: NEXT
FOR i = 1 TO 5: CIRCLE (34, 26), i, 0: NEXT
FOR i = 1 TO 3: CIRCLE (34, 28), i, 0: NEXT
FOR i = 1 TO 3: CIRCLE (34, 24), i, 0: NEXT
LINE (0, 0)-(40, 24), 0, BF
FOR i = 1 TO 12: CIRCLE (20, 16), i, 7: NEXT
FOR i = 1 TO 10: CIRCLE (20, 14), i, 7: NEXT
FOR i = 1 TO 10: CIRCLE (20, 18), i, 7: NEXT
FOR i = 1 TO 12: CIRCLE (20, 0), i, 0: NEXT
FOR i = 1 TO 10: CIRCLE (20, 2), i, 0: NEXT
CIRCLE (20, 16), 12, 7
CIRCLE (7, 27), 2, 7: CIRCLE (33, 27), 2, 7
CIRCLE (15, 36), 1, 7: CIRCLE (25, 36), 1, 7
GET (1, 1)-(39, 39), man1
IF pause THEN a$ = INPUT$(1)
'----------------------------------------------------men2
jin = jin + addjin: GOSUB add
FOR i = 10 TO 25: CIRCLE (20, 10), i, 6: NEXT
FOR i = 10 TO 23: CIRCLE (20, 12), i, 6: NEXT
FOR i = 1 TO 5: CIRCLE (6, 26), i, 0: NEXT
FOR i = 1 TO 3: CIRCLE (6, 28), i, 0: NEXT
FOR i = 1 TO 3: CIRCLE (6, 24), i, 0: NEXT
FOR i = 1 TO 5: CIRCLE (34, 26), i, 0: NEXT
FOR i = 1 TO 3: CIRCLE (34, 28), i, 0: NEXT
FOR i = 1 TO 3: CIRCLE (34, 24), i, 0: NEXT
LINE (0, 0)-(40, 24), 0, BF
FOR i = 1 TO 12: CIRCLE (20, 16), i, 7: NEXT
FOR i = 1 TO 10: CIRCLE (20, 14), i, 7: NEXT
FOR i = 1 TO 10: CIRCLE (20, 18), i, 7: NEXT
FOR i = 1 TO 12: CIRCLE (20, 0), i, 0: NEXT
FOR i = 1 TO 10: CIRCLE (20, 2), i, 0: NEXT
CIRCLE (20, 16), 12, 7: CIRCLE (16, 16), 2, 0, 1, 2: CIRCLE (24, 16), 2, 0, 1, 2
LINE (16, 18)-(17, 19), 0, B: LINE (23, 18)-(24, 19), 0, B
CIRCLE (20, 25), 2, 0, 1, 2
CIRCLE (7, 27), 2, 7: CIRCLE (33, 27), 2, 7
CIRCLE (15, 36), 1, 7: CIRCLE (25, 36), 1, 7
GET (1, 1)-(39, 39), man2
IF pause THEN a$ = INPUT$(1)
LINE (16, 18)-(17, 19), 7, B: LINE (23, 18)-(24, 19), 7, B
LINE (15, 19)-(18, 19), 0, B: LINE (22, 19)-(25, 19), 0, B
GET (1, 1)-(39, 39), autoMan2
CIRCLE (20, 25), 2, 7, 1, 2
CIRCLE (20, 25), 2, 0
LINE (18, 23)-(22, 25), 7, BF
GET (1, 1)-(39, 39), autoMan1
IF pause THEN a$ = INPUT$(1)
jin = jin + addjin: GOSUB add
c = 3
LINE (1, 14)-(5, 29), c, B
IF pause THEN a$ = INPUT$(1)
LINE (5, 10)-(32, 22), c, B
IF pause THEN a$ = INPUT$(1)
LINE (33, 14)-(37, 29), c, B
IF pause THEN a$ = INPUT$(1)
LINE (13, 0)-(23, 13), c, B
LINE (14, 10)-(22, 10), 0
LINE (8, 22)-(29, 37), c, B
LINE (15, 26)-(22, 37), c, B
LINE (16, 37)-(21, 37), 0
LINE (16, 11)-(20, 11), c
LINE (17, 7)-(19, 7), c
IF pause THEN a$ = INPUT$(1)
LINE (15, 13)-(22, 21), c, B
LINE (15, 11)-(10, 15), c
LINE (10, 15)-(15, 21), c
LINE (24, 13)-(26, 15), c
LINE (26, 15)-(22, 21), c
LINE (13, 1)-(23, 1), c
PSET (18, 6), c
CIRCLE (20, 4), 1, c
CIRCLE (16, 4), 1, c
GET (1, 1)-(39, 39), people1 'people 1
jin = jin + addjin: GOSUB add
PUT (1, 1), people1
'LOCATE 2, 1: PRINT "郭 巍"
GET (0, 0)-(40, 40), people1
jin = jin + addjin: GOSUB add
FOR i = 0 TO 19
CIRCLE (20, 20), i, 2
NEXT
FOR i = 1 TO 5
CIRCLE (10, 25), i, 1
NEXT
LINE (19, 1)-(21, 20), 7, BF
GET (1, 1)-(39, 39), people2 'people2
jin = jin + addjin: GOSUB add
LOCATE 2, 1: PRINT "顾 鹏"
CIRCLE (20, 20), 19, 6
FOR i = 1 TO 5
CIRCLE (30, 15), i, 2
NEXT
FOR i = 1 TO 5
CIRCLE (10, 15), i, 2
NEXT
GET (1, 1)-(39, 39), people3
IF pause THEN a$ = INPUT$(1)
jin = jin + addjin: GOSUB add ' 马松
LOCATE 2, 1: PRINT "马 松"
CIRCLE (20, 20), 19, 14
FOR i = 1 TO 5
CIRCLE (30, 15), i, 9
NEXT
FOR i = 1 TO 5
CIRCLE (10, 15), i, 9
NEXT
GET (1, 1)-(39, 39), people4 ' 马松
IF pause THEN a$ = INPUT$(1)
jin = jin + addjin: GOSUB add
' 仙人
FOR i = 1 TO 10
CIRCLE (20, 43), i, 10
NEXT
FOR i = 1 TO 14
CIRCLE (20, 22), i, 9
NEXT
CIRCLE (20, 22), 7, 3
FOR i = 1 TO 3
CIRCLE (15, 18), i, 7: CIRCLE (25, 18), i, 7: CIRCLE (20, 18), i, 7
CIRCLE (20, 23), i, 7: CIRCLE (18, 21), i, 7: CIRCLE (22, 21), i, 7
NEXT
CIRCLE (20, 13), 9, 10
FOR i = 1 TO 8
CIRCLE (20, 13), i, 0
NEXT
CIRCLE (17, 10), 2, 7, 1, 2: CIRCLE (23, 10), 2, 7, 1, 2: LINE (17, 11)-(18, 12), 14, B
LINE (22, 11)-(23, 12), 14, B: LINE (20, 24)-(20, 37), 7: LINE (19, 28)-(21, 29), 7, B
LINE (19, 33)-(21, 34), 7, B: CIRCLE (15, 28), 3, 0
FOR i = 1 TO 2