 Rem File: Cmd056.bas
 Rem Sub: Get.Graphics
 Rem $Include: 'dndbbs.inc'
 On Error Goto Main.Error
 If Chained<>-2 Then
    Color 15,0
    Print "DNDBBS Command 056 -- Get.Graphics."
    Color 7,0
    End
 Endif
 Call Get.Graphics
Main.Resume:
 Chain DND.Path+"DNDBBS.EXE"
 End
Main.Error:
 Resume Main.Resume

Sub Get.Graphics
 On Local Error Goto Error.Trap25
 If Local.Mode Then
    If Debug.Mode Then
       Strng="Debug mode."
       Call IO.O
    Else
       Strng="Statusline is for remote users only."
       Call IO.O
       Exit Sub
    Endif
 Else
    If Remote.ANSI.Color=False And Remote.Avatar.Color=False Then
       Strng="Remote ANSI not detected."
       Call IO.O
       Exit Sub
    Endif
 Endif
 Strng="Turn on statusline(y/n)? "
 No.Input.Out="Y"
 Call IO.I
 If Yes Then
    If Graphics.Status=0 Then
       StatusLine.Line=2
    Endif
    Graphics.Status=True
    Strng="Remote statusline on."
    Call IO.O
    UserRecord.StatusVar=-1
    If ANSIPrefixChar=Nul Then
       UserRecord.Prefix3=Nul
    Endif
    If ANSIPrefixChar<>Nul Then
       Do While Security.Guard
          If Lost.Carrier Then
             Exit Do
          Endif
          Graphics.Off=True
          Out2=UserRecord.Prefix3
          Out2=Rtrim$(Out2)
          Strng="Current statusline ANSI prefix: "
          If Len(Out2) Then
             Strng=Strng+Out2
          Else
             Strng=Strng+"<none>"
          Endif
          Call IO.O
          Strng="Statusline ANSI prefix code(8 characters,?=help,C=clear,<enter>=quit):"
          Call IO.O
          Strng="?"
          No.Input.Out=Nul
          Call IO.I
          Out2=Ucase$(Out2)
          Graphics.Off=False
          Select Case Lcase$(Out2)
          Case Nul
             Exit Do
          Case "?"
             Call Display.ANSI.Prefixes
          Case "c"
             UserRecord.Prefix3=Nul
             Strng="Statusline ANSI prefix reset."
             Call IO.O
          Case Else
             Call Check.ANSI.Prefix(V%)
             If V% Then
                Strng="Statusline ANSI prefix reset."
                Call IO.O
                UserRecord.Prefix3=Out2
             Else
                Strng="Invalid ANSI prefix."
                Call IO.O
                UserRecord.Prefix3=Nul
             Endif
          End Select
       Loop
    Endif
    Do While Security.Guard
       If Lost.Carrier Then
          Exit Do
       Endif
       Graphics.Off=True
       Out2=Statusline.String
       Out2=Rtrim$(Out2)
       Strng="Current custom statusline: "
       If Len(Out2) Then
          Strng=Strng+Out2
       Else
          Strng=Strng+"<none>"
       Endif
       Call IO.O
       Strng="Custom statusline string(?=help,C=clear,<enter>=quit):"
       Call IO.O
       Strng="?"
       No.Input.Out=Nul
       Call IO.I
       Graphics.Off=False
       Select Case Lcase$(Out2)
       Case Nul
          Exit Do
       Case "?"
          Call Display.Strings
       Case "c"
          Statusline.String=Nul
          UserRecord.StatusLineString=Nul
          Strng="Custom statusline reset."
          Call IO.O
       Case Else
          Statusline.String=Rtrim$(Out2)
          UserRecord.StatusLineString=Rtrim$(Out2)
          Strng="Custom statusline reset."
          Call IO.O
       End Select
    Loop
    Strng="ANSI prefix set to: "
    If Rtrim$(UserRecord.Prefix3)=Nul Then
       Strng=Strng+"<none>"
    Else
       Strng=Strng+Rtrim$(UserRecord.Prefix3)
    Endif
    Call IO.O
    Strng="Statusline set to: "
    If Rtrim$(UserRecord.StatusLineString)=Nul Then
       Strng=Strng+"<none>"
    Else
       Strng=Strng+Rtrim$(UserRecord.StatusLineString)
    Endif
    Call IO.O
    Exit Sub
 Endif
 Graphics.Status=False
 Strng="Remote statusline off."
 Call IO.O
Error.Resume25:
 Exit Sub
Error.Trap25:
 Resume Error.Resume25
End Sub

