Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2 FOR L=54272TO54296:POKEL,0:NEXT
- 3 POKE54296,15:POKE54277,190:POKE54289,248
- 7 DIM WX%(62), WY%(62), WC%(62), WH%(62):DIM CO%(3):CO%(1)=0:CO%(2)=7:CO%(3)=13
- 8 DIM LO%(3):LO%(0)=83:LO%(1)=32:LO%(2)=81:LO%(3)=81:LV%=1:X=RND(-TI):PC%=1
- 9 GOTO 9500
- 10 REM INICJALIZACJA WARTOSCI I PLANSZY
- 11 PX%=20:PY%=12:ZN%=211:ST%=0:PF%=0
- 12 WL%=3*LV%+2:WS%=5:WR%=WL%
- 13 XS%=0:YS%=0:XE%=0:YE%=0
- 15 PRINT CHR$(147)
- 20 XS%=0:YS%=20:XE%=39:YE%=24:GOSUB9200
- 25 FOR I=1 TO 5
- 26 POKE 1026+I+22*40,83:
- 27 T1%=4: IF(I>EN%) THEN T1%=14
- 28 POKE 55298+I+22*40,4
- 29 NEXT I
- 30 POKE781,22:POKE782,16:POKE 783,0:SYS65520:?"LEVEL"LV%
- 40 FOR I=1 TO 10
- 45 POKE 55333-I+22*40,1
- 50 T1%=32:IF (I <= BL%) THEN T1%=87
- 52 POKE 1061-I+22*40,T1%
- 55 NEXT I
- 59 REM SKRZYNIE
- 60 FOR I=0 TO 10
- 61 TX%=INT(RND(1)*40):TY%=INT(RND(1)*20)
- 62 ZN%=35:CL%=2:GOSUB9001
- 63 NEXT
- 64 REM WILKI
- 65 T1%=0:T2%=WR%:T3%=94:T4%=1:GOSUB 9009
- 75 FOR I=0 TO WR%
- 80 POKE 1024+WX%(I)+WY%(I)*40,WC%(I)
- 81 POKE 55296+WX%(I)+WY%(I)*40,CO%(WH%(I))
- 85 NEXT I
- 87 ZN%=38:CL%=PC%:GOSUB 9000
- 99 REM POCZATEK PETLI GRY
- 100 IF ST%=1 GOTO 10
- 110 IF ST%=255 GOTO 9610
- 115 TX%=PX%:TY%=PY%:XX%=PX%:XY%=PY%
- 120 T1%=PEEK(56321):IF T1%=255 THEN 120
- 130 IF (T1% AND 1)=0 THEN GOSUB 9100:GOTO250
- 140 IF (T1% AND 2)=0 THEN GOSUB 9110:GOTO250
- 150 IF (T1% AND 4)=0 THEN GOSUB 9120:GOTO250
- 160 IF (T1% AND 8)=0 THEN GOSUB 9130:GOTO250
- 170 IF (T1% AND 16)=0 THEN PF%=NOT(PF%):ZN%=38:CL%=PC%-PF%:GOSUB9000:GOTO 100
- 250 A%=PEEK(1024+TX%+TY%*40)
- 260 IF A%=32 THEN 295
- 265 IF A%=87 THEN 296
- 270 GOSUB9300
- 275 IF A%=35 THEN ZN%=LO%(INT(RND(1)*4)):CL%=5:GOSUB9001:GOTO310
- 276 IF A%=83 AND EN%<5 THEN EN%=EN%+1:GOSUB9330:GOTO295
- 277 IF A%=81 AND BL%<10 THEN BL%=BL%+1:GOSUB9400:GOTO295
- 279 IF A%=94 THEN WC%(WI%)=32:ZN%=32:GOSUB9001:GOSUB2100:GOSUB5050:GOTO 310
- 295 IF PF%=0 THEN ZN%=32:GOSUB9000:PX%=TX%:PY%=TY%:GOTO300
- 296 IF PF%=0 THEN GOTO310
- 297 IF A%=32 AND BL%>0 THEN ZN%=87:CL%=1:BL%=BL%-1:GOTO299
- 298 ZN%=32:BL%=BL%+1
- 299 GOSUB9001:PF%=0:GOSUB9400
- 300 ZN%=38:CL%=PC%-PF%:GOSUB9000
- 309 REM LOGIKA/RUCH KOMPUTEROWYCH POSTACI
- 310 FOR I=0 TO WR%
- 315 IF WC%(I)=94 THEN I%=I:GOSUB7001
- 330 NEXT I
- 350 GOSUB 9330
- 1000 GOTO 100
- 2000 REM DZWIEKI
- 2100 POKE54273,17:POKE54272,37:POKE54276,17
- 2110 FORI=1TO250:NEXT
- 2120 POKE 54276,16
- 2130 RETURN
- 5049 REM CZY KONIEC ETAPU? JAK TAK ZRESETUJ I ZWIEKSZ LEVEL
- 5050 WL%=WL%-1:IF WL%<0 THEN LV%=LV%+1:ST%=1
- 5051 RETURN
- 6999 REM SUBRUTYNKI KOMPUTEROWYCH POSTACI
- 7000 REM SUBRUTYNKA PIESKA (CHARACTER 94)
- 7001 TX%=WX%(I%):TY%=WY%(I%):GOSUB8000:IF SS%=1 THEN RETURN
- 7002 IF TX%=PX% THEN GOTO 7050
- 7003 IF TX%>PX% THEN TX%=TX%-1:GOTO 7005
- 7004 TX%=TX%+1
- 7005 A%=PEEK(1024+TX%+TY%*40)
- 7006 IF A%=35 OR A%=94 OR A%=87 THEN TX%=WX%(I%):GOTO 7050
- 7050 IF TY%=PY% THEN GOTO 7080
- 7055 IF TY%>PY% THEN TY%=TY%-1:GOTO 7070
- 7060 TY%=TY%+1
- 7070 A%=PEEK(1024+TX%+TY%*40)
- 7075 IF A%=35 OR A%=94 OR A%=87 OR A%=38 THEN TY%=WY%(I%):GOTO 7080
- 7080 ZN%=32:GOSUB 9002:ZN%=94:WX%(I%)=TX%:WY%(I%)=TY%:CL%=CO%(WH%(I%)):GOSUB9001
- 7099 RETURN
- 7999 REM PROCEDURA SPRAWDZANIE CZY MOGE UGRYZC
- 8000 SS%=0
- 8001 A%=PEEK(1025+TX%+TY%*40):IF A%=38 THEN 8005
- 8002 A%=PEEK(1023+TX%+TY%*40):IF A%=38 THEN 8005
- 8003 A%=PEEK(1024+TX%+(TY%+1)*40):IF A%=38 THEN 8005
- 8004 A%=PEEK(1024+TX%+(TY%-1)*40):IF A%<>38 THEN RETURN
- 8005 EN%=EN%-1:GOSUB2100:GOSUB8100:SS%=1:RETURN
- 8100 IF EN%>0 OR ST%=255 THEN RETURN
- 8110 ST%=255:ZN%=88:CL%=15:GOSUB9000:EN%=0
- 8130 RETURN
- 8999 REM SUBRUTYNKI UZYTKOWE
- 9000 POKE 1024+PX%+PY%*40,ZN%:POKE 55296+PX%+PY%*40,CL%:RETURN
- 9001 POKE 1024+TX%+TY%*40,ZN%:POKE 55296+TX%+TY%*40,CL%:RETURN
- 9002 POKE 1024+WX%(I%)+WY%(I%)*40,ZN%:POKE 55296+WX%(I%)+WY%(I%)*40,CL%:RETURN
- 9003 POKE 1024+XX%+XY%*40,ZN%:POKE 1024+XX%+XY%*40,CL%:RETURN
- 9009 REM PROCEDURA DO GENEROWANIA WROGOW
- 9010 FOR I=T1% TO T2%
- 9020 WX%(I)=INT(RND(1)*40)
- 9030 WY%(I)=INT(RND(1)*19)
- 9040 IF PX%=WX%(I) AND PY%=WX%(I) THEN GOTO 9020
- 9041 IF I=0 THEN 9050
- 9042 FOR J=0 TO I-1
- 9043 IF WX%(J)=WX%(I) AND WY%(J)=WY%(I) THEN GOTO 9020
- 9045 NEXT J
- 9050 WC%(I)=T3%:WH%(I)=T4%
- 9060 NEXT I
- 9070 RETURN
- 9100 TY%=TY%-1:IF TY%<0 THEN TY%=0
- 9101 RETURN
- 9110 TY%=TY%+1:IF TY%>18 THEN TY%=18
- 9111 RETURN
- 9120 TX%=TX%-1:IF TX%<0 THEN TX%=0
- 9121 RETURN
- 9130 TX%=TX%+1:IF TX%>39 THEN TX%=39
- 9131 RETURN
- 9200 POKE 1024+XS%+YS%*40,213:POKE 1024+XE%+YS%*40,201
- 9201 POKE 1024+XS%+YE%*40,202:POKE 1024+XE%+YE%*40,203
- 9202 FOR X=XS%+1 TO XE%-1 STEP 1
- 9203 POKE 1024+X+YE%*40,192
- 9204 POKE 1024+X+YS%*40,192
- 9205 NEXT X
- 9210 FOR Y=YS%+1 TO YE%-1 STEP 1
- 9211 POKE 1024+XS%+Y*40,221:POKE 1024+XE%+Y*40,221
- 9212 NEXT Y
- 9250 RETURN
- 9299 REM SPRAWDZANIE CZY NA POLU JEST COS
- 9300 WI%=127
- 9301 FOR I=0 TO WR%
- 9302 IF WX%(I)=TX% AND WY%(I)=TY% THEN WI%=I:GOTO 9305
- 9303 NEXT I
- 9305 RETURN
- 9330 FOR I=1 TO 5
- 9335 T1%=4: IF(I > EN%) THEN T1%=14
- 9345 POKE 55298+I+22*40,T1%
- 9350 NEXT
- 9355 RETURN
- 9400 FOR I=1 TO 10
- 9405 T1%=32:IF (I <= BL%) THEN T1%=87
- 9410 POKE 1061-I+22*40,T1%
- 9415 NEXT
- 9420 RETURN
- 9500 REM MINI PETLA TITLE SCREENA
- 9510 PRINT CHR$(147)
- 9520 POKE781,7:POKE782,12:POKE 783,0:SYS65520:?"TURBO PASTERZ"
- 9530 POKE781,20:POKE782,7:POKE 783,0:SYS65520
- 9540 IF T1%<10 THEN ?"WCISNIJ FIRE, ZEBY ZACZAC":T1%=T1%+1:GOTO9560
- 9550 ?" ":T1%=T1%+1:IF T1%>19 THEN T1%=0
- 9560 J%=PEEK(56321):IF J%=255 THEN 9530
- 9570 IF (J% AND 16) <> 0 THEN 9530
- 9580 LV%=1:BL%=3:EN%=5:GOTO 10
- 9600 REM MINI PETLA SMIERCI
- 9610 POKE781,7:POKE782,11:POKE 783,0:SYS65520:?"WILKI CIE ZJADLY!"
- 9620 POKE781,18:POKE782,12:POKE 783,0:SYS65520
- 9630 IF T1%<10 THEN ?"WCISNIJ FIRE":T1%=T1%+1:GOTO9660
- 9650 ?" ":T1%=T1%+1:IF T1%>19 THEN T1%=0
- 9660 J%=PEEK(56321):IF J%=255 THEN 9620
- 9670 IF (J% AND 16) <> 0 THEN 9620
- 9680 GOTO 9510
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement