 Rem File: DndeditL.bas
 Rem Sub: EditUsers
 Rem $Include: 'dndedit.inc'

 On Error Goto Main.Error
 If Chained2=0 Then
    Call Init.Arrays
    Call Read.Rows(Var2)
    Max.Row=Var2
    Call Save.Screen(False)
    Call Clear.Screen2
    Call Init.Mouse
    Call Read.Config(False)
    Call Passwrd5(Var,"l")
    Close #TempFile1
    If Var=False Then
       Call Terminate.Program(True)
       End
    Endif
 Endif
Main.Resume:
 Call EditUsers
 If Chained2 Then
    Chain DND.Path+"DNDEDIT.EXE"
 Endif
 Call Terminate.Program(True)
 End
Main.Error:
 Resume Main.Resume

Sub Search.Mess.File(Var1!,Var2)
 On Local Error Goto Error.Trap203
 Var2=False
 For TempA=False To MaxNodes
    Call Read.Message.Record(MessWorkFile1,TempA+1)
    Var$=MessWorkRecord1.UserName
    Select Case Rtrim$(Lcase$(Var$))
    Case "login", "logoff", "relogin"
       TempB=False
    Case Deleted$, Offline$
       TempB=False
    Case Else
       TempB=True
    End Select
    If TempB Then
       If MessWorkRecord1.UserIndex=Var1! Then
          Var2=True
          Exit For
       Endif
    Endif
 Next
Error.Resume203:
 Exit Sub
Error.Trap203:
 Resume Error.Resume203
End Sub

Sub UserSelect
 On Local Error Goto Error.Trap69
 Next.Field=False
 If TempX$=Chr$(9) Then
    TempX=77
 Endif
 Select Case TempX
 Case 77, 157, 116
    Select Case Selection
    Case 1 To 6
       Next.Field=Selection+17
    Case 7, 8
       Next.Field=Selection+16
    Case 9 To 16
       Next.Field=Selection+1
    Case 17
       Next.Field=27
    End Select
 Case 15, 75, 155, 115
    Select Case Selection
    Case 10 To 17
       Next.Field=Selection-1
    Case 18 To 22
       Next.Field=Selection-17
    Case 23 To 24
       Next.Field=Selection-16
    Case 27
       Next.Field=17
    End Select
 Case 72, 141, 152
    If Selection>1 Then
       Next.Field=Selection-1
    Endif
 Case 80, 145, 160
    If Selection<27 Then
       Next.Field=Selection+1
    Endif
 Case 71, 119
    If Selection<>1 Then
       Next.Field=1
    Endif
 Case 79, 117
    If Selection<>27 Then
       Next.Field=27
    Endif
 Case 73, 132
    Select Case Selection
    Case 2 To 17
       Next.Field=1
    Case 19 To 27
       Next.Field=18
    End Select
 Case 81, 118
    Select Case Selection
    Case 1 To 16
       Next.Field=17
    Case 17 To 26
       Next.Field=27
    End Select
 End Select
 Call ShowField
Error.Resume69:
 Exit Sub
Error.Trap69:
 Resume Error.Resume69
End Sub

Sub DisplayUser
 On Local Error Goto Error.Trap97
 If User.Number<=SFalse Or User.Number>Lof(UserFile2)/UserRecLen Then
    User.Number=1!
 Endif
 Call Read.Record(UserFile2,User.Number)
 TempX=False
 Call ShowUser
 Strng=UserRecord2.CodeName
 If Left$(Strng,9)=Deleted$ Then
    Call ShowDeletedUser
 Else
    For TempX=1 To 27
       Call ShowUser
    Next
 Endif
 Call ANSI(4,37,44)
 Call ANSI(2,12,7)
 Strng="(F/M/T/C/P/R/D/L/A/*)"
 Call Scrn(Strng)
 Call ANSI(2,16,20)
 Strng="(B/P/S/T)"
 Call Scrn(Strng)
 Call RedisplayField
Error.Resume97:
 Exit Sub
Error.Trap97:
 Resume Error.Resume97
End Sub

Sub EditUsers
 On Local Error Goto Error.Trap98
 User.Number=1!
 If Lof(UserFile2)=SFalse Then
    Call AddUser
 Endif
 Out3="Sysop User Edit"
 Call DisplayEditScreen(7,27,Out3)
 Call UserStatusLine
 Call DisplayUser
 Do While Lost.Carrier=False
    TempX$=Nul
    Do While TempX$=Nul
       If Lost.Carrier Then
          Exit Do
       Endif
       Call Read.Keyboard(TempX$)
       Call MouseDriver(3)
       If Mouse.Button2 Then
          TempX$=Chr$(27)
       Endif
       If Mouse.Button Then
          Call MouseButton(27)
          If Len(TempX$) Then
             Exit Do
          Endif
       Endif
       If Mouse.Row Or Mouse.Column Then
          Call MouseSelect(27)
       Endif
    Loop
    TempX=False
    Select Case Len(TempX$)
    Case 2
       TempX=Asc(Mid$(TempX$,2,1))
       If TempX=0 Then
          Call Write.Record(UserFile2,User.Number)
          Exit Do
       Endif
       Call UserSelect
    Case 1
       TempX=Asc(TempX$)
       Select Case TempX
       Case 1
          Call AddUser
       Case 4
          Call DeleteUser
       Case 5
          Call EditUserTreasure
          Call UserStatusLine
          TempX=False
          Call ShowUser
          TempX=Selection
          Call ShowUser
          Call RedisplayField
       Case 6
          Call EditUserObjects
          Call UserStatusLine
          TempX=False
          Call ShowUser
          TempX=Selection
          Call ShowUser
          Call RedisplayField
       Case 7
          Call EditUserContainers
          Call UserStatusLine
          TempX=False
          Call ShowUser
          TempX=Selection
          Call ShowUser
          Call RedisplayField
       Case 8
          Call Write.Record(UserFile2,User.Number)
          Call Help(7)
          Out3="Sysop User Edit"
          Call DisplayEditScreen(7,27,Out3)
          Call UserStatusLine
          Call DisplayUser
       Case 9
          Call UserSelect
       Case 13
          Call UserEdit
          Call Search.Mess.File(User.Number,User.Online)
          If User.Online Then
             User.Node=TempA
             Call Write.Message.Record(MessWorkFile7,User.Node+1)
          Endif
          Call Write.Record(UserFile2,User.Number)
          Call UserStatusLine
          TempX=False
          Call ShowUser
          TempX=Selection
          Call ShowUser
          Call RedisplayField
       Case 14
          Call NextUser
       Case 17
          Call PreviousUser
       Case 18
          Call SelectNextUser
          Call UserStatusLine
       Case 23
          Call SearchUser
       Case 27
          Call Write.Record(UserFile2,User.Number)
          Exit Do
       End Select
    End Select
 Loop
Error.Resume98:
 Exit Sub
Error.Trap98:
 Resume Error.Resume98
End Sub

Sub DeleteUser
 On Local Error Goto Error.Trap99
 UserRecord2.MaxCalls=False
 UserRecord2.FromHour=False
 UserRecord2.FromMin=False
 UserRecord2.ToHour=False
 UserRecord2.ToMin=False
 UserRecord2.ClassType=False
 UserRecord2.CodeName=Deleted$
 Strng=Deleted$
 Strng3=Strng
 Call Cryptograph(Strng3)
 UserRecord2.PassWord=Strng3
 Strng3=Strng
 Call Crypto(Strng3)
 UserRecord2.Password3=Strng3
 UserRecord2.Password2=Nul
 UserRecord2.ClassName=Deleted$
 Call Write.Record(UserFile2,User.Number)
 TempX=Selection
 Call DisplayUser
 Call RedisplayField
 Call Clear.LogFile
 Call Clear.ScrollFile
 Call Clear.Team
 Call Clear.UserInv
 Call Clear.Containers
 UserRecord2.First=SFalse
 UserRecord2.Last=SFalse
 UserRecord2.First2=SFalse
 UserRecord2.Last2=SFalse
Error.Resume99:
 Exit Sub
Error.Trap99:
 Resume Error.Resume99
End Sub

Sub Clear.LogFile
 On Local Error Goto ErrorTrap33
 Close #LogFile
 Open Log.FileName For Random Shared As #LogFile Len=LogRecLen
 For Var!=1! To Lof(LogFile)/LogRecLen
    Call Read.Record(LogFile,Var!)
    If LogRecord.User=User.Number Then
       LogRecord.User=SFalse
       Call Write.Record(LogFile,Var!)
    Endif
 Next
 Close #LogFile
 FileName=DND.Path+"writing.log"
 Open FileName For Random Shared As #LogFile Len=LogRecLen
 For Temp1!=1! To Lof(LogFile)/LogRecLen
    Call Read.Record(LogFile,Temp1!)
    If LogRecord.User=User.Number Then
       LogRecord.User=SFalse
       Call Write.Record(LogFile,Temp1!)
    Endif
 Next
 Close #LogFile
ErrorResume33:
 Exit Sub
ErrorTrap33:
 Resume ErrorResume33
End Sub

Sub Clear.ScrollFile
 On Local Error Goto ErrorTrap33b
 Close #LogFile
 FileName=DND.Path+"writing.log"
 Open FileName For Random Shared As #LogFile Len=LogRecLen
 For Var!=1! To Lof(LogFile)/LogRecLen
    Call Read.Record(LogFile,Var!)
    If LogRecord.User=User.Number Then
       LogRecord.User=SFalse
       Call Write.Record(LogFile,Var!)
    Endif
 Next
ErrorResume33b:
 Exit Sub
ErrorTrap33b:
 Resume ErrorResume33b
End Sub

Sub Clear.Team
 On Local Error Goto Error.Trap100
 For Var!=1! To Lof(TeamFile)/TeamRecLen
    Call Read.Record(TeamFile,Var!)
    For Var2=1 To 5
       Var1!=TeamRecord.UserIndex(Var2)
       If Var1!=User.Number Then
          TeamRecord.Member(Var2)=Nul
          TeamRecord.UserIndex(Var2)=SFalse
          TeamRecord.Activated(Var2)=False
          Call Write.Record(TeamFile,Var!)
       Endif
    Next
 Next
Error.Resume100:
 Exit Sub
Error.Trap100:
 Resume Error.Resume100
End Sub

Sub Clear.UserInv
 On Local Error Goto Error.Trap101
 For Var4!=1! To Lof(UserInvFile)/MessWorkRecLen6
    Call Read.Record(UserInvFile,Var4!)
    If MessWorkRecord6.User=User.Number Then
       MessWorkRecord6.User=SFalse
       MessWorkRecord6.Room=SFalse
       MessWorkRecord6.Index=SFalse
       MessWorkRecord6.Charges=False
       MessWorkRecord6.Plus=False
       MessWorkRecord6.Prev=SFalse
       MessWorkRecord6.Next=SFalse
       Call Write.Record(UserInvFile,Var4!)
    Endif
 Next
Error.Resume101:
 Exit Sub
Error.Trap101:
 Resume Error.Resume101
End Sub

Sub Clear.Containers
 On Local Error Goto Error.Trap102
 For Var0!=1! To Lof(ContainerFile)/ContainerRecLen
    Call Read.Record(ContainerFile,Var0!)
    If ContainerRecord.UserNumber=User.Number Then
       Call Clear.Container
       Call Write.Record(ContainerFile,Var0!)
    Endif
 Next
Error.Resume102:
 Exit Sub
Error.Trap102:
 Resume Error.Resume102
End Sub

Sub NextUser
 On Local Error Goto Error.Trap104
 If User.Number>=Lof(UserFile2)/UserRecLen Then
    Strng="This is the last user in the user file."
    Call ErrorMessage
 Else
    Call Write.Record(UserFile2,User.Number)
    User.Number=User.Number+1!
    Call DisplayUser
 Endif
Error.Resume104:
 Exit Sub
Error.Trap104:
 Resume Error.Resume104
End Sub

Sub PreviousUser
 On Local Error Goto Error.Trap105
 If User.Number<=1! Then
    Strng="This is the first user in the user file."
    Call ErrorMessage
 Else
    Call Write.Record(UserFile2,User.Number)
    User.Number=User.Number-1!
    Call DisplayUser
 Endif
Error.Resume105:
 Exit Sub
Error.Trap105:
 Resume Error.Resume105
End Sub

Sub SelectNextUser
 On Local Error Goto Error.Trap106
 Strng=Nul
 Out2="^ Cursor Edit"+Chr$(60)+Chr$(217)+" Exit Field "
 Call StatusLine
 Call ANSI(4,33,44)
 Call ANSI(2,23,2)
 Strng="Enter User: "
 Call Scrn(Strng)
 Call ANSI(4,37,40)
 Call ANSI(2,23,14)
 Strng=Space$(6)
 Call Scrn(Strng)
 Call ANSI(4,37,44)
 Call ANSI(2,23,23)
 Strng="(1-"+Mid$(Str$(Lof(UserFile2)/UserRecLen),2)+")"
 Multiplier=Len(Strng)+23
 Strng=Strng+" (+/-/x)"
 Call Scrn(Strng)
 Restore Data11
 Read Xcoor, Ycoor, Column, Line.Length, Row, Max.Lines, Line.Number
 Edit.Data(1)=Nul
 Call ScreenEdit
 Multiplier=False
 Temp2!=Int(Val(Edit.Data(1)))
 If Temp2!<=SFalse Or Temp2!>Lof(UserFile2)/UserRecLen Then
    Strng="The user number is not within the user file range."
    Call ErrorMessage
 Else
    Call Write.Record(UserFile2,User.Number)
    User.Number=Temp2!
    Call DisplayUser
 Endif
Error.Resume106:
 Exit Sub
Error.Trap106:
 Resume Error.Resume106
End Sub

