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

Sub Return.Object
 On Local Error Goto Error.Trap17
 If Parsed.Command1=Nul Then
    Strng="You aren't using that!"
    Call IO.O
    Exit Sub
 Endif
 TempC=False
 For Var=1 To MaxItems
    Var1!=UserRecord.Weapon(Var).Index
    If Var1! Then
       Call Read.Record(TreasureFile,Var1!)
       Out3=TreasureRecord.ShortName
       Out3=Left$(Out3,Len(Parsed.Command1))
       If Out3=Parsed.Command1 Then
          TempC=TempC+1
          If Parse.Temp=False Or TempC=Parse.Temp Then
             Out3=TreasureRecord.TreasureName
             Var2=UserRecord.Weapon(Var).Charges
             UserRecord.Weapon(Var).Index=SFalse
             UserRecord.Weapon(Var).Plus=False
             Out3=Lcase$(Out3)
             Out3=Rtrim$(Out3)
             Call Add.Inventory(Var1!,Var2)
             Out4=Rtrim$(TreasureRecord.Prefix1)
             Strng="You return "+Out4+Out3
             Call Convert.ANSI(True,VarQ,VarR)
             Carriage.Return=True
             Graphics.On=True
             Call IO.O
             Graphics.On=False
             Grpahics.Off=True
             Strng="."
             Call IO.O
             Exit Sub
          Endif
       Endif
    Endif
 Next
 Strng="Your aren't using that!"
 Call IO.O
Error.Resume17:
 Exit Sub
Error.Trap17:
 Resume Error.Resume17
End Sub
