0 defint a-z:clear2000:maxfiles=2 1 print"Enter your nickname. Actual":print"nickname may differ if entered":print"nickname is already logged in" 2 inputnn$:iflen(nn$)>16thenprint"Too long nickname, try again":goto2 3 print"Connecting to server...":a$="http://network.symbos.org:2801/":open"tcp:a$*"as#1 4 print"Authenticating...":print#1,"000^";nn$;"|":callnetsnddtg(1) 40 input#1,a$:nn$=right$(a$,len(a$)-4):print"You actual nickname: ";nn$:input#1,a$:print"Code: ";a$ 55 o$="":fori=0to5:callnetgetmem(255,&h6001+i,a):z=val("&H"+mid$(a$,i*2+1,2)):z=zxora:gosub100:o$=o$+m$:nexti 60 o$="001^"+o$+"|":print#1,o$:callnetsnddtg(1):print"Code reply: ";o$ 61 input#1,a$:ifmid$(a$,1,4)<>"002^"then61 62 ifmid$(a$,5,1)<>"A"thenprint"Access denied":close#1:stop 63 keyoff:cls:nl=peek(&hf3b1):sw=peek(&hf3b0):locate0,nl-2:printstring$(sw,"-");:ln=0:o$="":po=0:cl$=chr$(13)+chr$(10) 64 ms$="System: you are "+nn$:gosub3002:ms$="System: Type /? for help":gosub3002 65 in$="":locate0,nl-1:printstring$(sw-1," ");:poke&hfca9,255:locatepo,nl-1 67 a$=inkey$:ifa$=""then69 68 gosub1001:ifs=1thengosub501:o$="" 69 gosub2001:ifs<>1then90 70 ifop=5thenms$=in$:gosub3001:goto89 71 ifop=3thenprint#1,"003^Pingback|":callnetsnddtg(1):gosub4001:locatesw-15,nl-2:printleft$(in$,14):gosub4002:goto89 72 ifop=7thengosub3201:goto89 73 ifop=11thenms$="System: "+in$:gosub3001:goto89 74 ifop=9thengosub600:goto89 75 ifop=12thenms$="System: game with "+in$+"System: is about to start":gosub3002:goto89 76 ifop=8thengosub560:goto89 89 in$="" 90 goto67 100 m$=hex$(z):iflen(m$)=1thenm$="0"+m$ 110 return 500 '___parsing input string 501 ifleft$(o$,1)<>"/"then2501 502 a$=mid$(o$,2,1):ifa$="?"then510 503 ifa$="q"ora$="Q"then4202 504 ifa$="u"ora$="U"thenprint#1,"006^|":callnetsnddtg(1):return 505 ifa$="i"ora$="I"then520 506 ifa$="c"ora$="C"then530 507 ifa$="a"ora$="A"then540 508 ifa$="d"ora$="D"then550 509 return 510 restore514 511 reada$:l=len(a$):ifl=0thenlocatepo,nl-1:return 512 fori=1tol:ifmid$(a$,i,1)="_"thena$=left$(a$,i-1)+chr$(9)+right$(a$,l-i) 513 nexti:ms$=a$:gosub3002:goto511 514 data "/?_display this help","/q_quit","/i _invite user ","/c _cancel invite for user " 515 data "/u_list users logged in","/a _accept invite from ","/d _deny invite from ","" 519 '___invite player 520 z=len(o$):ifz<4thena$=""elsea$=mid$(o$,4,z-3) 521 print#1,"008^"+a$+"|":callnetsnddtg(1):ms$="Invite for "+a$+" sent":gosub3002:return 529 '___cancel invite 530 z=len(o$):ifz<4thena$=""elsea$=mid$(o$,4,z-3) 531 print#1,"013^"+a$+"|":callnetsnddtg(1):ms$="Inv cancel for "+a$+" sent":gosub3002:return 539 '___accept invite 540 z=len(o$):ifz<4thena$=""elsea$=mid$(o$,4,z-3) 541 print#1,"009^A^"+nn$+">"+a$+"|":callnetsnddtg(1):ms$="Inv accept for "+a$+" sent":gosub3002:return 549 '___deny invite 550 z=len(o$):ifz<4thena$=""elsea$=mid$(o$,4,z-3) 551 print#1,"009^D^"+nn$+">"+a$+"|":callnetsnddtg(1):ms$="Inv deny for "+a$+" sent":gosub3002:return 559 '___invite received 560 a=1:gosub610:ms$="You have invite from "+a$:gosub3002:gosub4001:return 599 '___invite response received 600 i$=left$(in$,1):a=3:gosub610:n1$=a$:a=a+1:gosub610:n2$=a$ 601 a$="Invite from "+n1$+" ":ifi$="A"thena$=a$+"accepted"elsea$=a$+"declined" 602 ms$=a$:gosub3002:ifi$="A"thenprint#1,"010^"+n2$+">"+n1$+"|":callnetsnddtg(1) 603 return 610 a$="":fori=atolen(in$):q$=mid$(in$,i,1):ifq$=">"orq$=chr$(13)thena=i:return 611 a$=a$+q$:nexti:a=i:return 1000 '___input from keyboard: in:a$,in/out=o$,out=s 1001 s=0:c=asc(a$):l=len(o$) 1002 ifc=8then1012 1003 ifc=29then1020 1004 ifc=28then1030 1005 ifc=127then1040 1006 ifc=13then1050 1007 ifc<32thenreturn 1008 iflen(o$)=sw-2thenbeep:return 1009 ifpo0thenpo=po-1:o$=left$(o$,po)+right$(o$,l-po-1):goto1011elsereturn 1020 ifpo<>0thenpo=po-1 1021 goto1011 1030 ifpo