Minimap¶
Types and Vars¶
EMinimapOrb¶
type EMinimapOrb = (MMOrbHP, MMOrbPrayer, MMOrbRun, MMOrbSpecialAttack);
The orbs around the minimap. Used when getting values from the orbs, or to toggle them.
EMinimapDotType¶
type EMinimapDotType = (MMDotPlayer, MMDotItem, MMDotNPC);
The differnet supported minimap dot types.
TRSMinimap¶
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¶
var Minimap: TRSMinimap;
This is the variable that stores all minimap related methods and variables.
Methods¶
Minimap._GetOrbValue¶
function TRSMinimap._GetOrbValue(Orb: EMinimapOrb): Int32;
Returns the value of the orb. Offsets the text shadow to figure out the text color.
Minimap.GetPrayerLevel¶
function TRSMinimap.GetPrayerLevel(): Int32;
Returns your current prayer level
Minimap.GetHPPercent¶
function TRSMinimap.GetHPPercent(): Int32;
Returns your current HP level as a percentage 0..100
Minimap.GetSpecialAttack¶
function TRSMinimap.GetSpecialAttack(): Int32;
Returns your special attack.
Minimap.IsPoisoned¶
function TRSMinimap.IsPoisoned: Boolean;
Returns true if you’re poisoned by checking the minimap orb.
Minimap.CurePoison¶
procedure TRSMinimap.CurePoison;
Clicks the hitpoints orb if currently poisoned.
Minimap.GetRunEnergy¶
function TRSMinimap.GetRunEnergy(): Integer;
Returns your current energy level
Minimap.isPrayerEnabled¶
function TRSMinimap.isPrayerEnabled(const Time: UInt32 = 0): Boolean;
Returns True if you have enabled it otherwise False.
Minimap.isRunEnabled¶
function TRSMinimap.isRunEnabled(WaitTime: Int32 = 0): Boolean;
Returns True if you have enabled it otherwise False.
Minimap.TogglePrayer¶
function TRSMinimap.TogglePrayer(const Enable: Boolean): Boolean;
A toggle to enable or disable prayer.
Minimap.ToggleRun¶
function TRSMinimap.ToggleRun(const Enable: Boolean): Boolean;
A toggle to enable or disable running.
Minimap.isPlayerMoving¶
function TRSMinimap.isPlayerMoving(MinShift: Integer = 300): Boolean;
Returns True if your character is moving.
Minimap.FindFlag¶
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¶
function TRSMinimap.isFlagPresent(const WaitTime: UInt32 = 0): Boolean;
Returns True if the flag can be found on the minimap.. otherwise False.
Minimap.WaitFlag¶
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¶
procedure TRSMinimap.WaitPlayerMoving(UseFlag: Boolean = True; TimeOut: Integer = 30000; MinShift: Integer = 300);
Waits till your character is no longer moving.
Minimap.WaitFlagEx¶
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:
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¶
function TRSMinimap.GetCompassAngle(AsDegrees:Boolean=True): Double;
Returns the current compass angle, default as degrees.
Minimap.SetCompassAngle_Mouse¶
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¶
procedure TRSMinimap.SetCompassAngle(Degrees: Double; Mouse: Boolean = True);
Sets the compass angle to the desired angle.
Minimap.ClickCompass¶
procedure TRSMinimap.ClickCompass();
Clicks the compass so that you face towards north.
Minimap.GetDots¶
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
dotTPA := Minimap.GetDots([MMDotNPC, MMDotPlayer]);
Minimap.FindDots¶
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¶
function TRSMinimap.isPointOn(P: TPoint): Boolean;
Returns True
if the given point is within the minimap.
Minimap.FilterPoints¶
procedure TRSMinimap.FilterPoints(var TPA: TPointArray);
Filters the TPA so that no points are outside the minimap circle.
Minimap.GetColorPercent¶
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¶
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.