home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun 1989 March & April / rerun-1989-03-04.d64 / kidnapped (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  6KB  |  187 lines

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