Map Objects

This file is responsible for interacting with map objects.


TMapObject.Find

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

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


TMapObject.Visible

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

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


TMapObject._UpTextCheck

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

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


TMapObject._WalkUpTextCheck

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

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


TMapObject._ClickHelper

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

Internal TMapObject 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.


TMapObject._SelectHelper

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

Internal TMapObject 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.


TObjectV2.Find

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

TObjectV2 method used to find a TObjectV2. 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(TMapObject).

Example:

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

TObjectV2.Draw

procedure TMapObject.Draw(out bitmap: TMufasaBitmap);

Helper method to debug TMapObjects used in Debug(TMapObject).


TObjectV2.Find

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

TObjectV2 method used to find a TObjectV2. 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(TMapObject).

Example:

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

TObjectV2.Draw

procedure TMapObject.Draw(out bitmap: TMufasaBitmap);

Helper method to debug TMapObjects used in Debug(TMapObject).


TMapObject.IsVisible

function TMapObject.IsVisible(): Boolean;

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

Example:

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

TMapObject._UpdateTarget

procedure TMapObject._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.


TMapObject._HoverHelper

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

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


TMapObject._WalkHoverHelper

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

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

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


TMapObject.PreHoverHelper

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

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


TMapObject.Hover

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

Method used to hover a TMapObject 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.

TMapObject.WalkHover

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

Method used to walk and hover a TMapObject 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();

TMapObject.Click

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

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

Example:

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

TMapObject.SelectOption

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

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

Example:

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

TMapObject.WalkClick

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

Method used to walk and click a TMapObject 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();

TMapObject.WalkSelectOption

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

Method used to walk and select an option on a TMapObject 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: TObjectV2); overload;
procedure Debug(npc: TNPCV2); overload;

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

Example:

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