home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er
/
64ER_CD.iso
/
s85xx
/
s8502b.d64
/
odyssee
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1995-03-30
|
31KB
|
263 lines
1 REM ***************
2 REM * ODYSSEE : *
3 REM * *
4 REM * MAINPRG. *
5 REM ***************
6 :
7 :
8 :
9 IFZ=0THEN9000
10 DIMT(4),V$(1,4),W$(1,4),W(2,4),S%(64):TI$="000000":W$="HAND":V1=40
15 G=350:Y=9:W=3:F=50:T=17061:H=300:FORZ=1TO4:G(Z)=5:NEXT:POKE12762,0
16 FORZ=1TO27:READZ$:NEXT:FORZ=0TO63
17 S%(Z)=50:NEXT:S%(64)=100:FORZ=1TO16
18 READI:S%(I)=I*100:NEXT:FORZ=1TO100
21 I=INT(RND(0)*20):X=INT(RND(0)*440+20):IFPEEK(17001+(20-I)+X*20)<>40THEN21
22 POKE17001+(20-I)+X*20,35:NEXT:FORI=0TO1:FORZ=1TO4:READW$(I,Z),W(I,Z):NEXT:NEXT
23 V$(0,1)="FOODSHOP":V$(0,2)="PUB":V$(1,1)="WEAPONSHOP":V$(1,2)="ARMOURSHOP"
24 V$(1,4)="EXIT THE TOWN":POKE788,52
25 V$(0,3)="TALK TO PEOPLE":V$(1,3)=V$(0,3):V$(0,4)="EXIT THE VILLAGE"
26 PRINTCHR$(147):POKE53265,11
33 I=T:FORZ=1TO40:POKE16604,I-256*INT(I/256):POKE16605,INT(I/256):I=I+20
34 SYS16484:NEXT:POKE1043+Y*40,33:IFB=5THENPOKE1043+Y*40,38:POKE55296+Y*40,14
35 POKE 214,20 : SYS58640 : PRINT "[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]";
40 POKE53265,155:POKE53272,29:GOTO 90
50 PRINT"ILLEGAL COMMAND":GOTO90
60 PRINT"NOT THERE":GOTO90
70 PRINT"NO WAY":GOTO90
80 PRINT"PASS"
90 PRINT"CMD: ";
100 SYS16674:P=1043+Y*40:I=I+1:IFI<15THENZ=PEEK(197):TA=Z*100:GOTO S%(Z)
110 I=0:IFPEEK(P-1)=35THEN160
120 IFPEEK(P+1)=35THEN160
130 IFPEEK(P-40)=35THEN160
140 IFPEEK(P+40)=35THEN160
150 GOTO100
160 I=INT(RND(0)*18):IFK+A(2)<ITHENPRINT"HIT":H=H-INT(RND(0)*5)-1:IFH<1THEN180
165 IFK+A(2)>I-1THENPRINT"MISSED"
170 PRINT"CMD: ";:GOTO100
180 PRINTN$" IS DEAD":FORZ=1TO10:POKE198,0:NEXT:WAIT198,1:RUN
210 I=V1:V1=PEEK(Z)
211 IFB=0THENIFPEEK(Z)=40THENGOTO X
212 IFB=5THENIFPEEK(Z)=37THENGOTO X
213 IFPEEK(Z)=41AND(SPAND2)=2THEN220
214 IFPEEK(Z)=37AND(SPAND16)=16THENSW=SW+1:GOTO2180
215 IFPEEK(Z)=37AND(SPAND16)=16THENGOTO X
216 IFPEEK(Z)=42THENH=H-100:IFH<0THEN180
217 IFPEEK(Z)=42THENGOTO X
218 IFPEEK(Z)=43AND(SPAND8)=8THENGOTO X
219 V1=I:GOTO70
220 BO=BO+1:IFBO=2THENSP=SP-2
230 GOTO X
1000 PRINT"ATTACK --- ";:GOTO10000
1010 IFPEEK(S)<>35THENPRINT"MISS":GOTO90
1020 I=INT(RND(0)*20):IFW+A(1)>IORZE=5THENPRINT"HIT":ZE=0:GOTO1040
1030 ZE=ZE+1:PRINT"MISS":GOTO90
1040 PRINT"HIT":G(Z)=G(Z)-1:IFG(Z)<1THENG(Z)=INT(RND(0)*3)+3:GOTO1060
1050 FORZ=1TO5:POKE197,64:NEXT:GOTO90
1060 I=INT(RND(0)*20):PRINT" KILLED --- GOLD FOUND :"I:G=G+I:POKES,40:U=40:P=35
1070 C=C+1:IFC=20THENPRINT"YOU GET A BLUE TASSLE":SP=SP+1
1080 GOTO2110
1200 IFB=5THENPRINT"ONLY ON FOOT":GOTO90
1205 PRINT"[147]"N$:PRINT:PRINT:PRINT:PRINT
1210 FORZ=1TO5:PRINTK$(Z);B(Z):NEXT
1215 POKE214,5:SYS58640:PRINTTAB(29)"FOOD :"INT(F):PRINTTAB(29)"GOLD :"G
1217 PRINTTAB(29)"POWER:"H:PRINT:PRINT
1220 PRINT:PRINT:PRINT"WEAPON : "W$
1230 PRINT:PRINT"ARMOUR : "AR$
1240 PRINT:PRINT"TOOLS : ";
1250 I=1:X=0:FORZ=1TO7:IF(SPANDI)=ITHENX=X+1:PRINTSP$(Z)";";
1255 I=I*2:NEXT
1260 IFX=0THENPRINT"NO TOOL":GOTO1290
1270 PRINT"[157] "
1290 POKE198,0:WAIT198,1:GOTO26
1400 PRINT"ENTER --- ";:GOTO10000
1410 IFPEEK(S)=36THENA$="A TOWN.":A=1:GOTO1460
1420 IFPEEK(S)=39THENA$="A VILLAGE.":A=0:GOTO1460
1430 IFPEEK(S)=44THEN16000
1440 IFPEEK(S)=31THENT=26641:Y=15:GOTO26
1450 GOTO60
1460 POKE53272,21:PRINT"[147]YOU HAVE ENTERED "A$;:GOTO15000
1700 PRINT"RESTART GAME --- ARE YOU SURE ? ";
1710 POKE198,0:WAIT198,1:GETZ$:IFZ$="Y"THENPRINTZ$:RUN
1720 PRINT"N":PRINT"I KNEW IT":GOTO90
2100 PRINT"FOOD: "INT(F):GOTO90
2110 S=S-1024:I=INT(S/40):Z=T+(40-(S-I*40))*20-Y1:POKEZ,U:GOTO90
2160 GOTO X
2180 IFSW=12THENSP=SP-16
2190 GOTO X
2200 PRINT"TRANSACT --- ";:GOTO10000
2210 PRINT"OK":PRINT"==> ";:IFPEEK(S)=34THEN2215
2211 IFPEEK(S)=35THENPRINT"NICE DAY;TODAY":GOTO90
2212 PRINT"NO RESPONSE":GOTO90
2215 IFY1=3ANDA(3)<16THEN20000
2220 IFY1=12ANDA(5)<10THEN20010
2225 IFY1=10ANDG<100THENPRINT"HE WANTS TO HAVE 100 GOLDEN COINS.":GOTO90
2227 IFY1=10THENG=G-100:PRINT"HE TAKES 100 COINS":PRINT"==> ";:GOTO2290
2230 IFY1=2ANDA(5)<30THEN20010
2235 IFY1=4ANDA(5)<20THEN20010
2240 IFY1=13THENPRINT"HE TELLS YOU A SECRET PASSWORD.":A(5)=10:GOTO2295
2245 IFY1=1THENPRINT"HE GIVES YOU MAGICAL BOOTS.":SP=SPOR2:GOTO2295
2250 IFY1=9THENPRINT"HE GIVES YOU A GOLDEN KEY":SP=SPOR32:GOTO2295
2255 IFY1=19AND(SPAND32)=32THENPRINT"HE TAKE THE GOLDEN KEY.":SP=SP-32:GOTO2290
2257 IFY1=19THENPRINT"HE WANTS TO HAVE THE GOLDEN KEY":GOTO90
2260 IFY1=11THENPRINT"HE GIVES YOU A KEY.":SP=SPOR6:GOTO2295
2265 IFY1=0ANDA(4)<17THENPRINT"WISDOM NO HIGH ENOUGH.":GOTO20005
2270 IFY1=8ANDA(3)<22THEN20000
2275 IFY1=6THENPRINT"HE GIVES YOU A SWIM-WEST":SP=SPOR16:GOTO2295
2280 IFY1=14THENPRINT"HE STOLES ALL YOUR GOLD":G=0:GOTO2295
2285 IFY1=5THENPRINT"HE GIVES YOU A MAGIC MISSILE.":SP=SPOR4:GOTO2295
2290 PRINT"YOU MAY PASS"
2295 FORZ=1TO16:POKES+54272,Z:FORI=1TO50:NEXT:NEXT:U=40:P=34
2297 POKES+54272,13:POKES,40:GOTO2110
2300 PRINT"EXIT ";:IFB=0THENPRINT"WHAT ?":GOTO90
2305 PRINT"SHIP --- ";:GOTO10000
2310 IFPEEK(S)<>40THEN60
2320 Y1=Y:POKES,33:PRINT"OK":IFS=P-40THENS=P-40:Y=Y-1:GOTO2360
2330 IFS=P+1THENS=P-1:T=T-20:POKE16604,(T)AND255:POKE16605,INT(T/256):SYS16384:GOTO2360
2340 IFS=P+40THENY=Y+1:S=P-40:GOTO2360
2350 S=P+1:T=T+20:I=T+780:POKE16604,IAND255:POKE16605,INT(I/256):SYS16484
2360 U=38:B=0:V1=40:GOTO2110
2600 PRINT"GOLD: "G:GOTO90
2800 PRINT"BOARD SHIP --- ";:GOTO10000
2810 IFPEEK(S)<>38THEN60
2820 IF(SPAND1)<>1THENPRINT"NO":PRINT"==> THE CREW DOES NOT ALLOW THIS":GOTO90
2830 PRINT"OK":B=5:POKEP,V1:POKE54272+S,14:P=P+1:IFS=P-41THENY=Y-1:GOTO2870
2840 IFS=PTHENT=T-20:POKE16604,(T)AND255:POKE16605,INT(T/256):SYS16384:GOTO2870
2850 IFS=P+39THENY=Y+1:GOTO2870
2860 T=T+20:I=T+780:POKE16604,IAND255:POKE16605,INT(I/256):SYS16484:GOTO2870
2870 U=37:S=P-1:P=38:V1=37:GOTO2110
2900 PRINT"POWER: "H:GOTO90
3000 PRINT"UNLOCK DOOR --- ";:IF(SPAND64)<>64THENPRINT"NO KEY":GOTO90
3005 GOTO10000
3010 IFPEEK(S)<>194THEN60
3020 PRINT"OK":POKES,40:POKES-41,192:GOTO90
3600 IF(SPAND4)<>4THENPRINT"NO MAGIC MISSILE":GOTO90
3610 PRINT"MAGIC MISSILE"
3620 FORZ=1024TO1823:I=PEEK(Z+54272):POKEZ+54272,1
3630 IFPEEK(Z)<>35ANDPEEK(Z)<>34THEN3640
3635 X=Z-1024:N=INT(X/40):POKET+(40-(X-N*40))*20-N,40:G=G+5:POKEZ,40
3640 IFPEEK(Z)=30THENGOTO18000
3650 POKEZ+54272,I:NEXT:SP=SP-4:GOTO90
4500 V2=V1
4505 Z=1042+Y*40:X=4510:GOTO210
4510 T=T+20:I=T+780:POKE16604,IAND255:POKE16605,INT(I/256):PRINT"WEST"
4520 SYS16484:POKEP+1,V2:POKEZ+1,33+B
4530 F=F-.2:IFF<0THENPRINT"NO FOOD --- ";:GOTO180
4540 GOTO90
4600 V2=V1:Z=1043+Y*40-40:X=4610:GOTO210
4610 PRINT"NORTH":POKEZ+40,V2:Y=Y-1:POKEZ,33+B:GOTO4530
5000 V2=V1
5005 Z=1044+Y*40:X=5010:GOTO210
5010 T=T-20:POKE16604,(T)AND255:POKE16605,INT(T/256):PRINT"EAST":SYS16384
5020 POKEP-1,V2:POKEZ-1,33+B:GOTO4530
5500 V2=V1:Z=1043+Y*40+40:X=5510:GOTO210
5510 PRINT"SOUTH":POKEZ-40,V2:Y=Y+1:POKE1043+Y*40,33+B:GOTO4530
9000 POKE53280,0:POKE53281,0:POKE53272,21:PRINTCHR$(142),CHR$(8):AR$="SKIN"
9010 POKE95,0:POKE96,160:POKE90,0:POKE91,192:POKE88,0:POKE89,192:SYS41919
9020 GOSUB9500:K$(5)=K$(5)+"00"
9100 PRINT"[147]"TAB(10)"CREATING A PLAYER":PRINTTAB(7)"=-=-=-=-=-=-=-=-=-=-=-="
9110 PRINT:PRINT:PRINT:FORZ=1TO5:PRINTTAB(10);K$(Z):A$(Z)="":NEXT:I=7:S=0
9115 FORZ=1TO4:POKE214,I:SYS58640
9120 PRINTTAB(25);:POKE198,0:WAIT198,1:GETZ$
9130 IFZ$=CHR$(20)ANDLEN(A$(Z))THENA$(Z)=LEFT$(A$(Z),LEN(A$(Z))-1):GOTO9165
9140 IFLEN(A$(Z))=2THENPRINT:GOTO9170
9150 IFASC(Z$)<48ORASC(Z$)>57THEN9120
9160 A$(Z)=A$(Z)+Z$
9165 PRINTZ$;:GOTO9120
9170 A(Z)=VAL(A$(Z)):S=S+A(Z):IFS>100THEN9100
9175 I=PEEK(214):POKE214,20:SYS58640:PRINT"POINTS LEFT : [157][157][157][157][157]"100-S:NEXT
9180 INPUT"[145][145][145][145][145][145]YOUR NAME ";N$
9184 IFPEEK(2)=0THENFORZ=57344TO65535:POKEZ,PEEK(Z):NEXT:POKE59639,20
9185 GOSUB9500:A(1)=INT(A(1)/5):A(2)=INT(A(2)/5):POKE2,1:POKE1,53
9190 I=43168:POKEI,32:POKEI+1,192:POKEI+2,2:I=704:POKEI,32:POKEI+1,138
9195 POKEI+2,173:POKEI+3,76:POKEI+4,247:POKEI+5,183:PRINTCHR$(147)
9197 FORZ=1TO4:B(Z)=A(Z):NEXT
9200 PRINTTAB(12)"<<< ODYSSEE >>>"
9210 PRINT""TAB(9)"<<< PLEASE WAIT >>>"
9220 PRINTTAB(6)"<<< WHILE LOADING PART2 >>>"
9230 PRINTTAB(3)"<<< (C) BY JAN GEISZELMANN >>>"
9240 PRINT"<<<-------------* 1984 *------------>>>"
9250 PRINTTAB(4)"*******************************"
9260 PRINTTAB(4)"* *"
9270 PRINTTAB(4)"*******************************":PRINT"[145][145]"TAB(6);
9280 FORZ=1TO27:READZ$
9290 FORX=1TO100:NEXT:IFZ$="X"THENPRINT" ";:NEXT
9295 PRINTZ$;:NEXT
9297 LOAD"WORLD",8,1
9299 REM FUER DATASETTE : ZEILE 9297 LOESCHEN UND ZEILE 9300-9320 EINGEBEN
9300 PRINT:PRINT:PRINT:PRINT"[144]LOAD"CHR$(34)"WORLD"CHR$(34)",1,1[145][145]";:POKE631,13
9310 POKE632,90:POKE633,61:POKE634,49:POKE635,58:POKE636,71:POKE637,111
9320 POKE638,49:POKE639,13:POKE198,10:END
9500 K$(1)="STRENGHT.......":K$(2)="STAMINA........":K$(3)="INTELLIGENCE..."
9510 K$(4)="WISDOM.........":K$(5)="PASSWORDS......":SP$(1)="BLUE TASSLE"
9520 SP$(2)="BOOTS":SP$(3)="MAGIC MISSILE":SP$(4)="MARK OF FIRE"
9530 SP$(5)="SWIM-WEST":SP$(6)="GOLDEN KEY":SP$(7)="KEY":RETURN
10000 POKE198,0:WAIT198,1:GETZ$
10010 IFZ$="@"THENS=P-40:PRINT"NORTH -- ";:Z=1:Y1=Y-1:GOTOTA+10
10020 IFZ$=":"THENS=P-1:PRINT"WEST --- ";:Z=2:Y1=Y:GOTOTA+10
10030 IFZ$=";"THENS=P+1:PRINT"EAST --- ";:Z=3:Y1=Y:GOTOTA+10
10040 IFZ$="/"THENS=P+40:PRINT"SOUTH -- ";:Z=4:Y1=Y+1:GOTOTA+10
10050 GOTO80
15000 POKE214,3:SYS58640:PRINT:V=1
15010 IFY1=9THENV$(A,3)="BUY A BOAT":V$(A,2)="TALK TO PEOPLE":V=2
15020 IFY1=1THENV=3
15030 IFY1=17THENV$(A,3)="BUY THE MARK OF FIRE":V=4
15100 I=1:FORZ=1TO4:PRINTI"[157].) "V$(A,Z):I=I+1:NEXT:PRINT"WHAT DO YOU WANT ? ";
15110 POKE198,0:WAIT198,1:GETZ$:IFVAL(Z$)<1ORVAL(Z$)>4THEN15110
15120 PRINTZ$:PRINT:PRINT:ONVAL(Z$)GOTO15125,15127,15128,15370
15125 X=0:ONA+1GOTO15230,15130
15127 X=1:ONA+1GOTO15276,15130
15128 ONVGOTO15200,15330,15276,15400
15130 FORZ=1TO4:PRINTZ"[157].) "W$(X,Z):NEXT:PRINT"YOUR INTEREST ? ";
15150 POKE198,0:WAIT198,1:GETZ$:PRINTZ$:IFVAL(Z$)<1ORVAL(Z$)>4THEN1460
15160 Z=VAL(Z$):PRINT"THE "W$(X,Z)" COST YOU"W(X,Z)"[157]. OK ? ";:U=15170:GOTO15530
15170 I=W(X,Z):U=15180:GOTO15500
15180 G=G-I:PRINT"OK!":IFX=0THENW$=W$(0,Z):W=3+Z*2:GOTO15520
15190 AR$=W$(1,Z):K=Z*2+1:GOTO15520
15200 PRINT"THE PEOPLE HERE DO NOT KNOW ANYTHING.":GOTO15520
15230 P=INT(RND(0)*20)+32:PRINT"100 FOOD UNITS COST YOU"P"[157]. OK ? ";
15235 U=15240:GOTO15530
15240 I=P:U=15250:F=F+100:GOTO15500
15250 PRINT"NOW YOU HAVE"INT(F)"FOOD UNITS":G=G-P:GOTO15520
15276 IFV<>2ANDV<>3THEN15280
15277 PRINT"THEY TELL YOU A SECRET PASSWORD.":B(5)=V*10:GOTO15520
15280 P=INT(RND(0)*75)-50:IFG=0THENPRINT"NO MONEY !":GOTO1460
15282 PRINT"GAMBLING ...":FORZ=1TO1000:NEXT:I=0:U=15285:GOTO15500
15285 IFP<0THENPRINT"I'M SORRY BUT YOU HAVE LOST";:GOTO15310
15290 IFP>0THENPRINT"OHH. YOU HAVE WON";:GOTO15312
15300 GOTO15282
15310 IFSGN(P)*P>GTHENP=-1*G
15312 PRINTP*SGN(P)"!"::G=G+P:GOTO15520
15315 GOTO15520
15330 PRINT"THE BOAT COST 100 COINS ! OK ? ";:U=15340:GOTO15530
15340 I=100:U=15350:GOTO15500
15350 G=G-100:Y=9:B=5:T=21101:RI=0:V1=37:FORZ=1TO500:NEXT
15370 POKE53272,29:GOTO23
15400 PRINT"THE MARK OF FIRE COST 50 ! OK ? ";:U=15410:GOTO15530
15410 U=15420:I=50:GOTO15500
15420 SP=SPOR8:G=G-I:GOTO15520
15500 IFG<ITHENPRINT"YOU HAVE NOT ENOUGH MONEY !":FORZ=1TO500:NEXT:GOTO1460
15510 GOTO U
15520 FORZ=1TO700:NEXT:GOTO1460
15530 POKE198,0:WAIT198,1:GETZ$:IFZ$<>"Y"THENPRINT"N":GOTO15520
15540 PRINTZ$:GOTO U
16000 PRINT"[147]YOU HAVE ENTERED THE CASTLE OF A LORD"
16010 PRINT"FOR 50 COINS YOU GET 1000 UNITS OF POWER"
16020 PRINT"DO YOU WANT ? ";
16030 POKE198,0:WAIT198,1:GETZ$:IFZ$<>"Y"THENPRINT"N":FORZ=1TO200:NEXT:GOTO26
16040 IFG<50THENPRINT"YOU HAVE NOT ENOUGH MONEY":GOTO26
16050 PRINTZ$:FORZ=1TO200:NEXT:G=G-50:H=H+1000:GOTO26
18000 FORZ=1TO16:FORI=1TO16::POKE53280,I:NEXT:POKE53281,Z:NEXT
18010 PRINT"[147]CONGRATULATIONS "N$
18020 A$="YOU HAVE MANAGED IT TO DESTROY THE DARK TOWER AND TO KILL THE"
18030 A$=A$+" WIZARD SARUMAN.THEPEOPLE LIVING IN SOSARIA HAVE MADE YOU TO "
18035 A$=A$+"THEIR NEW KING FOR THE NEXT 20 YEARS. END OF REPORT "
18040 FORZ=1TO183:PRINTMID$(A$,Z,1);:FORI=1TO150:NEXT:NEXT:END
20000 PRINT"YOU ARE NOT INTELLIGENT ENOUGH"
20005 PRINTTAB(4)"SO THAT YOU MAY PASS.":GOTO90
20010 PRINT"YOU DO NOT KNOW THE SECRET PASSWORD.":GOTO90
60000 DATAA,X,F,A,N,T,A,S,Y,X,R,O,L,E,X,P,L,A,Y,I,N,G,X,G,A,M,E
60010 DATA10,12,14,17,22,23,28,30,36,45,46,50,55,26,21,29,DAGGER
60020 DATA 50,AXE,80,BOW,100,GUN,150,CLOTH,50,LEATHER,80,CHAIN,100,SHIELD,150