Sub SearchUser
 On Local Error Goto Error.Trap107
 Call Write.Record(UserFile2,User.Number)
 Strng=Nul
 Out2="^ Cursor Edit "+Chr$(60)+Chr$(217)+" Exit Field  "
 Out2=Out2+"Append # sign and number for duplicate users"
 Call StatusLine
 Call ANSI(4,33,44)
 Call ANSI(2,23,2)
 Strng="Enter User Name or Number: "
 Call Scrn(Strng)
 Call ANSI(4,37,40)
 Call ANSI(2,23,29)
 Strng=Space$(30)
 Call Scrn(Strng)
 Restore Data12
 Read Xcoor, Ycoor, Column, Line.Length, Row, Max.Lines, Line.Number
 Edit.Data(1)=Nul
 Call ScreenEdit
 Call UserStatusLine
 Var2!=Int(Val(Edit.Data(1)))
 Temp$=Ucase$(Edit.Data(1))
 If Var2!>SFalse And Var2!<=Lof(UserFile2)/UserRecLen Then
    User.Number=Var2!
    Call DisplayUser
    Exit Sub
 Endif
 Temp.Index=SFalse
 Temp1=Instr(Temp$,"#")
 If Temp1 Then
    Temp.Index=Csng(Int(Val(Mid$(Temp$,Temp1+1))))
    Temp$=Left$(Temp$,Temp1-1)
 Endif
 Temp!=SFalse
 Temp3!=SFalse
 For Var2!=1! To Lof(UserFile2)/UserRecLen
    Call Read.Record(UserFile2,Var2!)
    Strng=Rtrim$(UserRecord2.CodeName)
    Call InstrSUB(TempX,Strng,Temp$)
    If TempX Then
       Temp3!=Temp3!+1!
       If Temp3!=1! Then
          Temp!=Var2!
       Endif
       If Temp.Index Then
          If Temp3!=Temp.Index Then
             User.Number=Var2!
             Call DisplayUser
             Exit Sub
          Endif
       Endif
    Endif
 Next
 If Temp.Index>SFalse Then
    Strng="The user name was not found in the user file."
    Call ErrorMessage
    Call DisplayUser
    Exit Sub
 Endif
 If Temp3!=SFalse Then
    Strng="The user name was not found in the user file."
    Call ErrorMessage
    Call DisplayUser
    Exit Sub
 Endif
 If Temp3!=1! Then
    User.Number=Temp!
    Call DisplayUser
    Exit Sub
 Endif
 Strng="There was more than one user found."
 Call ErrorMessage
 Strng="^ Scroll User  "+Chr$(60)+Chr$(217)+" Select User ("+Ltrim$(Str$(Temp3!))+" found)."
 Out2=Nul
 Call StatusLine
 User.Number=Temp!
 Var2!=Temp!
 Call DisplayUser
 Do While Lost.Carrier=False
    TempX$=Nul
    Do While TempX$=Nul
       If Lost.Carrier Then
          Exit Do
       Endif
       Call Read.Keyboard(TempX$)
       Call MouseDriver(3)
       If Mouse.Button2 Then
          TempX$=Chr$(27)
       Endif
       If Mouse.Button Then
          Call MouseCheck
          Exit Do
       Endif
    Loop
    TempX=False
    Select Case Len(TempX$)
    Case 1
       If TempX$=Chr$(13) Then
          User.Number=Var2!
          Call UserStatusLine
          Call DisplayUser
          Exit Sub
       Endif
    Case 2
       TempX=Asc(Mid$(TempX$,2,1))
       Select Case TempX
       Case 72, 141, 152
          VarA=False
          For Var3!=Var2!-1! To 1! Step -1!
             Call Read.Record(UserFile2,Var3!)
             Strng=Rtrim$(UserRecord2.CodeName)
             Call InstrSUB(TempX,Strng,Temp$)
             If TempX Then
                VarA=True
                Var2!=Var3!
                User.Number=Var3!
                Call DisplayUser
                Exit For
             Endif
          Next
          If VarA=False Then
             Strng="This is the first user in the search."
             Call ErrorMessage
          Endif
       Case 80, 145, 160
          VarA=False
          For Var3!=Var2!+1! To Lof(UserFile2)/UserRecLen
             Call Read.Record(UserFile2,Var3!)
             Strng=Rtrim$(UserRecord2.Codename)
             Call InstrSUB(TempX,Strng,Temp$)
             If TempX Then
                VarA=True
                Var2!=Var3!
                User.Number=Var3!
                Call DisplayUser
                Exit For
             Endif
          Next
          If VarA=False Then
             Strng="This is the last user in the search."
             Call ErrorMessage
          Endif
       End Select
    End Select
 Loop
Error.Resume107:
 Exit Sub
Error.Trap107:
 Resume Error.Resume107
End Sub

Sub UserStatusLine
 On Local Error Goto Error.Trap108
 Strng="^ Cursor Select "+Chr$(60)+Chr$(217)
 Strng=Strng+" Enter Choice <esc> Exit and Save ^h Help ^a Add ^d Delete"
 Out2="^n Next ^q Previous ^r Select"
 Out2=Out2+" ^w Search ^e Treasure ^f Objects ^g Containers"
 Call StatusLine
Error.Resume108:
 Exit Sub
Error.Trap108:
 Resume Error.Resume108
End Sub

Sub AddUser
 On Local Error Goto Error.Trap109
 User.Number=Lof(UserFile2)/UserRecLen+1!
 Strng=Deleted$
 Strng3=Strng
 Call Cryptograph(Strng3)
 UserRecord2.PassWord=Strng3
 Strng3=Strng
 Call Crypto(Strng3)
 UserRecord2.Password3=Strng3
 UserRecord2.Password2=Nul
 UserRecord2.Question=Nul
 UserRecord2.ClassName=Deleted$
 UserRecord2.ClassType=1
 UserRecord2.CodeName=Deleted$
 For Temp6=1 To MaxStats
    UserRecord2.Stats(Temp6)=12
 Next
 UserRecord2.Beauty=12
 UserRecord2.Glamour=12
 For Temp6=1 To MaxWeapons
    UserRecord2.Weapons(Temp6)=False
 Next
 UserRecord2.Room=SFalse
 UserRecord2.Level=False
 UserRecord2.Experience=False
 UserRecord2.Gold=False
 UserRecord2.Borrow=False
 UserRecord2.NumCalls=False
 UserRecord2.Fatigue=20
 UserRecord2.FatigueMax=20
 UserRecord2.Vitality=20
 UserRecord2.VitalityMax=20
 UserRecord2.Magic=20
 UserRecord2.MagicMax=20
 UserRecord2.Psionic=20
 UserRecord2.PsionicMax=20
 UserRecord2.Poison=False
 UserRecord2.Invisible=False
 UserRecord2.Race=False
 UserRecord2.Proficiency=1
 UserRecord2.Bank=False
 UserRecord2.PlayersKilled=False
 UserRecord2.MonstersKilled=False
 UserRecord2.Brief=False
 UserRecord2.DateOn=DateS$
 UserRecord2.Align1=False
 UserRecord2.Align2=False
 UserRecord2.Flags=False
 UserRecord2.Flags2=False
 UserRecord2.MaxCalls=False
 UserRecord2.FromHour=False
 UserRecord2.FromMin=False
 UserRecord2.ToHour=False
 UserRecord2.ToMin=False
 UserRecord2.SortInv=False
 For Var=1 To MaxItems
    UserRecord2.Weapon(Var).Index=SFalse
    UserRecord2.Weapon(Var).Charges=False
    UserRecord2.Weapon(Var).Plus=False
 Next
 UserRecord2.TimeLimit=SFalse
 UserRecord2.TimeUsed=SFalse
 UserRecord2.TimesLogon=0#
 UserRecord2.TimesDied=0#
 UserRecord2.Encumbrance=10
 UserRecord2.Prefix1=Nul
 UserRecord2.Prefix2=Nul
 UserRecord2.Prefix3=Nul
 For Var=1 To MaxShortcutKeys
    UserRecord2.ShortcutKey1(Var)=Nul
    UserRecord2.ShortcutKey2(Var)=Nul
 Next
 For Var=1 To 10
    UserRecord2.FunctionKeys(Var)=Nul
 Next
 UserRecord2.ActionLineString=Nul
 UserRecord2.StatusLineString=Nul
 UserRecord2.StatusVar=0
 UserRecord2.NodeList=String$(127,"1")
 UserRecord2.NodeList2=0!
 UserRecord2.EditList=0!
 UserRecord2.First=SFalse
 UserRecord2.Last=SFalse
 UserRecord2.First2=SFalse
 UserRecord2.Last2=SFalse
 UserRecord2.Buffer22=0!
 UserRecord2.Buffer23=0!
 UserRecord2.Buffer24=0#
 UserRecord2.Buffer25=0#
 Call Write.Record(UserFile2,User.Number)
 Call DisplayUser
 UserRecord.ObjectsCreated(10)=UserRecord.ObjectsCreated(10)+1#
 If User.Index Then
    Call Write.Record(UserFile,User.Index)
 Endif
Error.Resume109:
 Exit Sub
Error.Trap109:
 Resume Error.Resume109
End Sub

Sub ShowDeletedUser
 On Local Error Goto Error.Trap110
 Call ANSI(4,37,40)
 Call ANSI(2,4,2)
 Strng=Space$(30)
 Call Scrn(Strng)
 Call ANSI(2,4,2)
 Strng=Deleted$
 Call Scrn(Strng)
 Call ANSI(2,6,2)
 Strng=Space$(20)
 Call Scrn(Strng)
 Call ANSI(2,6,2)
 Strng=Deleted$
 Call Scrn(Strng)
 Call ANSI(2,8,2)
 Strng=Space$(5)
 Call Scrn(Strng)
 Call ANSI(2,10,2)
 Strng=Space$(5)
 Call Scrn(Strng)
 Call ANSI(4,37,44)
 Call ANSI(2,12,7)
 Strng="(F/M/T/C/P/R/D/L/A/*)"
 Call Scrn(Strng)
 Call ANSI(4,37,40)
 Call ANSI(2,11,7)
 Strng=Space$(10)
 Call Scrn(Strng)
 Call ANSI(2,12,29)
 Strng=" "
 Call Scrn(Strng)
 Call ANSI(2,13,12)
 Strng=Space$(7)
 Call Scrn(Strng)
 Call ANSI(2,13,20)
 Strng=Space$(7)
 Call Scrn(Strng)
 Call ANSI(2,15,2)
 Strng=Space$(20)
 Call Scrn(Strng)
 Call ANSI(2,15,2)
 Strng=Deleted$
 Call Scrn(Strng)
 Call ANSI(4,37,44)
 Call ANSI(2,16,20)
 Strng="(B/P/S/T)"
 Call Scrn(Strng)
 Call ANSI(4,37,40)
 Call ANSI(2,16,30)
 Strng=" "
 Call Scrn(Strng)
 Call ANSI(2,17,7)
 Strng=Space$(3)
 Call Scrn(Strng)
 Call ANSI(2,17,17)
 Strng=Space$(3)
 Call Scrn(Strng)
 Call ANSI(2,17,27)
 Strng=Space$(3)
 Call Scrn(Strng)
 Call ANSI(2,17,41)
 Strng=Space$(3)
 Call Scrn(Strng)
 Call ANSI(2,19,10)
 Strng=Space$(5)
 Call Scrn(Strng)
 Call ANSI(2,19,25)
 Strng=Space$(5)
 Call Scrn(Strng)
 Call ANSI(2,19,37)
 Strng=Space$(5)
 Call Scrn(Strng)
 Call ANSI(2,21,17)
 Strng=Space$(5)
 Call Scrn(Strng)
 Call ANSI(2,3,54)
 Strng=Space$(22)
 Call Scrn(Strng)
 Call ANSI(2,5,55)
 Strng=Space$(22)
 Call Scrn(Strng)
 Call ANSI(2,7,61)
 Strng=Space$(5)
 Call Scrn(Strng)
 Call ANSI(2,9,59)
 Strng=Space$(5)
 Call Scrn(Strng)
 Call ANSI(2,11,63)
 Strng=Space$(5)
 Call Scrn(Strng)
 Call ANSI(2,13,57)
 Strng=Space$(5)
 Call Scrn(Strng)
 Call ANSI(2,15,60)
 Strng=Space$(5)
 Call Scrn(Strng)
 Call ANSI(2,17,63)
 Strng=Space$(5)
 Call Scrn(Strng)
 Call ANSI(2,19,56)
 Strng=Space$(5)
 Call Scrn(Strng)
 Call ANSI(2,21,59)
 Strng=Space$(5)
 Call Scrn(Strng)
Error.Resume110:
 Exit Sub
Error.Trap110:
 Resume Error.Resume110
End Sub

Data11:
 Data 23,14,14,6,23,1,1
Data12:
 Data 23,29,29,20,23,1,1

