# Collection Box Methods to interact with the collection box interface. ```{figure} ../../images/collectionbox_interface.png ``` - - - ## ERSCollectButton ```pascal ERSCollectButton = enum(INVENTORY, BANK); ``` Enum representing the {ref}`Collection Box` buttons. - - - ## ERSCollectSlots ```pascal ERSCollectSlots = enum(STATUS, OPERATION, THUMBNAIL, ITEM, CHANGE); ``` Enum representing the {ref}`Collection Box` slot slots. The {ref}`Collection Box`, like the {ref}`Grand Exchange` has 8 slots available, Each of those slots, has it's own 5 small slots which is what this represents: ```{figure} ../../images/collectionbox_subslots.png ``` - - - ## TRSCollectionBox Main record to interact with the {ref}`Collection Box` interface. - - - ## CollectionBox.SetupInterface ```pascal procedure TRSCollectionBox.SetupInterface(); ``` Internal method used to setup the {ref}`TRSCollectionBox` coordinates. This is automatically called for you on the {ref}`CollectionBox variable`. - - - ## CollectionBox.IsOpen ```pascal function TRSCollectionBox.IsOpen(): Boolean; ``` Returns true if the collection box is open. Example: ```pascal WriteLn CollectionBox.IsOpen(); ``` - - - ## CollectionBox.WaitOpen ```pascal function TRSCollectionBox.WaitOpen(time: Integer = 600; interval: Integer = -1): Boolean; ``` Returns true if the collection box opens within `time` milliseconds.. Example: ```pascal WriteLn CollectionBox.WaitOpen(); ``` - - - ## CollectionBox.HasChange ```pascal function TRSCollectionBox.HasChange(slot: Integer): Boolean; ``` Returns true if the specified collection box `slot` has change. Example: ```pascal WriteLn CollectionBox.HasChange(0); ``` - - - ## CollectionBox.CollectSlot ```pascal function TRSCollectionBox.CollectSlot(slot: Integer; button: ERSCollectButton = ERSCollectButton.INVENTORY): Boolean; ``` Attempts to collect the item and change of the specified collection box `slot`. By default it attempts to collect things to your inventory, you can change it to the bank with the `button` parameter. Example: ```pascal WriteLn CollectionBox.CollectSlot(0); ``` - - - ## CollectionBox variable Global {ref}`TRSCollectionBox` variable.