home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 86 / 086.d81 / fargo (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1991-01-01  |  6.9 KB  |  178 lines

  1. 5 dv=peek(186):ifdv<8thendv=8
  2. 15 printchr$(142)"":goto1000
  3. 19 rem *** main game loop***
  4. 20 pokex%,32:onm%goto600:k%=peek(56320)and15:x%=x%+j%(k%)+d%
  5. 30 onc%(peek(x%))goto200,210,220,230,800,260,270,900,950
  6. 40 pokex%,i%:ond1%goto100:pokel1%,72:l1%=l1%-u%:onq%(peek(l1%))goto300,330,360,900
  7. 60 pokesb+l1%,8:pokel1%,71:ond2%goto150:pokel2%,74:l2%=l2%+u%
  8. 70 onq%(peek(l2%))goto400,430,460,950
  9. 80 pokesb+l2%,8:pokel2%,73:goto20
  10. 100 pokel1%,32:l1%=l1%+u%:ifl1%=s1%thenl1%=y1%+rnd(1)*28:s1%=l1%+u%:d1%=0:goto60
  11. 110 goto60
  12. 150 pokel2%,32:l2%=l2%-u%:ifl2%=s2%thenl2%=y2%+rnd(1)*28:s2%=l2%-40:d2%=0:goto80
  13. 160 goto80
  14. 200 pokes1,65:d%=-d%:x%=x%+d%:pokes1,64:goto40
  15. 210 pokes1,ac%:pokex%,69:sc=sc+125:printn$sc;:d%=-d%:x%=x%+d%:pokes1,32:goto40
  16. 220 pokes1,ac%:pokex%,69:sc=sc+250:printn$sc;:d%=-d%:x%=x%+d%:pokes1,da%:goto40
  17. 230 pokes1,ac%:pokex%,69:sc=sc+500:printn$sc;:d%=-d%:x%=x%+d%:pokes1,da%:goto40
  18. 260 x%=1505:goto40
  19. 270 bn=lv*1000:printv$bn:fort=1to1500:next:pokesb+10,8
  20. 275 forj=1to5:fort=1to10:next:next:sc=sc+1000:printn$sc;:pokes2,65
  21. 280 bn=bn-1000:pokes2,64:printv$bn:forj=1to200:next:ifbn>0then275
  22. 285 pokesb+8,35:lv=lv+1:iflv=16then8000
  23. 290 goto5000
  24. 300 l1%=l1%+u%:d1%=1:goto60
  25. 330 pokes2,129:pokes2,128:pokel1%,70:l1%=l1%+u%:d1%=1:goto60
  26. 360 pokes2,129:pokes2,128:pokel1%,32:l1%=l1%+u%:d1%=1:goto60
  27. 400 l2%=l2%-u%:d2%=1:goto80
  28. 430 pokes2,129:pokes2,128:pokel2%,70:l2%=l2%-u%:d2%=1:goto80
  29. 460 pokes2,129:pokes2,128:pokel2%,32:l2%=l2%-u%:d2%=1:goto80
  30. 599 rem** keyin
  31. 600 getm$:ifm$=""thenx%=x%+1+d%:goto30
  32. 610 ifm$=""thenx%=x%-1+d%:goto30
  33. 620 x%=x%+d%:goto30
  34. 799 rem** death
  35. 800 w=peek(x%):pokesb+24,7:pokes3,129:pokex%,27:fort=1to10:pokesb+15,31-t
  36. 810 forj=1to10:next:next:pokex%,0:fort=1to10:pokesb+15,21-t:forj=1to10:next:next
  37. 820 pokex%,35:fort=1to10:pokesb+15,11-t:forj=1to10:next:next:pokes3,128
  38. 830 fort=1to10:getm$:next:pokex%,w:ifw=70thenpokex%,32
  39. 840 pokesb+24,15:nl=nl-1:ifnl<0then8000
  40. 850 x%=1505:print"[150]"left$(l$,33)left$(d$,15)"   [157][157][157]"nl:w=1:goto40
  41. 899 rem*** swallow bottom
  42. 900 w=30:pokesb+24,8:pokex%,71:pokesb+x%,8:pokes3,17
  43. 910 pokesb+15,w:x%=x%+u%:w=w-1:ifpeek(x%)<>72thenpokes3,16:goto800
  44. 920 pokex%,75:fort=1to75:next:pokex%,72:goto910
  45. 949 rem*** swallow top
  46. 950 w=30:pokesb+24,8:pokex%,73:pokesb+x%,8:pokes3,17
  47. 960 pokesb+15,w:x%=x%-u%:w=w-1:ifpeek(x%)<>74thenpokes3,16:goto800
  48. 970 pokex%,75:fort=1to75:next:pokex%,74:goto960
  49. 999 rem*** initial set-up ***
  50. 1000 poke53281,0:poke53280,0:poke650,128:gosub9000
  51. 1005 sys57812"fargo font",dv,0:poke780,0:poke781,0:poke782,56:sys65493
  52. 1010 dim c%(74),q%(74),j%(15),m%(15,5)
  53. 1020 sb=54272:fort=1to17:readw%,x%,y%:c%(w%)=x%:q%(w%)=y%:next:u%=40
  54. 1030 fort=0to15:readw:j%(t)=w:next
  55. 1060 l$="":d$=""
  56. 1070 b1$="[151]":b2$=b1$:forj=1to10:b1$=b1$+"[196][197]":next:forj=1to10:b1$=b1$+"[197][196]":next
  57. 1080 forj=1to10:b2$=b2$+"[197][196]":next:forj=1to10:b2$=b2$+"[196][197]":next
  58. 1090 b1$=left$(b1$,40):b2$=left$(b2$,40):b3$="[151][157][157][145]"
  59. 1100 forj=1to12:b3$=b3$+"[196][157][197][157]":next:b3$=b3$+""
  60. 1110 forj=1to24:b3$=b3$+chr$(148)+" ":next
  61. 1120 fg$="fargofargofargofargofargofargofargofargofargofargofargofargofargofarg"
  62. 1150 f$="]\^_]]^\_\_]^\\]^_\]_^^]\]^\__]\^^]_\]\^^\]^_]_\"
  63. 1160 n$="[154]"+left$(d$,7)+left$(l$,31)
  64. 1170 fort=1to15:forj=0to5:readw:m%(t,j)=w:next:next
  65. 1180 v$=""+left$(l$,31)+left$(d$,20)+"      [157][157][157][157][157][157]"
  66. 1200 print"[147]":poke53272,30
  67. 1999 rem*** main menu ***
  68. 2000 gosub3000:t=0:lv=1
  69. 2010 w=int(rnd(1)*15)+1:poke55432+int(rnd(1)*6),w:poke55549+t,w:poke55561-t,w
  70. 2015 t=t+1:j=(jand15):ift=6thent=0
  71. 2020 getm$:ifm$=" "thenm%=1:goto4000
  72. 2030 w=(peek(56320)and16):ifm$="q"thenend
  73. 2035 if(m$>="1")and(m$<="9")thenlv=val(m$):gosub2500
  74. 2040 ifw=0thenm%=0:goto4000
  75. 2050 ifm$<>"l"then2010
  76. 2051 print"[147]":poke53272,21
  77. 2052 open15,8,15,"r0:hello connect=hello connect":input#15,er%:close15
  78. 2053 ifer%<>63thenend
  79. 2054 print"[147][144]load"chr$(34)"hello connect"chr$(34)",8"
  80. 2055 print"run"
  81. 2056 poke631,13:poke632,13:poke198,2:end
  82. 2060 goto2010
  83. 2500 print""left$(l$,29)left$(d$,18)m$:return
  84. 2999 rem*** title draw
  85. 3000 print"[147][151]";:fort=1to24:printmid$(fg$,t,39):next:printmid$(fg$,25,39)"";
  86. 3010 print"":w$=left$(l$,16):printw$" [145][157]       [157] ":printw$"       "
  87. 3020 w$=" ":m$="                              ":printw$m$
  88. 3030 printw$"[158][196] [153][193] [154][194] [150][195] king's quest! [195] [154][194] [153][193] [158][196] "
  89. 3040 printw$"[129][199] [199] [199] [199]               [199] [199] [199] [199] ":printw$"[200] [200] [200] [200] [199] [199] [199] [199] [199] [199] [199] [200] [200] [200] [200] "
  90. 3050 printw$left$(f$,29)" ":printw$m$:printw$"[153] press ([153]q)[153]uit or ([153]l)[153]oadstar!  "
  91. 3060 printw$m$:printw$"[154]press [159]fire[154] to play using joy2 ":printw$m$:b$="    "
  92. 3070 printw$"[155] or [150]press the [156]spacebar[150] to "b$:printw$b$"play using crsr keys! "b$
  93. 3080 printw$m$:printw$b$"[157][155]!start play at level 1[155]!"b$
  94. 3090 printw$"[152]([155]press [152]([155]1[152]-[155]9[152])[155] to change level[152]) ":printw$m$:return
  95. 3999 rem *** pre-game
  96. 4000 sc=0:nl=3:s1=54276:s2=54283:s3=54290:ac%=33:da%=32
  97. 4010 fort=0tolv-1:sc=sc+1000*t:next
  98. 4020 fort=0to24:poket+sb,0:next
  99. 4030 pokesb,47:pokesb+1,53:pokesb+5,25:pokesb+3,8
  100. 4040 pokesb+8,35:pokesb+13,136
  101. 4050 pokesb+20,252
  102. 4999 rem*** draw screen ***
  103. 5000 pokesb+24,10:print"[147]";:w$=" level[157][157][157][157][153]":pokes3,17:pokesb+15,32
  104. 5010 fort=1to31:print""left$(l$,t)w$lv:pokesb+15,32-t:next:pokes3,16:pokesb+24,15
  105. 5020 print"";:w$="[155]%[159]                             [155]&":fort=1to24:printw$:next
  106. 5030 printw$"";:w=m%(lv,0):fort=1tow:print""mid$(f$,t*2,29):next
  107. 5040 nl=nl+1:fort=1tow:print""left$(d$,25-t)mid$(f$,t*2,29);:next
  108. 5060 w$=left$(l$,31):print""w$"[151][197][196][197][196][196][197][196][197][157][196][145]":printw$"[197][157][196]f[158]arg[129]o[156]![151][196][157][197][145]"
  109. 5070 printw$"[196][157][197][196][197][196][196][197][196][197]":printw$"score[154]":printw$sc
  110. 5080 printw$"lives[157][157][157][157][150]"nl
  111. 5090 printw$"[158]level[157][157][157][157][157]bonus[157][157][157][157][157][157]"lv*1000
  112. 5100 j=28:p1=1146+w*40:p2=1866-w*40:fort=1tom%(lv,1):y%=rnd(1)*9:y%=y%*40+1346
  113. 5110 y%=y%+rnd(1)*j:pokey%,68:pokesb+y%,int(rnd(1)*15)+1:next:fort=1tom%(lv,5)
  114. 5120 y%=rnd(1)*11:y%=y%*40+1306+rnd(1)*j:pokey%,70:pokesb+y%,int(rnd(1)*15)+1:next
  115. 5130 fort=1tom%(lv,4):y%=p1+rnd(1)*j:pokey%,67:pokesb+y%,10:y%=p2+rnd(1)*j
  116. 5140 pokey%,67:pokesb+y%,10:next:p1=p1-40:p2=p2+40:fort=1tom%(lv,3)
  117. 5150 y%=p1+rnd(1)*j:pokey%,66:pokesb+y%,14:y%=p2+rnd(1)*j:pokey%,66:pokesb+y%,14
  118. 5160 next:p1=p1-40:p2=p2+40:fort=1tom%(lv,2):y%=p1+rnd(1)*j:pokey%,65
  119. 5170 pokesb+y%,13:y%=p2+rnd(1)*j:pokey%,65:pokey%+sb,13:next:poke1305,69:poke1705,69
  120. 5200 y1%=1986-w*40:y2%=1026+w*40:l1%=y1%+10:l2%=y2%+15:d1%=0:d2%=0:x%=1505
  121. 5210 s1%=l1%+40:s2%=l2%-40:d%=40:i%=64:pokesb+l1%,8:fort=1to20:getm$:next:goto20
  122. 7999 rem*** game over
  123. 8000 w$="[158][198]                       [198]":b$="[158][198]"
  124. 8010 print""b$"[198][198][198][198][198][198][198][198][198][198][198][198][198][198][198][198][198][198][198][198][198][198][198][198]":printw$
  125. 8020 ifnl<0then8100
  126. 8030 printb$"  ! congratulations !  [158][198]":printw$:printb$"[154]  you have completed [158][198]"
  127. 8040 printb$"[154]   the king's quest!   [158][198]":printw$:printb$"[156]   may your reign be   [158][198]"
  128. 8050 sc=sc+nl*10000:printb$"[156]  long and prosperous  [158][198]":goto8200
  129. 8100 printb$"     ! game-over !     [158][198]":printw$:printb$"[153]  you have failed to   [158][198]"
  130. 8110 printb$"[153]  complete the quest!  [158][198]":printw$:printb$"[154] better luck next time [158][198]"
  131. 8200 printw$:printb$"[150]  your final score is  [158][198]":printw$:printw$:printw$
  132. 8210 printb$"[155]     press any key     [158][198]":printw$:printb$"[198][198][198][198][198][198][198][198][198][198][198][198][198][198][198][198][198][198][198][198][198][198][198][198]"
  133. 8220 print"[145][145][145][145][145]"b$"[159]        "sc:fort=1to25:getm$:next
  134. 8230 getm$:ifm$=""then8230
  135. 8240 goto2000
  136. 8999 rem*** credits ***
  137. 9000 j$="[209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209]":print"[147][209][209][209]"j$"[209][209][209]"
  138. 9010 print"[209][158][209][209]"j$"[209][209][209]":print"[209][158][209][209]"j$"[209][158][209][209]":fort=1to7:print"[209][158][209][209]"j$"[209][158][209][209]":next
  139. 9020 print"[209][158][209][209]"j$"[209][158][209][209]":print"[209][158][209][209]"j$"[209][209][209]":print"[209][209][209]"j$"[209][209][209]":print""
  140. 9030 print"[151][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
  141. 9040 print"[152]             fargo!             "
  142. 9050 print"[152]      by: robert mundschau      "
  143. 9060 print"[152] v1.0 published on loadstar #86 "
  144. 9070 print"[152]  subscriptions 1-800-831-2694  "
  145. 9080 print"[152]       all rights reserved      "
  146. 9090 print"[151][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]"
  147. 9100 print"       setting up, please wait...":return
  148. 9997 rem ************
  149. 9998 rem *** data ***
  150. 9999 rem ************
  151. 10000 open15,8,15,"s0:fargo":close15:save"fargo",8:end
  152. 10005 rem*** character arrays ***
  153. 10010 data 29,5,1,30,5,1,31,5,1
  154. 10020 data 37,6,0,38,7,0,64,0,4
  155. 10030 data 65,2,1,66,3,1,67,4,1
  156. 10040 data 68,1,2,69,1,1,70,5,3
  157. 10050 data 71,8,1,72,5,1,73,9,1
  158. 10060 data 28,5,1,74,5,1
  159. 10099 rem*** joystick array ***
  160. 10100 data 0,0,0,0,0,0,1,1
  161. 10110 data 1,-1,-1,-1,0,0,0,0
  162. 10199 rem*** level amounts
  163. 10200 data 1,30,20,10,2,2
  164. 10210 data 1,28,18,10,3,4
  165. 10220 data 2,26,16,8,5,6
  166. 10230 data 2,24,14,8,6,8
  167. 10240 data 3,22,12,6,8,10
  168. 10250 data 3,20,10,6,9,12
  169. 10260 data 4,18,8,4,11,14
  170. 10270 data 4,16,6,4,12,16
  171. 10280 data 5,14,4,2,14,18
  172. 10290 data 5,12,2,2,15,20
  173. 10300 data 6,10,4,4,14,22
  174. 10310 data 6,8,6,4,12,24
  175. 10320 data 7,6,8,6,10,20
  176. 10330 data 5,50,4,3,4,2
  177. 10340 data 3,1,10,10,10,55
  178.