Sub ShowUser
 On Local Error Goto Error.Trap128
 Call Search.Mess.File(User.Number,User.Online)
 If User.Online Then
    User.Node=TempA
    Call Read.Message.Record(MessWorkFile7,User.Node+1)
 Endif
 Select Case TempX
 Case 0
    Call ANSI(4,33,44)
    Call ANSI(2,2,2)
    Strng="User"
    Call Scrn(Strng)
    Call ANSI(4,37,40)
    Call ANSI(2,2,7)
    Strng=Space$(8)
    Call Scrn(Strng)
    Call ANSI(2,2,7)
    Strng=Mid$(Str$(User.Number),2)
    Call Scrn(Strng)
    Call ANSI(4,37,40)
    Call ANSI(2,2,16)
    If User.Online Then
       Strng="(online) "
    Else
       Strng="(offline)"
    Endif
    Call Scrn(Strng)
    Call GetUserTreasure
    Call ANSI(4,33,44)
    Call ANSI(2,2,26)
    Strng="Treasure"
    Call Scrn(Strng)
    Call ANSI(2,2,35)
    Strng=Space$(8)
    Call Scrn(Strng)
    Call ANSI(2,2,35)
    Strng=Mid$(Str$(User.Treasure),2)
    Call Scrn(Strng)
    Call GetUserObject
    Call ANSI(4,33,44)
    Call ANSI(2,2,44)
    Strng="Objects"
    Call Scrn(Strng)
    Call ANSI(2,2,52)
    Strng=Space$(8)
    Call Scrn(Strng)
    Call ANSI(2,2,52)
    Strng=Mid$(Str$(User.Object),2)
    Call Scrn(Strng)
    User.Containers=SFalse
    Call Read.Record(UserFile2,User.Number)
    Temp2!=UserRecord2.First2
    If Temp2! Then
       Do While Lost.Carrier=False
          Call Read.Record(ContainerFile,Temp2!)
          Temp6!=ContainerRecord.Next
          If ContainerRecord.DeletedContainer=False Then
             If ContainerRecord.WithinContainer=SFalse Then
                User.Containers=User.Containers+1!
             Endif
          Endif
          If Temp6!=SFalse Then
             Exit Do
          Endif
          Temp2!=Temp6!
       Loop
    Endif
    Call Display.Container.Line
 Case Else
    Call ANSI(4,37,40)
    Select Case TempX
    Case 1
       Call ANSI(2,4,2)
       If User.Online Then
          Strng=MessWorkRecord7.CodeName
       Else
          Strng=UserRecord2.CodeName
       Endif
       Strng=Lcase$(Strng)
       Mid$(Strng,1,1)=Ucase$(Mid$(Strng,1,1))
       Call Scrn(Strng)
    Case 2
       Call ANSI(2,6,2)
       Strng=String$(20,Mask$)
       Call Scrn(Strng)
    Case 3
       Call ANSI(2,8,2)
       Strng=Space$(5)
       Call Scrn(Strng)
       Call ANSI(2,8,2)
       If User.Online Then
          Strng=Mid$(Str$(MessWorkRecord7.Level),2)
       Else
          Strng=Mid$(Str$(UserRecord2.Level),2)
       Endif
       Call Scrn(Strng)
    Case 4
       Call ANSI(2,10,2)
       Strng=Space$(8)
       Call Scrn(Strng)
       Call ANSI(2,10,2)
       If User.Online Then
          Strng=Mid$(Str$(MessWorkRecord7.Room),2)
       Else
          Strng=Mid$(Str$(UserRecord2.Room),2)
       Endif
       Call Scrn(Strng)
    Case 5
       Call ANSI(2,11,7)
       If UserRecord2.Race<1 Then
          UserRecord2.Race=1
       Endif
       Strng=Space$(10)
       Call Scrn(Strng)
       Call ANSI(2,11,7)
       If User.Online Then
          Strng=Rtrim$(Race(MessWorkRecord7.Race))
       Else
          Strng=Rtrim$(Race(UserRecord2.Race))
       Endif
       Call Scrn(Strng)
    Case 6
       Call ANSI(2,12,29)
       If User.Online Then
          Temp9=MessWorkRecord7.ClassType
       Else
          Temp9=UserRecord2.ClassType
       Endif
       Select Case Temp9
       Case 1
          Strng="F"
       Case 2
          Strng="M"
       Case 3
          Strng="T"
       Case 4
          Strng="C"
       Case 5
          Strng="P"
       Case 6
          Strng="R"
       Case 7
          Strng="D"
       Case 8
          Strng="L"
       Case 9
          Strng="A"
       Case 10
          Strng="*"
       Case Else
          Strng="?"
       End Select
       Call Scrn(Strng)
    Case 7
       Call ANSI(2,13,12)
       Strng=Space$(7)
       Call Scrn(Strng)
       Call ANSI(2,13,12)
       If User.Online Then
          Temp9=MessWorkRecord7.Align1
       Else
          Temp9=UserRecord2.Align1
       Endif
       Select Case Temp9
       Case Is<False
          Strng="Good"
       Case Is>False
          Strng="Evil"
       Case False
          Strng="Neutral"
       End Select
       Call Scrn(Strng)
       Call ANSI(2,13,20)
       Strng=Space$(7)
       Call Scrn(Strng)
       Call ANSI(2,13,20)
       If User.Online Then
          Temp9=MessWorkRecord7.Align2
       Else
          Temp9=UserRecord2.Align2
       Endif
       Select Case Temp9
       Case Is<False
          Strng="Lawful"
       Case Is>False
          Strng="Chaotic"
       Case Else
          Strng="Neutral"
       End Select
       Call Scrn(Strng)
    Case 8
       Call ANSI(2,15,2)
       If User.Online Then
          Strng=MessWorkRecord7.ClassName
       Else
          Strng=UserRecord2.ClassName
       Endif
       Call Scrn(Strng)
    Case 9
       Call ANSI(2,16,30)
       If User.Online Then
          Temp9=MessWorkRecord7.Proficiency
       Else
          Temp9=UserRecord2.Proficiency
       Endif
       Select Case Temp9
       Case 1
          Strng="B"
       Case 2
          Strng="P"
       Case 3
          Strng="S"
       Case 4
          Strng="T"
       Case Else
          Strng="?"
       End Select
       Call Scrn(Strng)
    Case 10
       Call ANSI(2,17,7)
       Strng=Space$(3)
       Call Scrn(Strng)
       Call ANSI(2,17,7)
       If User.Online Then
          Strng=Mid$(Str$(MessWorkRecord7.Weapon1),2)
       Else
          Strng=Mid$(Str$(UserRecord2.Weapons(1)),2)
       Endif
       Call Scrn(Strng)
    Case 11
       Call ANSI(2,17,17)
       Strng=Space$(3)
       Call Scrn(Strng)
       Call ANSI(2,17,17)
       If User.Online Then
          Strng=Mid$(Str$(MessWorkRecord7.Weapon2),2)
       Else
          Strng=Mid$(Str$(UserRecord2.Weapons(2)),2)
       Endif
       Call Scrn(Strng)
    Case 12
       Call ANSI(2,17,27)
       Strng=Space$(3)
       Call Scrn(Strng)
       Call ANSI(2,17,27)
       If User.Online Then
          Strng=Mid$(Str$(MessWorkRecord7.Weapon3),2)
       Else
          Strng=Mid$(Str$(UserRecord2.Weapons(3)),2)
       Endif
       Call Scrn(Strng)
    Case 13
       Call ANSI(2,17,41)
       Strng=Space$(3)
       Call Scrn(Strng)
       Call ANSI(2,17,41)
       If User.Online Then
          Strng=Mid$(Str$(MessWorkRecord7.Weapon4),2)
       Else
          Strng=Mid$(Str$(UserRecord2.Weapons(4)),2)
       Endif
       Call Scrn(Strng)
    Case 14
       Call ANSI(2,19,10)
       Strng=Space$(5)
       Call Scrn(Strng)
       Call ANSI(2,19,10)
       If User.Online Then
          Strng=Mid$(Str$(MessWorkRecord7.FatigueMax),2)
       Else
          Strng=Mid$(Str$(UserRecord2.FatigueMax),2)
       Endif
       Call Scrn(Strng)
    Case 15
       Call ANSI(2,19,25)
       Strng=Space$(5)
       Call Scrn(Strng)
       Call ANSI(2,19,25)
       If User.Online Then
          Strng=Mid$(Str$(MessWorkRecord7.VitalityMax),2)
       Else
          Strng=Mid$(Str$(UserRecord2.VitalityMax),2)
       Endif
       Call Scrn(Strng)
    Case 16
       Call ANSI(2,19,37)
       Strng=Space$(5)
       Call Scrn(Strng)
       Call ANSI(2,19,37)
       If User.Online Then
          Strng=Mid$(Str$(MessWorkRecord7.MagicMax),2)
       Else
          Strng=Mid$(Str$(UserRecord2.MagicMax),2)
       Endif
       Call Scrn(Strng)
    Case 17
       Call ANSI(2,21,17)
       Strng=Space$(5)
       Call Scrn(Strng)
       Call ANSI(2,21,17)
       If User.Online Then
          Strng=Mid$(Str$(MessWorkRecord7.PsionicMax),2)
       Else
          Strng=Mid$(Str$(UserRecord2.PsionicMax),2)
       Endif
       Call Scrn(Strng)
    Case 18
       Call ANSI(2,3,54)
       Strng=Space$(22)
       Call Scrn(Strng)
       Call ANSI(2,3,54)
       If User.Online Then
          Strng=Mid$(Str$(MessWorkRecord7.Experience),2)
       Else
          Strng=Mid$(Str$(UserRecord2.Experience),2)
       Endif
       Call Scrn(Strng)
    Case 19
       Call ANSI(2,5,55)
       Strng=Space$(22)
       Call Scrn(Strng)
       Call ANSI(2,5,55)
       If User.online Then
          Strng=Mid$(Str$(MessWorkRecord7.Gold),2)
       Else
          Strng=Mid$(Str$(UserRecord2.Gold),2)
       Endif
       Call Scrn(Strng)
    Case 20
       Call ANSI(2,7,61)
       Strng=Space$(5)
       Call Scrn(Strng)
       Call ANSI(2,7,61)
       If User.Online Then
          Strng=Ltrim$(Str$(MessWorkRecord7.TimeLimit))
       Else
          Strng=Ltrim$(Str$(UserRecord2.TimeLimit))
       Endif
       Call Scrn(Strng)
    Case 21
       Call ANSI(2,9,59)
       Strng=Space$(5)
       Call Scrn(Strng)
       Call ANSI(2,9,59)
       If User.Online Then
          Strng=Mid$(Str$(MessWorkRecord7.Stat1),2)
       Else
          Strng=Mid$(Str$(UserRecord2.Stats(1)),2)
       Endif
       Call Scrn(Strng)
    Case 22
       Call ANSI(2,11,63)
       Strng=Space$(5)
       Call Scrn(Strng)
       Call ANSI(2,11,63)
       If User.Online Then
          Strng=Mid$(Str$(MessWorkRecord7.Stat2),2)
       Else
          Strng=Mid$(Str$(UserRecord2.Stats(2)),2)
       Endif
       Call Scrn(Strng)
    Case 23
       Call ANSI(2,13,57)
       Strng=Space$(5)
       Call Scrn(Strng)
       Call ANSI(2,13,57)
       If User.Online Then
          Strng=Mid$(Str$(MessWorkRecord7.Stat3),2)
       Else
          Strng=Mid$(Str$(UserRecord2.Stats(3)),2)
       Endif
       Call Scrn(Strng)
    Case 24
       Call ANSI(2,15,60)
       Strng=Space$(5)
       Call Scrn(Strng)
       Call ANSI(2,15,60)
       If User.Online Then
          Strng=Mid$(Str$(MessWorkRecord7.Stat4),2)
       Else
          Strng=Mid$(Str$(UserRecord2.Stats(4)),2)
       Endif
       Call Scrn(Strng)
    Case 25
       Call ANSI(2,17,63)
       Strng=Space$(5)
       Call Scrn(Strng)
       Call ANSI(2,17,63)
       If User.Online Then
          Strng=Mid$(Str$(MessWorkRecord7.Stat5),2)
       Else
          Strng=Mid$(Str$(UserRecord2.Stats(5)),2)
       Endif
       Call Scrn(Strng)
    Case 26
       Call ANSI(2,19,56)
       Strng=Space$(5)
       Call Scrn(Strng)
       Call ANSI(2,19,56)
       If User.Online Then
          Strng=Mid$(Str$(MessWorkRecord7.Stat6),2)
       Else
          Strng=Mid$(Str$(UserRecord2.Stats(6)),2)
       Endif
       Call Scrn(Strng)
    Case 27
       Call ANSI(2,21,59)
       Strng=Space$(5)
       Call Scrn(Strng)
       Call ANSI(2,21,59)
       If User.Online Then
          Strng=Mid$(Str$(MessWorkRecord7.Stat7),2)
       Else
          Strng=Mid$(Str$(UserRecord2.Stats(7)),2)
       Endif
       Call Scrn(Strng)
    End Select
 End Select
Error.Resume128:
 Exit Sub
Error.Trap128:
 Resume Error.Resume128
End Sub

