home *** CD-ROM | disk | FTP | other *** search
/ Floppy Magazine 1987 #1 / Floppy_Magazine_87-1_1987_Megasystems_Oy_fi_Side_B.d64 / 5the (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  3KB  |  85 lines

  1. 5 ifpeek(828)=3then482
  2. 7 ifpeek(828)<>0then14
  3. 8 poke53281,0:poke53280,0:print"[147][154][142]"
  4. 10 poke646,14:x=24:y=3:gosub300:poke828,1
  5. 11 fori=0to8:poke1316+i,160:poke1636+i,160:next
  6. 12 fori=0to8:poke1315+i*40,160:poke1324+i*40,160:next
  7. 14 print"[154] keys:"av:print"[145]"tab(24)"coins:"ra
  8. 15 ifki=1thenprint"[129]         you have an axe"
  9. 17 poke54296,0:poke54296,15:poke54296,0
  10. 20 sys49152:poke54296,2:poke54296,0
  11. 25 jv=peek(56320):fr=jvand16:jv=15-(jvand15):ifjv=0andpe=16then25
  12. 27 iffr=0then101
  13. 28 lx=0:ly=0
  14. 30 ifjv=1thenli=-40:ly=-1:goto50
  15. 32 ifjv=2thenli=40:ly=1:goto50
  16. 34 ifjv=4thenli=-1:lx=-1:goto50
  17. 36 ifjv=8thenli=1:lx=1:goto50
  18. 38 goto25
  19. 50 poke50003,peek(1480+li):sys50000:ifpeek(781)<>0then25
  20. 52 fori=49155to49233step6:pe=peek(i)+peek(i+1)*256:pe=pe+li:hi=int(pe/256)
  21. 54 lo=pe-hi*256:pokei,lo:pokei+1,hi:next:x=x+lx:y=y+ly:goto20
  22. 100 poke54296,0:poke54296,15:poke54296,0
  23. 101 mp=38000+x+y*40:pe=peek(mp)
  24. 102 ifpe=71thenav=av+1:pokemp,32:pokemp+1000,0:goto494
  25. 104 ifpe=72thenra=ra+1:pokemp,32:pokemp+1000,0:goto14
  26. 105 ifpe=31thenpokemp,32:ki=1:goto14
  27. 106 yl=peek(1440):al=peek(1520):va=peek(1479):oi=peek(1481)
  28. 108 ifyl=70andki=1thenpokemp-40,81:pokemp+960,5:goto14
  29. 110 ifal=70andki=1thenpokemp+40,81:pokemp+1040,5:goto14
  30. 112 ifva=70andki=1thenpokemp-1,81:pokemp+999,5:goto14
  31. 114 ifoi=70andki=1thenpokemp+1,81:pokemp+1001,5:goto14
  32. 116 ifyl=67andav>0thenpokemp-40,32:pokemp+960,0:av=av-1:goto14
  33. 118 ifal=67andav>0thenpokemp+40,32:pokemp+1040,0:av=av-1:goto14
  34. 120 ifva=68andav>0thenpokemp-1,32:pokemp+999,0:av=av-1:goto14
  35. 122 ifoi=68andav>0thenpokemp+1,32:pokemp+1001,0:av=av-1:goto490
  36. 123 ifpe=94then480
  37. 124 ifpe=65then650
  38. 125 ifpe<>73then25
  39. 126 va=peek(39000+x+y*40)
  40. 128 print""
  41. 130 ifva<>250then136
  42. 132 ifrr=0thenprint" you visited the castle and got a key":rr=1:av=av+1:goto200
  43. 134 print"     you visited the castle":goto200
  44. 136 ifva<>247then140
  45. 138 ifvp=0thenvp=1:av=av+1:print" you visited the castle and got a key":goto200
  46. 139 goto134
  47. 140 ifva<>35then145
  48. 142 ifcy=0thency=1:av=av+1:print" you visited the castle and got a key":goto200
  49. 143 goto134
  50. 145 ifva<>45andva<>253then160
  51. 147 goto600
  52. 160 ifva<>65then25
  53. 170 print"[155]   you came to your homecastle !":forq=0to200:poke54296,2
  54. 172 poke54296,0:next:goto700
  55. 200 forw=0to3000:next:print"[145]                                       ":goto14
  56. 300 print"[147]"
  57. 302 print"[153]              return to"
  58. 304 print"    #$[176][191][170][185]  [176][191][177][187][162][181][170][185][178][174][190][179][173]+#$[][170][185] * "
  59. 306 print"    %'[188][172][175][171]  [188][172][165][180][182][167][175][171][163][184][189][183]-\%'<>[175][171] @ "
  60. 308 print""
  61. 310 print"[158]      by harri & ilpo hakkarainen"
  62. 312 print"            ^ 1987 hih[192]soft"
  63. 314 return
  64. 480 ifpeek(828)=3then610
  65. 481 poke828,3:sys51000:print"[144]":load"7the",8,1
  66. 482 ifki=1thenpoke38228,32
  67. 484 ifpo=1thenpoke38220,32
  68. 486 ifky=1thenpoke38777,32
  69. 488 goto14
  70. 490 ifpeek(828)=3thenpo=1
  71. 492 goto14
  72. 494 ifpeek(828)=3thenky=1
  73. 496 goto14
  74. 600 ifpeek(828)=2then610
  75. 602 poke828,2:sys51000:print"[144]":load"6the",8,1
  76. 610 poke828,1:sys51100:forll=1to500:next:goto14
  77. 650 print""
  78. 651 ifra=5thenav=av+1:ra=0:tm=1:print"         you bought a key":goto200
  79. 652 iftm=1thenprint"      there is nothing to buy":goto200
  80. 654 print"    you do not have enough coins":goto200
  81. 700 print" press button to start a new game"
  82. 702 wait56320,16,16
  83. 705 print"[147][144]load"chr$(34)"the homecastle !"chr$(34)",8":poke828,0
  84. 708 print"run":poke631,19:poke632,13:poke633,13:poke634,13:poke198,4:end
  85.