; games.seg.s ; modified for ACOS on 03/29/87 public fromsys on nocar goto no.car goto start no.car link "a:main.seg","term1" link.main link "a:main.seg","fromsys" fromsys on nocar goto no.car clear:recall "l:variables" goto start center b=(edit(3)/2)-(len(a$)/2):if b<1 b=1 print chr$(32,b); if flag(32) print chr$(15);a$;chr$(14):return print a$:return show.file setint(1):copy f$:setint(""):return vars kill "l:variables":store "l:variables":return start print sc$ if flag(32) a$=chr$(32,16)+chr$(14,2):gosub center if flag(32) a$=" "+chr$(14)+" Online Games "+chr$(15)+" ":gosub center if flag(32) a$=chr$(32,16)+chr$(14,2):gosub center if not flag(32) a$="%> Online Games <%":gosub center start2 if clock(2)<>0 print \(clock(2)-clock(1))/60":";:i$=str$((clock(2)-clock(1)) mod 60):if len(i$)<2 i$="0"+i$ if not clock(2) i$=chr$(13)+"00:00" print i$" Command? "; start1 gosub get.key if i$="Q" print "Quit...":goto link.main if i$="?" print "Commands -":gosub menu:goto start2 if i$="G" print "Goto SPUR!":link "a:spur.logon" if i$="T" print "Time bomb":push start2:goto time.bomb if i$="Y" print "Your stats":goto status if i$="C" goto change if i$="I" print "Insurance":gosub vars:link "a:insurance.seg" if (i$="E") and (flag(23)) print:goto exchange if i$="U" print "User robbing":gosub vars:link "a:robbing.seg" if i$="X" print "Transfer credits":goto xfer if i$="A" print "Armies":gosub vars:link "a:army.seg" if i$="R" print "Ships & Sailors":gosub vars:link "a:ships.seg" if i$="B" print "On-Line Banking":goto deposit if i$="S" print "Sub-names":gosub vars:link "a:names.seg" goto start1 menu setint(1) print ' [B)ank [I)nsurance [S)ub-name editor [U)ser robbing [X)-fer credits to user [G)oto SPUR [C)hange game [E)xchange PAE/time credits [T)ime bombs [Y)our status [Q)uit':setint(""):return status open #1,"f:u."+str$(un):position #1,5,2:input #1,a:close open #1,"b:bank":position #1,6,un:input #1,b:close i$=str$(a):gosub comma:print \"Credits on-hand: "i$ i$=str$(b):gosub comma:print "Credits in bank: "i$ goto start2 time.bomb print \"Choose: S)end time bomb, V)iew time bombs? "; gosub get.key:if i$="S" print "Send":goto sndbomb if i$<>"V" print "Quit":return print "View"\\"Users who currently have time bombs:"\ open #2,"b:users" for a=1 to nu:print "#"a; open #1,"f:u."+str$(a):position #1,5,10:input #1,b:close #1 if b=0 print chr$(8,len(str$(a))+1);:goto vwbomb position #2,64,a:input #2,i$,x$ if i$="" print chr$(8,len(str$(a))+1);:goto vwbomb if x$<>"." d4$=i$+" "+x$:else d4$=i$ f$=str$(b):f$=right$("00"+f$,3) setint(1):print " - "f$"% - "d4$ setint(""):if key(1) a=nu:print " -- Aborted" vwbomb next:close #2:print chr$(32,len(str$(a))+1):goto time.bomb sndbomb print' Credits are deducted from your bank account and cost 250 credits for each percent of damage.' f$="b:bank":open #1,f$:position #1,6,un:input #1,a:close xx=0:if (flag(4)) or (peek(-16287)>127) or (info(0)=0) xx=1:a=32000 if a<250 print \"You haven't got enough credits to send a time bomb.":return print \"You can send a time bomb for up to "a/250"% damage." gosub to.who:x=d:if (x=0) or (x=un) return print \"For what percent of damage? ";:d=len(str$(a/250)) gosub get.keys:z=val(i$):if z<1 return gf=a/250:if (z>gf) and (xx=0) print \"Invalid amount":return f1$="f:u."+str$(x):open #1,f1$:position #1,5,10:input #1,y:close if not y goto bomb1 print \d1$" already has a bomb for "y"% damage." print "Do you wish to continue? ";:gosub get.key if i$<>"Y" close:print "No":return print "Yes" bomb1 if xx goto cheat a=a-(z*250):open #1,f$:position #1,6,un:print #1,a:close cheat open #1,f1$:y=y+z:position #1,5,10:print #1,y:close if an goto bomb3 edit(0):ready "e:gmail" if info(6)<29 print \"Mail bit-map full!":return gosub date1 print #msg(x),un:print #6,"Letter From -%>On-Line Games" print #6,"Date Mailed -%>"i$\ print #6,a1$" "a2$" (#"un") sent you a time bomb for "y"% damage." copy #8,#6 print #msg(x),chr$(4);chr$(0);:msg(x)=msg(x)+1:update bomb2 f$="b:bomb.log":create f$ open #1,f$:position #1,80,0:input #1,a:a=a+1:if a=100 a=1 position #1,80,0:print #1,a:position #1,80,a i$=a1$+" "+a2$+chr$(32,24):x$=d1$+chr$(32,24) print #1,"["date$"]: "left$(i$,24); print #1," bombed "left$(x$,24)" for "; a$=right$(" "+str$(y),3) print #1,a$"%" close bomb3 print \"Time bomb delivered." return exchange open #1,"k:pae.points":position #1,12,un:input #1,pt,up,dn:close f$="f:u."+str$(un):open #1,f$:position #1,5,2:input #1,tm:close exch2 i$=str$(pt):gosub comma:x$=i$:i$=str$(tm):gosub comma print \"You have "x$" PAE credits, and "i$" time credits." print \'Exhange: [P]AE credits to time credits, or [T]ime credits to PAE credits? '; gosub get.key:if (i$<>"P") and (i$<>"T") print "Quit":goto start2 if i$="T" print "Time":goto ex.time print "PAE":if pt<1 print \"You have no PAE credits!":goto exch2 d=len(str$(pt)):print \"How many PAE credits? ";:gosub get.keys a=val(i$):if (a>pt) or (a<1) goto exch2 if a+tm>9500 print \"That's too many!":goto exch2 tm=tm+a:pt=pt-a open #1,f$:position #1,5,2:print #1,tm:close open #1,"k:pae.points":position #1,12,un:print #1,pt,up,dn:close:goto exch2 ex.time if tm<5 print \"You haven't got enough time credits!":goto exch2 print \'Time credits are divided by five when converted to PAE credits.' d=len(str$(tm)):print \"Convert how many time credits? "; gosub get.keys:a=val(i$):if a<5 goto exch2 tm=tm-a:pt=pt+(a/5) open #1,f$:position #1,5,2:print #1,tm:close open #1,"k:pae.points":position #1,12,un:print #1,pt,up,dn:close:goto exch2 xfer gosub to.who:a=d:if a=0 goto start2 if (not flag(4)) and (a=un) and (info(0)) goto start2 print \"User #"a" is "d1$"." print \"Checking "d1$"'s records..."; f$="f:u."+str$(a):open #1,f$:z=mark(1):close if z print "missing.":goto xfer print "okay." open #1,f$:position #1,5,2:input #1,z:close i$=str$(z):gosub comma print \d1$" has "i$" time credits." f$="f:u."+str$(un):open #1,f$:position #1,5,2:input #1,t:close if (t<1) and (not flag(4)) print \"You have no credits to x-fer!":goto start2 i$=str$(t):gosub comma print \"You have "i$" credits in reserve." input @2 "X-fer how many? "y:if y<1 goto xfer print \"Transfering credits..."; if (z+y)>9500 print 'wait! If you give him that much, he will have over 9,500 credits. Due to system limitations, this cannot be done.':goto xfer a$="f:u."+str$(a) open #1,a$:position #1,5,2:print #1,(z+y):close if not flag(4) open #1,f$:position #1,5,2:print #1,(t-y):close print "done."\"Notifying "d1$"...";:edit(0) ready "e:gmail":if info(6)<29 print \"Mail bit-map full!":goto start2 gosub date1 print #msg(a),un:print #6,"Letter From -%>On-Line Games" print #6,"Date Mailed -%>"i$\ i$=str$(y):gosub comma print #6,a1$" "a2$" (#"un") gave you "i$" of his reserve credits." copy #8,#6 print #msg(a),chr$(4);chr$(0);:msg(a)=msg(a)+1:update print "done.":goto start2 wr.credits open #1,"f:u."+str$(xx):position #1,5,2:print #1,cr:close open #1,"b:bank":position #1,6,xx:print #1,ba:close goto start2 deposit create "b:bank":if flag(4)=0 xx=un:goto banknorm gosub to.who:xx=d:if xx<1 goto start2 banknorm open #1,"f:u."+str$(xx):position #1,5,2:input #1,cr:close open #1,"b:bank":position #1,6,xx:input #1,ba:close print ' Maximum amount of credits allowed in the bank is 32,000. The system will not allow you to deposit any more than this. The maximum credits allowed on-hand is 9,500.' print \"Use '>' and '<', or arrow keys, to control:" print "On-hand/In bank: 0000/00000"; deposit1 print chr$(8,10); if cr<1000 print " "; if cr<100 print " "; if cr<10 print " "; print cr"/"ba; if ba<10000 print " "; if ba<1000 print " "; if ba<100 print " "; if ba<10 print " "; deposit2 a=key(0):if not a goto deposit2 if a=13 print "...saving.":goto wr.credits if a=21 goto up if a=8 goto down if a=60 goto down500 if a=62 goto up500 goto deposit2 up if flag(4) and (ba<>32000) ba=ba+1:goto deposit1 if (cr<1) or (ba=32000) goto deposit2 cr=cr-1:ba=ba+1:goto deposit1 down if (cr=9500) or (ba<1) goto deposit2 cr=cr+1:ba=ba-1:goto deposit1 up500 a=0:if (flag(4)) or (peek(-16287)>127) a=1 if (a) and (ba<31501) ba=ba+500:goto deposit1 if (cr<500) or (ba>31500) goto up10 cr=cr-500:ba=ba+500:goto deposit1 up10 if (cr<10) or (ba>31990) goto deposit2 cr=cr-10:ba=ba+10:goto deposit1 down500 if (cr>9000) or (ba<500) goto down10 cr=cr+500:ba=ba-500:goto deposit1 down10 if (cr>9490) or (ba<10) goto deposit2 cr=cr+10:ba=ba-10:goto deposit1 change f$="b:games":open #1,f$:a=mark(1):close if a print \\"There currently are no on-line games.":goto start2 print sc$:gosub show.file input @2 \"Select: "a:if a<1 goto start open #1,"a:game"+str$(a)+".seg.s":z=mark(1):close if z print \"Sorry, that game doesn't exist.":goto start2 print \"Running game #"a"..."; gosub vars:link "a:game"+str$(a)+".seg" date1 q=val(left$(date$,2)):q1=val(mid$(date$,4,2)):q2=val(right$(date$,2)) m$="000031059090120151181212243273304334":if q>1 q3=val(mid$(m$,q*3-2,3)) q1=q1+q3:m$="46012356":q1=q1+val(mid$(m$,8-(94-q2),1)):q1=q1 mod 7 m$="BobMonTueWedThuFriSat":if q1>1 td$=mid$(m$,q1*3-2,3):else td$="Sun" ml$="085534469788":q3=0:for q4=1 to q-1:q3=q3+val(mid$(ml$,q4,1):next mt$="FebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecember" if q>1 m$=mid$(mt$,q3+1,val(mid$(ml$,q4+1,1))):else m$="January" min$=mid$(time$,4,2):if len(time$)>8 tm$=time$:goto date2 if val(left$(time$,2))<12 tm$=left$(time$,2)+":"+min$+"AM":goto date2 q4=val(left$(time$,2)):tm$=str$(12-(24-q4))+":"+min$+"PM" date2 i$=td$+", "+m$+" "+mid$(date$,4,2)+" "+tm$ return get.keys if d<1 i$="":return x$="":gi=0 keys1 gosub get.key:if (gf=13) print " "chr$(8):return print i$;:x$=x$+i$ keys2 gi=99:gosub get.key if (gf<>8) and (gf<>127) goto keys3 print " "chr$(8,2)" "chr$(8,2); if len(x$)=1 goto get.keys x$=left$(x$,(len(x$)-1)):goto keys2 keys3 if gf=13 i$=x$:gi=0:print " "chr$(8):return print i$;:x$=x$+i$:if len(x$)=d i$=x$:gi=0:print " "chr$(8):return goto keys2 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) or (gf=14) i$=chr$(gf):return if gf and (gi=99) 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 ; Send to user to.who print \"To who [1-"nu;:input @2 ",Q]: "i$ 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 an=0:if left$(i$,1)="*" an=1:i$=mid$(i$,2) d$=i$:if (d$="SYSOP") or (d$=sys$) d=1:return gosub lower.case:d1$=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$<>"." d4$=a$+" "+i$:else d4$=a$ if d4$=d1$ close #1:close #2:return if instr(d1$,d4$) position #2,30,gf:print #2,d,d4$: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$<>"." d1$=a$+" "+i$:else d1$=a$ d0$="Send to "+d1$+" (#"+str$(d)+")? " snd.num2 print \d0$; gosub get.key:if i$<>chr$(14) an=0:goto snd.num1 print " "chr$(8,len(d0$)+1);chr$(32,len(d0$)+1);chr$(8,len(d0$)+1); print "Send it anonymously? "; gosub get.key:if i$<>"Y" print "No":goto snd.num2 an=1 snd.num1 if i$<>"Y" d=0:print "No":else print "Yes" return 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 comma if len(i$)<4 return if len(i$)<5 gf=1:else gf=2 i$=left$(i$,gf)+","+right$(i$,3):return