Sub UserEdit
 On Local Error Goto Error.Trap129
 Call Search.Mess.File(User.Number,User.Online)
 If User.Online Then
    User.Node=TempA
    Call Read.Message.Record(MessWorkFile7,User.Node+1)
 Endif
 If Selection=1 Or Selection=2 Then
    If Local.Mode=False Then
       If Allow.Remote.Edit=False Then
          Out2="Remote Sysops cannot edit user codename/password."
          Call ErrorStatusLine
          Exit Sub
       Endif
    Endif
 Endif
 Restore UserEditData
 For TempX=1 To Selection
    Read Xcoor, Ycoor, Column, Line.Length, Max.Lines, Row, Line.Number
 Next
 VarA=Xcoor
 VarB=Ycoor
 Select Case Selection
 Case 1
    If User.Online Then
       Strng=MessWorkRecord7.CodeName
    Else
       Strng=UserRecord2.CodeName
    Endif
    Strng=Lcase$(Strng)
    Mid$(Strng,1,1)=Ucase$(Mid$(Strng,1,1))
    Edit.Data(1)=Strng
 Case 2
    Hidden=True
    Strng=Nul
    Edit.Data(1)=Lcase$(Strng)
 Case 3
    If User.Online Then
       Edit.Data(1)=Mid$(Str$(MessWorkRecord7.Level),2)
    Else
       Edit.Data(1)=Mid$(Str$(UserRecord2.Level),2)
    Endif
 Case 4
    If User.Online Then
       Edit.Data(1)=Mid$(Str$(MessWorkRecord7.Room),2)
    Else
       Edit.Data(1)=Mid$(Str$(UserRecord2.Room),2)
    Endif
 Case 5
    If UserRecord2.Race<1 Then
       UserRecord2.Race=1
    Endif
    Call MakeBox(3,50,12,76)
    Call ANSI(4,37,40)
    For Temp2=1 To MaxRaces
       Call ANSI(2,Temp2+3,51)
       Strng=Lcase$(Rtrim$(Race(Temp2)))
       Mid$(Strng,1,1)=Ucase$(Mid$(Strng,1,1))
       Strng=Mid$(Str$(Temp2),2)+"="+Strng
       Strng=Strng+Space$(25-Len(Strng))
       Call Scrn(Strng)
    Next
    If User.Online Then
       Edit.Data(1)=Mid$(Str$(MessWorkRecord7.Race),2)
    Else
       Edit.Data(1)=Mid$(Str$(UserRecord2.Race),2)
    Endif
 Case 6
    Call MakeBox(3,50,14,76)
    Call ANSI(4,37,40)
    Call ANSI(2,4,51)
    Strng="F=Fighter                "
    Call Scrn(Strng)
    Call ANSI(2,5,51)
    Strng="M=Magic User             "
    Call Scrn(Strng)
    Call ANSI(2,6,51)
    Strng="T=Thief                  "
    Call Scrn(Strng)
    Call ANSI(2,7,51)
    Strng="C=Cleric                 "
    Call Scrn(Strng)
    Call ANSI(2,8,51)
    Strng="P=Paladin                "
    Call Scrn(Strng)
    Call ANSI(2,9,51)
    Strng="R=Ranger                 "
    Call Scrn(Strng)
    Call ANSI(2,10,51)
    Strng="D=Druid                  "
    Call Scrn(Strng)
    Call ANSI(2,11,51)
    Strng="L=Lady                   "
    Call Scrn(Strng)
    Call ANSI(2,12,51)
    Strng="A=Assistant DM           "
    Call Scrn(Strng)
    Call ANSI(2,13,51)
    Strng="*=Dungeon Master         "
    Call Scrn(Strng)
    If User.Online Then
       Temp9=MessWorkRecord7.ClassType
    Else
       Temp9=UserRecord2.ClassType
    Endif
    Select Case Temp9
    Case 1
       Edit.Data(1)="F"
    Case 2
       Edit.Data(1)="M"
    Case 3
       Edit.Data(1)="T"
    Case 4
       Edit.Data(1)="C"
    Case 5
       Edit.Data(1)="P"
    Case 6
       Edit.Data(1)="R"
    Case 7
       Edit.Data(1)="D"
    Case 8
       Edit.Data(1)="L"
    Case 9
       Edit.Data(1)="A"
    Case 10
       Edit.Data(1)="*"
    Case Else
       Edit.Data(1)="?"
    End Select
 Case 7
    If User.Online Then
       Temp9=MessWorkRecord7.Align1
    Else
       Temp9=UserRecord2.Align1
    Endif
    Select Case Temp9
    Case Is<False
       Edit.Data(1)="1"
    Case Is>False
       Edit.Data(1)="2"
    Case False
       Edit.Data(1)="3"
    End Select
    Strng=Nul
    Out2="^ Cursor Edit "+Chr$(60)+Chr$(217)+" Exit Field  "
    Out2=Out2+"1=Good, 2=Evil, 3=Neutral"
    Call StatusLine
    Call ANSI(4,33,44)
    Call ANSI(2,23,2)
    Strng="Enter Align Number: "
    Call Scrn(Strng)
    Call ANSI(4,37,40)
    Call ANSI(2,23,22)
    Strng=Space$(1)
    Call Scrn(Strng)
    Restore DataUser4
    Read Xcoor, Ycoor, Column, Line.Length, Row, Max.Lines, Line.Number
    Edit.Data(1)=Nul
    Call ScreenEdit
    Select Case Int(Val(Edit.Data(1)))
    Case 1
       Temp2=True
    Case 2
       Temp2=1
    Case 3
       Temp2=False
    End Select
    UserRecord2.Align1=Temp2
    If User.Online Then
       MessWorkRecord7.Align1=Temp2
       MessWorkRecord7.Flags4=MessWorkRecord7.Flags4 Or 2^3
    Endif
    If User.Online Then
       Temp9=MessWorkRecord7.Align2
    Else
       Temp9=UserRecord2.Align2
    Endif
    Select Case Temp9
    Case Is<False
       Edit.Data(1)="1"
    Case Is>False
       Edit.Data(1)="2"
    Case False
       Edit.Data(1)="3"
    End Select
    Strng=Nul
    Out2="^ Cursor Edit "+Chr$(60)+Chr$(217)+" Exit Field  "
    Out2=Out2+"1=Lawful, 2=Chaotic, 3=Neutral"
    Call StatusLine
    Call ANSI(4,33,44)
    Call ANSI(2,23,2)
    Strng="Enter Align Number: "
    Call Scrn(Strng)
    Call ANSI(4,37,40)
    Call ANSI(2,23,22)
    Strng=Space$(1)
    Call Scrn(Strng)
    Restore DataUser4
    Read Xcoor, Ycoor, Column, Line.Length, Row, Max.Lines, Line.Number
    Edit.Data(1)=Nul
    Call ScreenEdit
    Select Case Int(Val(Edit.Data(1)))
    Case 1
       Temp2=True
    Case 2
       Temp2=1
    Case 3
       Temp2=False
    End Select
    UserRecord2.Align2=Temp2
    If User.Online Then
       MessWorkRecord7.Align2=Temp2
       MessWorkRecord7.Flags4=MessWorkRecord7.Flags4 Or 2^4
    Endif
    Call UserStatusLine
    TempX=7
    Call ShowUser
    Exit Sub
 Case 8
    If User.Online Then
       Strng=MessWorkRecord7.ClassName
    Else
       Strng=UserRecord2.ClassName
    Endif
    Edit.Data(1)=Strng
 Case 9
    Call MakeBox(3,50,8,76)
    Call ANSI(4,37,40)
    Call ANSI(2,4,51)
    Strng="B=Blunt                  "
    Call Scrn(Strng)
    Call ANSI(2,5,51)
    Strng="P=Pole                   "
    Call Scrn(Strng)
    Call ANSI(2,6,51)
    Strng="S=Sharp                  "
    Call Scrn(Strng)
    Call ANSI(2,7,51)
    Strng="T=Thrusting              "
    Call Scrn(Strng)
    If User.Online Then
       Temp9=MessWorkRecord7.Proficiency
    Else
       Temp9=UserRecord2.Proficiency
    Endif
    Select Case Temp9
    Case 1
       Edit.Data(1)="B"
    Case 2
       Edit.Data(1)="P"
    Case 3
       Edit.Data(1)="S"
    Case 4
       Edit.Data(1)="T"
    Case Else
       Edit.Data(1)="?"
    End Select
 Case 10
    If User.Online Then
       Edit.Data(1)=Mid$(Str$(MessWorkRecord7.Weapon1),2)
    Else
       Edit.Data(1)=Mid$(Str$(UserRecord2.Weapons(1)),2)
    Endif
 Case 11
    If User.Online Then
       Edit.Data(1)=Mid$(Str$(MessWorkRecord7.Weapon2),2)
    Else
       Edit.Data(1)=Mid$(Str$(UserRecord2.Weapons(2)),2)
    Endif
 Case 12
    If User.Online Then
       Edit.Data(1)=Mid$(Str$(MessWorkRecord7.Weapon3),2)
    Else
       Edit.Data(1)=Mid$(Str$(UserRecord2.Weapons(3)),2)
    Endif
 Case 13
    If User.Online Then
       Edit.Data(1)=Mid$(Str$(MessWorkRecord7.Weapon4),2)
    Else
       Edit.Data(1)=Mid$(Str$(UserRecord2.Weapons(4)),2)
    Endif
 Case 14
    If User.Online Then
       Edit.Data(1)=Mid$(Str$(MessWorkRecord7.FatigueMax),2)
    Else
       Edit.Data(1)=Mid$(Str$(UserRecord2.FatigueMax),2)
    Endif
 Case 15
    If User.Online Then
       Edit.Data(1)=Mid$(Str$(MessWorkRecord7.VitalityMax),2)
    Else
       Edit.Data(1)=Mid$(Str$(UserRecord2.VitalityMax),2)
    Endif
 Case 16
    If User.Online Then
       Edit.Data(1)=Mid$(Str$(MessWorkRecord7.MagicMax),2)
    Else
       Edit.Data(1)=Mid$(Str$(UserRecord2.MagicMax),2)
    Endif
 Case 17
    If User.Online Then
       Edit.Data(1)=Mid$(Str$(MessWorkRecord7.PsionicMax),2)
    Else
       Edit.Data(1)=Mid$(Str$(UserRecord2.PsionicMax),2)
    Endif
 Case 18
    If User.Online Then
       Edit.Data(1)=Mid$(Str$(MessWorkRecord7.Experience),2)
    Else
       Edit.Data(1)=Mid$(Str$(UserRecord2.Experience),2)
    Endif
 Case 19
    If User.Online Then
       Edit.Data(1)=Mid$(Str$(MessWorkRecord7.Gold),2)
    Else
       Edit.Data(1)=Mid$(Str$(UserRecord2.Gold),2)
    Endif
 Case 20
    If User.Online Then
       Edit.Data(1)=Ltrim$(Str$(MessWorkRecord7.TimeLimit))
    Else
       Edit.Data(1)=Ltrim$(Str$(UserRecord2.TimeLimit))
    Endif
 Case 21
    If User.Online Then
       Edit.Data(1)=Mid$(Str$(MessWorkRecord7.Stat1),2)
    Else
       Edit.Data(1)=Mid$(Str$(UserRecord2.Stats(1)),2)
    Endif
 Case 22
    If User.Online Then
       Edit.Data(1)=Mid$(Str$(MessWorkRecord7.Stat2),2)
    Else
       Edit.Data(1)=Mid$(Str$(UserRecord2.Stats(2)),2)
    Endif
 Case 23
    If User.Online Then
       Edit.Data(1)=Mid$(Str$(MessWorkRecord7.Stat3),2)
    Else
       Edit.Data(1)=Mid$(Str$(UserRecord2.Stats(3)),2)
    Endif
 Case 24
    If User.Online Then
       Edit.Data(1)=Mid$(Str$(MessWorkRecord7.Stat4),2)
    Else
       Edit.Data(1)=Mid$(Str$(UserRecord2.Stats(4)),2)
    Endif
 Case 25
    If User.Online Then
       Edit.Data(1)=Mid$(Str$(MessWorkRecord7.Stat5),2)
    Else
       Edit.Data(1)=Mid$(Str$(UserRecord2.Stats(5)),2)
    Endif
 Case 26
    If User.Online Then
       Edit.Data(1)=Mid$(Str$(MessWorkRecord7.Stat6),2)
    Else
       Edit.Data(1)=Mid$(Str$(UserRecord2.Stats(6)),2)
    Endif
 Case 27
    If User.Online Then
       Edit.Data(1)=Mid$(Str$(MessWorkRecord7.Stat7),2)
    Else
       Edit.Data(1)=Mid$(Str$(UserRecord2.Stats(7)),2)
    Endif
 End Select
 Strng="^ Cursor Edit   "
 Out2=Chr$(60)+Chr$(217)+" Exit Field"
 Call StatusLine
 Call ScreenEdit
 Select Case Selection
 Case 1
    Edit.Data(1)=Rtrim$(Edit.Data(1))
    If Lcase$(Edit.Data(1))=Deleted$ Then
       Strng=Lcase$(Edit.Data(1))
    Else
       Strng=Ucase$(Edit.Data(1))
    Endif
    Call Valid(Strng,30)
    If Strng<>Nul Then
       UserRecord2.CodeName=Strng
       If User.Online Then
          MessWorkRecord7.CodeName=Strng
          MessWorkRecord7.Flags1=MessWorkRecord7.Flags1 Or 2^1
       Endif
    Endif
 Case 2
    Hidden=False
    Edit.Data(1)=Rtrim$(Edit.Data(1))
    If Lcase$(Edit.Data(1))=Deleted$ Then
       Strng=Lcase$(Edit.Data(1))
    Else
       Strng=Ucase$(Edit.Data(1))
    Endif
    If Len(Strng)>=3 Then
       Strng3=Strng
       Call Cryptograph(Strng3)
       UserRecord2.PassWord=Strng3
       Strng3=Strng
       Call Crypto(Strng3)
       UserRecord2.PassWord3=Strng3
       If User.Online Then
          MessWorkRecord7.PassWord=Strng3
          MessWorkRecord7.Flags1=MessWorkRecord7.Flags1 Or 2^2
       Endif
    Endif
 Case 3
    Temp9=Int(Val(Edit.Data(1)))
    UserRecord2.Level=Temp9
    If User.Online Then
       MessWorkRecord7.Level=Temp9
       MessWorkRecord7.Flags1=MessWorkRecord7.Flags1 Or 2^3
    Endif
 Case 4
    Var9!=Int(Val(Edit.Data(1)))
    UserRecord2.Room=Var9!
    If User.Online Then
       MessWorkRecord7.Room=Var9!
       MessWorkRecord7.Flags2=MessWorkRecord7.Flags2 Or 2^10
    Endif
 Case 5
    Temp2=Int(Val(Edit.Data(1)))
    If Temp2>False And Temp2<=MaxRaces Then
       UserRecord2.Race=Temp2
       If User.Online Then
          MessWorkRecord7.Race=Temp2
          MessWorkRecord7.Flags3=MessWorkRecord7.Flags3 Or 2^8
       Endif
    Endif
    Call ANSI(4,37,44)
    For TempX=3 To 14
       Call ANSI(2,TempX,50)
       Strng=Space$(27)
       Call Scrn(Strng)
    Next
    Call ANSI(4,33,44)
    For Temp2=18 To 23
       Call ANSI(2,Array.Data(Temp2,1),Array.Data(Temp2,2))
       Strng=Title.Data(Temp2)
       Call Scrn(Strng)
    Next
    For TempX=18 To 23
       Call ShowUser
    Next
    Call ANSI(4,37,44)
    Call ANSI(2,VarA,VarB)
    Strng=Space$(1)
    Call Scrn(Strng)
 Case 6
    Temp9=False
    Select Case Ucase$(Edit.Data(1))
    Case "F"
       Temp9=1
    Case "M"
       Temp9=2
    Case "T"
       Temp9=3
    Case "C"
       Temp9=4
    Case "P"
       Temp9=5
    Case "R"
       Temp9=6
    Case "D"
       Temp9=7
    Case "L"
       Temp9=8
    Case "A"
       Temp9=9
    Case "*"
       Temp9=10
    End Select
    UserRecord2.ClassType=Temp9
    If User.Online Then
       MessWorkRecord7.ClassType=Temp9
       MessWorkRecord7.Flags1=MessWorkRecord7.Flags1 Or 2^4
    Endif
    Call ANSI(4,37,44)
    For TempX=3 To 14
       Call ANSI(2,TempX,50)
       Strng=Space$(27)
       Call Scrn(Strng)
    Next
    Call ANSI(4,33,44)
    For Temp2=18 To 23
       Call ANSI(2,Array.Data(Temp2,1),Array.Data(Temp2,2))
       Strng=Title.Data(Temp2)
       Call Scrn(Strng)
    Next
    For TempX=18 To 23
       Call ShowUser
    Next
 Case 8
    Strng=Edit.Data(1)
    Call Valid(Strng,20)
    If Strng<>Nul Then
       UserRecord2.ClassName=Strng
       If User.Online Then
          MessWorkRecord7.Classname=Strng
          MessWorkRecord7.Flags1=MessWorkRecord7.Flags1 Or 2^10
       Endif
    Endif
 Case 9
    Call ANSI(4,37,44)
    For TempX=3 To 8
       Call ANSI(2,TempX,50)
       Strng=Space$(27)
       Call Scrn(Strng)
    Next
    Call ANSI(4,33,44)
    For Temp2=18 To 20
       Call ANSI(2,Array.Data(Temp2,1),Array.Data(Temp2,2))
       Strng=Title.Data(Temp2)
       Call Scrn(Strng)
    Next
    For TempX=18 To 20
       Call ShowUser
    Next
    Temp2=False
    Select Case Ucase$(Edit.Data(1))
    Case "B"
       Temp2=1
    Case "P"
       Temp2=2
    Case "S"
       Temp2=3
    Case "T"
       Temp2=4
    End Select
    UserRecord2.Proficiency=Temp2
    If User.Online Then
       MessWorkRecord7.Proficiency=Temp2
       MessWorkRecord7.Flags1=MessWorkRecord7.Flags1 Or 2^5
    Endif
 Case 10
    Temp9=Int(Val(Edit.Data(1)))
    UserRecord2.Weapons(1)=Temp9
    If User.Online Then
       MessWorkRecord7.Weapon1=Temp9
       MessWorkRecord7.Flags1=MessWorkRecord7.Flags1 Or 2^6
    Endif
 Case 11
    Temp9=Int(Val(Edit.Data(1)))
    UserRecord2.Weapons(2)=Temp9
    If User.Online Then
       MessWorkRecord7.Weapon2=Temp9
       MessWorkRecord7.Flags1=MessWorkRecord7.Flags1 Or 2^7
    Endif
 Case 12
    Temp9=Int(Val(Edit.Data(1)))
    UserRecord2.Weapons(3)=Temp9
    If User.Online Then
       MessWorkRecord7.Weapon3=Temp9
       MessWorkRecord7.Flags1=MessWorkRecord7.Flags1 Or 2^8
    Endif
 Case 13
    Temp9=Int(Val(Edit.Data(1)))
    UserRecord2.Weapons(4)=Temp9
    If User.Online Then
       MessWorkRecord7.Weapon4=Temp9
       MessWorkRecord7.Flags1=MessWorkRecord7.Flags1 Or 2^9
    Endif
 Case 14
    Temp9=Int(Val(Edit.Data(1)))
    UserRecord2.Fatigue=Temp9
    UserRecord2.FatigueMax=Temp9
    If User.Online Then
       MessWorkRecord7.FatigueMax=Temp9
       MessWorkRecord7.Flags3=MessWorkRecord7.Flags3 Or 2^9
    Endif
 Case 15
    Temp9=Int(Val(Edit.Data(1)))
    UserRecord2.Vitality=Temp9
    UserRecord2.VitalityMax=Temp9
    If User.Online Then
       MessWorkRecord7.VitalityMax=Temp9
       MessWorkRecord7.Flags3=MessWorkRecord7.Flags3 Or 2^10
    Endif
 Case 16
    Temp9=Int(Val(Edit.Data(1)))
    UserRecord2.Magic=Temp9
    UserRecord2.MagicMax=Temp9
    If User.Online Then
       MessWorkRecord7.MagicMax=Temp9
       MessWorkRecord7.Flags4=MessWorkRecord7.Flags4 Or 2^1
    Endif
 Case 17
    Temp9=Int(Val(Edit.Data(1)))
    UserRecord2.Psionic=Temp9
    UserRecord2.PsionicMax=Temp9
    If User.Online Then
       MessWorkRecord7.PsionicMax=Temp9
       MessWorkRecord7.Flags4=MessWorkRecord7.Flags4 Or 2^2
    Endif
 Case 18
    Temp9#=Int(Val(Edit.Data(1)))
    If Temp9#>1d308 Then
       Eat$=Nul
    Else
       UserRecord2.Experience=Temp9#
       If User.Online Then
          MessWorkRecord7.Experience=Temp9#
          MessWorkRecord7.Flags2=MessWorkRecord7.Flags2 Or 2^8
       Endif
    Endif
 Case 19
    Temp9#=Int(Val(Edit.Data(1)))
    If Temp9#>1D308 Then
       Eat$=Nul
    Else
       UserRecord2.Gold=Temp9#
       If User.Online Then
          MessWorkRecord7.Gold=Temp9#
          MessWorkRecord7.Flags2=MessWorkRecord7.Flags2 Or 2^9
       Endif
    Endif
 Case 20
    Temp9!=Int(Val(Edit.Data(1)))
    If Temp9!=0! Or Temp9!=-1! Then
       UserRecord2.TimeLimit=Temp9!
       If User.Online Then
          MessWorkRecord7.TimeLimit=Temp9!
          MessWorkRecord7.Flags3=MessWorkRecord7.Flags3 Or 2^1
       Endif
    Else
       If Temp9!<=86400! Then
          UserRecord2.TimeLimit=Temp9!
          If User.Online Then
             MessWorkRecord7.TimeLimit=Temp9!
             MessWorkRecord7.Flags3=MessWorkRecord7.Flags3 Or 2^1
          Endif
       Endif
    Endif
 Case 21
    Temp9=Int(Val(Edit.Data(1)))
    UserRecord2.Stats(1)=Temp9
    If User.Online Then
       MessWorkRecord7.Stat1=Temp9
       MessWorkRecord7.Flags2=MessWorkRecord7.Flags2 Or 2^1
    Endif
 Case 22
    Temp9=Int(Val(Edit.Data(1)))
    UserRecord2.Stats(2)=Temp9
    If User.Online Then
       MessWorkRecord7.Stat2=Temp9
       MessWorkRecord7.Flags2=MessWorkRecord7.Flags2 Or 2^2
    Endif
 Case 23
    Temp9=Int(Val(Edit.Data(1)))
    UserRecord2.Stats(3)=Temp9
    If User.Online Then
       MessWorkRecord7.Stat3=Temp9
       MessWorkRecord7.Flags2=MessWorkRecord7.Flags2 Or 2^3
    Endif
 Case 24
    Temp9=Int(Val(Edit.Data(1)))
    UserRecord2.Stats(4)=Temp9
    If User.Online Then
       MessWorkRecord7.Stat4=Temp9
       MessWorkRecord7.Flags2=MessWorkRecord7.Flags2 Or 2^4
    Endif
 Case 25
    Temp9=Int(Val(Edit.Data(1)))
    UserRecord2.Stats(5)=Temp9
    If User.Online Then
       MessWorkRecord7.Stat5=Temp9
       MessWorkRecord7.Flags2=MessWorkRecord7.Flags2 Or 2^5
    Endif
 Case 26
    Temp9=Int(Val(Edit.Data(1)))
    UserRecord2.Stats(6)=Temp9
    If User.Online Then
       MessWorkRecord7.Stat6=Temp9
       MessWorkRecord7.Flags2=MessWorkRecord7.Flags2 Or 2^6
    Endif
 Case 27
    Temp9=Int(Val(Edit.Data(1)))
    UserRecord2.Stats(7)=Temp9
    If User.Online Then
       MessWorkRecord7.Stat7=Temp9
       MessWorkRecord7.Flags2=MessWorkRecord7.Flags2 Or 2^7
    Endif
 End Select
