Advertisement
jaskiniaprawiczka

Untitled

Mar 14th, 2019
1,117
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 2 FOR L=54272TO54296:POKEL,0:NEXT
  2. 3 POKE54296,15:POKE54277,190:POKE54289,248
  3.  
  4. 7 DIM WX%(62), WY%(62), WC%(62), WH%(62):DIM CO%(3):CO%(1)=0:CO%(2)=7:CO%(3)=13
  5. 8 DIM LO%(3):LO%(0)=83:LO%(1)=32:LO%(2)=81:LO%(3)=81:LV%=1:X=RND(-TI):PC%=1
  6.  
  7. 9 GOTO 9500
  8.  
  9. 10 REM INICJALIZACJA WARTOSCI I PLANSZY
  10. 11 PX%=20:PY%=12:ZN%=211:ST%=0:PF%=0
  11. 12 WL%=3*LV%+2:WS%=5:WR%=WL%
  12. 13 XS%=0:YS%=0:XE%=0:YE%=0
  13.  
  14. 15 PRINT CHR$(147)
  15. 20 XS%=0:YS%=20:XE%=39:YE%=24:GOSUB9200
  16. 25 FOR I=1 TO 5
  17. 26 POKE 1026+I+22*40,83:
  18. 27 T1%=4: IF(I>EN%) THEN T1%=14
  19. 28 POKE 55298+I+22*40,4
  20. 29 NEXT I
  21.  
  22. 30 POKE781,22:POKE782,16:POKE 783,0:SYS65520:?"LEVEL"LV%
  23. 40 FOR I=1 TO 10
  24. 45 POKE 55333-I+22*40,1
  25. 50 T1%=32:IF (I <= BL%) THEN T1%=87
  26. 52 POKE 1061-I+22*40,T1%
  27. 55 NEXT I
  28.  
  29.  
  30.  
  31. 59 REM SKRZYNIE
  32. 60 FOR I=0 TO 10
  33. 61 TX%=INT(RND(1)*40):TY%=INT(RND(1)*20)
  34. 62 ZN%=35:CL%=2:GOSUB9001
  35. 63 NEXT
  36.  
  37. 64 REM WILKI
  38. 65 T1%=0:T2%=WR%:T3%=94:T4%=1:GOSUB 9009
  39. 75 FOR I=0 TO WR%
  40. 80 POKE 1024+WX%(I)+WY%(I)*40,WC%(I)
  41. 81 POKE 55296+WX%(I)+WY%(I)*40,CO%(WH%(I))
  42. 85 NEXT I
  43. 87 ZN%=38:CL%=PC%:GOSUB 9000
  44.  
  45. 99 REM POCZATEK PETLI GRY
  46.  
  47. 100 IF ST%=1 GOTO 10
  48. 110 IF ST%=255 GOTO 9610
  49. 115 TX%=PX%:TY%=PY%:XX%=PX%:XY%=PY%
  50. 120 T1%=PEEK(56321):IF T1%=255 THEN 120
  51. 130 IF (T1% AND 1)=0 THEN GOSUB 9100:GOTO250
  52. 140 IF (T1% AND 2)=0 THEN GOSUB 9110:GOTO250
  53. 150 IF (T1% AND 4)=0 THEN GOSUB 9120:GOTO250
  54. 160 IF (T1% AND 8)=0 THEN GOSUB 9130:GOTO250
  55. 170 IF (T1% AND 16)=0 THEN PF%=NOT(PF%):ZN%=38:CL%=PC%-PF%:GOSUB9000:GOTO 100
  56.  
  57. 250 A%=PEEK(1024+TX%+TY%*40)
  58. 260 IF A%=32 THEN 295
  59. 265 IF A%=87 THEN 296
  60.  
  61. 270 GOSUB9300
  62. 275 IF A%=35 THEN ZN%=LO%(INT(RND(1)*4)):CL%=5:GOSUB9001:GOTO310
  63. 276 IF A%=83 AND EN%<5 THEN EN%=EN%+1:GOSUB9330:GOTO295
  64. 277 IF A%=81 AND BL%<10 THEN BL%=BL%+1:GOSUB9400:GOTO295
  65. 279 IF A%=94 THEN WC%(WI%)=32:ZN%=32:GOSUB9001:GOSUB2100:GOSUB5050:GOTO 310
  66.  
  67. 295 IF PF%=0 THEN ZN%=32:GOSUB9000:PX%=TX%:PY%=TY%:GOTO300
  68. 296 IF PF%=0 THEN GOTO310
  69. 297 IF A%=32 AND BL%>0 THEN ZN%=87:CL%=1:BL%=BL%-1:GOTO299
  70. 298 ZN%=32:BL%=BL%+1
  71. 299 GOSUB9001:PF%=0:GOSUB9400
  72.  
  73.  
  74. 300 ZN%=38:CL%=PC%-PF%:GOSUB9000
  75.  
  76. 309 REM LOGIKA/RUCH KOMPUTEROWYCH POSTACI
  77.  
  78.  
  79. 310 FOR I=0 TO WR%
  80. 315 IF WC%(I)=94 THEN I%=I:GOSUB7001
  81. 330 NEXT I
  82.  
  83. 350 GOSUB 9330
  84.  
  85. 1000 GOTO 100
  86.  
  87. 2000 REM DZWIEKI
  88. 2100 POKE54273,17:POKE54272,37:POKE54276,17
  89. 2110 FORI=1TO250:NEXT
  90. 2120 POKE 54276,16
  91. 2130 RETURN
  92.  
  93. 5049 REM CZY KONIEC ETAPU? JAK TAK ZRESETUJ I ZWIEKSZ LEVEL
  94. 5050 WL%=WL%-1:IF WL%<0 THEN LV%=LV%+1:ST%=1
  95. 5051 RETURN
  96.  
  97. 6999 REM SUBRUTYNKI KOMPUTEROWYCH POSTACI
  98. 7000 REM SUBRUTYNKA PIESKA (CHARACTER 94)
  99. 7001 TX%=WX%(I%):TY%=WY%(I%):GOSUB8000:IF SS%=1 THEN RETURN
  100. 7002 IF TX%=PX% THEN GOTO 7050
  101. 7003 IF TX%>PX% THEN TX%=TX%-1:GOTO 7005
  102. 7004 TX%=TX%+1
  103. 7005 A%=PEEK(1024+TX%+TY%*40)
  104. 7006 IF A%=35 OR A%=94 OR A%=87 THEN TX%=WX%(I%):GOTO 7050
  105. 7050 IF TY%=PY% THEN GOTO 7080
  106. 7055 IF TY%>PY% THEN TY%=TY%-1:GOTO 7070
  107. 7060 TY%=TY%+1
  108. 7070 A%=PEEK(1024+TX%+TY%*40)
  109. 7075 IF A%=35 OR A%=94 OR A%=87 OR A%=38 THEN TY%=WY%(I%):GOTO 7080
  110. 7080 ZN%=32:GOSUB 9002:ZN%=94:WX%(I%)=TX%:WY%(I%)=TY%:CL%=CO%(WH%(I%)):GOSUB9001
  111. 7099 RETURN
  112.  
  113.  
  114. 7999 REM PROCEDURA SPRAWDZANIE CZY MOGE UGRYZC
  115. 8000 SS%=0
  116. 8001 A%=PEEK(1025+TX%+TY%*40):IF A%=38 THEN 8005
  117. 8002 A%=PEEK(1023+TX%+TY%*40):IF A%=38 THEN 8005
  118. 8003 A%=PEEK(1024+TX%+(TY%+1)*40):IF A%=38 THEN 8005
  119. 8004 A%=PEEK(1024+TX%+(TY%-1)*40):IF A%<>38 THEN RETURN
  120. 8005 EN%=EN%-1:GOSUB2100:GOSUB8100:SS%=1:RETURN
  121.  
  122. 8100 IF EN%>0 OR ST%=255 THEN RETURN
  123. 8110 ST%=255:ZN%=88:CL%=15:GOSUB9000:EN%=0
  124. 8130 RETURN
  125.  
  126. 8999 REM SUBRUTYNKI UZYTKOWE
  127. 9000 POKE 1024+PX%+PY%*40,ZN%:POKE 55296+PX%+PY%*40,CL%:RETURN
  128. 9001 POKE 1024+TX%+TY%*40,ZN%:POKE 55296+TX%+TY%*40,CL%:RETURN
  129. 9002 POKE 1024+WX%(I%)+WY%(I%)*40,ZN%:POKE 55296+WX%(I%)+WY%(I%)*40,CL%:RETURN
  130. 9003 POKE 1024+XX%+XY%*40,ZN%:POKE 1024+XX%+XY%*40,CL%:RETURN
  131.  
  132. 9009 REM PROCEDURA DO GENEROWANIA WROGOW
  133. 9010 FOR I=T1% TO T2%
  134. 9020 WX%(I)=INT(RND(1)*40)
  135. 9030 WY%(I)=INT(RND(1)*19)
  136. 9040 IF PX%=WX%(I) AND PY%=WX%(I) THEN GOTO 9020
  137. 9041 IF I=0 THEN 9050
  138. 9042 FOR J=0 TO I-1
  139. 9043 IF WX%(J)=WX%(I) AND WY%(J)=WY%(I) THEN GOTO 9020
  140. 9045 NEXT J
  141. 9050 WC%(I)=T3%:WH%(I)=T4%
  142. 9060 NEXT I
  143. 9070 RETURN
  144.  
  145. 9100 TY%=TY%-1:IF TY%<0 THEN TY%=0
  146. 9101 RETURN
  147. 9110 TY%=TY%+1:IF TY%>18 THEN TY%=18
  148. 9111 RETURN
  149. 9120 TX%=TX%-1:IF TX%<0 THEN TX%=0
  150. 9121 RETURN
  151. 9130 TX%=TX%+1:IF TX%>39 THEN TX%=39
  152. 9131 RETURN
  153.  
  154. 9200 POKE 1024+XS%+YS%*40,213:POKE 1024+XE%+YS%*40,201
  155. 9201 POKE 1024+XS%+YE%*40,202:POKE 1024+XE%+YE%*40,203
  156. 9202 FOR X=XS%+1 TO XE%-1 STEP 1
  157. 9203 POKE 1024+X+YE%*40,192
  158. 9204 POKE 1024+X+YS%*40,192
  159. 9205 NEXT X
  160. 9210 FOR Y=YS%+1 TO YE%-1 STEP 1
  161. 9211 POKE 1024+XS%+Y*40,221:POKE 1024+XE%+Y*40,221
  162. 9212 NEXT Y
  163. 9250 RETURN
  164.  
  165. 9299 REM SPRAWDZANIE CZY NA POLU JEST COS
  166. 9300 WI%=127
  167. 9301 FOR I=0 TO WR%
  168. 9302 IF WX%(I)=TX% AND WY%(I)=TY% THEN WI%=I:GOTO 9305
  169. 9303 NEXT I
  170. 9305 RETURN
  171.  
  172.  
  173. 9330 FOR I=1 TO 5
  174. 9335 T1%=4: IF(I > EN%) THEN T1%=14
  175. 9345 POKE 55298+I+22*40,T1%
  176. 9350 NEXT
  177. 9355 RETURN
  178.  
  179. 9400 FOR I=1 TO 10
  180. 9405 T1%=32:IF (I <= BL%) THEN T1%=87
  181. 9410 POKE 1061-I+22*40,T1%
  182. 9415 NEXT
  183. 9420 RETURN
  184.  
  185. 9500 REM MINI PETLA TITLE SCREENA
  186. 9510 PRINT CHR$(147)
  187. 9520 POKE781,7:POKE782,12:POKE 783,0:SYS65520:?"TURBO PASTERZ"
  188. 9530 POKE781,20:POKE782,7:POKE 783,0:SYS65520
  189. 9540 IF T1%<10 THEN ?"WCISNIJ FIRE, ZEBY ZACZAC":T1%=T1%+1:GOTO9560
  190. 9550 ?"                         ":T1%=T1%+1:IF T1%>19 THEN T1%=0
  191. 9560 J%=PEEK(56321):IF J%=255 THEN 9530
  192. 9570 IF (J% AND 16) <> 0 THEN 9530
  193. 9580 LV%=1:BL%=3:EN%=5:GOTO 10
  194.  
  195. 9600 REM MINI PETLA SMIERCI
  196. 9610 POKE781,7:POKE782,11:POKE 783,0:SYS65520:?"WILKI CIE ZJADLY!"
  197. 9620 POKE781,18:POKE782,12:POKE 783,0:SYS65520
  198. 9630 IF T1%<10 THEN ?"WCISNIJ FIRE":T1%=T1%+1:GOTO9660
  199. 9650 ?"                 ":T1%=T1%+1:IF T1%>19 THEN T1%=0
  200. 9660 J%=PEEK(56321):IF J%=255 THEN 9620
  201. 9670 IF (J% AND 16) <> 0 THEN 9620
  202. 9680 GOTO 9510
Advertisement
RAW Paste Data Copied
Advertisement