home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 52 / 64er_Magazin_Sonderheft_52_19xx_Markt__Technik_de_Side_A.d64 / odyssee (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  31KB  |  263 lines

  1. 1 rem ***************
  2. 2 rem *  odyssee :  *
  3. 3 rem *             *
  4. 4 rem *  mainprg.   *
  5. 5 rem ***************
  6. 6 :
  7. 7 :
  8. 8 :
  9. 9 ifz=0then9000
  10. 10 dimt(4),v$(1,4),w$(1,4),w(2,4),s%(64):ti$="000000":w$="hand":v1=40
  11. 15 g=350:y=9:w=3:f=50:t=17061:h=300:forz=1to4:g(z)=5:next:poke12762,0
  12. 16 forz=1to27:readz$:next:forz=0to63
  13. 17 s%(z)=50:next:s%(64)=100:forz=1to16
  14. 18 readi:s%(i)=i*100:next:forz=1to100
  15. 21 i=int(rnd(0)*20):x=int(rnd(0)*440+20):ifpeek(17001+(20-i)+x*20)<>40then21
  16. 22 poke17001+(20-i)+x*20,35:next:fori=0to1:forz=1to4:readw$(i,z),w(i,z):next:next
  17. 23 v$(0,1)="foodshop":v$(0,2)="pub":v$(1,1)="weaponshop":v$(1,2)="armourshop"
  18. 24 v$(1,4)="exit the town":poke788,52
  19. 25 v$(0,3)="talk to people":v$(1,3)=v$(0,3):v$(0,4)="exit the village"
  20. 26 printchr$(147):poke53265,11
  21. 33 i=t:forz=1to40:poke16604,i-256*int(i/256):poke16605,int(i/256):i=i+20
  22. 34 sys16484:next:poke1043+y*40,33:ifb=5thenpoke1043+y*40,38:poke55296+y*40,14
  23. 35 poke 214,20 : sys58640 : print "[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]";
  24. 40 poke53265,155:poke53272,29:goto 90
  25. 50 print"illegal command":goto90
  26. 60 print"not there":goto90
  27. 70 print"no way":goto90
  28. 80 print"pass"
  29. 90 print"   > ";
  30. 100 sys16674:p=1043+y*40:i=i+1:ifi<15thenz=peek(197):ta=z*100:goto s%(z)
  31. 110 i=0:ifpeek(p-1)=35then160
  32. 120 ifpeek(p+1)=35then160
  33. 130 ifpeek(p-40)=35then160
  34. 140 ifpeek(p+40)=35then160
  35. 150 goto100
  36. 160 i=int(rnd(0)*18):ifk+a(2)<ithenprint"hit":h=h-int(rnd(0)*5)-1:ifh<1then180
  37. 165 ifk+a(2)>i-1thenprint"missed"
  38. 170 print"   > ";:goto100
  39. 180 printn$" is dead":forz=1to10:poke198,0:next:wait198,1:run
  40. 210 i=v1:v1=peek(z)
  41. 211 ifb=0thenifpeek(z)=40thengoto x
  42. 212 ifb=5thenifpeek(z)=37thengoto x
  43. 213 ifpeek(z)=41and(spand2)=2then220
  44. 214 ifpeek(z)=37and(spand16)=16thensw=sw+1:goto2180
  45. 215 ifpeek(z)=37and(spand16)=16thengoto x
  46. 216 ifpeek(z)=42thenh=h-100:ifh<0then180
  47. 217 ifpeek(z)=42thengoto x
  48. 218 ifpeek(z)=43and(spand8)=8thengoto x
  49. 219 v1=i:goto70
  50. 220 bo=bo+1:ifbo=2thensp=sp-2
  51. 230 goto x
  52. 1000 print"attack --- ";:goto10000
  53. 1010 ifpeek(s)<>35thenprint"miss":goto90
  54. 1020 i=int(rnd(0)*20):ifw+a(1)>iorze=5thenprint"hit":ze=0:goto1040
  55. 1030 ze=ze+1:print"miss":goto90
  56. 1040 print"hit":g(z)=g(z)-1:ifg(z)<1theng(z)=int(rnd(0)*3)+3:goto1060
  57. 1050 forz=1to5:poke197,64:next:goto90
  58. 1060 i=int(rnd(0)*20):print" killed --- gold found :"i:g=g+i:pokes,40:u=40:p=35
  59. 1070 c=c+1:ifc=20thenprint"you get a blue tassle":sp=sp+1
  60. 1080 goto2110
  61. 1200 ifb=5thenprint"only on foot":goto90
  62. 1205 print"[147]"n$:print:print:print:print
  63. 1210 forz=1to5:printk$(z);b(z):next
  64. 1215 poke214,5:sys58640:printtab(29)"food :"int(f):printtab(29)"gold :"g
  65. 1217 printtab(29)"power:"h:print:print
  66. 1220 print:print:print"weapon : "w$
  67. 1230 print:print"armour : "ar$
  68. 1240 print:print"tools  : ";
  69. 1250 i=1:x=0:forz=1to7:if(spandi)=ithenx=x+1:printsp$(z)";";
  70. 1255 i=i*2:next
  71. 1260 ifx=0thenprint"no tool":goto1290
  72. 1270 print"[157] "
  73. 1290 poke198,0:wait198,1:goto26
  74. 1400 print"enter --- ";:goto10000
  75. 1410 ifpeek(s)=36thena$="a town.":a=1:goto1460
  76. 1420 ifpeek(s)=39thena$="a village.":a=0:goto1460
  77. 1430 ifpeek(s)=44then16000
  78. 1440 ifpeek(s)=31thent=26641:y=15:goto26
  79. 1450 goto60
  80. 1460 poke53272,21:print"[147]you have entered "a$;:goto15000
  81. 1700 print"restart game --- are you sure ? ";
  82. 1710 poke198,0:wait198,1:getz$:ifz$="y"thenprintz$:run
  83. 1720 print"n":print"i knew it":goto90
  84. 2100 print"food: "int(f):goto90
  85. 2110 s=s-1024:i=int(s/40):z=t+(40-(s-i*40))*20-y1:pokez,u:goto90
  86. 2160 goto x
  87. 2180 ifsw=12thensp=sp-16
  88. 2190 goto x
  89. 2200 print"transact --- ";:goto10000
  90. 2210 print"ok":print"==> ";:ifpeek(s)=34then2215
  91. 2211 ifpeek(s)=35thenprint"nice day;today":goto90
  92. 2212 print"no response":goto90
  93. 2215 ify1=3anda(3)<16then20000
  94. 2220 ify1=12anda(5)<10then20010
  95. 2225 ify1=10andg<100thenprint"he wants to have 100 golden coins.":goto90
  96. 2227 ify1=10theng=g-100:print"he takes 100 coins":print"==> ";:goto2290
  97. 2230 ify1=2anda(5)<30then20010
  98. 2235 ify1=4anda(5)<20then20010
  99. 2240 ify1=13thenprint"he tells you a secret password.":a(5)=10:goto2295
  100. 2245 ify1=1thenprint"he gives you magical boots.":sp=spor2:goto2295
  101. 2250 ify1=9thenprint"he gives you a golden key":sp=spor32:goto2295
  102. 2255 ify1=19and(spand32)=32thenprint"he take the golden key.":sp=sp-32:goto2290
  103. 2257 ify1=19thenprint"he wants to have the golden key":goto90
  104. 2260 ify1=11thenprint"he gives you a key.":sp=spor6:goto2295
  105. 2265 ify1=0anda(4)<17thenprint"wisdom no high enough.":goto20005
  106. 2270 ify1=8anda(3)<22then20000
  107. 2275 ify1=6thenprint"he gives you a swim-west":sp=spor16:goto2295
  108. 2280 ify1=14thenprint"he stoles all your gold":g=0:goto2295
  109. 2285 ify1=5thenprint"he gives you a magic missile.":sp=spor4:goto2295
  110. 2290 print"you may pass"
  111. 2295 forz=1to16:pokes+54272,z:fori=1to50:next:next:u=40:p=34
  112. 2297 pokes+54272,13:pokes,40:goto2110
  113. 2300 print"exit ";:ifb=0thenprint"what ?":goto90
  114. 2305 print"ship --- ";:goto10000
  115. 2310 ifpeek(s)<>40then60
  116. 2320 y1=y:pokes,33:print"ok":ifs=p-40thens=p-40:y=y-1:goto2360
  117. 2330 ifs=p+1thens=p-1:t=t-20:poke16604,(t)and255:poke16605,int(t/256):sys16384:goto2360
  118. 2340 ifs=p+40theny=y+1:s=p-40:goto2360
  119. 2350 s=p+1:t=t+20:i=t+780:poke16604,iand255:poke16605,int(i/256):sys16484
  120. 2360 u=38:b=0:v1=40:goto2110
  121. 2600 print"gold: "g:goto90
  122. 2800 print"board ship --- ";:goto10000
  123. 2810 ifpeek(s)<>38then60
  124. 2820 if(spand1)<>1thenprint"no":print"==> the crew does not allow this":goto90
  125. 2830 print"ok":b=5:pokep,v1:poke54272+s,14:p=p+1:ifs=p-41theny=y-1:goto2870
  126. 2840 ifs=pthent=t-20:poke16604,(t)and255:poke16605,int(t/256):sys16384:goto2870
  127. 2850 ifs=p+39theny=y+1:goto2870
  128. 2860 t=t+20:i=t+780:poke16604,iand255:poke16605,int(i/256):sys16484:goto2870
  129. 2870 u=37:s=p-1:p=38:v1=37:goto2110
  130. 2900 print"power: "h:goto90
  131. 3000 print"unlock door --- ";:if(spand64)<>64thenprint"no key":goto90
  132. 3005 goto10000
  133. 3010 ifpeek(s)<>194then60
  134. 3020 print"ok":pokes,40:pokes-41,192:goto90
  135. 3600 if(spand4)<>4thenprint"no magic missile":goto90
  136. 3610 print"magic missile"
  137. 3620 forz=1024to1823:i=peek(z+54272):pokez+54272,1
  138. 3630 ifpeek(z)<>35andpeek(z)<>34then3640
  139. 3635 x=z-1024:n=int(x/40):poket+(40-(x-n*40))*20-n,40:g=g+5:pokez,40
  140. 3640 ifpeek(z)=30thengoto18000
  141. 3650 pokez+54272,i:next:sp=sp-4:goto90
  142. 4500 v2=v1
  143. 4505 z=1042+y*40:x=4510:goto210
  144. 4510 t=t+20:i=t+780:poke16604,iand255:poke16605,int(i/256):print"west"
  145. 4520 sys16484:pokep+1,v2:pokez+1,33+b
  146. 4530 f=f-.2:iff<0thenprint"no food --- ";:goto180
  147. 4540 goto90                           
  148. 4600 v2=v1:z=1043+y*40-40:x=4610:goto210
  149. 4610 print"north":pokez+40,v2:y=y-1:pokez,33+b:goto4530
  150. 5000 v2=v1
  151. 5005 z=1044+y*40:x=5010:goto210
  152. 5010 t=t-20:poke16604,(t)and255:poke16605,int(t/256):print"east":sys16384
  153. 5020 pokep-1,v2:pokez-1,33+b:goto4530
  154. 5500 v2=v1:z=1043+y*40+40:x=5510:goto210
  155. 5510 print"south":pokez-40,v2:y=y+1:poke1043+y*40,33+b:goto4530
  156. 9000 poke53280,0:poke53281,0:poke53272,21:printchr$(142),chr$(8):ar$="skin"
  157. 9010 poke95,0:poke96,160:poke90,0:poke91,192:poke88,0:poke89,192:sys41919
  158. 9020 gosub9500:k$(5)=k$(5)+"00"
  159. 9100 print"[147]"tab(10)"creating a player":printtab(7)"=-=-=-=-=-=-=-=-=-=-=-="
  160. 9110 print:print:print:forz=1to5:printtab(10);k$(z):a$(z)="":next:i=7:s=0
  161. 9115 forz=1to4:poke214,i:sys58640
  162. 9120 printtab(25);:poke198,0:wait198,1:getz$
  163. 9130 ifz$=chr$(20)andlen(a$(z))thena$(z)=left$(a$(z),len(a$(z))-1):goto9165
  164. 9140 iflen(a$(z))=2thenprint:goto9170
  165. 9150 ifasc(z$)<48orasc(z$)>57then9120
  166. 9160 a$(z)=a$(z)+z$
  167. 9165 printz$;:goto9120
  168. 9170 a(z)=val(a$(z)):s=s+a(z):ifs>100then9100
  169. 9175 i=peek(214):poke214,20:sys58640:print"points left :      [157][157][157][157][157]"100-s:next
  170. 9180 input"[145][145][145][145][145][145]your name ";n$
  171. 9184 ifpeek(2)=0thenforz=57344to65535:pokez,peek(z):next:poke59639,20
  172. 9185 gosub9500:a(1)=int(a(1)/5):a(2)=int(a(2)/5):poke2,1:poke1,53
  173. 9190 i=43168:pokei,32:pokei+1,192:pokei+2,2:i=704:pokei,32:pokei+1,138
  174. 9195 pokei+2,173:pokei+3,76:pokei+4,247:pokei+5,183:printchr$(147)
  175. 9197 forz=1to4:b(z)=a(z):next
  176. 9200 printtab(12)"<<< odyssee >>>"
  177. 9210 print""tab(9)"<<<  please wait  >>>"
  178. 9220 printtab(6)"<<< while loading part2 >>>"
  179. 9230 printtab(3)"<<<  (c) by jan geiszelmann   >>>"
  180. 9240 print"<<<-------------* 1989 *------------>>>"
  181. 9250 printtab(4)"*******************************"
  182. 9260 printtab(4)"*                             *"
  183. 9270 printtab(4)"*******************************":print"[145][145]"tab(6);
  184. 9280 forz=1to27:readz$
  185. 9290 forx=1to100:next:ifz$="x"thenprint" ";:next
  186. 9295 printz$;:next
  187. 9297 load"world",8,1
  188. 9299 rem fuer datasette : zeile 9297 loeschen und zeile 9300-9320 eingeben
  189. 9300 print:print:print:print"[144]load"chr$(34)"world"chr$(34)",1,1[145][145]";:poke631,13
  190. 9310 poke632,90:poke633,61:poke634,49:poke635,58:poke636,71:poke637,111
  191. 9320 poke638,49:poke639,13:poke198,10:end
  192. 9500 k$(1)="strenght.......":k$(2)="stamina........":k$(3)="intelligence..."
  193. 9510 k$(4)="wisdom.........":k$(5)="passwords......":sp$(1)="blue tassle"
  194. 9520 sp$(2)="boots":sp$(3)="magic missile":sp$(4)="mark of fire"
  195. 9530 sp$(5)="swim-west":sp$(6)="golden key":sp$(7)="key":return
  196. 10000 poke198,0:wait198,1:getz$
  197. 10010 ifz$="@"thens=p-40:print"north -- ";:z=1:y1=y-1:gotota+10
  198. 10020 ifz$=":"thens=p-1:print"west --- ";:z=2:y1=y:gotota+10
  199. 10030 ifz$=";"thens=p+1:print"east --- ";:z=3:y1=y:gotota+10
  200. 10040 ifz$="/"thens=p+40:print"south -- ";:z=4:y1=y+1:gotota+10
  201. 10050 goto80
  202. 15000 poke214,3:sys58640:print:v=1
  203. 15010 ify1=9thenv$(a,3)="buy a boat":v$(a,2)="talk to people":v=2
  204. 15020 ify1=1thenv=3
  205. 15030 ify1=17thenv$(a,3)="buy the mark of fire":v=4
  206. 15100 i=1:forz=1to4:printi"[157].) "v$(a,z):i=i+1:next:print"what do you want ? ";
  207. 15110 poke198,0:wait198,1:getz$:ifval(z$)<1orval(z$)>4then15110
  208. 15120 printz$:print:print:onval(z$)goto15125,15127,15128,15370
  209. 15125 x=0:ona+1goto15230,15130
  210. 15127 x=1:ona+1goto15276,15130
  211. 15128 onvgoto15200,15330,15276,15400
  212. 15130 forz=1to4:printz"[157].) "w$(x,z):next:print"your interest ? ";
  213. 15150 poke198,0:wait198,1:getz$:printz$:ifval(z$)<1orval(z$)>4then1460
  214. 15160 z=val(z$):print"the "w$(x,z)" cost you"w(x,z)"[157]. ok ? ";:u=15170:goto15530
  215. 15170 i=w(x,z):u=15180:goto15500
  216. 15180 g=g-i:print"ok!":ifx=0thenw$=w$(0,z):w=3+z*2:goto15520
  217. 15190 ar$=w$(1,z):k=z*2+1:goto15520
  218. 15200 print"the people here do not know anything.":goto15520
  219. 15230 p=int(rnd(0)*20)+32:print"100 food units cost you"p"[157]. ok ? ";
  220. 15235 u=15240:goto15530
  221. 15240 i=p:u=15250:f=f+100:goto15500
  222. 15250 print"now you have"int(f)"food units":g=g-p:goto15520
  223. 15276 ifv<>2andv<>3then15280
  224. 15277 print"they tell you a secret password.":b(5)=v*10:goto15520
  225. 15280 p=int(rnd(0)*75)-50:ifg=0thenprint"no money !":goto1460
  226. 15282 print"gambling ...":forz=1to1000:next:i=0:u=15285:goto15500
  227. 15285 ifp<0thenprint"i'm sorry but you have lost";:goto15310
  228. 15290 ifp>0thenprint"ohh. you have won";:goto15312
  229. 15300 goto15282
  230. 15310 ifsgn(p)*p>gthenp=-1*g
  231. 15312 printp*sgn(p)"!"::g=g+p:goto15520
  232. 15315 goto15520
  233. 15330 print"the boat cost 100 coins ! ok ? ";:u=15340:goto15530
  234. 15340 i=100:u=15350:goto15500
  235. 15350 g=g-100:y=9:b=5:t=21101:ri=0:v1=37:forz=1to500:next
  236. 15370 poke53272,29:goto23
  237. 15400 print"the mark of fire cost 50 ! ok ? ";:u=15410:goto15530
  238. 15410 u=15420:i=50:goto15500
  239. 15420 sp=spor8:g=g-i:goto15520
  240. 15500 ifg<ithenprint"you have not enough money !":forz=1to500:next:goto1460
  241. 15510 goto u
  242. 15520 forz=1to700:next:goto1460
  243. 15530 poke198,0:wait198,1:getz$:ifz$<>"y"thenprint"n":goto15520
  244. 15540 printz$:goto u
  245. 16000 print"[147]you have entered the castle of a lord"
  246. 16010 print"for 50 coins you get 1000 units of power"
  247. 16020 print"do you want ? ";
  248. 16030 poke198,0:wait198,1:getz$:ifz$<>"y"thenprint"n":forz=1to200:next:goto26
  249. 16040 ifg<50thenprint"you have not enough money":goto26
  250. 16050 printz$:forz=1to200:next:g=g-50:h=h+1000:goto26
  251. 18000 forz=1to16:fori=1to16::poke53280,i:next:poke53281,z:next
  252. 18010 print"[147]congratulations "n$
  253. 18020 a$="you have managed it to destroy the dark tower and to kill the"
  254. 18030 a$=a$+" wizard saruman.thepeople living in sosaria have made you  to "
  255. 18035 a$=a$+"their new king for the next 20 years. end of report "
  256. 18040 forz=1to183:printmid$(a$,z,1);:fori=1to150:next:next:end
  257. 20000 print"you are not intelligent enough"
  258. 20005 printtab(4)"so that you may pass.":goto90
  259. 20010 print"you do not know the secret password.":goto90
  260. 60000 dataa,x,f,a,n,t,a,s,y,x,r,o,l,e,x,p,l,a,y,i,n,g,x,g,a,m,e
  261. 60010 data10,12,14,17,22,23,28,30,36,45,46,50,55,26,21,29,dagger
  262. 60020 data 50,axe,80,bow,100,gun,150,cloth,50,leather,80,chain,100,shield,150
  263.