Error.Resume129:
 Exit Sub
Error.Trap129:
 Resume Error.Resume129
End Sub

' Xcoor, Ycoor, Column, Line.Length, Row, Max.Lines, Line.Number
DataUser4:
 Data 23,22,22,1,23,1,1

Sub ClearSubstats2
 On Local Error Goto Error.Trap140
 If TempD Then
    TempD=False
    Call ANSI(4,37,44)
    For Var=6 To 11
       Call ANSI(2,Var,30)
       Strng=Space$(50)
       Call Scrn(Strng)
    Next
    Call ANSI(4,33,44)
    For Temp2=20 To 23
       Call ANSI(2,Array.Data(Temp2,1),Array.Data(Temp2,2))
       Strng=Title.Data(Temp2)
       Call Scrn(Strng)
    Next
    For TempX=20 To 23
       Call ShowUser
    Next
    Call UserStatusLine
 Endif
Error.Resume140:
 Exit Sub
Error.Trap140:
 Resume Error.Resume140
End Sub

Sub GetUserTreasure
 On Local Error Goto Error.Trap141
 User.Treasure=SFalse
 Call Search.Mess.File(User.Number,User.Online)
 If User.Online Then
    For Temp2!=1! To Lof(MessWorkFile6)/MessWorkRecLen6
       Call Read.Record(MessWorkFile6,Temp2!)
       If MessWorkRecord6.User=User.Number Then
          If MessWorkRecord6.Index>SFalse Then
             User.Treasure=User.Treasure+1!
          Endif
       Endif
    Next
 Else
    Temp2!=UserRecord2.First
    If Temp2! Then
       Do While Lost.Carrier=False
          Call Read.Record(UserInvFile,Temp2!)
          VarQ!=MessWorkRecord6.Next
          If MessWorkRecord6.Index>SFalse Then
             User.Treasure=User.Treasure+1!
          Endif
          If VarQ!=SFalse Then
             Exit Do
          Endif
          Temp2!=VarQ!
       Loop
    Endif
 Endif
 If Treasure.Number>User.Treasure Then
    Treasure.Number=User.Treasure
 Endif
Error.Resume141:
 Exit Sub
Error.Trap141:
 Resume Error.Resume141
End Sub

Sub GetUserObject
 On Local Error Goto Error.Trap141a
 User.Object=SFalse
 Call Search.Mess.File(User.Number,User.Online)
 If User.Online Then
    For Temp2!=1! To Lof(MessWorkFile6)/MessWorkRecLen6
       Call Read.Record(MessWorkFile6,Temp2!)
       If MessWorkRecord6.User=User.Number Then
          If MessWorkRecord6.Index<SFalse Then
             User.Object=User.Object+1!
          Endif
       Endif
    Next
 Else
    Temp2!=UserRecord2.First
    If Temp2! Then
       Do While Lost.Carrier=False
          Call Read.Record(UserInvFile,Temp2!)
          VarQ!=MessWorkRecord6.Next
          If MessWorkRecord6.Index<SFalse Then
             User.Object=User.Object+1!
          Endif
          If VarQ!=SFalse Then
             Exit Do
          Endif
          Temp2!=VarQ!
       Loop
    Endif
 Endif
 If Object.Number>User.Object Then
    Object.Number=User.Object
 Endif
Error.Resume141a:
 Exit Sub
Error.Trap141a:
 Resume Error.Resume141a
End Sub

Sub GetUserContainer
 On Local Error Goto Error.Trap141b
 User.Containers=SFalse
 Call Read.Record(UserFile2,User.Number)
 Temp2!=UserRecord2.First2
 If Temp2! Then
    Do While Lost.Carrier=False
       Call Read.Record(ContainerFile,Temp2!)
       VarQ!=ContainerRecord.Next
       If ContainerRecord.DeletedContainer=False Then
          If ContainerRecord.WithinContainer=SFalse Then
             User.Containers=User.Containers+1!
          Endif
          If VarQ!=SFalse Then
             Exit Do
          Endif
          Temp2!=VarQ!
       Endif
    Loop
 Endif
 If Container.Number>User.Containers Then
    Container.Number=User.Containers
 Endif
Error.Resume141b:
 Exit Sub
Error.Trap141b:
 Resume Error.Resume141b
End Sub

Sub DisplayUserTreasureScreen
 On Local Error Goto Error.Trap142
 Call GetUserTreasure
 If User.Treasure=SFalse Then
    Treasure.Index=SFalse
    Treasure.Number=SFalse
    Call ShowUserTreasure
    Out2="There is no treasure of the user to display."
    Call ErrorStatusLine
    Exit Sub
 Endif
 Temp!=SFalse
 Treasure.Index=SFalse
 Call Search.Mess.File(User.Number,User.Online)
 If User.Online Then
    For Inventory.Index!=1! To Lof(MessWorkFile6)/MessWorkRecLen6
       Call Read.Record(MessWorkFile6,Inventory.Index!)
       If MessWorkRecord6.User=User.Number Then
          If MessWorkRecord6.Index>SFalse Then
             Temp!=Temp!+1!
             If Temp!=Treasure.Number Then
                Treasure.Index=MessWorkRecord6.Index
                Exit For
             Endif
          Endif
       Endif
    Next
 Else
    Inventory.Index!=UserRecord2.First
    If Inventory.Index! Then
       Do While Lost.Carrier=False
          Call Read.Record(UserInvFile,Inventory.Index!)
          Next.Index!=MessWorkRecord6.Next
          If MessWorkRecord6.Index>SFalse Then
             Temp!=Temp!+1!
             If Temp!=Treasure.Number Then
                Treasure.Index=MessWorkRecord6.Index
                Exit Do
             Endif
          Endif
          If Next.Index!=SFalse Then
             Exit Do
          Endif
          Inventory.Index!=Next.Index!
       Loop
    Endif
 Endif
 If Treasure.Index<=SFalse Or _
 Treasure.Index>Lof(TreasureFile)/TreasureRecLen Then
    Out2="The treasure number is not within the treasure file range."
    Call ErrorStatusLine
    Exit Sub
 Endif
 Call ShowUserTreasure
Error.Resume142:
 Exit Sub
Error.Trap142:
 Resume Error.Resume142
End Sub

Sub DisplayUserObjectScreen
 On Local Error Goto Error.Trap142a
 Call GetUserObject
 If User.Object=SFalse Then
    Object.Index=SFalse
    Object.Number=SFalse
    Call ShowUserObject
    Out2="There is no object of the user to display."
    Call ErrorStatusLine
    Exit Sub
 Endif
 Temp!=SFalse
 Object.Index=SFalse
 Call Search.Mess.File(User.Number,User.Online)
 If User.Online Then
    For Inventory.Index!=1! To Lof(MessWorkFile6)/MessWorkRecLen6
       Call Read.Record(MessWorkFile6,Inventory.Index!)
       If MessWorkRecord6.User=User.Number Then
          If MessWorkRecord6.Index<SFalse Then
             Temp!=Temp!+1!
             If Temp!=Object.Number Then
                Object.Index=Abs(MessWorkRecord6.Index)
                Exit For
             Endif
          Endif
       Endif
    Next
 Else
    Inventory.Index!=UserRecord2.First
    If Inventory.Index! Then
       Do While Lost.Carrier=False
          Call Read.Record(UserInvFile,Inventory.Index!)
          Next.Index!=MessWorkRecord6.Next
          If MessWorkRecord6.Index<SFalse Then
             Temp!=Temp!+1!
             If Temp!=Object.Number Then
                Object.Index=Abs(MessWorkRecord6.Index)
                Exit Do
             Endif
          Endif
          If Next.Index!=SFalse Then
             Exit Do
          Endif
          Inventory.Index!=Next.Index!
       Loop
    Endif
 Endif
 If Object.Index<=SFalse Or _
 Object.Index>Lof(ObjectFile)/ObjectRecLen Then
    Out2="The object number is not within the object file range."
    Call ErrorStatusLine
    Exit Sub
 Endif
 Call ShowUserObject
Error.Resume142a:
 Exit Sub
Error.Trap142a:
 Resume Error.Resume142a
End Sub

Sub DisplayUserContainerScreen
 On Local Error Goto Error.Trap142b
 Call GetUserContainer
 If User.Containers=SFalse Then
    Container.Index=SFalse
    Container.Number=SFalse
    Call ShowUserContainer
    Out2="There is no container of the user to display."
    Call ErrorStatusLine
    Exit Sub
 Endif
 Temp!=SFalse
 Container.Index=SFalse
 Call Read.Record(UserFile2,User.Number)
 Inventory.Index!=UserRecord2.First2
 If Inventory.Index! Then
    Do While Lost.Carrier=False
       Call Read.Record(ContainerFile,Inventory.Index!)
       Next.Index!=ContainerRecord.Next
       If ContainerRecord.DeletedContainer=False Then
          If ContainerRecord.WithinContainer=SFalse Then
             Temp!=Temp!+1!
             If Temp!=Container.Number Then
                Container.Index=Temp! ' ContainerRecord.ContainerIndex
                Exit Do
             Endif
          Endif
       Endif
       If Next.Index!=SFalse Then
          Exit Do
       Endif
       Inventory.Index!=Next.Index!
    Loop
 Endif
 If Container.Index=SFalse Then
    Out2="The container number is not within the container file range."
    Call ErrorStatusLine
    Exit Sub
 Endif
 Call ShowUserContainer
Error.Resume142b:
 Exit Sub
Error.Trap142b:
 Resume Error.Resume142b
End Sub

Sub EditUserTreasure
 On Local Error Goto Error.Trap143
 Treasure.Number=1
 Call DisplayUserTreasureScreen
 Do While Lost.Carrier=False
    Call GetUserTreasure
    Call UserTreasureStatusLine
    TempX$=Nul
    Do While TempX$=Nul
       If Lost.Carrier Then
          Exit Do
       Endif
       Call Read.Keyboard(TempX$)
       Call MouseDriver(3)
       If Mouse.Button2 Then
          TempX$=Chr$(27)
       Endif
       If Mouse.Button Then
          Call MouseCheck
          Exit Do
       Endif
    Loop
    TempX=False
    Select Case Len(TempX$)
    Case 1
       TempX=Asc(TempX$)
       Select Case TempX
       Case 1
          Call AddUserTreasure
          Call Display.Container.Line
       Case 4
          Call DeleteUserTreasure
          Call Display.Container.Line
       Case 23
          Call SearchUserTreasure
          Call Display.Container.Line
       Case 27
          Call ClearSubstats2
          Exit Sub
       End Select
    Case 2
       TempX=Asc(Mid$(TempX$,2,1))
       Select Case TempX
       Case 72, 141, 152
          Call PreviousUserTreasure
       Case 80, 145, 160
          Call NextUserTreasure
       End Select
    End Select
 Loop
Error.Resume143:
 Exit Sub
Error.Trap143:
 Resume Error.Resume143
End Sub

Sub EditUserObjects
 On Local Error Goto Error.Trap143a
 Object.Number=1
 Call DisplayUserObjectScreen
 Do While Lost.Carrier=False
    Call GetUserObject
    Call UserObjectStatusLine
    TempX$=Nul
    Do While TempX$=Nul
       If Lost.Carrier Then
          Exit Do
       Endif
       Call Read.Keyboard(TempX$)
       Call MouseDriver(3)
       If Mouse.Button2 Then
          TempX$=Chr$(27)
       Endif
       If Mouse.Button Then
          Call MouseCheck
          Exit Do
       Endif
    Loop
    TempX=False
    Select Case Len(TempX$)
    Case 1
       TempX=Asc(TempX$)
       Select Case TempX
       Case 1
          Call AddUserObject
          Call Display.Container.Line
       Case 4
          Call DeleteUserObject
          Call Display.Container.Line
       Case 23
          Call SearchUserObject
          Call Display.Container.Line
       Case 27
          Call ClearSubstats2
          Exit Sub
       End Select
    Case 2
       TempX=Asc(Mid$(TempX$,2,1))
       Select Case TempX
       Case 72, 141, 152
          Call PreviousUserObject
       Case 80, 145, 160
          Call NextUserObject
       End Select
    End Select
 Loop
Error.Resume143a:
 Exit Sub
Error.Trap143a:
 Resume Error.Resume143a
End Sub

Sub EditUserContainers
 On Local Error Goto Error.Trap143b
 Container.Number=1
 Call DisplayUserContainerScreen
 Do While Lost.Carrier=False
    Call GetUserContainer
    Call UserContainerStatusLine
    TempX$=Nul
    Do While TempX$=Nul
       If Lost.Carrier Then
          Exit Do
       Endif
       Call Read.Keyboard(TempX$)
       Call MouseDriver(3)
       If Mouse.Button2 Then
          TempX$=Chr$(27)
       Endif
       If Mouse.Button Then
          Call MouseCheck
          Exit Do
       Endif
    Loop
    TempX=False
    Select Case Len(TempX$)
    Case 1
       TempX=Asc(TempX$)
       Select Case TempX
       Case 1
          Call Search.Mess.File(User.Number,User.Online)
          If User.Online=False Then
             Call AddUserContainer
          Endif
          Call Display.Container.Line
       Case 4
          Call Search.Mess.File(User.Number,User.Online)
          If User.Online=False Then
             Call DeleteUserContainer
          Endif
          Call Display.Container.Line
       Case 23
          Call SearchUserContainer
          Call Display.Container.Line
       Case 27
          Call ClearSubstats2
          Exit Sub
       End Select
    Case 2
       TempX=Asc(Mid$(TempX$,2,1))
       Select Case TempX
       Case 72, 141, 152
          Call PreviousUserContainer
       Case 80, 145, 160
          Call NextUserContainer
       End Select
    End Select
 Loop
Error.Resume143b:
 Exit Sub
Error.Trap143b:
 Resume Error.Resume143b
End Sub

Sub DeleteUserTreasure
 On Local Error Goto Error.Trap144
 VarQ=False
 Temp!=SFalse
 Call GetUserTreasure
 If User.Treasure>SFalse Then
    Call Search.Mess.File(User.Number,User.Online)
    If User.Online Then
       For Inventory.Index!=1! To Lof(MessWorkFile6)/MessWorkRecLen6
          Call Read.Record(MessWorkFile6,Inventory.Index!)
          If MessWorkRecord6.User=User.Number Then
             If MessWorkRecord6.Index>SFalse Then
                Temp!=Temp!+1!
                If Temp!=Treasure.Number Then
                   MessWorkRecord6.User=SFalse
                   Call Write.Record(MessWorkFile6,Inventory.Index!)
                   VarQ=True
                   Exit For
                Endif
             Endif
          Endif
       Next
    Else
       Inventory.Index!=UserRecord2.First
       If Inventory.Index! Then
          Do While Lost.Carrier=False
             Call Read.Record(UserInvFile,Inventory.Index!)
             Next.Index!=MessWorkRecord6.Next
             If MessWorkRecord6.Index>SFalse Then
                Temp!=Temp!+1!
                If Temp!=Treasure.Number Then
                   Call Delete.List.Node3(Inventory.Index!)
                   Call Clear.List.Node
                   Call Write.Record(UserInvFile,Inventory.Index!)
                   VarQ=True
                   Exit Do
                Endif
             Endif
             If Next.Index!=SFalse Then
                Exit Do
             Endif
             Inventory.Index!=Next.Index!
          Loop
       Endif
    Endif
 Endif
 If VarQ=True Then
    Out2="The treasure has been deleted from the user."
    TempX=False
    Call ShowUser
 Else
    Out2="The treasure was not deleted from the user."
 Endif
 Call ErrorStatusLine
 Treasure.Number=1
 Call DisplayUserTreasureScreen
