; Sub-Names ; Created for ACOS on 07/21/87 on nocar goto no.car gg=0:create "b:names" list print sc$\"Current sub-names:"\ open #1,"b:names":position #1,21,0:input #1,a if not a close:print "<< None >>":goto st gh=0:for b=1 to a:position #1,21,b:input #1,i$ a$=str$(b):if len(a$)<2 a$="0"+a$ i$=i$+chr$(32,21):print "["a$"] "left$(i$,21); gh=gh+1:if gh=3 print:gh=0 next:close:print st print \"L)ist, S)how, M)ake, C)hange, A)ssign, Q)uit: "; st1 gosub get.key:if i$="Q" print "Quit":goto quit if i$="L" print "List":goto list if i$="A" print "Assign":goto assign if i$="M" print "Make":goto make if i$="S" print "Show":goto show if (i$="Z") and ((flag(4)) or (peek(-16287)>127)) print "Zero":goto zero if i$<>"C" goto st1 print "Change" if not a print \"No sub-names to change!":goto st an=0:if (flag(4)) or (peek(-16287)>127) an=1:goto cha1 open #1,"f:u."+str$(un):position #1,5,2:input #1,bb:close if bb<100 close:print ' You need at least 100 credits to change a sub-name.':goto st print \"It costs 100 credits to change a sub-name." print "Will you pay? ";:gosub get.key if i$<>"Y" print "No":goto st print "Yes" cha1 input @2 \"Change sub-name #"bb if (bb<1) or (bb>a) goto st input @3 "Enter new sub-name: "i$ if not i$ goto st if len(i$)>20 print \"Sub-name too long.":goto st open #1,"b:names":position #1,21,bb:print #1,i$:close if an gg=1:goto st open #1,"f:u."+str$(un):position #1,5,2:input #1,bb position #1,5,2:print #1,bb-100:close gg=1:goto st show print \"User listing with subnames:"\ open #1,"b:users":for b=1 to nu position #1,64,b:input #1,d1$,d2$ if d2$<>"." d4$=d1$+" "+d2$:else d4$=d1$ if d1$="" next:close:goto st setint(1):print d4$" (#"b") - "; open #2,"f:u."+str$(b):position #2,5,17:input #2,c:close #2 if c=0 print "":next:close:goto st open #2,"b:names":position #2,21,c:input #2,i$:close #2 print "["i$"]":setint("") if key(1) print \"%> Aborted <%":b=nu next:close:goto st make if a>23 print \"Too many names already made, change one instead.":goto st input @3 \"Enter new sub-name: " i$ if len(i$)>20 print "Too long, max=20":goto make if not i$ goto st a=a+1:open #1,"b:names":position #1,21,0:print #1,a position #1,21,a:print #1,i$:close:goto st assign an=0:if (flag(4)) or (peek(-16287)>127) an=1:goto ass1 open #1,"f:u."+str$(un):position #1,5,2:input #1,bb:close if bb<500 close:print ' You need at least 500 credits to assign a sub-name.':goto st print \"It costs 500 credits to assign a sub-name." print "Will you pay? ";:gosub get.key if i$<>"Y" print "No":goto st print "Yes" ass1 input @2 \"Assign sub-name #"bb if (bb<1) or (bb>a) goto st gosub to.who:if d=0 goto st f$="f:u."+str$(d):open #1,f$ position #1,5,17:input #1,b if b=0 goto assign2 open #2,"b:names":position #2,21,b:input #2,i$:close #2 print \"Current sub-name: ["i$"]"\\"Verify change ([Y],N): "; gosub get.key:if i$="N" print "No":close:goto st print "Yes" assign2 position #1,5,17:print #1,bb:close if an gg=1:goto st open #1,"f:u."+str$(un):position #1,5,2:input #1,bb position #1,5,2:print #1,bb-500:close gg=1:goto st zero input @2 \"Zero user: "i$:gosub to.who1:if d=0 goto st open #1,"f:u."+str$(d):position #1,5,17:print #1,0:close goto st to.who print \"To who [1-"nu;:input @2 ",Q]: "i$ to.who1 if (i$="") or (i$="Q") d=0:return if left$(i$,1)="#" i$=mid$(i$,2):goto snd.num if val(left$(i$,1)) goto snd.num d$=i$:if (d$="SYSOP") or (d$=sys$) d=1:return gosub lower.case:d$=ab$ kill "l:matches":create "l:matches" open #2,"l:matches" open #1,"b:users":d=1:gf=0 snd.user position #1,64,d input #1,a$,i$:if i$<>"." d1$=a$+" "+i$:else d1$=a$ if d1$=d$ close #1:close #2:return if instr(d$,d1$) position #2,30,gf:print #2,d,d1$:gf=gf+1 if dnu) goto snd.usr2 open #1,"b:users" position #1,64,d:input #1,a$,i$:close #1 if a$="" goto snd.usr2 if i$<>"." d4$=a$+" "+i$:else d4$=a$ print \"Assign to "d4$"? "; gosub get.key if i$<>"Y" d=0:print "No":else print "Yes" return no.car link "a:main.seg","term1" quit if gg print \"Updating...";:else goto quit1 f$="f:u."+str$(un):open #1,f$:position #1,5,17:input #1,a:close print ".";:if a open #1,"b:names":position #1,21,a:input #1,nb$:close kill "b:variables":print ".";:store "b:variables" quit1 link "a:games.seg","fromsys" get.key ww=0:wx=0 get.key1 gf=clock(2) if (gf<>0) and (clock(1)>gf) print \\"[ Time Limit Exceeded ]":pop:goto no.car gf=peek(-16384):if (gf=129) or (gf=150) get i$:print chr$(8);:return gf=key(0):if (gf>96) and (gf<123) gf=gf-32 if (gf>31) or (gf=13) i$=chr$(gf):return ww=ww+1:if flag(33)=0 goto get.key2 wx=wx+1:if wx>16 wx=1 print mid$("!/-\!/-\!\-/!\-/",wx,1);chr$(8); get.key2 if ww=2000 print chr$(7,2); if ww=4000 pop:goto no.car if (not info(0)) and (not info(5)) and (eu<>1) pop:goto no.car goto get.key1 lower.case if len(i$)=1 ab$=i$:return ab$=left$(i$,1):for wy=2 to len(i$):wx=asc(mid$(i$,wy,1)) if wx=32 ab$=ab$+" "+mid$(i$,wy+1,1):wy=wy+1:next:return if (wx<65) or (wx>96) ab$=ab$+chr$(wx):next:return ab$=ab$+chr$(wx+32):next:return