home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
genie-commodore-file-library
/
C64Telecom
/
TELE-BATTLE-V1.4
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
7KB
|
227 lines
10 REM ** TELE-BATTLE V1.1 ** V1.3 MODS
20 REM ** BY JULIAN BURGER ** APRIL 5, 1988
30 REM ** OCTOBER 5,1987 **
40 REM -THE FIRST IN A SERIES
50 REM ----OF MODEM GAMES
60 REM ** ALL WILL BE FREEWARE **
70 REM ** BUT DON'T CHANGE THE **
80 REM ** PROGRAM AROUND OR MY **
90 REM ** NAME, PLEASE!! **
100 POKE53281,.:POKE53280,.:POKE820,16-(PEEK(56577)AND16)
105 GOSUB5000
110 OPEN5,2,.,""+CHR$(0)
120 DIMG%(9,9),S$(4),L%(4),H%(1),N$(1):FORI=.TO4:READS$(I),L%(I):NEXT
130 DATAPT BOAT,2,DESTROYER,3,SUBMARINE,3,BATTLESHIP,4,CARRIER,5
140 CR$=CHR$(13):DL$=CHR$(20):SP$=" ":LC$=SP$+SP$+" ":RM$=LC$:PL$="":SD=54272:FORI=.TO24:POKESD+I,.:NEXT:CR%=PEEK(820)
150 FORI=1TO20:IN$=IN$+CHR$(148):NEXT
160 REM ** MAIN MENU **
170 PRINT"[147][155][142]"TAB(9)"** TELE-BATTLE V1.3 **":PRINTTAB(9)"** BY JULIAN BURGER **
180 [153]"MODEM STATUS:";:[141]2000:[139]RT%[179][177]CR%[167][153]"NO ";
190 [153]"CARRIER":[153]"[1] SEND MODEM COMMAND
200 PRINT"[2] START GAME"
210 PRINT"[3] QUIT"
220 PRINT"SELECT -->";:GOSUB2000
230 IF(PEEK(56577)AND16)<>RT%THEN170
240 GETA$:IFA$<"1"ORA$>"3"THEN230
250 PRINTA$
260 IFRT%=CR%THEN280
270 IFA$="2"THENPRINT"YOU MUST BE ON-LINE TO PLAY":FORI=1TO1100:NEXT:GOTO170
280 IFA$="3"THENCLOSE5:CLOSE15:PRINT"[147]";:END
290 IFA$="1"THEN320
300 IFA$="2"THEN360
310 REM ** MODEM COMMAND **
320 PRINT"COMMAND -->";:LG%=20:GOSUB1490:IFI$=""THEN170
330 IFI$="+++"THENPRINT#5,I$;:GOTO170
340 PRINT#5,I$:GOTO170
350 REM ** START NEW GAME **
360 PL%=.:PRINT"[147]YOU MAY CHAT NOW, PRESS F1 WHEN
370 [153]"YOU ARE READY TO BEGIN...
380 GOSUB1600:GOSUB1800:POKE198,.
390 PRINT"[154]ENTER YOUR NAME -->";:LG%=10:GOSUB1490:N$(.)=I$:I$="
400 [153]"GETTING OPPONENTS NAME...":[141]1800:[141]1870:[152]5,""N$(.)
410 [161]#5,A$:[139]A$[179][177]""[167]410
420 [161]#5,A$:[139]A$[178]CR$[167]450
430 [139]A$[177]""[167]I$[178]I$[170]A$
440 [137]420
450 N$(1)[178]I$
460 [143] ** INPUT SHIPS **
470 [153]"LOADCLRPLACE YOUR SHIPS:
480 PRINT" [154]ABCDEFGHIJ":PRINT" [172][162][162][162][162][162][162][162][162][162][187]":FORY=.TO9
490 PRINT"[154]"CHR$(48+Y)"[152]..........[146][161]":NEXT:PRINT"[145]"TAB(11)"[190]
500 [153]""[163]22)"PRINTUSE CURSOR KEYS":[153][163]22)"TO MOVE; RETURN
510 PRINTTAB(25)"TO PLACE.
520 [153][163]22)"USE CURSOR KEYS":[153][163]25)"TO SELECT":[153][163]25)"DIRECTION
530 PRINTTAB(27)"[158]SHIP:
540 BS%[178]1225:BL%[178]BS%[170]20:CL[178]54272:X%[178].:Y%[178].
550 [129]S[178].[164]4
560 [143] ** PLACE SHIP **
570 [153]"SYS"[163]20)SP$
580 [153]"ON"[163]30[171]([195](S$(S))[173]2)[171].5)S$(S)
590 L%[178]BS%[170]Y%[172]40[170]X%:P%[178][194](L%):[151]L%,P%[171]128
600 [141]1460:[139]A$[178]CR$[167]710
610 [139]A$[179][177]"ON"[175]A$[179][177]""[175]A$[179][177]"CMD"[175]A$[179][177]""[167]600
620 [139]A$[178]"ON"[167]Y%[178]Y%[171]1
630 [139]A$[178]""[167]Y%[178]Y%[170]1
640 [139]A$[178]"CMD"[167]X%[178]X%[171]1
650 [139]A$[178]""[167]X%[178]X%[170]1
660 [151]L%,P%:[139]Y%[179].[167]Y%[178]9
670 [139]Y%[177]9[167]Y%[178].
680 [139]X%[179].[167]X%[178]9
690 [139]X%[177]9[167]X%[178].
700 [137]590
710 [139]G%(X%,Y%)[167]660
720 [153]PL$"PRINTDIRECTION?
730 GOSUB1460:IFA$=CR$THENPRINTPL$SP$:GOTO660
740 IFA$<>"[145]"ANDA$<>""ANDA$<>"[157]"ANDA$<>""THEN730
750 DY%=1*(A$="[145]")-1*(A$=""):DX%=1*(A$="[157]")-1*(A$="")
760 XX%=X%:YY%=Y%:E%=.:FORI=2TOL%(S)
770 XX%=XX%+DX%:YY%=YY%+DY%
780 IFXX%<.ORXX%>9ORYY%<.ORYY%>9THENE%=1:GOTO800
790 IFG%(XX%,YY%)THENE%=1
800 NEXT:IFE%THEN720
810 XX%=X%:YY%=Y%:FORI=1TOL%(S):G%(XX%,YY%)=S+1
820 Z%=YY%*40+XX%:POKECL+BS%+Z%,15:POKEBS%+Z%,ASC(S$(S))+64
830 XX%=XX%+DX%:YY%=YY%+DY%:NEXT:PRINT"[145]"SP$:NEXT
840 PRINTPL$"[155]WAITING FOR OPPONENT TO SETUP...":GOSUB1800
850 REM ** WHO GOES FIRST? **
860 A%=(PEEK(162)AND15)+1
870 PRINT#5,CHR$(A%);
880 GET#5,A$:IFA$=""THEN880
890 B%=ASC(A$):IFA%=B%THEN860
900 PRINTPL$SP$SP$PL$;:IFB%<A%THENPRINT"YOU GO FIRST":PL%=.:GOTO920
910 PRINTN$(1)" GOES FIRST":PL%=1
920 GOSUB1870:TL=TI+120
930 IFTI<TLTHEN930
940 REM ** SET UP SCREEN AND BEGIN **
950 PRINTPL$SP$SP$:T%=6-INT(LEN(N$(1))/2+.5):T0%=6-INT(LEN(N$(.))/2+.5)
960 PRINT""SP$:PRINT"[152]"TAB(T%)N$(1):PRINT"[155]"TAB(20+T0%)N$(.)"":FORI=.TO12
970 PRINTTAB(22)SP$:PRINT"[145]"IN$:NEXT
980 PRINT"[154] ABCDEFGHIJ":PRINT" [172][162][162][162][162][162][162][162][162][162][187]":FORY=.TO9:PRINT"[154]"CHR$(48+Y)"[152]..........[146][161]
990 [130]:[153]"ON"[163]11)"COS
1000 IFPL%THEN1270
1010 REM ** LOCAL PLAYER **
1020 PRINTPL$"[156]YOUR TURN -- PRESS F1 WHEN READY":PRINTSP$SP$:GOSUB1600
1030 PRINT#5,"";
1040 PRINTPL$SP$SP$:PRINTPL$"[158]USE CURSOR KEYS; RETURN TO FIRE
1050 L%[178]BS%[170]Y%[172]40[170]X%:P%[178][194](L%):[151]L%,P%[171]128
1060 [141]1460:[139]A$[178]CR$[167]1170
1070 [139]A$[179][177]"ON"[175]A$[179][177]""[175]A$[179][177]"CMD"[175]A$[179][177]""[167]1060
1080 [139]A$[178]"ON"[167]Y%[178]Y%[171]1
1090 [139]A$[178]""[167]Y%[178]Y%[170]1
1100 [139]A$[178]"CMD"[167]X%[178]X%[171]1
1110 [139]A$[178]""[167]X%[178]X%[170]1
1120 [151]L%,P%:[139]Y%[179].[167]Y%[178]9
1130 [139]Y%[177]9[167]Y%[178].
1140 [139]X%[179].[167]X%[178]9
1150 [139]X%[177]9[167]X%[178].
1160 [137]1050
1170 [139]([194](L%[170]CL)[175]15)[179][177]12[167]1120
1180 [151]L%,P%:[153]PL$"FIRE!"SP$SP$
1190 [141]1800:[152]5,[199](X%[170]65)[199](Y%[170]65);
1200 [161]#5,A$:[139]A$[179]"ATN"[167]1200
1210 Z%[178][198](A$)[171]193:[141]1900:[139]Z%[178].[167][151]L%[170]CL,1:[137]1260
1220 [151]L%[170]CL,2:[139]Z%[178]1[167]1260
1230 [153]"OPENYOU SANK "N$(1)"'S "S$(Z%[171]2):H%(.)[178]H%(.)[170]1:TL[178]TI[170]120
1240 [139]TI[179]TL[167]1240
1250 [139]H%(.)[178]5[167]1420
1260 [143] ** REMOTE PLAYER **
1270 PL%[178]1:[153]PL$""N$(1)"'S TURN":[153]SP$SP$:[141]1600
1280 [153]PL$"OPENWAITING FOR MOVE":[141]1800
1290 [161]#5,X$:[139]X$[179]"A"[167]1290
1300 [161]#5,Y$:[139]Y$[179]"A"[167]1300
1310 XX%[178][198](X$)[171]65:YY%[178][198](Y$)[171]65:LL%[178]BL%[170]YY%[172]40[170]XX%:Z%[178]G%(XX%,YY%)
1320 ZZ%[178]Z%:[139]Z%[178].[167]1350
1330 ZZ%[178]1:L%(Z%[171]1)[178]L%(Z%[171]1)[171]1:[139]L%(Z%[171]1)[178].[167]ZZ%[178]Z%[170]1:H%(1)[178]H%(1)[170]1
1350 [152]5,[199](ZZ%[170]193);:[153]PL$"CONT"N$(1)" FIRES AT "[170][199](XX%[170]65)[170]"-"[170][199](YY%[170]48)
1360 [141]1900:[139]Z%[178].[167][151]LL%[170]CL,1:[137]1400
1370 [151]LL%[170]CL,2:[139]ZZ%[178]1[167]1400
1380 [153]"DEF"N$(1)" SANK YOUR "S$(ZZ%[171]2):TL[178]TI[170]120
1390 [139]TI[179]TL[167]1390
1400 [139]H%(1)[179]5[167]PL%[178].:[137]1020
1410 [143] ** GAME OVER **
1420 [153]""SP$SP$" ":[153]"SYSGAME OVER -- LIST"N$(PL%)"WAIT PRINT#WINS!!!
1430 PRINTPL$"[154]PRESS F1 FOR MENU...":PRINTSP$SP$:PL%=.:GOSUB1600
1440 RUN 110
1450 REM ** GET ONE KEY **
1460 GETA$:IFA$=""THEN1460
1470 RETURN
1480 REM ** INPUT TEXT **
1490 I$=""
1500 PRINT" [146][157]";
1510 GOSUB1460:IFA$=CR$THEN1580
1520 IFA$=DL$THEN1560
1530 A$=CHR$(ASC(A$)AND127):IFA$<" "THEN1510
1540 IFLEN(I$)=LG%THEN1510
1550 I$=I$+A$:PRINTA$;:GOTO1500
1560 IFLEN(I$)THENI$=LEFT$(I$,LEN(I$)-1):PRINTA$;
1570 GOTO1500
1580 PRINT" ":RETURN
1590 REM ** CHAT MODE **
1595 PRINT"[159][146] [192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]
1600 [153]"OPEN TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN
1605 PRINT"[159] [192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][145]
1607 [137]1607
1610 [161]A$:[139]A$[178]""[167]1690
1620 A$[178][199]([198](A$)[175]127):[139]A$[179]" "[176]A$[177]"_"[167]1640
1630 [137]1680
1640 [139]A$[178]DL$[167]LC$[178]" "[170][200](LC$,37):[152]5,A$;:[137]1690
1650 [139]A$[178]CR$[167]LC$[178][201](LC$,34)[170]"POKE CONT":[152]5:[137]1690
1660 [139]A$[179][177]""[176]PL%[167]1690
1670 [152]5,"";:[142]
1680 [152]5,A$;:LC$[178][201](LC$,37)[170]"CONT"[170]A$
1690 [161]#5,B$:[139]B$[178]""[167]1770
1700 B$[178][199]([198](B$)[175]127):[139]B$[179]" "[176]B$[177]"_"[167]1720
1710 [137]1760
1720 [139]B$[178]DL$[167]RM$[178]" "[170][200](RM$,37):[137]1770
1730 [139]B$[178]CR$[167]RM$[178][201](RM$,34)[170]"POKE DEF":[137]1770
1740 [139]B$[178]""[167][142]
1750 [137]1770
1760 RM$[178][201](RM$,37)[170]"DEF"[170]B$
1770 [139]A$[177]""[176]B$[177]""[153]"ONONONONLIST"LC$:[153]"PRINT#"RM$
1775 [141]2000:[139]RT%[178]CR%[167]1610
1780 [153]"CARRIER LOST":[156]:[128]
1790 [143] ** WAIT FOR OTHER PLAYER **
1800 [141]1870
1810 TL[178]TI[170]60:[152]5,"";
1820 [161]#5,A$:[139]A$[178]""[167][152]5,"";:[137]1870
1830 [141]2000:[139]RT%[179][177]CR%[167]1780
1840 [139]TI[179]TL[167]1820
1850 [137]1810
1860 [143] ** CLEAR INPUT BUFFER **
1870 [161]#5,A$:[139]A$[177]""[175]A$[179]"A"[167]1870
1880 [142]
1890 [143] ** SOUND EFFECT **
1900 [129]I[178].[164]23:[151]SD[170]I,.:[130]:[151]SD[170]24,15:[151]SD[170]5,80:[151]SD[170]6,255
1910 [151]SD[170]4,17:[151]SD[170]4,16:[129]I[178]255[164]73[169][171]2.1
1920 [151]SD[170]1,I:[129]J[178]1[164]5:[130]J,I:[153]PL$SP$SP$" "
1930 [139]Z%[178].[167]1960
1940 [153]PL$"HIT!!":[151]53280,2:[151]SD[170]1,10:[151]SD[170]5,112:[151]SD[170]6,252:[151]SD[170]4,129
1950 [129]D[178]1[164]500:[130]:[151]SD[170]4,128:[151]53280,.:[142]
1960 [153]PL$"MISS ":[151]SD[170]24,4:[151]SD[170]5,143:[151]SD[170]6,252
1970 [151]SD[170]1,90:[151]SD,40:[151]SD[170]4,129:[129]I[178].[164]100:[130]:[151]SD[170]4,128:[129]I[178].[164]100:[130]
1980 [142]
1990 [143] ** CHECK FOR CARRIER **
2000 RT%[178][194](56577)[175]16:[142]
5000 [153]"LOAD CALL THESE FINE BOARDS:"[170][199](13)[170][199](13)
5001 [153]" SYSSHOESHINE'S BAZAARWAIT
5005 PRINT" [158]HOLE IN THE WALL[146]"+CHR$(13)+"[145][145][145][145][145][145][145][145][145][145]"
5007 FORX=1TO200:NEXT
5010 PRINT" [159]OVER 40 MEGS ONLINE!
5015 [153]" HOME OF SUPRA 128WAIT"[170][199](13)[170]"ONONONONONONONONONON"
5017 [129]X[178]1[164]200:[130]
5020 [153]" CONT300/1200/2400 BAUD
5025 PRINT" A BBS FOR THE 128"+CHR$(13)+"[145][145][145][145][145][145][145][145][145][145]"
5027 FORX=1TO200:NEXT
5030 PRINT" [129]RUNNING COLOR 64
5035 [153]" 300/1200 BAUD"[170][199](13)[170]"ONONONONONONONONONON"
5037 [129]X[178]1[164]200:[130]
5040 [153]" PRINTPC PURSUITABLE
5045 PRINT" HOME OF TELE-GAMES"+CHR$(13)+"[145][145][145][145][145][145][145][145][145][145]"
5047 FORX=1TO200:NEXT
5050 PRINT" [155](415)/769-6958
5055 [153]" (415)/524-1329"[170][199](13)[170][199](13)
5060 [153]" PRINT#HIT ANY KEY TO PLAYWAIT"
5090 [161]A$:[139]A$[178]""[167]5090
5100 [142]
6682