Error.Resume144:
 Exit Sub
Error.Trap144:
 Resume Error.Resume144
End Sub

Sub DeleteUserObject
 On Local Error Goto Error.Trap144a
 VarQ=False
 Temp!=SFalse
 Call GetUserObject
 If User.Object>SFalse Then
    Call Search.Mess.File(User.Number,User.Online)
    If User.Online Then
       For Inventory.Index!=1! To Lof(MessWorkFile6)/MessWorkRecLen6
          Call Read.Record(MessWorkFile6,Inventory.Index!)
          If MessWorkRecord6.User=User.Number Then
             If MessWorkRecord6.Index<SFalse Then
                Temp!=Temp!+1!
                If Temp!=Treasure.Number Then
                   MessWorkRecord6.User=SFalse
                   Call Write.Record(MessWorkFile6,Inventory.Index!)
                   VarQ=True
                   Exit For
                Endif
             Endif
          Endif
       Next
    Else
       Inventory.Index!=UserRecord2.First
       If Inventory.Index! Then
          Do While Lost.Carrier=False
             Call Read.Record(UserInvFile,Inventory.Index!)
             Next.Index!=MessWorkRecord6.Next
             If MessWorkRecord6.Index<SFalse Then
                Temp!=Temp!+1!
                If Temp!=Object.Number Then
                   Call Delete.List.Node3(Inventory.Index!)
                   Call Clear.List.Node
                   Call Write.Record(UserInvFile,Inventory.Index!)
                   VarQ=True
                   Exit Do
                Endif
             Endif
             If Next.Index!=SFalse Then
                Exit Do
             Endif
             Inventory.Index!=Next.Index!
          Loop
       Endif
    Endif
 Endif
 If VarQ=True Then
    Out2="The object has been deleted from the user."
    TempX=False
    Call ShowUser
 Else
    Out2="The object was not deleted from the user."
 Endif
 Call ErrorStatusLine
 Object.Number=1
 Call DisplayUserObjectScreen
Error.Resume144a:
 Exit Sub
Error.Trap144a:
 Resume Error.Resume144a
End Sub

Sub DeleteUserContainer
 On Local Error Goto Error.Trap144b
 VarQ=False
 Temp!=SFalse
 Call GetUserContainer
 If User.Containers>SFalse Then
    Call Read.Record(UserFile2,User.Number)
    Inventory.Index!=UserRecord2.First2
    If Inventory.Index! Then
       Do While Lost.Carrier=False
          Call Read.Record(ContainerFile,Inventory.Index!)
          Next.Index!=ContainerRecord.Next
          If ContainerRecord.DeletedContainer=False Then
             If ContainerRecord.WithinContainer=SFalse Then
                Temp!=Temp!+1!
                If Temp!=Container.Number Then
                   Call Delete.User.Container(Inventory.Index!)
                   VarQ=True
                   Exit Do
                Endif
             Endif
          Endif
          If Next.Index!=SFalse Then
             Exit Do
          Endif
          Inventory.Index!=Next.Index!
       Loop
    Endif
 Endif
 If VarQ=True Then
    Out2="The container has been deleted from the user."
    TempX=False
    Call ShowUser
 Else
    Out2="The container was not deleted from the user."
 Endif
 Call ErrorStatusLine
 Container.Number=1
 Call DisplayUserContainerScreen
Error.Resume144b:
 Exit Sub
Error.Trap144b:
 Resume Error.Resume144b
End Sub

Sub Delete.List.Node3(VarZ!)
 On Local Error Goto ErrorTrp32a
 If UserRecord2.First=VarZ! Then
    Call Read.Record(UserInvFile,VarZ!)
    UserRecord2.First=MessWorkRecord6.Next
    Call Write.Record(UserFile2,User.Number)
    If UserRecord2.First>SFalse Then
       Call Read.Record(UserInvFile,UserRecord2.First)
       MessWorkRecord6.Prev=SFalse
       Call Write.Record(UserInvFile,UserRecord2.First)
    Endif
 Else
    If UserRecord2.Last=VarZ! Then
       Call Read.Record(UserInvFile,VarZ!)
       UserRecord2.Last=MessWorkRecord6.Prev
       Call Write.Record(UserFile2,User.Number)
       If UserRecord2.Last>SFalse Then
          Call Read.Record(UserInvFile,UserRecord2.Last)
          MessWorkRecord6.Next=SFalse
          Call Write.Record(UserInvFile,UserRecord2.Last)
       Endif
    Else
       Call Read.Record(UserInvFile,VarZ!)
       Previous.Node!=MessWorkRecord6.Prev
       Next.Node!=MessWorkRecord6.Next
       Call Read.Record(UserInvFile,Previous.Node!)
       MessWorkRecord6.Next=Next.Node!
       Call Write.Record(UserInvFile,Previous.Node!)
       Call Read.Record(UserInvFile,Next.Node!)
       MessWorkRecord6.Prev=Previous.Node!
       Call Write.Record(UserInvFile,Next.Node!)
    Endif
 Endif
ErrorRsm32a:
 Exit Sub
ErrorTrp32a:
 Resume ErrorRsm32a
End Sub

Sub Delete.User.Container(VarZ!)
 On Local Error Goto ErrorTrp32e
 Call Read.Record(UserFile2,User.Number)
 If UserRecord2.First2=VarZ! Then
    Call Read.Record(ContainerFile,VarZ!)
    UserRecord2.First2=ContainerRecord.Next
    Call Write.Record(UserFile2,User.Number)
    If UserRecord2.First2>SFalse Then
       Call Read.Record(ContainerFile,UserRecord2.First2)
       ContainerRecord.Prev=SFalse
       Call Write.Record(ContainerFile,UserRecord2.First2)
    Endif
 Else
    If UserRecord2.Last2=VarZ! Then
       Call Read.Record(ContainerFile,VarZ!)
       UserRecord2.Last2=ContainerRecord.Prev
       Call Write.Record(UserFile2,User.Number)
       If UserRecord2.Last2>SFalse Then
          Call Read.Record(ContainerFile,UserRecord2.Last2)
          ContainerRecord.Next=SFalse
          Call Write.Record(ContainerFile,UserRecord2.Last2)
       Endif
    Else
       Call Read.Record(ContainerFile,VarZ!)
       Previous.Node!=ContainerRecord.Prev
       Next.Node!=ContainerRecord.Next
       Call Read.Record(ContainerFile,Previous.Node!)
       ContainerRecord.Next=Next.Node!
       Call Write.Record(ContainerFile,Previous.Node!)
       Call Read.Record(ContainerFile,Next.Node!)
       ContainerRecord.Prev=Previous.Node!
       Call Write.Record(ContainerFile,Next.Node!)
    Endif
 Endif
ErrorRsm32e:
 Exit Sub
ErrorTrp32e:
 Resume ErrorRsm32e
End Sub

Sub AddUserTreasure
 On Local Error Goto Error.Trap145
 Strng=Nul
 Out2="^ Cursor Edit "+Chr$(60)+Chr$(217)+" Exit Field  "
 Out2=Out2+"Append # sign and number for duplicate treasure"
 Call StatusLine
 Call ANSI(4,33,44)
 Call ANSI(2,23,2)
 Strng="Enter Treasure Name or Number: "
 Call Scrn(Strng)
 Call ANSI(4,37,40)
 Call ANSI(2,23,33)
 Strng=Space$(30)
 Call Scrn(Strng)
 Restore Data15A
 Read Xcoor, Ycoor, Column, Line.Length, Row, Max.Lines, Line.Number
 Edit.Data(1)=Nul
 Call ScreenEdit
 Temp2!=Int(Val(Edit.Data(1)))
 If Temp2!=SFalse Then
    Temp.Index=SFalse
    Var$=Edit.Data(1)
    Var=Instr(Var$,"#")
    If Var Then
       Edit.Data(1)=Left$(Var$,Var-1)
       Var$=Mid$(Var$,Var+1)
       Temp.Index=Int(Val(Var$))
    Endif
    Edit.Data(1)=Lcase$(Edit.Data(1))
    If Edit.Data(1)<>Nul Then
       Temp3!=SFalse
       For Temp2!=1! To Lof(TreasureFile)/TreasureRecLen
          Call Read.Record(TreasureFile,Temp2!)
          If TreasureRecord.Container=False Then
             If Left$(TreasureRecord.TreasureName, _
             Len(Edit.Data(1)))=Edit.Data(1) Then
                Temp3!=Temp3!+1!
                If Temp.Index=Temp3! Or Temp.Index=SFalse Then
                   Temp6=TreasureRecord.Charges
                   Exit For
                Endif
             Endif
          Endif
       Next
    Endif
 Endif
 If Temp2!<=SFalse Or Temp2!>Lof(TreasureFile)/TreasureRecLen Then
    Call Display.Container.Line
    Out2="The treasure name was not found in the treasure file."
    Call ErrorStatusLine
    Exit Sub
 Endif
 VarQ=False
 Call Search.Mess.File(User.Number,User.Online)
 If User.Online Then
    Inventory.Index!=Lof(MessWorkFile6)/MessWorkRecLen6+1!
    MessWorkRecord6.User=User.Number
    MessWorkRecord6.Index=Temp2!
    MessWorkRecord6.Charges=Temp6
    Call Write.Record(MessWorkFile6,Inventory.Index!)
    VarQ=True
 Else
    Inventory.Index!=Lof(UserInvFile)/MessWorkRecLen6+1!
    Call Write.Record(UserInvFile,Inventory.Index!)
    MessWorkRecord6.Room=SFalse
    MessWorkRecord6.User=User.Number
    MessWorkRecord6.Index=Temp2!
    MessWorkRecord6.Charges=Temp6
    MessWorkRecord6.Plus=False
    Call Add.List.Node3(Inventory.Index!)
    VarQ=True
 Endif
 If VarQ Then
    Out2="The treasure has been added to the user."
    TempX=False
    Call ShowUser
 Else
    Out2="The treasure was not added to the user."
 Endif
 Call ErrorStatusLine
 Treasure.Number=1
 Call DisplayUserTreasureScreen
Error.Resume145:
 Exit Sub
Error.Trap145:
 Resume Error.Resume145
End Sub

Sub AddUserObject
 On Local Error Goto Error.Trap145a
 Strng=Nul
 Out2="^ Cursor Edit "+Chr$(60)+Chr$(217)+" Exit Field  "
 Out2=Out2+"Append # sign and number for duplicate object"
 Call StatusLine
 Call ANSI(4,33,44)
 Call ANSI(2,23,2)
 Strng="Enter Object Name or Number: "
 Call Scrn(Strng)
 Call ANSI(4,37,40)
 Call ANSI(2,23,31)
 Strng=Space$(30)
 Call Scrn(Strng)
 Restore Data15B
 Read Xcoor, Ycoor, Column, Line.Length, Row, Max.Lines, Line.Number
 Edit.Data(1)=Nul
 Call ScreenEdit
 Temp2!=Int(Val(Edit.Data(1)))
 If Temp2!=SFalse Then
    Temp.Index=SFalse
    Var$=Edit.Data(1)
    Var=Instr(Var$,"#")
    If Var Then
       Edit.Data(1)=Left$(Var$,Var-1)
       Var$=Mid$(Var$,Var+1)
       Temp.Index=Int(Val(Var$))
    Endif
    Edit.Data(1)=Lcase$(Edit.Data(1))
    If Edit.Data(1)<>Nul Then
       Temp3!=SFalse
       For Temp2!=1! To Lof(ObjectFile)/ObjectRecLen
          Call Read.Record(ObjectFile,Temp2!)
          If Left$(ObjectRecord.ObjectName, _
          Len(Edit.Data(1)))=Edit.Data(1) Then
             Temp3!=Temp3!+1!
             If Temp.Index=Temp3! Or Temp.Index=SFalse Then
                Temp6=TreasureRecord.Charges
                Exit For
             Endif
          Endif
       Next
    Endif
 Endif
 If Temp2!<=SFalse Or Temp2!>Lof(ObjectFile)/TreasureRecLen Then
    Call Display.Container.Line
    Out2="The object name was not found in the object file."
    Call ErrorStatusLine
    Exit Sub
 Endif
 VarQ=False
 Call Search.Mess.File(User.Number,User.Online)
 If User.Online Then
    Inventory.Index!=Lof(MessWorkFile6)/MessWorkRecLen6+1!
    MessWorkRecord6.User=User.Number
    MessWorkRecord6.Index=-(Temp2!)
    MessWorkRecord6.Charges=False
    Call Write.Record(MessWorkFile6,Inventory.Index!)
    VarQ=True
 Else
    Inventory.Index!=Lof(UserInvFile)/MessWorkRecLen6+1!
    Call Write.Record(UserInvFile,Inventory.Index!)
    MessWorkRecord6.Room=SFalse
    MessWorkRecord6.User=User.Number
    MessWorkRecord6.Index=-(Temp2!)
    MessWorkRecord6.Charges=False
    MessWorkRecord6.Plus=False
    Call Add.List.Node3(Inventory.Index!)
    VarQ=True
 Endif
 If VarQ Then
    Out2="The object has been added to the user."
    TempX=False
    Call ShowUser
 Else
    Out2="The object was not added to the user."
 Endif
 Call ErrorStatusLine
 Object.Number=1
 Call DisplayUserObjectScreen
Error.Resume145a:
 Exit Sub
Error.Trap145a:
 Resume Error.Resume145a
End Sub

Sub AddUserContainer
 On Local Error Goto Error.Trap145b
 Strng=Nul
 Out2="^ Cursor Edit "+Chr$(60)+Chr$(217)+" Exit Field  "
 Out2=Out2+"Append # sign and number for duplicate containers"
 Call StatusLine
 Call ANSI(4,33,44)
 Call ANSI(2,23,2)
 Strng="Enter Container Name or Number: "
 Call Scrn(Strng)
 Call ANSI(4,37,40)
 Call ANSI(2,23,34)
 Strng=Space$(30)
 Call Scrn(Strng)
 Restore Data15C
 Read Xcoor, Ycoor, Column, Line.Length, Row, Max.Lines, Line.Number
 Edit.Data(1)=Nul
 Call ScreenEdit
 Temp2!=Int(Val(Edit.Data(1)))
 If Temp2!=SFalse Then
    Temp.Index=SFalse
    Var$=Edit.Data(1)
    Var=Instr(Var$,"#")
    If Var Then
       Edit.Data(1)=Left$(Var$,Var-1)
       Var$=Mid$(Var$,Var+1)
       Temp.Index=Int(Val(Var$))
    Endif
    Edit.Data(1)=Lcase$(Edit.Data(1))
    If Edit.Data(1)<>Nul Then
       Temp3!=SFalse
       For Temp2!=1! To Lof(TreasureFile)/TreasureRecLen
          Call Read.Record(TreasureFile,Temp2!)
          If TreasureRecord.Container Then
             If Left$(TreasureRecord.TreasureName, _
             Len(Edit.Data(1)))=Edit.Data(1) Then
                Temp3!=Temp3!+1!
                If Temp.Index=Temp3! Or Temp.Index=SFalse Then
                   Temp6=TreasureRecord.Charges
                   Exit For
                Endif
             Endif
          Endif
       Next
    Endif
 Endif
 If Temp2!<=SFalse Or Temp2!>Lof(TreasureFile)/TreasureRecLen Then
    Call Display.Container.Line
    Out2="The container name was not found in the treasure file."
    Call ErrorStatusLine
    Exit Sub
 Endif
 Call Read.Record(TreasureFile,Temp2!)
 If TreasureRecord.Container=0 Then
    Call Display.Container.Line
    Out2="The container name was not found in the treasure file."
    Call ErrorStatusLine
    Exit Sub
 Endif
 Call Drop.Container.In.User(Temp2!)
 Out2="The container has been added to the user."
 TempX=False
 Call ShowUser
 Call ErrorStatusLine
 Container.Number=1
 Call DisplayUserContainerScreen
