home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1984 October / 1984-10.d64 / tomb_64 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  2KB  |  70 lines

  1. 0 poke56,28:clr:print"[147]":poke53280,2:poke53281,0:goto3000:ph=0:sc=0
  2. 1 gosub2000:c=55296:dx=1:dy=1:ex(1)=5:ex(2)=20:ex(3)=35
  3. 2 q=40:ey(1)=12:ey(2)=6:ey(3)=22:poke1982,32
  4. 3 poke1024+q*dy+dx,33:pokec+q*dy+dx,4
  5. 4 forz=1to3:poke1024+q*ey(z)+ex(z),36:pokec+q*ey(z)+ex(z),5:next
  6. 5 poke2023,37:poke56295,7:s=1024
  7. 6 cl=54272:vl=cl+24:fori=cltocl+24:pokei,0:next
  8. 11 tr=500
  9. 18 pokevl,15:pokecl+5,15:pokecl+6,129:for z=1to25:next:pokevl,0
  10. 20 x1=peek(56320):cy=-(((x1and1)=1)+((x1and2)=2)*-1)
  11. 21 cx=((x1and8)=8)+((x1and4)=4)*-1
  12. 23 ifcx=0andcy=0then80
  13. 24 ifpeek(s+q*(dy+cy)+(dx+cx))=35then80
  14. 25 pokes+q*dy+dx,32:dx=dx+cx:dy=dy+cy:ifpeek(s+q*dy+dx)=36then4000
  15. 28 pokec+q*dy+dx,4:pokes+q*dy+dx,33
  16. 29 ifs+q*dy+dx=2023then5000
  17. 80 b=int(rnd(1)*3)+1:cx(b)=0:cy(b)=0:w=0
  18. 81 pokes+q*ey(b)+ex(b),32:cx(b)=((ex(b)>dx)-(ex(b)<dx))
  19. 82 ex(b)=ex(b)+cx(b)
  20. 85 cy(b)=((ey(b)>dy)-(ey(b)<dy))
  21. 86 ifpeek(s+q*ey(b)+ex(b)+q*cy(b))=35thency(b)=0:ex(b)=ex(b)-cx(b)
  22. 87 ey(b)=ey(b)+cy(b)
  23. 88 ifpeek(s+q*ey(b)+ex(b))=33then4000
  24. 89 pokes+q*ey(b)+ex(b),36:pokec+q*ey(b)+ex(b),5:tr=tr-1:goto18
  25. 91 goto18
  26. 299 cx(b)=0:cy(b)=0
  27. 1999 end
  28. 2000 form=1064to1983
  29. 2001 if int(rnd(1)*3)=1andpeek(m-1)<>35then 2004
  30. 2002 next
  31. 2003 return
  32. 2004 pokem+54272,2:pokem,35:next
  33. 2999 return
  34. 3000 poke56334,peek(56334)and254:poke1,peek(1)and251:print"";
  35. 3001 printtab(15)"redefining[146]":fori=0to511:pokei+12288,peek(i+53248):nexti
  36. 3002 fori=12552to12559:readj:pokei,j:next
  37. 3003 data60,60,24,255,60,60,102,102
  38. 3004 fori=12568to12575:readj:pokei,j:next
  39. 3005 data255,255,255,255,255,255,255,255
  40. 3006 fori=12576to12583:readj:pokei,j:next
  41. 3007 data129,153,102,60,255,60,66,66
  42. 3008 fori=12584to12591:readj:pokei,j:next:print"[147]"
  43. 3009 data0,0,126,126,126,126,0,0
  44. 3010 poke1,peek(1)or4:poke56334,peek(56334)or1:poke53272,peek(53272)and240or12
  45. 3011 forc=1024to1063:pokec+54272,2:pokec,35:pokec+55232,2:pokec+960,35:next
  46. 3012 forc=1024to1984step40:pokec+54272,2:pokec,35:pokec+54311,2:pokec+39,35:next
  47. 3111 goto 1
  48. 4000 forl2=1to5:pokevl,9:pokecl+5,72:pokecl+6,241:forl1=50to25step-1
  49. 4001 poke cl+1,l1:pokecl+4,33:nextl1:nextl2:pokecl+4,32
  50. 4003 printtab(6)"the guardian has caught you"
  51. 4004 printtab(17)"[158]gold="sc
  52. 4005 print"[159]hit the trigger if you dare to try again"
  53. 4006 printtab(6)"[159]type (q) if you wish  to quit"
  54. 4007 geta$:x1=peek(56320)and16:ifa$="q"thenpoke53272,21:print"[147]":end
  55. 4009 ifx1<>0then 4007
  56. 4010 if sc<>ph then ph=sc
  57. 4011 print"[147]":sc=0:goto 3011
  58. 5000 print:printtab(10)"you grab the treasure"
  59. 5001 pokevl,15:pokecl+5,71:pokecl+6,241:forz=1to100:pokecl+4,33
  60. 5002 pokecl+1,int(rnd(1)*128)+64:forhg=1to10:next:next:pokecl+4,32
  61. 5100 print"[147]":printtab(14)"  gold=[158]"sc;:print" "
  62. 5101 forl=1totr:sc=sc+1:printtab(21)"[145]"sc:next
  63. 5120 print"  most treasure recovered before=";:printtab(32)"[158]"ph
  64. 5122 printtab(10)"[156] press q to quit now"
  65. 5123 print:printtab(7)"hit the trigger to continue"
  66. 5124 geta$:x1=peek(56320)and16:ifx1=0 then print"[147]":goto3011
  67. 5125 if a$="q"then poke53272,21:print"[147]":end
  68. 5126 goto 5124
  69. 20000 x1=peek(56320)and16:printx1:goto20000
  70.