5 POKE53281,11:POKE53280,11:PRINTCHR$(142):POKE52,56:POKE56,56:CLR 10 PRINT"[147]":DIM A%(26),F$(26),TL%(12),T1%(12),LC%(70),CM%(26) 15 POKE214,12:PRINT:POKE211,5:PRINT"SETTING UP ........PLEASE WAIT" 20 FORI=1TO26:READF$(I):NEXTI 50 POKE56334,PEEK(56334)AND254:POKE1,PEEK(1)AND251 51 FORI=0TO511:POKEI+14336,PEEK(I+53248):POKEI+15360,PEEK(I+54272):NEXT 52 POKE1,PEEK(1)OR4:POKE56334,PEEK(56334)OR1 55 FORI=1TO12:READZ:FORJ=ZTOZ+7:READK:POKEJ,K:NEXTJ,I 100 FORI=1TO26:READA%(I):NEXT:FORI=1TO8:READV(I):NEXT 110 FORI=1TO26:IFI=1THENCM%(I)=A%(I):GOTO150 120 CM%(I)=CM%(I-1)+A%(I) 150 NEXT:H=1024:C=54272:S=C:CH=28:FORI=1TO5:READB%(I),E%(I):NEXT 160 FORI=1TO12:READT1%(I):NEXT 165 DEFFNA(X)=INT(RND(1)*X)+1:DEFFNL(Q)=H+40*Y+X 167 DEFFND(ZZ)=ABS((ZZ=39)+(ZZ=-39)+(ZZ=41)+(ZZ=-41)) 170 FORI=1TO5:A=FNA(2):D%(I)=(A=1)-(A=2):NEXT 175 FORI=1TO5:TR(I)=(D%(I)=-1)*(-E%(I))-(D%(I)=1)*(B%(I)) 176 VR(I)=(TR(I)=E%(I))-(TR(I)=B%(I)):IFI>2THENVR(I)=VR(I)*40 177 TY=(VR(I)=1)*36+(VR(I)=-1)*37+(VR(I)=40)*39+(VR(I)=-40)*38:TY(I)=(-1)*TY 180 ED(I)=(TR(I)=B%(I))*(-E%(I))+(TR(I)=E%(I))*(-B%(I)):NEXT 185 PRINT"[147]":POKE214,8:PRINT:POKE211,13:PRINT"SELECT A LEVEL" 187 POKE214,10:PRINT:POKE211,16:PRINT"1) EASY" 189 POKE214,12:PRINT:POKE211,16:PRINT"2) HARD" 190 GETZ$:LV=VAL(Z$):RD=RND(1):IFZ$=""THEN190 191 IFLV<1ORLV>2THEN190 195 PRINT"[147]":POKE53272,(PEEK(53272)AND240)OR14 197 FORMC=STOS+24:POKEMC,0:NEXT:POKES+24,15:POKES+5,120:POKES+6,240:HF=S+1:LF=S 200 PRINT"[147]":GOSUB3005:FORI=1TO12:A=T1%(I):GOSUB3200:NEXT 210 P%=H+81:POKEP%,CH:POKEP%+C,7 220 M1=0:M2=0:M3=0:M4=0:XF%=0:CF%=0:GS=1400 300 GOSUB1000:IFEN=1THEN6000 310 IFXF%=0THENGOSUB2000 320 GOSUB400:IFEN=1THEN6000 330 GOSUB7000:GOSUB500:IFEN=1THEN6000 340 GOSUB1000:IFEN=1THEN6000 350 GOSUB5000:IFEN=1THEN6000 360 GOSUB500:IFEN=1THEN6000 390 GOTO300 400 FORT=1TO5:A=TR(T):TR(T)=TR(T)+VR(T) 410 IFTR(T)=ED(T)THENVR(T)=(-1)*VR(T):GOSUB700:GOTO440 420 IFPEEK(TR(T))>=36ANDPEEK(TR(T))<=39THENTR(T)=TR(T)-VR(T):GOTO450 430 IFPEEK(TR(T))=27ORPEEK(TR(T))=28THENEN=1:T=5:GOTO450 440 POKEA,32:POKETR(T),TY(T):POKETR(T)+C,15:GOSUB9810:IFN4=1THEN450 445 GOSUB500:IFEN=1THENT=5 450 NEXT:RETURN 500 JV=PEEK(56320):JV=15-(JVAND15):FR=PEEK(56320)AND16 505 IFFR=0ANDSH=0THENGOSUB9600 510 DY=(JV=1)+(JV=5)+(JV=9)-(JV=6)-(JV=10)-(JV=2) 520 DX=(JV=4)+(JV=5)+(JV=6)-(JV=9)-(JV=10)-(JV=8) 525 IF(DX=0ANDDY=0)ORGS=0THENRETURN 535 CH=28:IFDX<>0THENCH=28 540 IFDY<>0THENCH=27 550 ZZ=40*DY+DX:Z=P%+ZZ:PK=PEEK(Z) 555 IFFND(ZZ)=1AND(PK=32ORPK=160)THEN625 557 IFSH=1THEN800 560 CP=(PK=30)+(PK=32)*2+(PK=40)*3+(PK=41)*4+(PK=42)*5+(PK=160)*6+(PK=0)*7 570 ONABS(CP)GOTO600,620,8000,8000,9000,625,3300 580 IFPEEK(Z)>=129ANDPEEK(Z)<=154THEN4000 590 IFPEEK(Z)>=36ANDPEEK(Z)<=39THENEN=1:RETURN 600 IF(PEEK(Z+C)AND15)=5THEN620 605 GOTO625 620 GOSUB9820:POKEP%,32:POKEZ,CH:POKEZ+C,7:P%=Z 625 GS=GS-2:IFGS=<0THENGS=0:GOSUB9700 630 RETURN 700 TY=(VR(T)=1)*36+(VR(T)=-1)*37+(VR(T)=40)*39+(VR(T)=-40)*38:TY(T)=(-1)*TY 710 ED=(ED(T)=B%(T))*(-E%(T))+(ED(T)=E%(T))*(-B%(T)):ED(T)=ED 720 RETURN 800 IFPEEK(Z)=30AND(PEEK(Z+C)AND15)=5THEN620 810 IFPEEK(Z)<>32THEN625 820 GOTO620 1000 FORLL=1TO12:PK=PEEK(TL%(LL)+C)AND15 1005 IFPEEK(TL%(LL))=32THENPOKETL%(LL),30:POKETL%(LL)+C,PK 1010 POKETL%(LL)+C,PK:TL=(PK=2)*1+(PK=5)*2+(PK=7)*3 1012 GOSUB500:IFEN=1THENLL=12:GOTO1030 1015 GOSUB400:IFEN=1THENLL=12:GOTO1030 1020 GOSUB5000:IFEN=1THENLL=12:GOTO1030 1025 ONABS(TL)GOSUB1040,1050,1060 1030 NEXT:RETURN 1040 A=FNA(3):IFA=1THENPOKETL%(LL)+C,5:POKETL%(LL),30 1045 RETURN 1050 A=FNA(3):IFA=2THENPOKETL%(LL)+C,7:POKETL%(LL),30 1055 RETURN 1060 A=FNA(3):IFA=3THENPOKETL%(LL)+C,2:POKETL%(LL),30 1065 RETURN 1500 FORI=22TO23:FORJ=1TO37 1510 POKE214,I:PRINT:POKE211,J:PRINTCHR$(32);:NEXTJ,I:RETURN 2000 PX=FNA(26):XF%=PX+128 2005 GOSUB1500:POKE214,22:PRINT:POKE211,1 2010 PRINT"CABBY, GO TO THE ";F$(XF%-128);:PT=PX:CL=0:X=1:GOSUB5155 2020 GOSUB500:RETURN 3005 I=49152:IF PEEK(49154)=216THENSYS49160:GOTO3030 3010 READ A:IF A=256 THENSYS49160:GOTO3030 3020 POKE I,A:I=I+1:GOTO 3010 3030 POKE1064,40:POKE1065,41:POKE1066,40:POKE1067,41:FORI=1064TO1067:POKEI+C,1: 3040 NEXT:POKE1104+C,1:POKE1104,40:FORI=1105TO1107:POKEI,32:POKEI+40,32:NEXT 3050 POKE1144,40:POKE1144+C,1:FORI=1265TO1301:POKEI,32:NEXT 3055 FORI=1545TO1581:POKEI,32:NEXT 3060 FORI=1114TO1754STEP40:POKEI,32:POKEI+10,32:POKEI+20,32:NEXT 3065 FORI=1TO5 3067 X=FNA(38):Y=FNA(19):L=FNL(Q) 3070 IFPEEK(L)=32ORPEEK(L)<>160THEN3067 3075 POKEL,42:POKEL+C,7:NEXT 3080 K=0:FORI=1TO26:FORJ=1TOA%(I) 3090 X=FNA(40):Y=FNA(19):L=FNL(Q) 3100 IF PEEK(L)=32ORPEEK(L)<>160THEN3090 3110 IFPEEK(L+1)=160ANDPEEK(L-1)=160ANDPEEK(L+40)=160ANDPEEK(L-40)=160THEN3090 3120 K=K+1:LC%(K)=L:POKEL,I+128:NEXT:NEXT:RETURN 3200 IFPEEK(A)<>32THENGOSUB3220 3210 TL%(I)=A:POKEA,30:POKEA+C,5:RETURN 3220 FORJ=1TO8 3230 IFPEEK(A+V(J))=32THENA=A+V(J):K=8 3240 NEXT:RETURN 3300 IFXF%<>0THENRETURN 3310 POKEP%,32:POKEZ,CH:POKEZ+C,7:GOSUB2000 3320 POKEP%,CH:POKEP%+C,7:POKEZ,160:POKEZ+C,1:MN=1:RETURN 3330 M1=ABS(SP-Z)/10+1:POKEP%,32:POKEZ,CH:POKEZ+C,7:GOSUB9820 3340 M2=INT(FNA(100*M1)/10)/100 3350 GOSUB1500:POKE214,22:PRINT:POKE211,1 3360 PRINT"YOU COLLECT";M1;"PLUS TIP OF";M2; 3370 M3=M1+M2+M3:M1=0:M2=0:POKEP%,CH:POKEP%+C,7:POKEZ,XF%:POKEZ+C,1 3375 PT=PX:CL=1:X=1:GOSUB5155 3380 POKE214,23:PRINT:POKE211,1:PRINT"YOU HAVE";M3;:MN=0:XF%=0:CF%=0:RETURN 4000 IFMN=1THEN3330 4005 IFCF%<>0THEN4500 4010 IFPEEK(Z)<>XF%THEN630 4030 IFLV=2ANDZ<>DZTHEN630 4050 PC=FNA(26):CF%=PC+128 4200 SP=Z:POKEZ,CH:POKEZ+C,7:POKEP%,32:GOSUB9820 4210 IFLV=1THENPT=PC:CL=1:GOSUB5155 4260 GOSUB1500:POKE214,22:PRINT:POKE211,1 4265 PRINT"TAKE ME TO THE ";F$(CF%-128);:PT=PC:CL=0:X=2:GOSUB5155 4280 POKEP%,CH:POKEP%+C,7:GOSUB9820:POKEZ,XF%:POKEZ+C,1 4285 IFCF%=XF%THENPOKEZ+C,0 4290 IFLV=1ANDXF%<>CF%THENPT=PX:CL=1:GOSUB5155 4300 GOTO630 4500 IFPEEK(Z)<>CF%THEN630 4505 IFLV=2ANDZ<>DCTHEN630 4510 POKEZ,CH:POKEZ+C,7:POKEP%,32:GOSUB9820 4550 M1=ABS(SP-Z)/10+1 4560 M2=INT(FNA(100*M1)/10)/100 4570 GOSUB1500:POKE214,22:PRINT:POKE211,1 4573 PRINT"YOU COLLECT";M1;"PLUS TIP OF";M2; 4580 M3=M1+M2+M3:M1=0:M2=0 4600 POKE214,23:PRINT:POKE211,1:PRINT"YOU HAVE";M3; 4650 POKEP%,CH:POKEP%+C,7:GOSUB9820:POKEZ,CF%:POKEZ+C,1 4655 IFLV=1THENPT=PC:CL=1:GOSUB5155 4660 CF%=0:XF%=0:GOTO630 5000 MX=0:MY=0:GOTO5010 5005 MY=INT((P%-H)/40):MX=(P%-H)-40*MY:RETURN 5010 GOSUB5005:CT=ABS((MY=6)*1+(MY=13)*2):T=CT:IFCT>0THENGOSUB5050 5015 GOSUB5005:CT=ABS((MX=10)*3+(MX=20)*4+(MX=30)*5):T=CT:IFCT>0THENGOSUB5050 5020 RETURN 5050 IFP%>TR(CT)ANDVR(CT)>0THEN5080 5060 IFP%