Error.Resume145b:
 Exit Sub
Error.Trap145b:
 Resume Error.Resume145b
End Sub

Sub Add.List.Node3(VarZ!)
 On Local Error Goto ErrorTrp27b
 If UserRecord2.First=SFalse Then
    UserRecord2.First=VarZ!
    UserRecord2.Last=VarZ!
    Call Write.Record(UserFile2,User.Number)
    MessWorkRecord6.Prev=SFalse
    MessWorkRecord6.Next=SFalse
    Call Write.Record(UserInvFile,VarZ!)
    Exit Sub
 Endif
 MessWorkRecord6.Prev=UserRecord2.Last
 MessWorkRecord6.Next=SFalse
 Call Write.Record(UserInvFile,VarZ!)
 Call Read.Record(UserInvFile,UserRecord2.Last)
 MessWorkRecord6.Next=VarZ!
 Call Write.Record(UserInvFile,UserRecord2.Last)
 Call Read.Record(UserInvFile,VarZ!)
 UserRecord2.Last=VarZ!
 Call Write.Record(UserFile2,User.Number)
ErrorRsm27b:
 Exit Sub
ErrorTrp27b:
 Resume ErrorRsm27b
End Sub

Sub Drop.Container.In.User(Var2!)
 On Local Error Goto ErrTrap48a
 VarA!=Lof(ContainerFile)/ContainerRecLen+1!
 Call Clear.Container
 ContainerRecord.ContainerName=TreasureRecord.TreasureName
 ContainerRecord.ContainerShort=TreasureRecord.ShortName
 ContainerRecord.ContainerMax=TreasureRecord.ContainerMax
 ContainerRecord.NamePrefix=TreasureRecord.ContainerPrefix
 ContainerRecord.Prefix1=TreasureRecord.Prefix1
 ContainerRecord.Size=TreasureRecord.ContainerSize
 ContainerRecord.Material=TreasureRecord.ContainerMaterial
 ContainerRecord.InvisibleContainer=Yes
 If TreasureRecord.KeyNumber Then
    ContainerRecord.KeyNumber=TreasureRecord.KeyNumber
    ContainerRecord.Closed=True
    ContainerRecord.Locked=True
 Endif
 If TreasureRecord.Locked Then
    ContainerRecord.Closed=True
    ContainerRecord.Locked=True
 Endif
 ContainerRecord.RoomNumber=SFalse
 ContainerRecord.UserNumber=User.Number
 ContainerRecord.WithinContainer=SFalse
 ContainerRecord.Weight=TreasureRecord.Weight
 ContainerRecord.ContainerIndex=Abs(Var2!)
 ContainerRecord.Disappears=TreasureRecord.ContainerDisappears
 ContainerRecord.SelfImplodes=TreasureRecord.ContainerSelfImplodes
 ContainerRecord.Permanent=TreasureRecord.Permanent
 ContainerRecord.First=SFalse
 ContainerRecord.Last=SFalse
 ContainerRecord.SwapFlag=SFalse
 ContainerRecord.Scanned=False
 For VarR=1 To 3
    ContainerRecord.RestrictItem(VarR)=TreasureRecord.RestrictItem(VarR)
 Next
 ContainerRecord.TrapType=TreasureRecord.TrapType
 ContainerRecord.TrapHits=TreasureRecord.TrapHits
 ContainerRecord.TrapItem=TreasureRecord.TrapItem
 Call Write.Record(ContainerFile,VarA!)
 Call Add.User.Container(VarA!)
ErrResume48a:
 Exit Sub
ErrTrap48a:
 Resume ErrResume48a
End Sub

Sub Add.User.Container(VarA!)
 On Local Error Goto ErrResume141g
 ' add container to users.dat list
 Call Read.Record(UserFile2,User.Number)
 ContainerRecord.SwapFlag=False
 If UserRecord2.First2=SFalse Then
    UserRecord2.First2=VarA!
    UserRecord2.Last2=VarA!
    Call Write.Record(UserFile2,User.Number)
    ContainerRecord.Prev=SFalse
    ContainerRecord.Next=SFalse
    Call Write.Record(ContainerFile,VarA!)
 Else
    ContainerRecord.Prev=UserRecord2.Last2
    ContainerRecord.Next=SFalse
    Call Write.Record(ContainerFile,VarA!)
    Call Read.Record(ContainerFile,UserRecord2.Last2)
    ContainerRecord.Next=VarA!
    Call Write.Record(ContainerFile,UserRecord2.Last2)
    Call Read.Record(ContainerFile,VarA!)
    UserRecord2.Last2=VarA!
    Call Write.Record(UserFile2,User.Number)
 Endif
ErrExit141g:
 Exit Sub
ErrResume141g:
 Resume ErrExit141g
End Sub

Sub Clear.Container
 On Local Error Goto ErrTrap46
 ContainerRecord.ContainerName=Nul
 ContainerRecord.ContainerShort=Nul
 ContainerRecord.NamePrefix="in it"
 ContainerRecord.ContainerMax=False
 ContainerRecord.Closed=False
 ContainerRecord.Locked=False
 ContainerRecord.KeyNumber=SFalse
 ContainerRecord.UserNumber=SFalse
 ContainerRecord.RoomNumber=SFalse
 ContainerRecord.DeletedContainer=False
 ContainerRecord.InvisibleContainer=False
 ContainerRecord.Weight=False
 ContainerRecord.WithinContainer=SFalse
 ContainerRecord.Disappears=SFalse
 ContainerRecord.ContainerIndex=SFalse
 ContainerRecord.Size=False
 ContainerRecord.Material=False
 ContainerRecord.Permanent=False
 ContainerRecord.SelfImplodes=False
 ContainerRecord.First=SFalse
 ContainerRecord.Last=SFalse
 ContainerRecord.First2=SFalse
 ContainerRecord.Last2=SFalse
 ContainerRecord.Prefix1=""
 ContainerRecord.Damaged=False
 ContainerRecord.Scanned=False
ErrResume46:
 Exit Sub
ErrTrap46:
 Resume ErrResume46
End Sub

Sub SearchUserTreasure
 On Local Error Goto Error.Trap146
 Strng=Nul
 Out2="^ Cursor Edit "+Chr$(60)+Chr$(217)+" Exit Field  "
 Out2=Out2+"Append # sign and number for duplicate treasure"
 Call StatusLine
 Call ANSI(4,33,44)
 Call ANSI(2,23,2)
 Strng="Enter Treasure Name or Number: "
 Call Scrn(Strng)
 Call ANSI(4,37,40)
 Call ANSI(2,23,33)
 Strng=Space$(30)
 Call Scrn(Strng)
 Restore Data16A
 Read Xcoor, Ycoor, Column, Line.Length, Row, Max.Lines, Line.Number
 Edit.Data(1)=Nul
 Call ScreenEdit
 Temp2!=Int(Val(Edit.Data(1)))
 Temp$=Lcase$(Edit.Data(1))
 Temp.Index=SFalse
 Temp1=Instr(Temp$,"#")
 If Temp1 Then
    Temp.Index=Csng(Int(Val(Mid$(Temp$,Temp1+1))))
    Temp$=Left$(Temp$,Temp1-1)
 Endif
 If Temp2!<=SFalse Or Temp2!>Lof(TreasureFile)/TreasureRecLen Then
    Temp2!=SFalse
 Endif
 If Temp2!=SFalse Then
    Temp4=Len(Temp$)
    Temp3!=SFalse
    For Temp5!=1! To Lof(TreasureFile)/TreasureRecLen
       Call Read.Record(TreasureFile,Temp5!)
       If TreasureRecord.Container=False Then
          Out3=Rtrim$(TreasureRecord.TreasureName)
          Call InstrSUB(TempX,Out3,Temp$)
          If TempX Then
             Temp3!=Temp3!+1!
             If Temp3!=Temp.Index Or Temp.Index=SFalse Then
                Temp2!=Temp5!
                Exit For
             Endif
          Endif
       Endif
    Next
 Endif
 If Temp2!=SFalse Then
    Call Display.Container.Line
    Out2="The treasure name was not found in the treasure file."
    Call ErrorStatusLine
    Exit Sub
 Endif
 Treasure.Number=Temp2!
 Treasure.Index=Temp2!
 Call ShowUserTreasure
 Call Display.Container.Line
 Out2="To exit treasure search display,"
 Call ErrorStatusLine
 Treasure.Number=1!
 Call DisplayUserTreasureScreen
Error.Resume146:
 Exit Sub
Error.Trap146:
 Resume Error.Resume146
End Sub

Sub SearchUserObject
 On Local Error Goto Error.Trap146a
 Strng=Nul
 Out2="^ Cursor Edit "+Chr$(60)+Chr$(217)+" Exit Field  "
 Out2=Out2+"Append # sign and number for duplicate object"
 Call StatusLine
 Call ANSI(4,33,44)
 Call ANSI(2,23,2)
 Strng="Enter Object Name or Number: "
 Call Scrn(Strng)
 Call ANSI(4,37,40)
 Call ANSI(2,23,31)
 Strng=Space$(30)
 Call Scrn(Strng)
 Restore Data16B
 Read Xcoor, Ycoor, Column, Line.Length, Row, Max.Lines, Line.Number
 Edit.Data(1)=Nul
 Call ScreenEdit
 Temp2!=Int(Val(Edit.Data(1)))
 Temp$=Lcase$(Edit.Data(1))
 Temp.Index=SFalse
 Temp1=Instr(Temp$,"#")
 If Temp1 Then
    Temp.Index=Csng(Int(Val(Mid$(Temp$,Temp1+1))))
    Temp$=Left$(Temp$,Temp1-1)
 Endif
 If Temp2!<=SFalse Or Temp2!>Lof(ObjectFile)/ObjectRecLen Then
    Temp2!=SFalse
 Endif
 If Temp2!=SFalse Then
    Temp4=Len(Temp$)
    Temp3!=SFalse
    For Temp5!=1! To Lof(ObjectFile)/ObjectRecLen
       Call Read.Record(ObjectFile,Temp5!)
       Out3=Rtrim$(ObjectRecord.ObjectName)
       Call InstrSUB(TempX,Out3,Temp$)
       If TempX Then
          Temp3!=Temp3!+1!
          If Temp3!=Temp.Index Or Temp.Index=SFalse Then
             Temp2!=Temp5!
             Exit For
          Endif
       Endif
    Next
 Endif
 If Temp2!=SFalse Then
    Call Display.Container.Line
    Out2="The object name was not found in the object file."
    Call ErrorStatusLine
    Exit Sub
 Endif
 Object.Number=Temp2!
 Object.Index=Temp2!
 Call ShowUserObject
 Call Display.Container.Line
 Out2="To exit object search display,"
 Call ErrorStatusLine
 Object.Number=1!
 Call DisplayUserObjectScreen
Error.Resume146a:
 Exit Sub
Error.Trap146a:
 Resume Error.Resume146a
End Sub

Sub SearchUserContainer
 On Local Error Goto Error.Trap146b
 Strng=Nul
 Out2="^ Cursor Edit "+Chr$(60)+Chr$(217)+" Exit Field  "
 Out2=Out2+"Append # sign and number for duplicate containers"
 Call StatusLine
 Call ANSI(4,33,44)
 Call ANSI(2,23,2)
 Strng="Enter Container Name or Number: "
 Call Scrn(Strng)
 Call ANSI(4,37,40)
 Call ANSI(2,23,34)
 Strng=Space$(30)
 Call Scrn(Strng)
 Restore Data16C
 Read Xcoor, Ycoor, Column, Line.Length, Row, Max.Lines, Line.Number
 Edit.Data(1)=Nul
 Call ScreenEdit
 Temp2!=Int(Val(Edit.Data(1)))
 Temp$=Lcase$(Edit.Data(1))
 Temp.Index=SFalse
 Temp1=Instr(Temp$,"#")
 If Temp1 Then
    Temp.Index=Csng(Int(Val(Mid$(Temp$,Temp1+1))))
    Temp$=Left$(Temp$,Temp1-1)
 Endif
 If Temp2!<=SFalse Or Temp2!>Lof(ContainerFile)/ContainerRecLen Then
    Temp2!=SFalse
 Endif
 If Temp2!=SFalse Then
    Temp4=Len(Temp$)
    Temp3!=SFalse
    For Temp5!=1! To Lof(ContainerFile)/ContainerRecLen
       Call Read.Record(ContainerFile,Temp5!)
       If Container.DeletedContainer=False Then
          If ContainerRecord.WithinContainer=SFalse Then
             Out3=Rtrim$(ContainerRecord.ContainerName)
             Call InstrSUB(TempX,Out3,Temp$)
             If TempX Then
                Temp3!=Temp3!+1!
                If Temp3!=Temp.Index Or Temp.Index=SFalse Then
                   Temp2!=Temp5!
                   Exit For
                Endif
             Endif
          Endif
       Endif
    Next
 Endif
 If Temp2!=SFalse Then
    Call Display.Container.Line
    Out2="The container name was not found in the container file."
    Call ErrorStatusLine
    Exit Sub
 Endif
 Container.Number=Temp2!
 Container.Index=Temp2!
 Call ShowUserContainer
 Call Display.Container.Line
 Out2="To exit container search display,"
 Call ErrorStatusLine
 Container.Number=1!
 Call DisplayUserContainerScreen
Error.Resume146b:
 Exit Sub
Error.Trap146b:
 Resume Error.Resume146b
End Sub

Sub PreviousUserTreasure
 On Local Error Goto Error.Trap147
 If Treasure.Number<=1! Then
    Out2="That is the first or only treasure. Can't cursor up."
    Call ErrorStatusLine
    Exit Sub
 Endif
 Treasure.Number=Treasure.Number-1!
 Call DisplayUserTreasureScreen
Error.Resume147:
 Exit Sub
Error.Trap147:
 Resume Error.Resume147
End Sub

Sub PreviousUserObject
 On Local Error Goto Error.Trap147a
 If Object.Number<=1! Then
    Out2="That is the first or only object. Can't cursor up."
    Call ErrorStatusLine
    Exit Sub
 Endif
 Object.Number=Object.Number-1!
 Call DisplayUserObjectScreen
Error.Resume147a:
 Exit Sub
Error.Trap147a:
 Resume Error.Resume147a
End Sub

Sub PreviousUserContainer
 On Local Error Goto Error.Trap147b
 If Container.Number<=1! Then
    Out2="That is the first or only container. Can't cursor up."
    Call ErrorStatusLine
    Exit Sub
 Endif
 Container.Number=Container.Number-1!
 Call DisplayUserContainerScreen
Error.Resume147b:
 Exit Sub
Error.Trap147b:
 Resume Error.Resume147b
End Sub

Sub NextUserTreasure
 On Local Error Goto Error.Trap148
 Call GetUserTreasure
 If Treasure.Number>=User.Treasure Then
    Out2="That is the last or only treasure. Can't cursor down."
    Call ErrorStatusLine
 Else
    Treasure.Number=Treasure.Number+1!
    Call DisplayUserTreasureScreen
 Endif
Error.Resume148:
 Exit Sub
Error.Trap148:
 Resume Error.Resume148
End Sub

Sub NextUserObject
 On Local Error Goto Error.Trap148a
 Call GetUserObject
 If Object.Number>=User.Object Then
    Out2="That is the last or only object. Can't cursor down."
    Call ErrorStatusLine
 Else
    Object.Number=Object.Number+1!
    Call DisplayUserObjectScreen
 Endif
Error.Resume148a:
 Exit Sub
Error.Trap148a:
 Resume Error.Resume148a
