-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfujichat.txt
45 lines (45 loc) · 1.57 KB
/
fujichat.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
10 DIM LINE$(120),B$(40),OUT$(120):OUT$=""
15 B$="(40 hearts)"
20 GOSUB 8200
25 GRAPHICS 0:POKE 82,0
35 DLIST=)(560):POKE DLIST+27,130
40 FOR I=0 TO 19:READ A:POKE 1536+I,A:NEXT I
45 POKE 512,0:POKE 513,6:POKE 54286,192
46 DATA 72,138,72,169,80,162,88,141,10,212,141,23,208,142,24,208,104,170,104,64
47 OPEN #2,4,0,"K:"
50 TOP=)(88)
55 POSITION 0,23:? ">";
110 IF PEEK(764)=255 THEN 200
120 GET #2,K:OUT$(LEN(OUT$)+1)=CHR$(K):IF K<>155 THEN ? CHR$(K);
125 IF K=155 AND LEN(OUT$)=1 THEN OUT$="":GOTO 200
130 IF K=155 THEN ? #1,NAME$;": ";OUT$(1,LEN(OUT$)-1):OUT$="":B ADR(B$),TOP+40*23,40
200 STATUS #1,A:BW=PEEK(747)*256+PEEK(746):IF BW=0 THEN 110
201 REM POSITION 0,0
202 ROW=PEEK(84):IF ROW<22 THEN 210
203 POSITION 0,0:B TOP+40,TOP,40*22
204 B ADR(B$),TOP+40*22,40
205 POSITION 0,22
210 INPUT #1;LINE$:? LINE$
250 POSITION 0,23:? ">";OUT$;:GOTO 110
8199 END
8200 DIM H$(64),D$(128),NAME$(13)
8210 GRAPHICS 0:POKE 82,0
8220 ? " FUJICHAT v0.1"
8221 ? " by @KaySavetz":?
8222 ? "WHAT IS YOUR NAME";:INPUT NAME$
8223 IF NAME$="" THEN 8222
8230 ? :? "ENTER SERVER IP OR RETURN FOR DEFAULT"
8240 INPUT #16,H$
8250 IF H$="" THEN H$="97.120.11.62"
8260 D$="N:TCP://":D$(LEN(D$)+1)=H$:D$(LEN(D$)+1)=":8888/"
8261 TRAP 8290
8270 ? :? "CONNECTING TO: ";D$:OPEN #1,12,3,D$
8280 ? :? "CONNECTED!"
8281 X=10:GOSUB 9001:GOTO 8400
8290 ? :? "COULD NOT CONNECT."
8291 X=6:GOSUB 9001:CLOSE #1:GOTO 8230
8400 TRAP 40000
8410 ? #1;NAME$;" has connected!"
8420 RETURN
9000 STATUS #1,A:IF PEEK(746)=0 THEN 8396
9001 FOR I=15 TO 0 STEP -1:SOUND 0,50,X,I:FOR DE=0 TO 5:NEXT DE:NEXT I:RETURN