# HouseOptions Methods to interact with the house options that live on the options gametab. ```{figure} ../../images/houseoptions.png ``` - - - ## ERSHouseOptionsButton ```pascal ERSHouseOptionsButton = enum(CLOSE, VIEWER, EXPEL, SERVANT, LEAVE); ``` It should be self explanatory what they represent. - - - ## TRSHouseOptions Main record responsible with interacting with the house options. - - - ## HouseOptions.SetupGameTab ```pascal procedure TRSHouseOptions.SetupGameTab(); ``` Internal method used to setup the {ref}`TRSHouseOptions` coordinates. This is automatically called for you on the {ref}`HouseOptions` variable. - - - ## TRSHouseOptions.Buttons ```pascal Buttons: TBoxArray; ``` `TBoxes` for each of the {ref}`HouseOptions` buttons. Example: ```pascal ShowOnTarget(HouseOptions.Buttons); ``` ```{figure} ../../images/houseoptions_buttons.png ``` You can also access each button with an index or, more conveniently, with a {ref}`ERSHouseOptionsButton`. Example: ```pascal ShowOnTarget(HouseOptions.Buttons[ERSHouseOptionsButton.VIEWER]); ``` ```{figure} ../../images/houseoptions_button.png ``` - - - ## HouseOptions.IsOpen ```pascal function TRSHouseOptions.IsOpen(): Boolean; ``` Returns True/False on whether the house options are open. Example: ```pascal WriteLn HouseOptions.IsOpen(); ``` - - - ## HouseOptions.WaitOpen ```pascal function TRSHouseOptions.WaitOpen(time: Integer = 600; interval: Integer = -1): Boolean; ``` Returns true if the house options open within `time` milliseconds. Example: ```pascal WriteLn HouseOptions.WaitOpen(); ``` - - - ## HouseOptions.Open ```pascal function TRSHouseOptions.Open(): Boolean; ``` Attempts to open the house options on the options gametab. This method is overriden after {ref}`Options`, for more information check {ref}`HouseOptions.Open override`. Example: ```pascal WriteLn HouseOptions.Open(); ``` - - - ## HouseOptions.Close ```pascal function TRSHouseOptions.Close(): Boolean; ``` Attempts to close the house options. Example: ```pascal WriteLn HouseOptions.Close(); ``` - - - ## HouseOptions.ExpelGuests ```pascal function TRSHouseOptions.ExpelGuests(): Boolean; ``` Attempts to expel guests through the house options button. Example: ```pascal WriteLn HouseOptions.ExpelGuests(); ``` - - - ## HouseOptions.CallServant ```pascal function TRSHouseOptions.CallServant(): Boolean; ``` Attempts to call the house servant through the house options button. For this to work you need to have a servant at your house and a [bell-pull](https://oldschool.runescape.wiki/w/Bell_pull_space). Example: ```pascal WriteLn HouseOptions.CallServant(); ``` - - - ## HouseOptions.LeaveHouse ```pascal function TRSHouseOptions.LeaveHouse(): Boolean; ``` Attempts to leave the house through the house options button. Example: ```pascal WriteLn HouseOptions.LeaveHouse(); ``` - - - ## HouseOptions variable Global {ref}`TRSHouseOptions` variable.