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();

Options.GetTab override

function TRSOptions.GetTab(): ERSOptionsTab; override;

Override that basically sets the cached zoom level when the display tab is open.

E.g., when the bank is open, all gametab buttons are hidden but you have the inventory open.

Example:

WriteLn GameTabs.GetCurrent();

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);

Minimap.SetZoomToPoint override

function TRSMinimap.SetZoomToPoint(pt: TPoint; randomness: Integer = 0): Boolean; override;

Overrides Minimap.SetZoomToPoint to truncate the minimum and maximum zoom at Antiban.Zoom level.


Options.SetZoomLevel override

function TRSOptions.SetZoomLevel(level: Int32): Boolean; override;

Overrides Options.SetZoomLevel to also set the RSMouseZoom ZoomLevel.


ScriptForm.OnStart override

procedure TScriptForm.OnStart(sender: TLazObject); override;

Overrides TScriptForm.OnStart to perform certain tasks when the script starts running, e.g. start the Simba Recorder