Advertisement
felixnardella

Bomber

Jul 23rd, 2020
454
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. 10 vo=54296:pi=54273
  2. 20 de=54277:ga=54276
  3. 30 ba=53281:br=53280
  4. 40 pokevo,15:pokede,15
  5. 50 pokeba,14:pokebr,5
  6. 60 print"{clear}" , " bomber"
  7. 70 rem visualizza grattacieli
  8. 80 sc=1024:rem indirizzo schermo
  9. 90 for co = 0 to 39
  10. 100 bu=int(rnd(0)*7)+18
  11. 110 bl=int(rnd(1)*2)*88+162
  12. 120 for ro = bu to 24
  13. 130 pl=sc+ro*40+co
  14. 140 poke pl, bl
  15. 150 poke pl+54272,9
  16. 160 forf=1984 to 2023:pokef,160:pokef+54272,11 : next
  17. 170 rem movimento aeroplano
  18. 180 ro=5: co=0
  19. 190 pl=sc+ro*40+co
  20. 200 poke pl-1,32:poke pl,32:pl=pl+1
  21. 210 ke=peek(197):if ke=4 then pl=pl-40
  22. 220 if pl<1024 then pl=pl+40
  23. 230 if ke=5 then pl=pl+40
  24. 240 lo=lo+1:rem loop count
  25. 250 if peek(pl)<>32 goto480
  26. 260 poke pl,91:poke pl-1,109
  27. 270 poke pl+54272,0:pokepl+54272-1,0
  28. 280 if peek(pl+40)<>160goto330
  29. 290 ta=ta+1:rem taxi count
  30. 300 for f=1 to 20*ta:next
  31. 310 if ta<15 goto330
  32. 320 print"landed safely!": goto 680
  33. 330 rem bomb
  34. 340 if bo=0 goto 430
  35. 350 if dr then bp=pl:dr=0:rem bp=bomb posn
  36. 360 pokebp,32
  37. 370 bp=bp+40
  38. 380 wh=wh-2:poke pi,wh
  39. 390 if peek(bp)=162 or peek(bp)=250 thengosub620
  40. 400 ifpeek(bp)=160thenbo=0: pokega,32:pokede,15
  41. 410 if bo=0 then poke ba,14:poke br,5:goto 430
  42. 420 poke bp,46:poke bp+54272,0
  43. 430 rem check controls
  44. 440 ke=peek(197)
  45. 450 if ke=3 and bo=0 then dr=1:bo=1
  46. 460 if dr then wh=130:pokepi,wh:pokega,33
  47. 470 goto 200
  48. 480 rem crash
  49. 490 if pl<1500 then 260
  50. 500 poke pl,42:poke pl+54272,0:rem explode symbol
  51. 510 gosub530
  52. 520 print " crashed!" : goto740
  53. 530 rem boom
  54. 540 pokede,11:pokepi,3:pokega,129
  55. 550 forf=1to8
  56. 560 pokebr,0:pokeba,2
  57. 570 forq=ito50:next
  58. 580 pokebr,5:pokeba,14
  59. 590 forq=1to50:next
  60. 600 nextf:pokega,128
  61. 610 return
  62. 620 rem bomb hit
  63. 630 pokede,11:pokepi,4:pokega,129
  64. 640 pokebr,5:pokeba,14
  65. 650 forq=1to5:next
  66. 660 pokebr,4:pokeba,7
  67. 670 return
  68. 680 rem finish
  69. 690 hi=peek(830): print"high score="hi
  70. 700 pa=int(lo/40):rem 1 pass = 40 loops
  71. 710 gosub770
  72. 720 print" your score="(40-pa)+le
  73. 730 if(40-pa)+le>hi then hi=(40-pa)+le:poke830,hi
  74. 740 print"press m for more"
  75. 750 get a$:ifa$<>"m"goto750
  76. 760 run
  77. 770 for f=1944 to 1983
  78. 780 if peek(f)<>32 then le=le+1
  79. 790 next:le=le-2:return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement