home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Run Magazine ReRun 1989 March & April
/
rerun-1989-03-04.d64
/
kidnapped
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
6KB
|
187 lines
0 rem **** kidnapped ****
5 poke52,48:poke56,48:clr:poke53280,7:poke53281,3:goto815
10 print"[147]"
15 sx=1:sy=1:c=1:px=15:py=8:l1=18:l2=17:cc=1:ss=1:g=0:sp=54272
20 print"[144]"tab(39)d2$"[145]"
25 fori=1to40:poke1023+i,0:next:fori=0to23:poke1024+i*40,0:next
30 fori=1to40:poke1983+i,0:next:fori=0to21:poke1063+i*40,0:next:print""
35 printtab(20)"@"tab(36)"@":printtab(20)"@"tab(36)"@"
40 print"@@@@@@@ @@@@@@@@@ @ @@@@@ @@@@@@@"
45 printtab(3)"@ @"tab(23)"@@"tab(36)"@":printtab(3)"@ @"tab(23)"@@"tab(36)"@"
50 printtab(3)"@ @@@@@@@@@ @ @ @@ @@@@@@@"
55 printtab(17)"@ @ @@"tab(33)"@":printtab(17)"@@@@ @@"tab(33)"@ @"
60 printtab(3)"@@@@@@@@@@@@ @ @ @@@@@@@@@@@ @"
65 printtab(3)"@"tab(17)"@ @ @@@@@@@@@@@ @@@"
70 printtab(3)"@"tab(20)"@"tab(33)"@ @":printtab(3)"@@@@@@@@@@@@";
75 printtab(20)"@"tab(33)"@ @":printtab(17)"@@@@@@@@@@@@@@@@@@@@"
80 printtab(22)"@ @@@@@ @ @@":printtab(3)"@@@ @@@ @"tab(22)"@ @@@@@ @"
85 printtab(5)"@"tab(10)"@ @ @@@@@@@"tab(32)"@":printtab(5)"@"tab(10)"@ @";
90 printtab(16)"@@"tab(32)"@@@@@":printtab(3)"@@@@@@@@ @@@@@"tab(26)"@@@@"
95 printtab(8)"@"tab(20)"@@@@ @":printtab(8)"@"tab(20)"@@@@ @"tab(32)"@@@@@@@"
100 printtab(3)"@@@@@@@@@@@@@@ @@@@ @ @ @@@@@@@"
105 printtab(13)"@"tab(23)"@ @ @":print"[145]"spc(13)"@"spc(9)"@ @ @"
110 print""d1$:print"[149]"tab(31)d2$:print"[156]"tab(31);d2$;spc(5)""d1$
115 print""tab(20)d2$:printtab(8)"[158]"d2$:poke1024+sx+sy*40,61
120 ifn=3thenpoke1024+l1+l2*40,33
125 ifn>1thenpoke1024+px+py*40,33
130 fors=1to6:a(s)=int(6*rnd(9)+1):ifs=1then150
135 ifs=6then155
140 fork=1tos-1:ifa(k)=a(s)thenk=1:goto130
145 nextk
150 nexts
155 fori=1toll:print"[159]":ifa(i)=1thenprint"="
160 ifa(i)=2thenprint""tab(32)"="
165 ifa(i)=3thenprint""tab(32)"="
170 ifa(i)=4thenprint""tab(21)"="
175 ifa(i)=5thenprint""tab(37)"="
180 ifa(i)=6thenprint""tab(9)"="
185 nexti:forrd=1to7
190 pl=int(1000*rnd(1))+1:pp=pl+1024:pw=peek(pp)
195 ifpw=0orpw=63orpw=62orpw=61orpw=33then190
200 poke55296+pl,7:poke1024+pl,60:nextrd
205 foraa=1tom
210 pl=int(1000*rnd(1))+1:pp=pl+1024:pw=peek(pp)
215 ifpw=0orpw=63orpw=62orpw=61orpw=60orpw=33then210
220 a(aa)=pp:ifaa=1then235
225 fori=1toaa-1:ifabs(a(aa)-a(i))<42then210
230 nexti
235 poke55296+pl,1:poke1024+pl,33:nextaa:ti$="000000"
240 ifn>1thenpoke1024+px+py*40,33
245 goto415
250 ifz>0andz<3then270
255 ifz=3thenz=0
260 po=int(6*rnd(1)+1):ifpo=5thenpo=3
265 ifpo=6thenpo=4
270 x1=px:y1=py:ifpo=1thenpy=py+1
275 ifpo=2thenpy=py-1
280 ifpo=3thenpx=px+1
285 ifpo=4thenpx=px-1
290 p=1024+px+py*40:ch=peek(p):ifch=61then590
295 ifch=0orch=33orch=60orch=62orch=63then310
300 poke1024+x1+y1*40,32:z=z+1:goto240
305 goto240
310 z=0:py=y1:px=x1:goto240
315 poke1024+l1+l2*40,33
320 goto415
325 x2=l1:y2=l2:ifcc=1thenl1=l1+1
330 ifcc=2thenl1=l1-1
335 ifcc=3thenl2=l2+1
340 ifcc=4thenl2=l2-1
345 p=1024+l1+l2*40:ch=peek(p):ifp=1735andcc=1thencc=3:goto365
350 ifp=1735andcc=4thencc=2:goto365
355 ifch=61then590
360 ifch=0orch=33orch=60orch=62orch=63then370
365 poke1024+x2+y2*40,32:goto315
370 l1=x2:l2=y2:ifcc=1thencc=2:goto320
375 ifcc=2thencc=1:goto320
380 ifcc=3thencc=4:goto320
385 ifcc=4thencc=3:goto320
390 poke1024+sx+sy*40,61
395 ifn=2then250
400 ifn=3andss=1thenss=2:goto325
405 ifn=3andss=2thenss=1:goto250
410 fori=1to120:next
415 s2=sx:s3=sy:ifti$>"000200"then610
420 s=peek(56320):ff=sand16:s=15-(sand15):ifff=16then430
425 goto495
430 ifs=1thensy=sy-1:goto465
440 ifs=8thensx=sx+1:goto465
445 ifs=2thensy=sy+1:goto465
450 ifs=4thensx=sx-1:goto465
455 ifn<>1then395
460 goto415
465 p=1024+sx+sy*40:ch=peek(p):ifch=33then590
470 ifch=63orch=62orch=0then490
475 ifch=60then555
480 ifch=61then565
485 poke1024+s2+s3*40,32:goto390
490 sx=s2:sy=s3:goto390
495 ifk<>1then390
500 k=0:b=1024+sx+1+sy*40:bu=1024+sx+(sy-1)*40
505 ifb=1943orb=1983then625
510 ifpeek(bu)=63then535
515 ifpeek(b)=62thengoto525
520 k=1:goto490
525 b1=b-40:ifpeek(b1)<>62thenb1=b+40
530 c1=b-1024+1:c2=b1-1024+1:goto545
535 b1=bu+1:ifpeek(b1)<>63thenb1=bu-1
540 b=bu:c1=b-1024-40:c2=b1-1024-40
545 pokeb,32:pokeb1,32:poke55296+c1,0:poke55296+c2,0
550 poke55296+(b-1024),0:poke55296+(b1-1024),0:goto390
555 ifk=1then490
560 poke55296+sx+sy*40,0:k=1:goto485
565 g=g+1:poke1024+sx+sy*40,32:poke55296+c1,0:poke55296+c2,0
570 poke1024+s2+s3*40,32:poke1024+sx+sy*40,61:gosub880:goto485
575 fori=1to2000:next:return
580 geti$:ifi$=""then580
585 return
590 poke1024+s2+s3*40,32:gosub900
595 print"[147]oh, no. you got caught by"
600 print"one of these : !"
605 gosub575:goto690
610 gosub900:gosub930
615 print"[147]oh, no. you ran out of time,"
620 print"and the maze blew up.":goto605
625 ifn=1andg=3then645
630 ifn=2andg=4then645
635 ifn=3andg=5then645
640 k=1:goto490
645 ma=ma+1:gosub880:ifn=3andma>5then705
650 ifma>5then665
655 printtab"[147]"tab(8)"[144]good job. you will now"
660 printtab(10)"enter maze number";ma:gosub575:goto10
665 printtab"[147]"tab(4)" good job. you have finished"
670 printtab(4)"all of the mazes in this level."
675 ifn=1thenn=2:a$="intermediate":goto685
680 ifn=2thenn=3:a$="advanced":goto685
685 print"[144]entering the "a$" level ...":gosub575:goto810
690 print"[147]would you like to play again (y/n)":gosub580
695 ifi$<>"y"then715
700 goto775
705 print"[147]"tab(1)"good job. you have solved every level."
710 gosub575:goto690
715 printtab(14)"** game over **":end
720 print"[147][144]"tab(13)"please wait ..."
725 poke56334,peek(56334)and254:poke1,peek(1)and251
730 fori=0to511:pokei+12288,peek(i+53248):next
735 fori=12288to12288+7:gosub755:next:fori=12768to12768+31:gosub755:next
740 fori=12552to12552+7:gosub755:next
745 poke1,peek(1)or4:poke56334,peek(56334)or1:poke53272,peek(53272)and240or12
750 d1$="??":d2$=">[157]>":goto775
755 readj:pokei,j:return:data0,126,126,126,126,126,126,0
760 data56,32,56,32,32,60,36,60:data60,60,24,255,60,60,102,102
765 data28,28,28,127,127,28,28,28:data24,24,255,255,255,24,24,0
770 data60,66,153,153,66,60,102,195
775 print"[147]choose the level of difficulty:"
780 print""tab(6)"(1) [144]beginner"
785 print""tab(6)"(2) [144]intermediate":print""tab(6)"(3) [144]advanced"
790 gosub580:n=val(i$):ifn>3orn<1then790
795 ifn=1thenll=3:m=6
800 ifn=2thenll=4:m=8
805 ifn=3thenll=5:m=10
810 ma=1:printtab"[147]"tab(8)"[144]well, kid, you will now":goto660
815 print"[147]"
820 printtab(15)"[145]kidnapped":printtab(15)"[145][146]kidnapped"
825 printtab(15)"[145]kidnapped":w=w+1:ifw<50then820
830 print"your friends have been kidnapped by
835 [153]"some aliens from another planet. you
840 print"must find them in the maze. depress
845 [153]"the button (have key) to open doors.
850 print"when you find all of your friends,
855 [153]"exit at the black door. you get 2 min.
860 printtab(7)"[144]watch out for the aliens.
865 [153][163]18)"good luck, kid."
870 [153]"stoppress any key ...
875 gosub580:goto720
880 fori=0to22:pokesp+1,0:next
885 pokesp+24,143:pokesp+5,16:pokesp+19,16:pokesp+6,252:pokesp+20,249
890 pokesp+4,21:pokesp+18,17:pokesp+1,68:pokesp+15,42:fori=1to200:next
895 pokesp+4,20:pokesp+18,16:fori=1to400:next:return
900 fori=1to22:pokesp+i,0:nexti
910 pokesp+24,15:pokesp+5,80:pokesp+12,160:pokesp+6,255:pokesp+13,252
915 pokesp+4,17:pokesp+4,16:fori=255to50step-1:poke54273,i:forj=1to5:next:next
920 pokesp+1,10:pokesp+8,1:pokesp+5,112:pokesp+6,252:pokesp+4,129:pokesp+11,129
925 fori=1to200:next:pokesp+4,128:pokesp+11,128:return
930 fori=1to15:forii=1to15:poke53280,i:poke53281,ii:nextii:nexti
935 poke53280,7:poke53281,3:return