home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 207 / 207.d81 / b.planet (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  26KB  |  808 lines

  1. 1 ifpeek(52016)<>32orpeek(52040)<>245thenload"linput.pr",8,1
  2. 2 rem planet of the robots
  3. 3 rem by daniel tobias
  4. 4 rem c64 version 1.1
  5. 5 rem 6/12/84
  6. 7 na$="[208]lanet of the [210]obots"
  7. 8 poke 53280,7:poke53281,1:print"[144]"
  8. 9 s=54272:fori=.to24:pokes+i,.:next
  9. 10 print"":li=52016
  10. 15 dim lv%(100,8),ld$(100,1),r%(100),id$(50),il%(50),pr(50),iw(50),l%(100)
  11. 17 dim wd$(100),w%(100,1),fw%(1)
  12. 18 dimv%(3),h%(2),o%(1),a(1)
  13. 20 gosub 18000:gosub 19000
  14. 60 print"[147]"
  15. 100 rem start
  16. 108 xx=1
  17. 110 ifxx=1thengosub1000
  18. 120 gosub500
  19. 125 xx=xx+1:ifxx>5thenxx=1
  20. 130 iffw%(0)=0thenprint"[215]hat?":goto110
  21. 140 onfw%(0)gosub2000,3000,4000,5000,5500,6000,7000,8000,9000,9500
  22. 142 iffw%(0)>10thenonfw%(0)-10gosub13000,13500,14500,15000,15500,16000,16500
  23. 143 iffw%(0)=18thengosub10000
  24. 145 iffw%(0)=99then300
  25. 150 t=t+1
  26. 160 goto110
  27. 200 rem convert to lower case
  28. 220 for ip=1tolen(i$)
  29. 230 ch$=mid$(i$,ip,1)
  30. 240 ifch$>="[193]"andch$<="[218]"theni$=left$(i$,ip-1)+chr$(asc(ch$)-128)+mid$(i$,ip+1)
  31. 260 next ip
  32. 270 return
  33. 300 rem end
  34. 305 print"[144]"
  35. 310 print "[211]top after"t"turns."
  36. 312 input"play again";pa$:ifpa$="y"orpa$="[217]"orpa$="[183]"thenrun
  37. 320 print
  38. 330 goto40000:remd"chr$(34)"hello"chr$(34)",8":print"qqqqruns":poke631,13:poke63
  39. 332 [151]198,2:[128]
  40. 500 [143] handle input
  41. 505 fw%(0)[178]0:fw%(1)[178]0
  42. 510 [153]"-->";:[158]li,b$:i$[178]b$[170]"":[153]
  43. 515 [139] i$[178]"" [167] 510
  44. 518 [141] 200
  45. 520 wd$[178]"":a[178]1
  46. 530 [139] [202](i$,a,1)[178]" " [167] 600
  47. 540 wd$[178]wd$[170][202](i$,a,1)
  48. 550 a[178]a[170]1:[139]a[179][178][195](i$)[167]530
  49. 600 [143] found word
  50. 610 [129]b[178]1[164]nw:[139]wd$(b)[178]wd$[167][141]650
  51. 620 [130]b:wd$[178]"":a[178]a[170]1
  52. 630 [139]a[177][195](i$)[167][142]
  53. 640 [137]530
  54. 650 [129]c[178]0[164]1
  55. 660 [139]w%(b,c)[177][178]0[167]fw%(c)[178]w%(b,c)
  56. 670 [130]c
  57. 680 [142]
  58. 1000 [143] print description
  59. 1002 [139]ld$(l,0)[178]"s"[167][141]12000
  60. 1005 [153]
  61. 1010 [153]ld$(l,l%(l))
  62. 1011 [139]l[178]28[175]j[178]0[167][153]"(NULL)here is a door with bars."
  63. 1012 [139]l[178]28[175]j[179][177]0[167][153]"(NULL)he bars are broken, leaving a way out."
  64. 1014 [153]
  65. 1015 l%(l)[178]1
  66. 1020 [153]"(NULL)pen pathways: ";:[129]a[178]1[164]8:[139]lv%(l,a)[179][177]0[167][153]dn$(a)" ";
  67. 1025 [130]a
  68. 1030 [153]
  69. 1040 [153]"(NULL)isible objects:"
  70. 1045 x[178]0
  71. 1050 [129]a[178]1[164]ni
  72. 1060 [139] il%(a)[178]l[167][153]" "id$(a);:x[178]1
  73. 1062 [139]il%(a)[178]l[175]pr(a)[177]0[175]r%(l)[178]1[167][153]" ((NULL)rice $"pr(a)")";
  74. 1065 [139] il%(a)[178]l[167][153]
  75. 1070 [130]a
  76. 1080 [139]x[178]0[167][153]"(NULL)here are none."
  77. 1082 [139] r%(l)[179][177]0[167][153]
  78. 1085 [139]r%(l)[178]1[167][153]"lenlerk robot here."
  79. 1090 [139]r%(l)[177]20[175]r%(l)[179]29[167][153]"chr$uard robot here."
  80. 1110 [139] r%(l)[178]3[167][153]"peekerzerk robot here!"
  81. 1120 [139]t[171]e[177][178]100[167][153]"(NULL)ou are getting hungry!"
  82. 1480 [153]
  83. 1490 [142]
  84. 2000 [143] move
  85. 2005 [139]fw%(1)[179]101[176]fw%(1)[177]108[167][153]"chr$o where?":[142]
  86. 2010 x[178]lv%(l,fw%(1)[171]100)
  87. 2020 [139]x[179]0[176]x[177]nl[167][153]"(NULL)ot defined yet.":[142]
  88. 2025 [139]l[178]28[175]i$[178]"break out"[167]15000
  89. 2030 [139]x[178]0[167][153]"(NULL)ou can't go that way.":[142]
  90. 2035 [139]r%(l)[178]3[167][153]"(NULL)obot: (NULL)rying to escape, huh?  right$t won't"
  91. 2037 [139]r%(l)[178]3[167][153]"work!  (NULL)ap! (NULL)ou're dead!":[137]300
  92. 2040 [139]x[178]6[175]il%(7)[179][177]0[167][153]"(NULL)obot: right$'m sorry, but the dress code"
  93. 2041 [139]x[178]6[175]il%(7)[179][177]0[167][153]"  requires that you wear a tie.":[142]
  94. 2042 [139]l[178]6[175]r[179][177]0[167][153]"(NULL)obot: right$'m sorry.  (NULL)ou are a bad credit"
  95. 2043 [139]l[178]6[175]r[179][177]0[167][153]"  risk.  (NULL)ou can't enter.":[142]
  96. 2045 [139]r%(l)[178]20[170]fw%(1)[171]100[167]2500
  97. 2060 [143]
  98. 2065 [139]l[178]39[175]x[178]39[175][187](0)[179].35[167]pl[178]1[171]pl:x[178]35:[139]pl[178]0[167]x[178]40
  99. 2080 [139]x[178]17[167][153]"(NULL)obot: (NULL)orry, this information booth is   out of order."
  100. 2085 [139]x[178]17[167][142]
  101. 2087 [139]ld$(x,0)[178]"(NULL)"[167][141]12000:[142]
  102. 2090 [139]l[178]36[175]x[178]37[167][133]"valnter combination";a$
  103. 2095 [139]l[178]36[175]x[178]37[175][197](a$)[179][177]cm%[167][153]"(NULL)orry. (NULL)rong!":[142]
  104. 2100 [139]x[178]38[167]14000
  105. 2200 l[178]x:xx[178]1:[142]
  106. 2500 [143] id card
  107. 2510 [139]il%(12)[178]0[167][153]"(NULL)obot: right$.str$. accepted.  (NULL)ou can pass."
  108. 2520 [139]il%(12)[178]0[167][153]"  chr$ood day, (NULL)r. (NULL)mith.":[137]2060
  109. 2530 [153]"(NULL)obot: right$'m sorry, but you can't go that   way without an right$.str$. card."
  110. 2540 [142]
  111. 3000 [143] pick up
  112. 3005 [139]fw%(1)[178]0[176]fw%(1)[177]ni[167][153]"(NULL)o such thing here.":[142]
  113. 3006 [139]il%(fw%(1))[178]0[167][153]"(NULL)ou are already carrying it!":[142]
  114. 3007 [139]il%(fw%(1))[179][177]l[167][153]"(NULL)o such thing here.":[142]
  115. 3009 [139]pr(fw%(1))[177]0[175]r%(l)[178]1[167][153]"(NULL)obot: (NULL)ou can't take that without"
  116. 3010 [139]pr(fw%(1))[177]0[175]r%(l)[178]1[167][153]"  paying for it!  (NULL)lease buy it if you"
  117. 3011 [139]pr(fw%(1))[177]0[175]r%(l)[178]1[167][153]"  want it.":[142]
  118. 3013 hf[178]0
  119. 3015 [139]wt[170]iw(fw%(1))[177]150[175]iw(fw%(1))[179][178]150[167] hf[178]1
  120. 3017 [139] hf[178]1 [167] [153] "(NULL)oo heavy.  (NULL)ou must drop something     first.":[142]
  121. 3020 [139]iw(fw%(1))[177]150[167][153]"(NULL)oo heavy for you to lift.":[142]
  122. 3030 [139]iw(fw%(1))[179]0[167][153]"right$t is securely fastened.":[142]
  123. 3040 il%(fw%(1))[178]0:wt[178]wt[170]iw(fw%(1))
  124. 3045 [153] "(NULL)(NULL)."
  125. 3050 [139]fw%(1)[178]10[167]m[178][182](m)
  126. 3060 [142]
  127. 4000 [143] drop
  128. 4010 [139]fw%(1)[179]1[176]fw%(1)[177]ni[167][153]"(NULL)ou are not carrying one.":[142]
  129. 4020 [139]il%(fw%(1))[179][177]0[167][153]"(NULL)ou are not carrying one.":[142]
  130. 4030 il%(fw%(1))[178]l:wt[178]wt[171]iw(fw%(1))
  131. 4040 [153] "(NULL)(NULL)."
  132. 4042 [139]l[178]39[167][153]"right$t slides into a crevice in the ruins   and is lost."
  133. 4043 [139]l[178]39[167]il%(fw%(1))[178][171]1
  134. 4045 [139]fw%(1)[178]10[167]m[178][171][182](m)
  135. 4050 [142]
  136. 5000 [143] look
  137. 5005 [139]fw%(1)[177]0[167]8000
  138. 5010 xx[178]1
  139. 5020 l%(l)[178]0
  140. 5030 [142]
  141. 5500 [143] inv
  142. 5505 x[178]0
  143. 5510 [153] "(NULL)ou are carrying:"
  144. 5520 [129]a[178]1[164]ni
  145. 5525 [139]a[178]10[167]5540
  146. 5530 [139]il%(a)[178]0[167][153]" "id$(a):x[178]1
  147. 5540 [130]a
  148. 5545 [139]m[177]0[167][153]"close$"m"in cash.":x[178]1
  149. 5550 [139]x[178]0[167][153]"(NULL)othing."
  150. 5560 [142]
  151. 6000 [143] save game
  152. 6010 [153]"valnter filename. (str$efault: planet.save)":[133]f$
  153. 6015 [139]f$[178]""[167]f$[178]"planet.save"
  154. 6017 [159]15,8,15:[152]15,"s:"f$:[160]15
  155. 6020 [159]2,8,2,f$[170]",s,w"
  156. 6040 [152]2,l:[129]b[178]1[164]ni:[152]2,il%(b):[130]b:[152]2,wt:[152]2,t
  157. 6050 [129]b[178]1[164]nl:[152]2,r%(b):[130]b:[152]2,m:[152]2,e
  158. 6060 [129]b[178]1[164]ni:[152]2,pr(b):[130]b
  159. 6070 [152]2,cm%:[152]2,r:[152]2,j
  160. 6080 [152]2,pw:[152]2,rm
  161. 6090 [160]2
  162. 6100 [153] "(NULL)(NULL).":[142]
  163. 6500 [143] load game
  164. 6510 [153]"valnter filename. (str$efault: planet.save)":[133]f$
  165. 6515 [139]f$[178]""[167]f$[178]"planet.save"
  166. 6520 [159]15,8,15
  167. 6530 [159]2,8,2,f$[170]",s,r"
  168. 6540 [141] 6900
  169. 6550 [132]2,l:[129]b[178]1[164]ni:[132]2,il%(b):[130]b:[132]2,wt:[132]2,t
  170. 6560 [129]b[178]1[164]nl:[132]2,r%(b):[130]b:[132]2,m:[132]2,e
  171. 6565 [129]b[178]1[164]ni:[132]2,pr(b):[130]b
  172. 6570 [132]2,cm%:[132]2,r:[132]2,j
  173. 6575 [139]j[179][177]0[167]lv%(28,8)[178]27
  174. 6580 [132]2,pw:[132]2,rm
  175. 6590 [160]2:[160]15
  176. 6600 [142]
  177. 6900 [132]15,a$,b$,c$,d$
  178. 6910 [139][197](a$)[177]0[167][153]"chr$ame not found.":[129]a[178]1[164]100:[130]a:[138]
  179. 6920 [142]
  180. 7000 [143] weigh
  181. 7010 [139]il%(2)[179][177]l[175]il%(2)[179][177]0[167][153]"(NULL)here is no scale.":[142]
  182. 7020 [139]fw%(1)[178]2[167][153]"(NULL)ou can't weigh it on itself!":[142]
  183. 7030 [139]fw%(1)[179]1[176]fw%(1)[177]ni[167][153]"(NULL)here is no such item here.":[142]
  184. 7040 [139]il%(fw%(1))[179][177]l[175]il%(fw%(1))[179][177]0[167][153]"(NULL)here is no such item here.":[142]
  185. 7050 [153]"right$t weighs"iw(fw%(1))"pounds."
  186. 7060 [142]
  187. 8000 [143] read/examine
  188. 8005 [139]fw%(1)[178]200[167][153]"(NULL)he bars look rusty and weak.":[142]
  189. 8010 [139]fw%(1)[179]1[176]fw%(1)[177]ni[167][153]"(NULL)o such thing here.":[142]
  190. 8020 [139]il%(fw%(1))[179][177]l[175]il%(fw%(1))