# RSObjects This file is responsible for interacting with map objects. - - - ## TRSNPC.Find ```pascal function TRSNPC.Find(cuboidArray: TCuboidArray): T2DPointArray; ``` Internal TRSNPC method responsible for filtering a TCuboidArray by what's visible in the mainscren. This is meant to filter TRSNPC.GetCuboidArray() so targets that are outside of the mainscreen are filtered out. You will probably never need to use this directly. - - - ## TRSNPCV2.Find ```pascal function TRSNPCV2.FindEx(out cuboids: TCuboidArray; out atpa: T2DPointArray): Boolean; function TRSNPCV2.Find(out atpa: T2DPointArray): Boolean; function TRSNPCV2.FindFromPosition(me: TPoint; out atpa: T2DPointArray): Boolean; ``` TRSNPCV2 method used to find a {ref}`TRSNPCV2`. 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(TRSNPC)`. Example: ```pascal WriteLn RSObjects.GEBank.Find(atpa); //Be in ge and with a walker setup there. Debug(atpa); ``` - - - ## TRSNPC._UpTextCheck ```pascal function TRSNPC._UpTextCheck(out shouldExit: Boolean): Boolean; ``` Internal TRSNPC helper method that is used by all hovering methods. You probably don't need to use this directly. - - - ## TRSNPC._HoverHelper ```pascal function TRSNPC._HoverHelper(attempts: Integer; trackTarget: Boolean): Boolean; ``` Internal helper method used to hover a TRSNPC target. You should not use this directly. - - - ## TRSNPC._WalkHoverHelper ```pascal function TRSNPC._WalkHoverHelper(attempts: Integer; trackTarget: Boolean): Boolean; ``` Internal helper method used to walk and hover a TRSNPC target. You should not use this directly. This is responsible for deciding wether we should walk to a TRSNPC target or not before attempting to hover it. - - - ## TRSNPC._PreHoverHelper ```pascal function TRSNPC.PreHoverHelper(attempts: Integer): Boolean; ``` Internal helper method used to pre-hover a TRSNPC target. You should not use this directly. - - - ## TRSNPC._ClickHelper ```pascal function TRSNPC._ClickHelper(leftClick: Boolean): Boolean; ``` Internal TRSNPC 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. - - - ## TRSNPC._SelectHelper ```pascal function TRSNPC._SelectHelper(action: TStringArray): Boolean; ``` Internal TRSNPC 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. - - - ## TRSNPC.Hover ```pascal function TRSNPC.Hover(attempts: Integer = 2; trackTarget: Boolean = TRSNPC.TrackTarget): Boolean; ``` Method used to hover a TRSNPC 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. ``` - - - ## TRSNPC.WalkHover ```pascal function TRSNPC.WalkHover(attempts: Integer = 2; trackTarget: Boolean = TRSNPC.TrackTarget): Boolean; ``` Method used to walk and hover a TRSNPC 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(); ``` - - - ## TRSNPC.Click ```pascal function TRSNPC.Click(leftClick: Boolean = True; attempts: Integer = 2): Boolean; ``` Method used to click a TRSNPC target if it's found on the mainscreen. Example: ```pascal //Be in ge with a ge map loaded. WriteLn RSObjects.GEBank.Click(); ``` - - - ## TRSNPC.SelectOption ```pascal function TRSNPC.SelectOption(action: TStringArray; attempts: Integer = 2): Boolean; ``` Method used to select an option on a TRSNPC target if it's found on the mainscreen. Example: ```pascal //Be in ge with a ge map loaded. WriteLn RSObjects.GEBank.SelectOption(['Collect']); ``` - - - ## TRSNPC.WalkClick ```pascal function TRSNPC.WalkClick(leftClick: Boolean = True; attempts: Integer = 2): Boolean; ``` Method used to walk and click a TRSNPC 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(); ``` - - - ## TRSNPC.WalkSelectOption ```pascal function TRSNPC.WalkSelectOption(action: TStringArray; attempts: Integer = 2): Boolean; ``` Method used to walk and select an option on a TRSNPC 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']); ``` - - - ## TImage.DrawNPC ```pascal procedure TImage.DrawNPC(npc: TRSNPC); ``` Helper method to debug TRSNPCs.