# Map Objects This file is responsible for interacting with map objects. - - - ## TMapObject.Find ```pascal 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 ```pascal 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 ```pascal 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 ```pascal 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 ```pascal 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 ```pascal 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. - - - ## TGameObjectV2.Find ```pascal function TGameObjectV2.FindEx(out cuboids: TCuboidArray; out atpa: T2DPointArray): Boolean; function TGameObjectV2.Find(out atpa: T2DPointArray): Boolean; function TGameObjectV2.FindFromPosition(me: TPoint; out atpa: T2DPointArray): Boolean; ``` TGameObjectV2 method used to find a {ref}`TGameObjectV2`. 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: ```pascal WriteLn RSObjects.GEBank.Find(atpa); //Be in ge and with a walker setup there. Debug(atpa); ``` - - - ## TGameObjectV2.Draw ```pascal procedure TMapObject.Draw(out bitmap: TMufasaBitmap); ``` Helper method to debug TMapObjects used in `Debug(TMapObject)`. - - - ## TGameObjectV2.Find ```pascal function TGameObjectV2.FindEx(out cuboids: TCuboidArray; out atpa: T2DPointArray): Boolean; function TGameObjectV2.Find(out atpa: T2DPointArray): Boolean; function TGameObjectV2.FindFromPosition(me: TPoint; out atpa: T2DPointArray): Boolean; ``` TGameObjectV2 method used to find a {ref}`TGameObjectV2`. 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: ```pascal WriteLn RSObjects.GEBank.Find(atpa); //Be in ge and with a walker setup there. Debug(atpa); ``` - - - ## TGameObjectV2.Draw ```pascal procedure TMapObject.Draw(out bitmap: TMufasaBitmap); ``` Helper method to debug TMapObjects used in `Debug(TMapObject)`. - - - ## TMapObject._Routers ```pascal function TMapObject._FindExRouter(out cuboids: TCuboidExArray; out atpa: T2DPointArray): Boolean; function TMapObject._GetCuboidArrayRouter(me: TPoint = [0,0]; angle: Single = $FFFF): TCuboidExArray; ``` Helper internal router methods that "route" methods to the right type. - - - ## TMapObject.IsVisible ```pascal function TMapObject.IsVisible(): Boolean; ``` TMapObject method used to find a {ref}`TMapObject`. If found returns true, if not returns false. Example: ```pascal WriteLn RSObjects.GEBank.IsVisible(); //Be in ge and with a walker setup there. ``` - - - ## TMapObject._UpdateTarget ```pascal 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 ```pascal 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 ```pascal 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 ```pascal function TMapObject.PreHoverHelper(attempts: Int32): Boolean; ``` Internal helper method used to pre-hover a TMapObject target. You should not use this directly. - - - ## TMapObject.Hover ```pascal 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: ```pascal RSW.WebWalk(WaspWeb.LOCATION_VARROCK); RSObjects.GEBank.Hover(); //Be in GE with a walker setup there. ``` - - - ## TMapObject.WalkHover ```pascal 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: ```pascal //Be in varrock with a varrock map loaded. RSW.WebWalk(WaspWeb.LOCATION_VARROCK); RSObjects.GEBank.WalkHover(); ``` - - - ## TMapObject.Click ```pascal 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: ```pascal //Be in ge with a ge map loaded. WriteLn RSObjects.GEBank.Click(); ``` - - - ## TMapObject.SelectOption ```pascal 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: ```pascal //Be in ge with a ge map loaded. WriteLn RSObjects.GEBank.SelectOption(['Collect']); ``` - - - ## TMapObject.WalkClick ```pascal 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: ```pascal //Be in ge with a ge map loaded, preferably far away so it has to walk. WriteLn RSObjects.GEBank.WalkClick(); ``` - - - ## TMapObject.WalkSelectOption ```pascal 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: ```pascal //Be in ge with a ge map loaded, preferably far away so it has to walk. WriteLn RSObjects.GEBank.WalkSelectOption(['Collect']); ``` - - - ## Debug ```pascal procedure Debug(obj: TGameObjectV2); overload; procedure Debug(npc: TNPCV2); overload; ``` Debugs a TMapObject used with the help of it's `.Draw()` method. Example: ```pascal {$I SRL-T/main.simba} begin Map.SetupChunkEx([49,52,49,52]); Debug(Objects.Get('clay rocks')); //be in varrock west mine. end. ```