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

  1. 0 print"[147]":poke36879,10:goto3000:ph=0:sc=0:s=7680
  2. 1 gosub2000:s=7680:c=38400:dx=1:dy=1:ex(1)=10:ex(2)=13:ex(3)=2
  3. 2 q=22:ey(1)=11:ey(2)=10:ey(3)=17:poke8162,32:poke8139,32:poke7726,32
  4. 3 pokes+q*dy+dx,33:pokec+q*dy+dx,4
  5. 4 forz=1to3:pokes+q*ey(z)+ex(z),36:pokec+q*ey(z)+ex(z),5:next
  6. 5 poke8185,37:poke38905,7
  7. 11 tr=500
  8. 12 poke36878,15
  9. 18 poke36875,140:for z=1to25:next
  10. 19 poke36875,0
  11. 20 poke37154,127:p=peek(37152)and128:j0=-(p=0):poke37154,255
  12. 21 p=peek(37151):j1=-((pand8)=0):j2=-((pand16)=0):j3=-((pand4)=0)
  13. 22 cx=j0-j2:cy=j1-j3
  14. 23 ifcx=0andcy=0then80
  15. 24 ifpeek(s+q*(dy+cy)+(dx+cx))=35then80
  16. 25 pokes+q*dy+dx,32:dx=dx+cx:dy=dy+cy:ifpeek(s+q*dy+dx)=36then4000
  17. 28 pokec+q*dy+dx,4:pokes+q*dy+dx,33
  18. 29 ifs+q*dy+dx=8185then5000
  19. 79 ifint(rnd(1)*3)=1then18
  20. 80 b=int(rnd(1)*3)+1:cx(b)=0:cy(b)=0:w=0
  21. 81 pokes+q*ey(b)+ex(b),32:cx(b)=((ex(b)>dx)-(ex(b)<dx))
  22. 82 ex(b)=ex(b)+cx(b)
  23. 85 cy(b)=((ey(b)>dy)-(ey(b)<dy))
  24. 86 ifpeek(s+q*ey(b)+ex(b)+q*cy(b))=35thency(b)=0:ex(b)=ex(b)-cx(b)
  25. 87 ey(b)=ey(b)+cy(b)
  26. 88 ifpeek(s+q*ey(b)+ex(b))=33then4000
  27. 89 pokes+q*ey(b)+ex(b),36:pokec+q*ey(b)+ex(b),5:tr=tr-1:goto18
  28. 91 goto18
  29. 299 cx(b)=0:cy(b)=0
  30. 1999 end
  31. 2000 form=7702to8163
  32. 2001 ifint(rnd(1)*3)=1 andpeek(m-1)<>35then2004
  33. 2002 next
  34. 2003 return
  35. 2004 pokem+30720,2:pokem,35:next
  36. 2999 return
  37. 3000 poke56,28:poke52,28:poke51,peek(55):clr:print"";:printtab(6)"redefining"
  38. 3001 cs=256*peek(52)+peek(51):fori=cstocs+511:pokei,peek(i+32768-cs):next
  39. 3002 fori=7432to7439:readj:pokei,j:next
  40. 3003 data60,60,24,255,60,60,102,102
  41. 3004 fori=7448to7455:readj:pokei,j:next
  42. 3005 data255,255,255,255,255,255,255,255
  43. 3006 fori=7456to7463:readj:pokei,j:next
  44. 3007 data129,153,102,60,255,60,66,66
  45. 3008 fori=7464to7471:readj:pokei,j:next:print"[147]"
  46. 3009 data0,0,126,126,126,126,0,0
  47. 3010 clr:poke36869,255
  48. 3011 forc=7680to7701:pokec+30720,2:pokec,35:pokec+31204,2:pokec+484,35:next
  49. 3012 forc=7680to8164step22:pokec+30720,2:pokec,35:pokec+30741,2:pokec+21,35:next
  50. 3111 goto 1
  51. 4000 poke 36878,15:poke36876,200:forl1=250 to 150step-17
  52. 4001 poke36875,l1:forl2=150to190:poke36876,l2:nextl2,l1
  53. 4002 poke36875,0:poke36876,0
  54. 4003 print"  the guardian has         caught you."
  55. 4004 printtab(8)"[158]gold="sc
  56. 4005 print"[159]hit the trigger if you  dare to try again."
  57. 4006 print"[159]type (q) if you wish         to quit."
  58. 4007 geta$:p=peek(37137):if a$="q"thenpoke251,0:sys251
  59. 4008 if-((pand32)=0)<>1then4007
  60. 4009 if sc>ph then ph=sc
  61. 4010 print"[147]":sc=0:goto3011
  62. 5000 print"you grab the treasure"
  63. 5001 forz=1to100:poke36876,int(rnd(1)*128)+128
  64. 5002 forhg=1to10:next:next:poke36876,0
  65. 5100 print"[147]":print"  gold=[158]"sc;:print" "
  66. 5101 forl=1totr:sc=sc+1:print"[145]"sc:next
  67. 5120 print" most treasure recov-  ered from tomb yet":printtab(8)"[158]"ph
  68. 5121 print"[156] press q to quit now"
  69. 5122 print:print  "   hit the trigger         to continue"
  70. 5123 p=peek(37137):if -((pand32)=0)=1then print"[147]":goto 3011
  71. 5124 if peek(197)=48 then poke251,0:sys251
  72. 5125 goto 5123
  73.