Overrides¶
Several final overrides to add some final behaviour to certain methods. This is the very last file being included in the library.
RSClient.IsLoggedIn override¶
function TRSClient.IsLoggedIn(): Boolean; override;
Checks for a bunch of game settings when being logged in returns true.
These settings are checked at least once and WaspLib and cache the results so we don’t check it again unless for some reason is needed.
These ensures things like:
The mainscreen is set to the highest pitch
The client has max brightness set
The roofs are hidden
XPBar is set properly (this check can fail and more checks will be done).
Example:
WriteLn RSClient.IsLoggedIn();
GameTabs.GetCurrent override¶
function TRSGameTabs.GetCurrent(): ERSGameTab; override;
Override that handles several scenarios where the “current” gametab is not visible.
E.g., when the bank is open, all gametab buttons are hidden but you have the inventory open.
Example:
WriteLn GameTabs.GetCurrent();
GameTabs.Open override;¶
function TRSGameTabs.Open(tab: ERSGameTab): Boolean; override;
Overrides GameTabs.Open to close the bank if the bank open.
HouseOptions.Open override¶
function TRSHouseOptions.Open(): Boolean; override;
Attempts to open the house options on the options gametab.
Since HouseOptions depends on Options, an override is necessary.
Example:
WriteLn HouseOptions.Open();
WorldSwitcher.Open override¶
function TRSWorldSwitcher.Open(waitLoad: Boolean = True): Boolean; override;
Attempts to open the world switcher.
Since WorldSwitcher depends on Logout, this override is necessary.
Example:
WriteLn WorldSwitcher.Open();
Chat.LeveledUp override¶
function TRSChat.LeveledUp(): Boolean; override;
Returns true if we have the level up message on the chat box and attempts to
increment Stats Levels
variables.
Example:
if Chat.LeveledUp() then
Chat.ClickContinue(True);