ZXTape! 0Created with Ramsoft MakeTZXrun Hq1:1:1:39435 :6,0;:"screen":6,0;:"help.code":6,0;:"ghosthunt" 4screen 0u ?8p `<0x???0``<<px ``fdLL@b LL @?<x `<0x ????0``@<<x ``fdLL@b LLL@0`<px `0 `08888pp>>0|``&B@0 ```dO@b@0` ` <0x `00`0``<<0x `` B@0` ` <0x `00`0``<<0x ``b0` ` <0x `00`0``<<0x ``DHH@bHHH@0` ` <0x `00p`0``<<0x ``fdLL@b LL @0` `<0x `88880pp``<<0x ``fdLL@b LL @Ą1110b~`3 1110 bb`# 31110@ bb`#  31110@ b~`  1?10@   ~~` ?!?pBB` r!!! b` DD@FFF22``` F|f@@FFF220p  8! @!E @Db :Fdf@@2>"8HH&"" """ D <0HD< Fdf@@"HH@ q¢"! P¢!@ (@$HD D|f@>>"HHH B""!  ""@ (@$HD DDDD""><40pGA¢@Ç g`i4v=0 .65250=03000 :1000 $652452557000X 3990:1:1:7::p=1 0,175:255,0:0,-23:-255,0:0,23:1,7;"HELP for GHOSTHUNT";#1;0,0;1;"To choose this one: press ENTERTo go to the next: press SPACE" 0,143:255,0:0,-135:-255,0:0,135:6,10 ;"instructions";9 ,11 ;"suggestion";12 ,7;"save your program";15,7;"load another level";18,9 ;"about the game" (t,491:900 2$995:z$=13 110n <z$" "502 At,15:900 F#p=p+1:p=6p=1 P 40( n"990:p=11000 xp=22000 p=3500 -p=5p=6:f=1:1045 p=1:w$="LOAD ANOTHER" 7:800 :p=1300,:w$="LOAD YOUR OWN" *p=2400:w$="LOAD ANOTHER" 995:z$=13 h z$" "230 p=3-p:210 ,e'''"If you want any more levels, youwill have to write them yourself- good luck with your program!" T '"To load a version that you savedyourself (suppose the programwas called ""mine"" when you savedit), Just type:"''7;"LOAD ""mine"" ENTER"''':850R #''"LOAD is on the J key."  p=1:w$="SAVE YOUR OWN" #:800 :p=1600X p=2700 995:z$=13 h z$" "530 &p=3-p:510 X'"Choose a name for the program(such as your own name). Thename can be as many as 10characters long."''"Then, using the chosen name,type:" l3''7;"SAVE ""name"" ENTER"' v~''"SAVE is on the S key. Make sureyou have a blank tape in therecorder on which to save yourprogram."  &'"After saving, you may like tocheck that it saved correctly."''"Rewind the tape and, using thesame name, type:"''6;"VERIFY ""name"" ENTER"''"then start the tape."'''"VERIFY is on R in extended mode(see chapter 1 of your manualabout keymodes)."   \0,0;" HOW TO ";w$;" VERSION OF"'11 ;"GHOSTHUNT";31;" "'' %!f$="next":p=2f$="last" *y#1;0,0;1;"Go to BASIC: press ENTERGo to ";f$;" page: press SPACE" 4 R;"then start the tape.": qt+1,3*p+2:t+3,3*p+4:t+2,6:t+4,25:(t+5): :7:0:7::0:0:0: 87:0:0:0:0:7: ""995 z$=:z$=""996  Pf=0:990:p=1:1100L:1900l:p=11060$ /1200:1900l:p=21060$ /1300:1900l:p=31060$ /1400x:1900l:p=41060$ 1500:#1;0,0;1;"Go to BASIC: press ENTERMore about the game: press SPACE":1910v:p=51060$ /1600@:1900l:p=61060$ 91700:1900l:p=8f=01000 ,p=8f=1p=6:1045 $h L2pn=1:1800:'"TO USE THIS PROGRAM, YOU MUSTREAD THIS INTRODUCTION CAREFULLY"''"GHOSTHUNT is a game program witha difference."''"You develop the game yourself,making changes to the programlisting at will, and there's aunique added feature to give youhelp if you should ever need it." V'"You can play GHOSTHUNT simply asan adventure game, or else as afun way to learn BASICprogramming."''"If you find any part of the gameboring, it's up to you to changeit!" ` Fpn=2:1800:'"When you leave the HELP program,you can review the listing ofGHOSTHUNT by making use of theLIST command on the K key."''"YOU CAN'T GO WRONG!  If changesyou make to the program evercause errors, the HELP programwill automatically show you whatwent wrong and why." '"If the going gets too tough,then you can always start afreshby clearing the computer andloading GHOSTHUNT from the tapeagain."  pn=3:1800:''"The unique HELP facility can:"'''" 1) describe the game."'''" 2) suggest changes you could try out in GHOSTHUNT" ''" 3) show you how to SAVE your own versions of the game."'''" 4) show you how to LOAD the next version of GHOSTHUNT." ( xpn=4:1800:''"To use the HELP facility youtype:"''9 ;"RUN help ENTER"''"RUN is on the R key. Press thekeys for H E L P separately,and then press the ENTER key." ''12 ;"WARNING"''"You may sometimes lose HELP, butit will reappear after you nextRUN the GHOSTHUNT game."  ܚi=196-1::i,11 ;"GHOSTHUNT";i+1,7;"the adventure game";i+2,4;"you can program yourself" 20-i,0;"(If you press ENTER, you canthen start the game by typing RUN ENTER) ":i: @pn=1:1650r:'"The aim of GHOSTHUNT is to finda ghost in a haunted house. Totrap it, you must discover theroom in which the ghost is to befound. The game has 5 ""levels""which you must add, one at atime. These are:"''"1) Simply guess the room number." J'"2) You can move from room to room, searching as you go."''"3) The ghost moves about too."''"4) Room names and hiding places are added."''"5) Magic charms can be found." T r5;"ABOUT THE GAME Page ";pn: pn=2:1650r:'"In the final version of the gamethere are four charms - a goldnugget, a silver penny, ashamrock and a locket. Each onehas one of four effects. Theseeffects either:" '" 1) attract the ghost."''" 2) frighten the ghost away."''" 3) provide a hint where the ghost can be found."''" 4) give a hint intended to confuse you."''"The problem is to discover whichis which?"  4;"INTRODUCTION TO GHOSTHUNT Page ";pn : lu#1;0,0;1;"Go to BASIC: press ENTERGo to next page: press SPACE" v995:z$=13 z$" "1910v p=p+1:: [990:3,2;" SOMETHING YOU COULD CHANGE ";10 ,0; -v0v521004+100d*v h 4"Are you unlucky or are you a bitof a smart alec?";15,0;"HINT: start again or leave my private bits alone!": |"Change the tunes by altering thedata for the ""tune subroutines"".";:0,71G:2800 :"300 to 400.": "Try to redefine the keys which make the man move."'"For example, u could mean up, d down, l left and r right.":0,557:2800 :"3000 onwards": `"Try to change when and where theghost moves. For example make itmove to a room at random.":0,63?:2800 :"4000 onwards": v"Try to change the names of the rooms and the objects in them.":0,71G:2800 :"1400 onwards": ("Try to change the effects charmshave when they have been picked up. You may find this quite a challenge!":0,557:2800 :"4400 onwards": 2:255,0:1:0,104h:255,0:0:18,0;"HINT: look at lines ";: Ti=0:;:#1;1,0;"STOP THE TAPE Then press ENTER" :z$=:z$13 .1}L,i:i=20-i:3010 ;: Xee=65245+1:e=0e=9 e=13 e=17e=21991:9990' b?990:23625I\,65246:23626J\,65247 l&c=e+480:e>9 c=c+7 vc;" ";:a=a(65220) {/a127(a);:a=a+1:7035{ 6(a-128);" ";a(65246);":";65248 ^4,0;:e=1"You have probably lost a statement earlier in the program" &e=2"Is this a new variable?" +e=3"Compare and variable values" @e=4"You have made the program too big. Delete some." :e=5"You must be trying to"'"outside the screen" (e=6"Are you dividing by zero?" <e=7"Have you lost on line 160, or mixed upand?" 8e=10 "Check the variable values in thefunction" (e=11 "Check the variable value" $e=12 "Are you using or ?" 3e=14"Check the last and countthe items" &e=18"Have you forgotten a?" Ke=20"Check the number or variable"'"value specifying the colour." Ce=25e=26"Each needs an appropriate somewhere"  Z23689\20"What on earth have you done?"'"You're on your own with this one"  k10 ,0;"See Appendix B of your Spectrum manual for further details aboutthe report codes." *n'''"Press ENTER to see your programor press CAPS SHIFT 1 (ie EDIT)to edit the offending line!" 41:0,108l:255,0:2:0,20:255,0:4:0,68D:255,0:0 >h '65400x ' 65417 :O:_:<#!XG:_:2*K\[S\R##*i[kRB0 m>2!"B\>2D\v  L[i*kʹE\!:2:\*K\[S\RDM*k*K\"U\+"]\>22*K\[S\RDMq#p#^#V#B8 [S\*S\ *K\DM*S\Utghosthunt 4'4,4%GHOSTHUNT + edit 4  65251 !write your own ...  !... adventure game.  !If you need any help or !suggestions - just type +RUN help ENTER  !the program ...  Best=0:  Ghostroom=1+(8*) (Score=60< 21000:introductn <2000:draw house F3000 :make guess P3Guess=Ghostroom8000@:130:right ZScore=Score-10 d:Score085004!:130:eaten by ghost n7500L:stay alive x70F: try again 9000(#:another?  y$="y"30 y$"n"130  !... and the subroutines !clear to b & w colours  17:0:7:0:0:: ,!cheerful tune  6300,:400 @ J<7,.1}L,0,.1}L,4,.1}L,7 TF.1}L,12 ,.1}L,7,.1}L,4,.4L,0 ^!sinister tune  h350^:400 r |j7,.5,-30,.25~,-42*,.5,-30,.25~,-18,.5,-30 '.25~,546,.25~,66B !the musician   no of notes i=1no of notes length,pitch length,pitch i  !clear message area  0:0:0 @i=05:i,0;" ":i  X!press enter to move on  bS1,4;4;7;1;1;"Press ENTER to carry on";z$ l !introduction  200:5 32;1;2,11 ;" GHOSTHUNT " 300,:cheery tune C1;1;1;4,7;" an adventure game " 1200:set udgs $'9 ,7;"What is your name?" .@4;7;1;1;"type your name here: ";n$ 81400x:set vars B&:1;8;"Hello, ";n$;"." L 350^ Vh2;14,2;"When you are ready, ";1;n$;0;","'4;"we'll go to the:" `9:8;4;1;1;" HAUNTED HOUSE " j1600@:600X t !graphics chars  J23675{\,12 :23676|\,154:800 : for "udg" i="a""h"+7 n:i,n i x(8):y(8) i=18  x(i),y(i) i   85U,170,85U,170,85U,170,85U,170,1,2,5,10 ,21,42*,85U,170,0,128,64@,160,80P,168,84T,170:user defined graphics for roof 0,0,0,0,7,7,7,2,15,31,63?,103g,199,135,7,15,128,192,224,32 ,32 ,32 ,128,128:udg of man (15,29,25,17,17,491,115s,0,128,128,128,128,128,128,128,0 214,6,14,11 ,14,18,14,23,18,7,18,11 ,18,19,18,23 x!set variables for prog  Guess=0 4r$(8,13 ):w$(2,8,18) 1400x:i=18 #r$(i),w$(1,i),w$(2,i) i Object=(2*)+1  ^"black bedroom","in the wardrobe","under the bed","study","in the cupboard","under the desk" b"landing","in the bookcase","on the chandelier","magenta room","in the wardrobe","under the bed" `"lounge","under the settee","in the grand piano","dining room","under the table","in the vase" `"conservatory","in the aspidistra","behind the azalea","kitchen","in the oven","in the larder" @!set up charms for game  J9c(4):c$(4,12 ):g(4):g=0 T:1600@ ^i=14 hn=(4*)+1 r;c$(n,1)" "1640h:because already got it |c$(n):charm type 4c(i)=(8*)+1:put charm in a room :j=1i-1:c(i)=c(j)1670:max 1/rm j i  2"gold nugget","shamrock","locket","silver penny" !draw house   200 the skyline and grass /5:0,127:255,0 :4:21,0;:i=030:" ";:i the brickwork '6:i=2012 -1 *i,4;:j=426:"";:j  i the roof A7:2:i=02:11 -i,4+i;"";  'j=121-2*i:"";:j *"":i 3the chimneys 4Cx=7:y=8:c=2:a=3:b=2:2500 >y=21:2500 Gthe upstairs windows H1:7 RDx=13 :y=5:c=0:a=3:b=4:2500 \,0:y=10 :c=1:2500 f#y=17:c=2:2500 p#y=22:c=3:2500 ythe downstairs windows zDx=17:y=6:c=4:a=3:b=3:2500 #y=10 :c=5:2500 #y=18:c=6:2500 #y=22:c=7:2500 the door  0 Ex=17:y=14:c=3:a=4:b=3:2500 Y0:115s,18:115s,19:116t,19:116t,18 5000:show score 2700 :draw man  !draw a block of colour  c i=0a-1:x+i,y; j=0b-1:" "; j:i  !draw man in doorway  8:8:8 x=18:y=15 2900T  !draw man in window  8:8:8 x(Guess),y(Guess);"" !x(Guess)+1,y(Guess);""  T!draw him anywhere  ^ x,y;"" hx+1,y;"" rx+2,y;"" | !make a guess  /7:500:Guess=03200 .0,0;"use arrow keys to move or" h1,0;"press enter to guess now.";:g08;" or"'"press space to drop a charm" 3800:input move z$=" "4800:3020 ,z$=13 :enter, so have guessed 64000:move ghostif moving out of ghostroom 1:2800 "z$=8Guess=Guess-1 "z$=9 Guess=Guess+1 &#z$=10 Guess=Guess+4 0#z$=11 Guess=Guess-4 :0:2800 D44,0;"You are now in"'"the ";r$(Guess) N4200h:charms? X44000:helpcharm? b"flag=17:500 l3020 :next input special case Guess=0 +0,0;"use arrow keys to move" 3800:input move 1:2700 z$=8Guess=6 z$=9 Guess=7 z$=11 Guess=3 3130: !input a move  .""3810:stop multiple key hits +z$=:z$=""3820:wait for key Gz$"5"z$"8"3,0;"don't forget CAPS SHIFT":3810 w(z$13 Guess=0)(z$<8ůz$>11 )(z$" "g=0)3810:only certain keys allowed  WGuess>0Guess4Ưz$=11 3810:can't move up from upstairs W(Guess=0Guess5)Ưz$=10 3810:can't move down from here V(Guess=1Guess=5)Ưz$=83810:can't move left from here (W(Guess=4Guess=8)Ưz$=9 3810:can't move right from here 2 !move ghost?  -GuessGhostroom:only if in Ghostroom n=(3*) =n=1(Ghostroom=1Ghostroom=5)4020 =n=2(Ghostroom=4Ghostroom=8)4020 <n=0Ghostroom4Ghostroom=Ghostroom+4: :n=0Ghostroom5Ghostroom=Ghostroom-4 (n=1Ghostroom=Ghostroom-1 (n=2Ghostroom=Ghostroom+1  h!deal with new charms  r!flag=0:j=14 |%c(j)=Guessg(j)=04250 j  -600X:5:500:flag=1 l0,0;"There is a ";c$(j)'"here in the ";r$(Guess)''"Do you want to pick it up?"'"Press y or n" 3z$=:z$="y"g=1:g(j)=1:4290 z$"n"4270  0!assess charms in hand  ::2*>1 D3g(3)=1g(4)=14600 NIg(2)=1n=(8*)+1:4510:random tips Xg(1)1 b n=Ghostroom lr=(3*) v-r=1(n=1n=5)4460l -r=2(n=4n=8)4460l r=1n=n-1 r=2n=n+1 flag=1:600X:4:500:1,0;"I feel the ghostly presence"'"I sense that it is close"'"to the ";r$(n)  350^  600X  "a(n=n-4n)=n-4*(n>4)  x=a(Guess)  y=a(Ghostroom)  g(4)=14670>  x>y4750 *x!y=1x=14750 H!y=4x=44760 Ry=1y=4 \x24750 f 4760 Ghostroom=Ghostroom+1: Ghostroom=Ghostroom-1: !drop a charm  3:500 /0,0;"Press the number to drop:"' n=1:i=14 )g(i)0n;" ";c$(i)':n=n+1 i "0 no charm, after all." *z$=:z$<"0"z$>(n-1)4820 z$="0"4940L n=2g=0 $n=z$:i=14 .g(i)0n=n-1 8n0i Bg(i)=0:c(i)=Guess L7:500 V !print score and best  $0:1:2:6 0,27;" YOU";1,27;"COULD";2,27;"SCORE";3,27;" ";3,29;Score L4,27;" BEST";5,27;" ";5,29;Best '216,144:39',0  X!draw the ghoul  bghost's mouth l 4 v&106j,480:524,0 %0,16:-8,-8 %-9 ,8:-9 ,-8 %-9 ,8:-9 ,-8 %-8,8:0,-16 ghost's eyes  0 114r,90Z,7 150,90Z,7  body $19,10 ;""  outline %79O,14:0,70F &184,14:0,70F -104h,0,   L!wrong guess  V6:500 `90,0;"The ghost is not in"'"the ";r$(Guess) j 350^ t`'"You lose 10 points":i=15:1:0:7:5020:5000:i ~0:8:0 M4,0;"But never mind.At least"'"you're still alive!":300, 600X:7:500  @!score a right answer  J28200 :200:Score085004! Tl0,8;2;6;1;1;" WELL DONE ";1,13 ;0;n$ ^300,:cheery tune h1;"The GHOST was in "; rA1;"the"'1;r$(Guess);0;" ";w$(Object,Guess) |7000X:draw ghost O21,0;1;"Your score this time is ";1;1;Score !1;"Now, press enter.";z$  !where in room?  4:500:0,0;"Yes, in the ";r$(Guess)'"But is the ghost"'"1 ";w$(1,Guess)'"2 ";w$(2,Guess)''"press 1 or 2" ="1"n=1:8250: &="2"n=2:8250: 0 8220 :|500:nObjectScore=Score-10 :2,0;"No, it's ";w$(Object,Guess)'"You lose 10 points.":5000 D2n=Object2,0;"Right, ";w$(n,Guess) N 600X X !4!get eaten by ghost  !> 200 !H7000X:8600! !Rl1;2;6;1;0,0;"Oh dear, ";n$;1'"you got eaten by the ghost!" !\A4;7;1;1;"Press ENTER to move on";z$ !f !!run into mouth  !W1:8:x=16:y=3016-1:2900T :2900T :y !1x=15:y=y+1:2900T :2900T !Hx=14:2920h :2920h :x=13 :2930r :2930r ! #(!new game or stop?  #2200:4 #<96,0;3;"If you want another game of" #F08,9 ;2;1;"GHOSTHUNT" #P7'3;n$;", then enter y for YES"''"or n for NO." #Zy$ #d 200 #nScore>BestBest=Score #x '4This is the last line that BASIC will allow :Rule1: leave well alone :65311:4 el'h'tvpFnextW LOAD YOUR OWNZ E