# DepositBox DepositBox interface. - - - ## ERSDPButtons ```pascal ERSDPButtons = enum(WORN, LOOT, INVENTORY); ``` Enum representing the 3 main deposit buttons of the {ref}`DepositBox` interface. - - - ## TRSDepositBox Main record to interact with the {ref}`DepositBox` interface. - - - ## DepositBox.SetupInterface ```pascal procedure TRSDepositBox.SetupInterface; ``` Initializes depositbox variables. ```{note} This is automatically called on the **DepositBox** variable. ``` - - - ## DepositBox.IsOpen ```pascal function TRSDepositBox.IsOpen(): Boolean; ``` Returns true if the {ref}`DepositBox` interface is open. Example: ```pascal WriteLn DepositBox.IsOpen(); ``` - - - ## DepositBox.WaitOpen ```pascal function TRSDepositBox.WaitOpen(time: Integer; interval: Integer = -1): Boolean; ``` Returns true if the {ref}`DepositBox` is open within `time` milliseconds. ## Example: ```pascal WriteLn DepositBox.WaitOpen(); ``` - - - ## DepositBox.Close ```pascal function TRSDepositBox.Close(escape: Boolean): Boolean; function TRSDepositBox.Close(escapeProbability: Single = 0): Boolean; overload; ``` Closes the depositbox interface. Depending on `escape` or `escapeProbability the function will either click the button or press escape key. Example: ```pascal WriteLn DepositBox.Close(); ``` - - - ## DepositBox variable Global {ref}`TRSDepositBox` variable.