Sub Display.Strings
 On Local Error Goto Error.Trap25z
 Graphics.Off=False
 Strng="Custom statusline variables are:"
 Call IO.O
 Graphics.Off=True
 Strng=" [1]  user codename"
 Call IO.O
 Strng=" [2]  user classname"
 Call IO.O
 Strng=" [3]  date/time in form: mm/dd/yyyy hh:mm:ss"
 Call IO.O
 Strng=" [4]  date in form: mm/dd/yyy"
 Call IO.O
 Strng=" [5]  time in form: hh:mm:ss"
 Call IO.O
 Strng=" [6]  formatted date/time in form: ddd dd mmm yy, hh:mma/p"
 Call IO.O
 Strng=" [7]  user node (-,0-9,A-Z,10-99)"
 Call IO.O
 Strng=" [8]  user comm port (-,1-64)"
 Call IO.O
 Strng=" [9]  user port (-,0-63)"
 Call IO.O
 Strng=" [a]  date/time user logged on"
 Call IO.O
 Strng=" [b]  program version"
 Call IO.O
 Strng=" [c]  program release"
 Call IO.O
 Strng=" [d]  program name (dndbbs)"
 Call IO.O
 Strng=" [e]  program runmode"
 Call IO.O
 Strng=" [f]  program run number"
 Call IO.O
 Call More.Prompt
 If No Or Quit Then
    Exit Sub
 Endif
 Graphics.Off=False
 Strng="The standard phone lines are:"
 Call IO.O
 Graphics.Off=True
 Strng=" [g]  phone line#1"
 Call IO.O
 Strng=" [h]  phone line#2"
 Call IO.O
 Strng=" [i]  phone line#3"
 Call IO.O
 Strng=" [j]  phone line#4"
 Call IO.O
 Call More.Prompt
 If No Or Quit Then
    Exit Sub
 Endif
 Graphics.Off=False
 Strng="System variables are:"
 Call IO.O
 Graphics.Off=True
 Strng=" [k]  Sysop Name"
 Call IO.O
 Strng=" [l]  Sysop Email"
 Call IO.O
 Strng=" [m]  BBS name"
 Call IO.O
 Strng=" [n]  BBS description"
 Call IO.O
 Call More.Prompt
 If No Or Quit Then
    Exit Sub
 Endif
 Graphics.Off=True
 Strng="The additional phone lines 5-16 are [o] to [z]"
 Call IO.O
 Strng="The extended phone lines 17-127 are {17} to {127}"
 Call IO.O
 Call More.Prompt
 If No Or Quit Then
    Exit Sub
 Endif
 Graphics.Off=False
 Strng="The additional switches for status line are in <>:"
 Call IO.O
 Graphics.Off=True
 Strng=" <LV>  Level         <TA>  Logon date\time"
 Call IO.O
 Strng=" <ST>  Strength      <TB>  Logon date"
 Call IO.O
 Strng=" <IN>  Intelligence  <TC>  Logon time"
 Call IO.O
 Strng=" <WI>  Wisdom        <TH>  Hexidecimal date\time"
 Call IO.O
 Strng=" <DE>  Dexterity     <TI>  Hexidecimal date"
 Call IO.O
 Strng=" <CO>  Consitution   <TJ>  Hexidecimal time"
 Call IO.O
 Strng=" <PI>  Piety         <TO>  Time online"
 Call IO.O
 Strng=" <CH>  Charisma      <TR>  Time remaining"
 Call IO.O
 Strng=" <FA>  Fatigue       <GD>  User gold"
 Call IO.O
 Strng=" <VI>  Vitality      <EX>  User experience"
 Call IO.O
 Strng=" <MA>  Magic         <WS>  Wishes left"
 Call IO.O
 Strng=" <PS>  Psionic       <GS>  Sysop page slots"
 Call IO.O
 Graphics.Off=False
 Strng="Switches for prefixes:"
 Call IO.O
 Graphics.Off=True
 Strng=" <P0>  node prefix  <P1>  dm prefix  <P2>  sysop prefix"
 Call IO.O
 Call More.Prompt
 If No Or Quit Then
    Exit Sub
 Endif
 Graphics.Off=False
 Strng="The drive replacements are:"
 Call IO.O
 Graphics.Off=True
 Strng=" (1) drive letter"
 Call IO.O
 Strng=" (2) current directory"
 Call IO.O
 Strng=" (3) volume label"
 Call IO.O
 Strng=" (4) server machine name"
 Call IO.O
 Call More.Prompt
Error.Resume25z:
 Exit Sub
Error.Trap25z:
 Resume Error.Resume25z
End Sub
