home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 49 / 049.d81 / rr2 (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  11KB  |  279 lines

  1. 1 goto217
  2. 2 printtv$mid$(ti$,2,1)cl$mid$(ti$,3,2)cl$right$(ti$,2)
  3. 3 geta$:ifa$>""thengosub16
  4. 4 syspm:if(peek(jy)and15)<15thenpokew1,33:pokew1,32
  5. 5 if(peek(b2)and1)thengosub135
  6. 6 b=peek(b1):if(band1)>.thengosub23
  7. 7 i=peek(fr):ifi>.then43
  8. 8 if(bt)or(t3)then34
  9. 9 if(ti>tk)orq(l,.)<1then109
  10. 10 sysmm:if(peek(b2)and4)thengosub137
  11. 11 if(peek(b1)and5)<>5then2
  12. 12 cx=f-q(l,2)+int(rnd(1)*6):if(cx<3)or(rnd(1)>.7)then2
  13. 13 poke53281,1:pokew1,p1:q(l,3)=q(l,3)-2*cx+4:printen$q(l,3)"[157] ";:poke53281,0:pokew1,q1
  14. 14 ifq(l,3)>.then2
  15. 15 goto121
  16. 16 i=asc(a$):ifi=32then21
  17. 17 ifi<>13thenreturn
  18. 18 poke53280,2:poke198,.:i$=ti$
  19. 19 geta$:ifa$>""thenpoke53280,.:ti$=i$:return
  20. 20 goto19
  21. 21 ch=ch+1:ifch>8thench=.
  22. 22 bu=.:printac$a$(ch)"";:pokew1,p1:pokew1,q1:fori=1to10:next:return
  23. 23 if(band120)=.thenreturn
  24. 24 if(band8)thenpokesa,peek(sa)and247:c(it)=c(it)+1:c%(rm)=c%(rm)and143:return
  25. 25 if(band16)and(peek(52220)=60)then126
  26. 26 if(band64)and(peek(52222)=59)thenreturn
  27. 27 if(band64)and(peek(mc)=191)then31
  28. 28 pokew1,p1:fori=1to30:poke53281,1:poke53281,.:next:pokesa,peek(sa)and143
  29. 29 pokew1,q1:q(l,3)=q(l,3)-int(rnd(1)*11+5):ifq(l,3)<.thenq(l,3)=.
  30. 30 printen$q(l,3)"[157] ";:return
  31. 31 pokepx,120:pokepy,140:printp$(.);:pokexp,120:pokeyp,140:t3=1:kp=.
  32. 32 tt=ti+(60*int(rnd(1)*31+15)):fori=1to5:pokew2,p2:forj=.to45:poken2,j:next
  33. 33 pokew2,q2:next:pokesa,peek(sa)and191:b=peek(b1):return
  34. 34 if(bt>.)then37
  35. 35 if(tt<ti)thent3=.:printpd$;:goto9
  36. 36 kp=1-kp:printp$(kp);:goto9
  37. 37 if(ti<bk)thengoto9
  38. 38 ifbt=(rm+1)then41
  39. 39 pokevl,5:pokew1,p1:fori=1to100:next:pokew1,q1:pokevl,15:i=bt-1
  40. 40 r%(i)=r%(i)and31:c%(i)=.:bt=.:goto9
  41. 41 pokew1,p1:fori=90to.step-1:poke53281,i:pokevl,int(rnd(1)*16):next:pokew1,q1
  42. 42 pokevl,15:r%(rm)=r%(rm)and31:c%(rm)=.:pokesa,.:bt=.:goto116
  43. 43 ifi>1thengosub138:goto2
  44. 44 on(ch+1)gosub45,51,64,67,72,76,81,84,91:goto8
  45. 45 cx=q(l,2)-f+int(rnd(1)*6):if(cx<3)or((peek(b1)and5)<>5)thenreturn
  46. 46 poke53281,2:pokew1,p1:fori=4to2step-.5:poken1,i:next:pokew1,q1:poken1,4
  47. 47 poke53281,.:e=e-2*cx+4:ife>.thenreturn
  48. 48 pokemc,peek(mc)and251:pokew3,p3:pokew3,q3:fori=120to60step-2:poken3,i:next
  49. 49 pokesa,peek(sa)and251:pokemc,peek(mc)or4:if(rnd(1)>.3)thenc%(rm)=c%(rm)and240
  50. 50 return
  51. 51 q(l,.)=q(l,.)-int(rnd(1)*3+4):ifq(l,.)<1thenq(l,.)=.
  52. 52 printpo$q(l,.)"[157] ";:on(peek(fc)-47)goto53,54,55,56
  53. 53 z=62:z5=53263:zx=.:zy=18:za=8:goto57
  54. 54 z=63:z5=53262:zx=18:zy=.:za=8:goto57
  55. 55 z=62:z5=53263:zx=.:zy=-18:za=-8:goto57
  56. 56 z=63:z5=53262:zx=-18:zy=.:za=-8
  57. 57 poke52223,z:poke53262,peek(px)+zx:poke53263,peek(py)+zy:pokesa,peek(sa)or128
  58. 58 zz=peek(z5):h=.:pokew3,p3:fori=16to3step-1:poken3,i:zz=(zz+za)and255:pokez5,zz
  59. 59 h=peek(b1):if(hand128)or(peek(b2)and128)or(zz<30)theni=3
  60. 60 next:pokew3,q3:pokesa,peek(sa)and127:if((hand128)=.)thenreturn
  61. 61 h=hand118:ifh=.thenreturn
  62. 62 pokemc,peek(mc)and(255-h):if(rnd(1)>.3)or(hand2)thenc%(rm)=c%(rm)and112
  63. 63 fori=1to10:next:pokesa,peek(sa)and(255-h):pokemc,peek(mc)orh:return
  64. 64 ifc(2)=.thenprintac$"[153]!none[153]!";:return
  65. 65 c(2)=c(2)-1:bt=rm+1:pokesa,peek(sa)and191:pokeec,13:pokemc,255:poke52222,59
  66. 66 poke53260,120:poke53261,140:pokesa,peek(sa)or64:bk=ti+300:return
  67. 67 ifc(1)=.thenprintac$"no pak";:return
  68. 68 fori=1to30:pokew1,p3:poken1,i:poken1,i/2:pokew1,q3:next:poken1,4
  69. 69 c(1)=c(1)-1:q(l,.)=q(l,.)+int(rnd(1)*20+21):ifq(l,.)>98thenq(l,.)=99
  70. 70 printpo$q(l,.)"[157] ";:if(rnd(1)>.8)and(r<6)thenr=r+1:printac$"[153]+ rpr[153]!";
  71. 71 return
  72. 72 ifr=.thenprintac$"no rpr";:return
  73. 73 fori=.to14:poken1,int(rnd(1)*40+40):pokew1,p3:forj=.to50:next:pokew1,q3:next
  74. 74 poken1,4:r=r-1:q(l,3)=q(l,3)+int(rnd(1)*10+11):ifq(l,3)>fethenq(l,3)=fe
  75. 75 printen$q(l,3)"[157] ";:return
  76. 76 if(c%(rm)and128)=.thenprintac$"[153]?lock[153]?";:return
  77. 77 ifc(.)=.thenprintac$"no key";:return
  78. 78 if(rnd(1)>(q(l,4)/5+.39))thenc(.)=c(.)-1:printac$"key dm";
  79. 79 pokew1,p3:fori=12to3step-.05:poken1,i:next:pokew1,q3:poken1,4
  80. 80 c%(rm)=c%(rm)and127:printpd$;:return
  81. 81 fori=50to90:poken1,i-20:poken1,i:pokew1,33:pokew1,32:next:poken1,4
  82. 82 if((peek(sa)and64)=.)or(peek(ec)and15)or(int(rnd(1)*4)>=q(l,4))thenreturn
  83. 83 pokew3,p3:poken3,10:pokew3,q3:pokeec,2:return
  84. 84 printac$"value[153]?";:a$="":poke198,.:fori=1to250
  85. 85 geta$:ifa$<>""theni=250
  86. 86 nexti:printac$a$(7);:ifa$=""thenreturn
  87. 87 a=val(a$):if(a<1)or(a>q(l,1))thenreturn
  88. 88 ps=a:z3=a*2:pokesp,z3:printsp$ps"";:x3=peek(px)-120:y3=peek(py)-140
  89. 89 x3=z3*int(x3/z3)+120:y3=z3*int(y3/z3)+140:pokepx,x3:pokepy,y3:pokexp,x3
  90. 90 pokeyp,y3:return
  91. 91 if(peek(b1)and3)=3then130
  92. 92 if(bu=.)thenbu=1:printac$"beam ?";:goto128
  93. 93 y1=peek(mc)or1:y2=y1and254
  94. 94 pokew3,p1:fori=3to50step((i+1)/20):pokemc,y1:poken3,i:pokemc,y2:next
  95. 95 pokew3,q1:pokesa,peek(sa)and254:fori=1to1000:next:pokesa,.:print"[147]";
  96. 96 pokemc,y1:ifp=pcthen123
  97. 97 rr=int(p/pc*100):r$="in fact,it was a dismal failure..."
  98. 98 ifrr>35thenr$="a 50/50 average isn't very good in a    case like this..."
  99. 99 ifrr>65thenr$="but you are to be commended for your    great effort."
  100. 100 if(rr>90)and(l=0)thenr$="but you died a hero!"
  101. 101 print"[154]your mission was not exactly a major    success...":printr$
  102. 102 print"[154]you managed to save"p"prisoners:"
  103. 103 print"that's a[159]"rr"[157]%[154] success ratio."
  104. 104 print"[150]try again? [[159]y[150]/[159]n[150]]":poke198,.
  105. 105 geta$:ifa$="y"thenrun
  106. 106 ifa$<>"n"then105
  107. 107 poke53280,14:poke53281,6:poke648,4:poke53272,21
  108. 108 poke56576,(peek(56576)and252)or3:print"[147][154]";:goto276
  109. 109 ifq(l,.)<1then113
  110. 110 o1$="":o2$=o1$+"":o1$=o1$+"out of time!"
  111. 111 o2$=o2$+"out of time![146]":fori=1to20:printo2$:forj=1to30:next:printo1$
  112. 112 forj=1to30:nextj,i:goto93
  113. 113 o1$="":o2$=o1$+"":o1$=o1$+"out of power"
  114. 114 o2$=o2$+"out of power[146]":fori=1to20:printo2$:forj=1to30:next:printo1$
  115. 115 forj=1to30:nextj,i
  116. 116 fori=1to750:next:pokesa,.:b=peek(b1):b=peek(b2):print"[147]";:l=l-1:ifl=.then97
  117. 117 pokepx,120:pokepy,140:pokexp,120:pokeyp,140:pokemc,255:poke52216,48
  118. 118 ps=q(l,1):pokesp,ps*2:fe=q(l,3)
  119. 119 rm=int(rnd(1)*192):if(c%(rm))then119
  120. 120 ch=.:bu=.:pk=ti+1200:gosub154:goto2
  121. 121 pokew1,p1:pokemc,peek(mc)and254:fori=0to50step.5:poken1,i:next:pokew1,q1
  122. 122 pokesa,peek(sa)and254:poken1,4:goto116
  123. 123 printtab(9)"mission accomplished!!"
  124. 124 print"[154]you freed all of the prisoners and"
  125. 125 print"and are celebrated as a hero!!":goto104
  126. 126 rm=int(rnd(1)*192):pokesa,.:pokexp,120:pokeyp,140:pokepx,120:pokepy,140
  127. 127 goto154
  128. 128 i=peek(56320)and16:ifi=.then128
  129. 129 return
  130. 130 y1=peek(mc)or2:y2=peek(mc)and253:pokew3,p1:fori=3to50step((i+1)/20)
  131. 131 pokemc,y1:poken3,i:pokemc,y2:next:pokew3,q1:pokesa,peek(sa)and253
  132. 132 pokemc,y1:c%(rm)=c%(rm)and127:p=p+1:printac$"[150]free"str$(p)"";
  133. 133 ifp=pcthenpoken1,80:fori=1to5:pokew1,33:pokew1,32:forj=1to100:nextj,i
  134. 134 poken1,4:return
  135. 135 poken1,2:pokew1,33:pokew1,32:pokexp,peek(px):pokeyp,peek(py):poken1,4
  136. 136 b=peek(b2):return
  137. 137 pokemx,peek(ox):pokemy,peek(oy):b=peek(b2):return
  138. 138 pokesa,.:rm=rm+m(i):pokexp,p(.,i):pokepx,p(.,i):pokeyp,p(1,i):pokepy,p(1,i)
  139. 139 ifti>pkthenq(l,.)=q(l,.)-1:printpo$q(l,.)"[157] ";:pk=ti+600
  140. 140 d=r%(rm):c=c%(rm):printpd$;:sys(dw)d:ia=1:r1=rm+r0:r2=r1+r0
  141. 141 if(dand32)thengosub162:goto145
  142. 142 if(dand64)thengosub163:goto145
  143. 143 if(dand128)theni=rnd(-r1):gosub167:i=rnd(-ti):goto145
  144. 144 if(cand128)thengosub169:goto147
  145. 145 if(cand15)thengosub170
  146. 146 if(cand112)theni=rnd(-r2):gosub173:i=rnd(-ti)
  147. 147 pokesa,ia:b=peek(b1):b=peek(b2):ifz9=1thenz9=.:return
  148. 148 pokerx,160:yy=int(rm/16):xx=rm-(yy*16):yy=int(yy/3):xx=int(xx/2)
  149. 149 rx=rd+xx+fy*yy:pokerx,171:sys(pa)17,28," ":j=.:fori=.to7
  150. 150 k=2^i:if((c and k)=k)thenprinttab(29)"[158]["c$(i)"[158]]":j=j+1
  151. 151 next:ifj=.thenj=1:printtab(29)"[158][[159]--00--[158]]"
  152. 152 ifj=1thenprinttab(29)"        "
  153. 153 return
  154. 154 bu=.:print"[154][147]";:z9=1:i=1:gosub138
  155. 155 printcr$"[154]unit:[155]"4-l"":fori=.to4:printtab(29)"[156]"q$(i)"[155]"q(l,i)"[157]":next
  156. 156 printtab(29)"[154]prspd[155]"ps:printtab(29)"[156]function":printtab(29)"[158]>";
  157. 157 printa$(ch)"[158]<":printtab(29)"[156]scanning":ifc=.thenprinttab(29)"[158][[159]--00--[158]]"
  158. 158 fori=.to7:j=2^i:if((c and j)=j)thenprinttab(29)"[158]["c$(i)"[158]]"
  159. 159 next:sys(pa)20,28," "
  160. 160 yy=int(rm/16):xx=rm-(yy*16):yy=int(yy/3):xx=int(xx