# MainScreen Methods to interact with the MainScreen. - - - ## ObjectFinder.Unlimit ```pascal procedure TRSObjectFinder.Unlimit; ``` Resets ObjectFinder size limits - - - ## ObjectFinder.Unlimited ```pascal function TRSObjectFinder.Unlimited: TRSObjectFinder; ``` Returns a copy of the ObjectFinder with the size limits removed. - - - ## MainScreen.FilterInPolygon ```pascal function TRSMainScreen.FilterInPolygon(tpa, polygon: TPointArray): TPointArray; function TRSMainScreen.FilterInPolygon(atpa: T2DPointArray; polygon: TPointArray): T2DPointArray; overload; ``` Filters the given TPointArray or T2DPointArray and returns only those that are visible within a polygon on the mainScreen. - - - ## MainScreen.GetAdjacentTiles ```pascal function TRSMainScreen.GetAdjacentTiles: TRectArray; ``` Returns the 4 tiles adjacent to the player in form of a TRectArray. - - - ## MainScreen.DebugAdjacentTiles ```pascal procedure TRSMainScreen.DebugAdjacentTiles; ``` Debugs MainScreen.GetAdjacentTiles. Example: ```pascal MainScreen.DebugAdjacentTiles; ``` - - - ## MainScreen.InMultiCombat ```pascal function TRSMainScreen.InMultiCombat: Boolean; ``` Returns true if we are in multi combat false if not. Example: ```pascal Writeln MainScreen.InMultiCombat; ``` - - - ## MainScreen.FindGrave ```pascal function TRSMainScreen.FindGrave: Boolean; ``` Returns true if we died and there's a grave available somewhere, false otherwise. Example: ```pascal Writeln MainScreen.FindGrave; ``` - - - ## MainScreen.LoadingPOH ```pascal function TRSMainScreen.LoadingPOH: Boolean; ``` Returns true if we are loading a poh. Example: ```pascal Writeln MainScreen.LoadingPOH; ``` - - - ## MainScreen.WaitLoadingPOH ```pascal function TRSMainScreen.WaitLoadingPOH: Boolean; ``` Waits for the POH loading screen returns true if we find a loading screen and successfully wait for it to finish. Example: ```pascal Writeln MainScreen.WaitLoadingPOH; ``` - - - ## MainScreen.FindEnemyHitsplats ```pascal function TRSMainScreen.FindEnemyHitsplats(): Boolean; ``` Returns the hitsplats on screen that don't belong to the player. Example: ```pascal Debug(MainScreen.FindEnemyHitsplats()); ``` - - - ## MainScreen.InCombat ```pascal function TRSMainScreen.InCombat: Boolean; ``` Returns true if we are currently in combat. With slow attack speed between you and the enemy this might return false negatives. Example: ```pascal Writeln MainScreen.InCombat; ``` - - - ## MainScreen.WaitInCombat ```pascal function TRSMainScreen.WaitInCombat(waitTime: Int32; interval: Int32 = -1): Boolean; ``` Waits the specified **waitTime** until we are in combat. Example: ```pascal MainScreen.WaitInCombat(5000); ``` - - - ## MainScreen.WaitNotInCombat ```pascal function TRSMainScreen.WaitNotInCombat(waitTime: Int32; interval: Int32 = -1): Boolean; ``` Waits the specified **waitTime** until we are nto in combat. Example: ```pascal MainScreen.WaitNotInCombat(5000); ``` - - - ## MainScreen.FindArrow ```pascal function TRSMainScreen.FindArrow(out TPA: TPointArray): Boolean; function TRSMainScreen.FindArrow: Boolean; overload; ``` Returns true if there's a yellow arrow on screen. If a TPointArray is passed as a parameter it will return with the location of the arrow tip. Example: ```pascal Writeln MainScreen.FindArrow; ``` - - - ## MainScreen.WaitArrow ```pascal function TRSMainScreen.WaitArrow(TPA: TPointArray; WaitTime: Int32 = 600; Interval: Int32 = -1): Boolean; function TRSMainScreen.WaitArrow(WaitTime: Int32 = 600; Interval: Int32 = -1): Boolean; ``` Waits **WaitTime** for a yellow arrow to appear on MainScreen. If a TPointArray is passed as a parameter it will return with the location of the arrow tip. Example: ```pascal Writeln MainScreen.WaitArrow; ```