Minimap ========== ------------ Types and Vars --------------- ------------ EMinimapOrb ~~~~~~~~~~~~ .. code-block:: pascal type EMinimapOrb = (MMOrbHP, MMOrbPrayer, MMOrbRun, MMOrbSpecialAttack); The orbs around the minimap. Used when getting values from the orbs, or to toggle them. ------------ EMinimapDotType ~~~~~~~~~~~~~~~~ .. code-block:: pascal type EMinimapDotType = (MMDotPlayer, MMDotItem, MMDotNPC); The differnet supported minimap dot types. ------------ TRSMinimap ~~~~~~~~~~~ .. code-block:: pascal TRSMinimap = record(TInterfaceBase) CompassInfo: TMMCompassInfo; OrbInfo: array[EMinimapOrb] of TMMOrbInfo; MaskBMP: Int32; MaskPoly: TPointArray; Center: TPoint; end; Defines the type connected to the variable named `Minimap`. ------------ Minimap ~~~~~~~~ .. code-block:: pascal var Minimap: TRSMinimap; This is the variable that stores all minimap related methods and variables. ------------ Methods -------- ------------ Minimap.GetMiddle ~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSMinimap.GetMiddle: TPoint; Returns the center of the minimap ------------ Minimap._GetOrbValue ~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSMinimap._GetOrbValue(Orb: EMinimapOrb): Int32; Returns the value of the orb. Offsets the text shadow to figure out the text color. ------------ Minimap.GetPrayerLevel ~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSMinimap.GetPrayerLevel(): Int32; Returns your current prayer level ------------ Minimap.GetHPLevel ~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSMinimap.GetHPLevel: Int32; Returns your current HP level ------------ Minimap.GetHPPercent ~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSMinimap.GetHPPercent(): Int32; Returns your current HP level as a percentage `0..100` ------------ Minimap.GetSpecialAttack ~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSMinimap.GetSpecialAttack(): Int32; Returns your special attack. ------------ Minimap.IsPoisoned ~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSMinimap.IsPoisoned: Boolean; Returns true if you're poisoned by checking the minimap orb. ------------ Minimap.CurePoison ~~~~~~~~~~~~~~~~~~ .. code-block:: pascal procedure TRSMinimap.CurePoison; Clicks the hitpoints orb if currently poisoned. ------------ Minimap.GetRunEnergy ~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSMinimap.GetRunEnergy(): Integer; Returns your current energy level ------------ Minimap.isPrayerEnabled ~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSMinimap.isPrayerEnabled(const Time: UInt32 = 0): Boolean; Returns `True` if you have enabled it otherwise `False`. ------------ Minimap.isRunEnabled ~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSMinimap.isRunEnabled(WaitTime: Int32 = 0): Boolean; Returns `True` if you have enabled it otherwise `False`. ------------ Minimap.TogglePrayer ~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSMinimap.TogglePrayer(const Enable: Boolean): Boolean; A toggle to enable or disable prayer. ------------ Minimap.ToggleRun ~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSMinimap.ToggleRun(const Enable: Boolean): Boolean; A toggle to enable or disable running. ------------ Minimap.isPlayerMoving ~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSMinimap.isPlayerMoving(MinShift: Integer = 300): Boolean; Returns `True` if your character is moving. ------------ Minimap.FindFlag ~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSMinimap.FindFlag(BMP: Int32; out P: TPoint): Boolean; overload; function TRSMinimap.FindFlag(out P: TPoint): Boolean; overload; First version searches for the flag on a bitmap. Second version searched for the flag on the client. ------------ Minimap.isFlagPresent ~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSMinimap.isFlagPresent(const WaitTime: UInt32 = 0): Boolean; Returns True if the flag can be found on the minimap.. otherwise False. ------------ Minimap.WaitFlag ~~~~~~~~~~~~~~~~~ .. code-block:: pascal procedure TRSMinimap.WaitFlag(const Dist: UInt32 = 0; ExitIfNotMoving: Boolean = True); Waits while the flag distance is greater than `dist`. Timeout is ~20 seconds which is reset when flag distance has changed. ------------ Minimap.WaitPlayerMoving ~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal procedure TRSMinimap.WaitPlayerMoving(UseFlag: Boolean = True; TimeOut: Integer = 30000; MinShift: Integer = 300); Waits till your character is no longer moving. ------------ Minimap.WaitFlagEx ~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSMinimap.WaitFlagEx(MaxDist: Byte = 5): Boolean; Extra WaitFlag method that Waits for the flag to disapear but will return if the position we walked to is where the flag was first clicked. - Useful to know if you were able to walk into a room or not (blocked entrance, etc). - MaxDist param is default, but is the max distance the flag can move else we result False. Example: .. code-block:: pascal if (Minimap.WaitFlagEx()) then srl.Writeln('We have walked to the position succesfully') else srl.Writeln('We have finished walking, but the flag moved alot so we didnt hit our target pos'); ------------ Minimap.GetCompassAngle ~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSMinimap.GetCompassAngle(AsDegrees:Boolean=True): Double; Returns the current compass angle, default as degrees. ------------ Minimap.SetCompassAngle_Mouse ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSMinimap.SetCompassAngle_Mouse(Degrees: Double): Boolean; Uses the mouse to change the compass angle. This method should not be used directly, but instead called through ``Minimap.SetCompassAngle``. ------------ Minimap.SetCompassAngle ~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal procedure TRSMinimap.SetCompassAngle(Degrees: Double; Mouse: Boolean = True); Sets the compass angle to the desired angle. ------------ Minimap.ClickCompass ~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal procedure TRSMinimap.ClickCompass(); Clicks the compass so that you face towards north. ------------ Minimap.GetDots ~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSMinimap.GetDots(DotTypes: set of EMinimapDotType; SortFromPlayer: Boolean = True): TPointArray; Returns all the dots of the given types. See the defintion of EMinimapDotType. By default it will sort all the points from the center of the minimap, meaning the closest to your come first in the result. The points in the resulting array are the top-left corner of the dot, so for the center offset it by 2 or 3, 2.5 for dead center. **Example** .. code-block:: pascal dotTPA := Minimap.GetDots([MMDotNPC, MMDotPlayer]); ------------ Minimap.FindDots ~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSMinimap.FindDots(DotType: set of EMinimapDotType; MinCount: UInt32 = 1): Boolean; Returns True if the given number of dots can be found on the minimap. By default if it can find 1 dot of the given type. ------------ Minimap.isPointOn ~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSMinimap.isPointOn(P: TPoint): Boolean; Returns ``True`` if the given point is within the minimap. ------------ Minimap.FilterPoints ~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal procedure TRSMinimap.FilterPoints(var TPA: TPointArray); Filters the TPA so that no points are outside the minimap circle. ------------ Minimap.GetColorPercent ~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSMinimap.GetColorPercent(Color: Int32; Tolerance: Int32 = 0): Int32; Returns hte percentage of the minimap that contains the given color. Can be handy when checking if you are above or bellow groundlevel. ------------ Minimap.RandomCompass ~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal procedure TRSMinimap.RandomCompass(Min, Max: Double; Mouse: Boolean = True); Rotates the compass to a random angle between Min and Max. Values are given as degrees. ------------