Map Objects

This file is responsible for interacting with map objects.


TRSMapObject.Find

function TRSMapObject.Find(cuboidArray: TCuboidArray): T2DPointArray;

Internal TRSMapObject method responsible for filtering a TCuboidArray by what’s visible in the mainscren. This is meant to filter TRSMapObject.GetCuboidArray() so targets that are outside of the mainscreen are filtered out. You will probably never need to use this directly.


TRSMapObject.Visible

function TRSMapObject.Visible(cuboidArray: TCuboidArray): Boolean;

Internal TRSMapObject method that returns true or false if we have TCuboids visible on the mainscreen. You probably don’t need to use this directly.


TRSMapObject._UpTextCheck

function TRSMapObject._UpTextCheck(out shouldExit: Boolean): Boolean;

Internal TRSMapObject helper method that is used by all hovering methods. You probably don’t need to use this directly.


TRSMapObject._WalkUpTextCheck

function TRSMapObject._WalkUpTextCheck(out shouldExit: Boolean): Boolean;

Internal TRSMapObject helper method that is used by all walking hover methods. You probably don’t need to use this directly.


TRSMapObject._ClickHelper

function TRSMapObject._ClickHelper(leftClick: Boolean): Boolean;

Internal TRSMapObject helper method that is used by other clicking methods. You probably don’t need to use this directly.

This is what’s responsible for deciding if we click a target we are hovering or not.


TRSMapObject._SelectHelper

function TRSMapObject._SelectHelper(action: TStringArray): Boolean;

Internal TRSMapObject helper method that is used by other select methods. You probably don’t need to use this directly.

This is what is responsible for deciding if we just left click a target we are hovering or right click it and choose an option.


TRSObjectV2.Find

function TRSObjectV2.FindEx(out cuboids: TCuboidArray; out atpa: T2DPointArray): Boolean;
function TRSObjectV2.Find(out atpa: T2DPointArray): Boolean;
function TRSObjectV2.FindFromPosition(me: TPoint; out atpa: T2DPointArray): Boolean;

TRSObjectV2 method used to find a TRSObjectV2. If found returns true, if not returns false. The “extended” method in particular is mostly meant for debugging and is the one used when you call Debug(TRSMapObject).

Example:

WriteLn RSObjects.GEBank.Find(atpa); //Be in ge and with a walker setup there.
Debug(atpa);

TRSObjectV2.Draw

procedure TRSMapObject.Draw(out bitmap: TMufasaBitmap);

Helper method to debug TRSMapObjects used in Debug(TRSMapObject).


TRSObjectV2.Find

function TRSObjectV2.FindEx(out cuboids: TCuboidArray; out atpa: T2DPointArray): Boolean;
function TRSObjectV2.Find(out atpa: T2DPointArray): Boolean;
function TRSObjectV2.FindFromPosition(me: TPoint; out atpa: T2DPointArray): Boolean;

TRSObjectV2 method used to find a TRSObjectV2. If found returns true, if not returns false. The “extended” method in particular is mostly meant for debugging and is the one used when you call Debug(TRSMapObject).

Example:

WriteLn RSObjects.GEBank.Find(atpa); //Be in ge and with a walker setup there.
Debug(atpa);

TRSObjectV2.Draw

procedure TRSMapObject.Draw(out bitmap: TMufasaBitmap);

Helper method to debug TRSMapObjects used in Debug(TRSMapObject).


TRSMapObject.IsVisible

function TRSMapObject.IsVisible(): Boolean;

TRSMapObject method used to find a TRSMapObject. If found returns true, if not returns false.

Example:

WriteLn RSObjects.GEBank.IsVisible(); //Be in ge and with a walker setup there.

TRSMapObject._UpdateTarget

procedure TRSMapObject._UpdateTarget(sender: PMouse; var x, y: Double; var done: Boolean);

Internal helper method of TMouseMovingEventEx type used to update the target position while the mouse is moving. You should probably not touch this if you don’t understand it.


TRSMapObject._HoverHelper

function TRSMapObject._HoverHelper(attempts: Int32; trackTarget: Boolean): Boolean;

Internal helper method used to hover a TRSMapObject target. You should not use this directly.


TRSMapObject._WalkHoverHelper

function TRSMapObject._WalkHoverHelper(attempts: Int32; trackTarget: Boolean): Boolean;

Internal helper method used to walk and hover a TRSMapObject target. You should not use this directly.

This is responsible for deciding wether we should walk to a TRSMapObject target or not before attempting to hover it.


TRSMapObject.PreHoverHelper

function TRSMapObject.PreHoverHelper(attempts: Int32): Boolean;

Internal helper method used to pre-hover a TRSMapObject target. You should not use this directly.


TRSMapObject.Hover

function TRSMapObject.Hover(attempts: Int32 = 2; trackTarget: Boolean = TRSMapObject.TrackTarget): Boolean;

Method used to hover a TRSMapObject target if it’s found on the mainscreen. It can update the target position while the mouse moves with trackTarget.

Example:

RSW.WebWalk(WaspWeb.LOCATION_VARROCK);
RSObjects.GEBank.Hover(); //Be in GE with a walker setup there.

TRSMapObject.WalkHover

function TRSMapObject.WalkHover(attempts: Int32 = 2; trackTarget: Boolean = TRSMapObject.TrackTarget): Boolean;

Method used to walk and hover a TRSMapObject target if it’s found on the mainscreen after walking. It can update the target position while the mouse moves with trackTarget.

Example:

//Be in varrock with a varrock map loaded.
RSW.WebWalk(WaspWeb.LOCATION_VARROCK);
RSObjects.GEBank.WalkHover();

TRSMapObject.Click

function TRSMapObject.Click(leftClick: Boolean = True; attempts: Int32 = 2): Boolean;

Method used to click a TRSMapObject target if it’s found on the mainscreen.

Example:

//Be in ge with a ge map loaded.
WriteLn RSObjects.GEBank.Click();

TRSMapObject.SelectOption

function TRSMapObject.SelectOption(action: TStringArray; attempts: Int32 = 2): Boolean;

Method used to select an option on a TRSMapObject target if it’s found on the mainscreen.

Example:

//Be in ge with a ge map loaded.
WriteLn RSObjects.GEBank.SelectOption(['Collect']);

TRSMapObject.WalkClick

function TRSMapObject.WalkClick(leftClick: Boolean = True; attempts: Int32 = 2): Boolean;

Method used to walk and click a TRSMapObject target if it’s found on the mainscreen.

Example:

//Be in ge with a ge map loaded, preferably far away so it has to walk.
WriteLn RSObjects.GEBank.WalkClick();

TRSMapObject.WalkSelectOption

function TRSMapObject.WalkSelectOption(action: TStringArray; attempts: Int32 = 2): Boolean;

Method used to walk and select an option on a TRSMapObject target if it’s found on the mainscreen.

Example:

//Be in ge with a ge map loaded, preferably far away so it has to walk.
WriteLn RSObjects.GEBank.WalkSelectOption(['Collect']);

Debug

procedure Debug(obj: TRSObjectV2); overload;
procedure Debug(npc: TRSNPCV2); overload;

Debugs a TRSMapObject used with the help of it’s .Draw() method.

Example:

{$I SRL-T/osr.simba}
begin
  Map.SetupChunkEx([49,52,49,52]);
  Debug(Objects.Get('clay rocks')); //be in varrock west mine.
end.