End Sub

Sub NextUserContainer
 On Local Error Goto Error.Trap148b
 Call GetUserContainer
 If Container.Number>=User.Containers Then
    Out2="That is the last or only container. Can't cursor down."
    Call ErrorStatusLine
 Else
    Container.Number=Container.Number+1!
    Call DisplayUserContainerScreen
 Endif
Error.Resume148b:
 Exit Sub
Error.Trap148b:
 Resume Error.Resume148b
End Sub

Sub UserTreasureStatusLine
 On Local Error Goto Error.Trap149
 Strng="^ Cursor Select <esc> Exit Treasure Display"
 Out2="^d Delete Treasure ^a Add Treasure ^w Search Treasure"
 Call StatusLine
Error.Resume149:
 Exit Sub
Error.Trap149:
 Resume Error.Resume149
End Sub

Sub UserObjectStatusLine
 On Local Error Goto Error.Trap149a
 Strng="^ Cursor Select <esc> Exit Object Display"
 Out2="^d Delete Object ^a Add Object ^w Search Object"
 Call StatusLine
Error.Resume149a:
 Exit Sub
Error.Trap149a:
 Resume Error.Resume149a
End Sub

Sub UserContainerStatusLine
 On Local Error Goto Error.Trap149b
 Strng="^ Cursor Select <esc> Exit Container Display"
 Call Search.Mess.File(User.Number,User.Online)
 Out2=Nul
 If User.Online=False Then
    Out2="^d Delete Container ^a Add Container "
 Endif
 Out2=Out2+"^w Search Containers"
 Call StatusLine
Error.Resume149b:
 Exit Sub
Error.Trap149b:
 Resume Error.Resume149b
End Sub

Sub ShowUserTreasure
 On Local Error Goto Error.Trap150
 TempD=True
 Call ANSI(4,33,44)
 For Var=7 To 11
    Call ANSI(2,Var,30)
    Strng=Space$(50)
    Call Scrn(Strng)
 Next
 Call ANSI(2,6,45)
 Strng="Treasure Number"
 Call Scrn(Strng)
 Call ANSI(2,6,61)
 Strng=Space$(8)
 Call Scrn(Strng)
 Call ANSI(2,6,61)
 Strng=Str$(Treasure.Number)
 Call Scrn(Strng)
 Call ANSI(4,37,40)
 Call Read.Record(TreasureFile,Treasure.Index)
 Call ANSI(4,37,44)
 Call ANSI(2,7,34)
 Strng="Name:"
 Call Scrn(Strng)
 If Treasure.Index>SFalse Then
    Strng=Left$(TreasureRecord.TreasureName,20)
    Call Scrn(Strng)
 Endif
 Call ANSI(2,8,34)
 Strng="Identifier:"
 Call Scrn(Strng)
 If Treasure.Index>SFalse Then
    Strng=Left$(TreasureRecord.ShortName,14)
    Strng=Lcase$(Strng)
    Call Scrn(Strng)
 Endif
 Call ANSI(2,9,34)
 Strng="Weight:"
 Call Scrn(Strng)
 If Treasure.Index>SFalse Then
    Strng=Mid$(Str$(TreasureRecord.Weight),2)
    Call Scrn(Strng)
 Endif
 Call ANSI(2,10,34)
 Strng="Value:"
 Call Scrn(Strng)
 If Treasure.Index>SFalse Then
    VarX#=TreasureRecord.Gold
    Strng=Str$(VarX#)
    'Call Extend.Amount2(VarX#,Strng)
    Call Scrn(Strng)
 Endif
 Call ANSI(2,11,34)
 Strng="Hits:"
 Call Scrn(Strng)
 If Treasure.Index>SFalse Then
    Strng=Mid$(Str$(Abs(TreasureRecord.Plus)),2)
    Call Scrn(Strng)
 Endif
 Call ANSI(2,7,60)
 Strng="Coins:"
 Call Scrn(Strng)
 If Treasure.Index>SFalse Then
    If TreasureRecord.Coin Then
       Call Scrn("Yes")
    Else
       Call Scrn("No")
    Endif
 Endif
 Call ANSI(2,8,60)
 Strng="Potion:"
 Call Scrn(Strng)
 If Treasure.Index>SFalse Then
    If TreasureRecord.Potion Then
       Call Scrn("Yes")
    Else
       Call Scrn("No")
    Endif
 Endif
 Call ANSI(2,9,60)
 Strng="Scroll:"
 Call Scrn(Strng)
 If Treasure.Index>SFalse Then
    If TreasureRecord.Scroll Then
       Call Scrn("Yes")
    Else
       Call Scrn("No")
    Endif
 Endif
 Call ANSI(2,10,60)
 Strng="Invisible:"
 Call Scrn(Strng)
 If Treasure.Index>SFalse Then
    If TreasureRecord.Invisible Then
       Call Scrn("Yes")
    Else
       Call Scrn("No")
    Endif
 Endif
 Call ANSI(2,11,60)
 Strng="Key Number:"
 Call Scrn(Strng)
 If Treasure.Index>SFalse Then
    If TreasureRecord.MasterKey Then
       Strng="<master>"
    Else
       If TreasureRecord.KeyNumber>SFalse Then
          Strng=Right$(Str$(TreasureRecord.KeyNumber+1000000!),6)
       Else
          Strng="0"
       Endif
    Endif
    Call Scrn(Strng)
 Endif
Error.Resume150:
 Exit Sub
Error.Trap150:
 Resume Error.Resume150
End Sub

Sub ShowUserObject
 On Local Error Goto Error.Trap118a
 TempD=True
 Call ANSI(4,33,44)
 For Var=7 To 11
    Call ANSI(2,Var,30)
    Strng=Space$(50)
    Call Scrn(Strng)
 Next
 Call ANSI(2,6,45)
 Strng="Object Number"
 Call Scrn(Strng)
 Call ANSI(2,6,59)
 Strng=Space$(8)
 Call Scrn(Strng)
 Call ANSI(2,6,59)
 Strng=Str$(Object.Number)
 Call Scrn(Strng)
 Call ANSI(4,37,40)
 Call Read.Record(ObjectFile,Object.Index)
 Call ANSI(4,37,44)
 Call ANSI(2,7,34)
 Strng="Name:"
 Call Scrn(Strng)
 If Object.Index>SFalse Then
    Strng=Left$(ObjectRecord.ObjectName,20)
    Call Scrn(Strng)
 Endif
 Call ANSI(2,8,34)
 Strng="Identifier:"
 Call Scrn(Strng)
 If Object.Index>SFalse Then
    Strng=Left$(ObjectRecord.ShortName,14)
    Strng=Lcase$(Strng)
    Call Scrn(Strng)
 Endif
 Call ANSI(2,9,34)
 Strng="Room Links:"
 Call Scrn(Strng)
 If Object.Index>SFalse Then
    Strng=Mid$(Str$(ObjectRecord.RoomLink1),2)+","
    Call Scrn(Strng)
    Strng=Mid$(Str$(ObjectRecord.RoomLink2),2)
    Call Scrn(Strng)
 Endif
 Call ANSI(2,10,34)
 Strng="Permanent:"
 Call Scrn(Strng)
 If Object.Index>SFalse Then
    If ObjectRecord.Permanent Then
       Call Scrn("Yes")
    Else
       Call Scrn("No")
    Endif
 Endif
 Call ANSI(2,11,34)
 Strng="Hiding:"
 Call Scrn(Strng)
 If Object.Index>SFalse Then
    If MessWorkRecord6.Plus=Hidden.Object Then
       Call Scrn("Yes")
    Else
       Call Scrn("No")
    Endif
 Endif
 Call ANSI(2,7,60)
 Strng="Hidden:"
 Call Scrn(Strng)
 If Object.Index>SFalse Then
    If ObjectRecord.Hidden Then
       Call Scrn("Yes")
    Else
       Call Scrn("No")
    Endif
 Endif
 Call ANSI(2,8,60)
 Strng="Invisible:"
 Call Scrn(Strng)
 If Object.Index>SFalse Then
    If ObjectRecord.Invisible Then
       Call Scrn("Yes")
    Else
       Call Scrn("No")
    Endif
 Endif
 Call ANSI(2,9,60)
 Strng="Trapped:"
 Call Scrn(Strng)
 If Object.Index>SFalse Then
    If ObjectRecord.JailTrap Then
       Call Scrn("Yes")
    Else
       Call Scrn("No")
    Endif
 Endif
 Call ANSI(2,10,60)
 Strng="Locked:"
 Call Scrn(Strng)
 If Object.Index>SFalse Then
    If ObjectRecord.DoorLock>1 Then
       Call Scrn("Yes")
    Else
       Call Scrn("No")
    Endif
 Endif
 Call ANSI(2,11,60)
 Strng="Relocks:"
 Call Scrn(Strng)
 If Object.Index>SFalse Then
    If ObjectRecord.Relocks Then
       Call Scrn("Yes")
    Else
       Call Scrn("No")
    Endif
 Endif
Error.Resume118a:
 Exit Sub
Error.Trap118a:
 Resume Error.Resume118a
End Sub

Sub ShowUserContainer
 On Local Error Goto Error.Trap150b
 TempD=True
 Call ANSI(4,33,44)
 For Var=7 To 11
    Call ANSI(2,Var,30)
    Strng=Space$(50)
    Call Scrn(Strng)
 Next
 Call ANSI(2,6,45)
 Strng="Container Number"
 Call Scrn(Strng)
 Call ANSI(2,6,62)
 Strng=Space$(8)
 Call Scrn(Strng)
 Call ANSI(2,6,62)
 Strng=Str$(Container.Number)
 Call Scrn(Strng)
 Call ANSI(4,37,44)
 Call ANSI(2,7,34)
 Strng="Name:"
 Call Scrn(Strng)
 If Container.Index>SFalse Then
    Strng=Left$(ContainerRecord.ContainerName,20)
    Call Scrn(Strng)
 Endif
 Call ANSI(2,8,34)
 Strng="Identifier:"
 Call Scrn(Strng)
 If Container.Index>SFalse Then
    Strng=Left$(ContainerRecord.ContainerShort,14)
    Strng=Lcase$(Strng)
    Call Scrn(Strng)
 Endif
 Call ANSI(2,9,34)
 Strng="Weight:"
 Call Scrn(Strng)
 If Container.Index>SFalse Then
    Strng=Mid$(Str$(ContainerRecord.Weight),2)
    Call Scrn(Strng)
 Endif
 Call ANSI(2,10,34)
 Strng="Prefix:"
 Call Scrn(Strng)
 If Container.Index>SFalse Then
    Strng=Left$(ContainerRecord.NamePrefix,14)
    Strng=Lcase$(Strng)
    Call Scrn(Strng)
 Endif
 Call ANSI(2,11,34)
 Strng="Max:"
 Call Scrn(Strng)
 If Container.Index>SFalse Then
    If ContainerRecord.ContainerMax=True Then
       Strng="<unlimited>"
    Else
       If ContainerRecord.ContainerMax Then
          Strng=Mid$(Str$(ContainerRecord.ContainerMax),2)
       Else
          Strng="<n/a>"
       Endif
    Endif
    Call Scrn(Strng)
 Endif
 Call ANSI(2,7,60)
 Strng="Size:"
 Call Scrn(Strng)
 If Container.Index>SFalse Then
    Select Case ContainerRecord.Size
    Case 1
       Strng="small"
    Case 2
       Strng="medium"
    Case 3
       Strng="large"
    Case Else
       Strng="any"
    End Select
    Call Scrn(Strng)
 Endif
 Call ANSI(2,8,60)
 Strng="Trap:"
 Call Scrn(Strng)
 If Container.Index>SFalse Then
    If ContainerRecord.TrapType Then
       Call Scrn("Yes")
    Else
       Call Scrn("No")
    Endif
 Endif
 Call ANSI(2,9,60)
 Strng="Damaged:"
 Call Scrn(Strng)
 If Container.Index>SFalse Then
    If ContainerRecord.Damaged Then
       Call Scrn("Yes")
    Else
       Call Scrn("No")
    Endif
 Endif
 Call ANSI(2,10,60)
 Strng="Invisible:"
 Call Scrn(Strng)
 If Container.Index>SFalse Then
    If ContainerRecord.InvisibleContainer Then
       Call Scrn("Yes")
    Else
       Call Scrn("No")
    Endif
 Endif
 Call ANSI(2,11,60)
 Strng="Key Number:"
 Call Scrn(Strng)
 If Container.Index>SFalse Then
    If ContainerRecord.KeyNumber>SFalse Then
       Strng=Right$(Str$(ContainerRecord.KeyNumber+1000000!),6)
    Else
       Strng="0"
    Endif
    Call Scrn(Strng)
 Endif
Error.Resume150b:
 Exit Sub
Error.Trap150b:
 Resume Error.Resume150b
End Sub

Sub Clear.List.Node
 On Local Error Goto ErrorTrp32d
 MessWorkRecord6.User=SFalse
 MessWorkRecord6.Room=SFalse
 MessWorkRecord6.Index=SFalse
 MessWorkRecord6.Charges=False
 MessWorkRecord6.Plus=False
 MessWorkRecord6.Prev=SFalse
 MessWorkRecord6.Next=SFalse
ErrorRsm32d:
 Exit Sub
ErrorTrp32d:
 Resume ErrorRsm32d
End Sub

Sub Display.Container.Line
 Call ANSI(4,33,44)
 Call ANSI(2,2,61)
 Strng="Containers"
 Call Scrn(Strng)
 Call ANSI(2,2,72)
 Strng=Space$(8)
 Call Scrn(Strng)
 Call ANSI(2,2,72)
 Strng=Mid$(Str$(User.Containers),2)
 Call Scrn(Strng)
End Sub

Data15A:
 Data 23,33,33,30,23,1,1

Data15B:
 Data 23,31,31,30,23,1,1

Data16A:
 Data 23,33,33,30,23,1,1

Data16B:
 Data 23,31,31,30,23,1,1

' Xcoor, Ycoor, Column, Line.Length, Max.Lines, Row, Line.Number
UserEditData:
 Data 4,2,2,30,1,4,1
 Data 6,2,2,30,1,6,1
 Data 8,2,2,5,1,8,1
 Data 10,2,2,8,1,10,1
 Data 11,18,18,1,1,11,1
 Data 12,29,29,1,1,12,1
 Data 13,12,12,7,1,13,1
 Data 15,2,2,20,1,15,1
 Data 16,30,30,1,1,16,1
 Data 17,7,7,3,1,17,1
 Data 17,17,17,3,1,17,1
 Data 17,27,27,3,1,17,1
 Data 17,41,41,3,1,17,1
 Data 19,10,10,5,1,19,1
 Data 19,25,25,5,1,19,1
 Data 19,37,37,5,1,19,1
 Data 21,17,17,5,1,21,1
 Data 3,54,54,22,1,3,1
 Data 5,55,55,22,1,5,1
 Data 7,61,61,5,1,7,1
 Data 9,59,59,5,1,9,1
 Data 11,63,63,5,1,11,1
 Data 13,57,57,5,1,13,1
 Data 15,60,60,5,1,15,1
 Data 17,63,63,5,1,17,1
 Data 19,56,56,5,1,19,1
 Data 21,59,59,5,1,21,1

UserEditData2:
 Data 13,20,20,7,1,13,1

Data15C:
 Data 23,34,34,30,23,1,1
Data16C:
 Data 23,34,34,30,23,1,1

Sub Extend.Amount2(Var#,Var$)
 VarX$=Ltrim$(Str$(Var#)) ' 1.111D308
 V=Instr(VarX$,"D")
 If V Then
    If Mid$(VarX$,2,1)="." Then
       VarX$=Left$(VarX$,1)+Mid$(VarX$,V)
    Endif
    Var$=" "+VarX$
 Else
    Var$=" "+Format$(Var#,"#,##0;;")
 Endif
End Sub
