DotFilters#

Methods to handle DotFilters. Dot filters are filters that filter in or out ERSMinimapDots.


type TRSDotFilter#

Used to filter mmdots


Minimap.GetCircle#

function TRSMinimap.GetCircle(Loc: TPoint; Radius: Int32; Offset: TPoint = [0, 0]): TCircle;

Returns a circle in the Minimap, Loc being the middle point of the circle.

Example:

var
  P: TPoint;
  Bitmap: TMufasaBitmap;

begin
  P := Minimap.GetDots(ERSMinimapDots.NPC)[0];

  Bitmap.FromClient;

  Bitmap.DrawCircle(P.X, P.Y, Minimap.GetCircle(P, 5)); //Draws a circle in the minimap around an NPC of 5 radius.

  ShowBitmap(Bitmap);
  FreeBitmap(Bitmap);
end;

Minimap.GetCircleArray#

function TRSMinimap.GetCircleArray(Locs: TPointArray; Radius: Int32; Offset: TPoint = [0, 0]): TCircleArray;

Returns an array of circles in the minimap.

Example:

var
  P: TPoint;
  TPA: TPointArray;
  Bitmap: TMufasaBitmap;

begin
  TPA := Minimap.GetDots(ERSMinimapDots.NPC);

  Bitmap.FromClient;

  for P in TPA do
    Bitmap.DrawCircle(P.X, P.Y, Minimap.GetRadius(P, 5));

  ShowBitmap(Bitmap);
  FreeBitmap(Bitmap);
end;

Minimap.GetDotInCircle#

function TRSMinimap.GetDotInCircle(Dot: ERSMinimapDot; Loc, Radius: Int32; Offset: TPoint = [0, 0]): TPoint;

Functions to get the ERSMinimapDots in a circle. Returns only the first dot found. This is useful to know if a minimap dot is within range for example.

Example:

var
  Bitmap: TMufasaBitmap;

begin
  Bitmap.FromClient;

  //Draws a white cross on the first NPC dot found within our 8 pixel radius of the minimap center.
  Bitmap.DrawCross(Minimap.GetDotInCircle(ERSMinimapDot.NPC, Minimap.Center, 8), 4, $FFFFFF);

  ShowBitmap(Bitmap);
  FreeBitmap(Bitmap);
end;

Minimap.GetDotInCircleArray#

function TRSMinimap.GetDotInCircleArray(Dot: ERSMinimapDot; Locs: TPointArray; Radius: Int32; Offset: TPoint = [0, 0]): TPointArray;

Same as above but for an array of circles. Returns only the first dot found in each circle in the array. It’s a bit hard to explain it’s uses but I personally use it in RSMMDots to accurately find the Minimap Dots while filtering out the ones I do not want.


Minimap.GetDotArrayInCircle#

function TRSMinimap.GetDotArrayInCircle(Dot: ERSMinimapDot; Loc: TPoint; Radius: Int32; Offset: TPoint = [0, 0]): TPointArray;

Functions to get the ERSMinimapDots in a circle. Returns all dots found. This is useful to know if minimap dots are within range for example.

Example:

var
  P: TPoint;
  TPA: TPointArray;
  Bitmap: TMufasaBitmap;

begin
  Bitmap.FromClient;

  TPA := Minimap.GetDotArrayInCircle(ERSMinimapDot.NPC, Minimap.Center, 8); //Get all npc dots that are within 8 pixels of the minimap center;

  for P in TPA do
    Bitmap.DrawCross(P, 4, $FFFFFF); //Will draw a white cross in each npc dot

  ShowBitmap(Bitmap);
  FreeBitmap(Bitmap);
end;

Minimap.GetDotArrayInCircleArray#

function TRSMinimap.GetDotArrayInCircleArray(Dot: ERSMinimapDot; Locs: TPointArray; Radius: Int32; Offset: TPoint = [0, 0]): TPointArray;

Same as above but for an array of circles. Returns all dots found in each circle in the array. It’s a bit hard to explain it’s uses but I personally use it in RSMMDots to accurately find the Minimap Dots while filtering out the ones I do not want.


Minimap.GetDotTileMS#

function TRSMinimap.GetDotTileMS(Dot: ERSMinimapDot; Loc: TPoint; Radius: Int32; TileVector: Vector3; Offset, RadiusOffset: TPoint = [0, 0]): TRectangle;
function TRSMinimap.GetDotTileMS(Dot: ERSMinimapDot; Loc: TPoint; Radius: Int32; Z: Double = 0): TRectangle; overload;
function TRSMinimap.GetDotTileMS(Dot: ERSMinimapDot; Locs: TPointArray; Radius: Int32; TileVector: Vector3; Offset, RadiusOffset: TPoint = [0, 0]): TRectArray; overload;
function TRSMinimap.GetDotTileMS(Dot: ERSMinimapDot; Locs: TPointArray; Radius: Int32; Z: Double = 0): TRectArray; overload;

I’m not going to be too detailed on this one, if you read the previous functions documentations you can understand what this does. Depending on the function you use it either: Combines Minimap.GetTileMS with Minimap.GetDotInCircle to return a tile of a minimap dot within a circle. Combines Minimap.GetTileArrayMS with Minimap.GetDotInCircleArray to return a tile of one minimap dot in each circle array we have.


Minimap.GetDotArrayTilesMS#

function TRSMinimap.GetDotArrayTilesMS(Dot: ERSMinimapDot; Loc: TPoint; Radius: Int32; TileVector: Vector3; Offset, RadiusOffset: TPoint = [0, 0]): TRectArray;
function TRSMinimap.GetDotArrayTilesMS(Dot: ERSMinimapDot; Loc: TPoint; Radius: Int32; Z: Double = 0): TRectArray; overload;
function TRSMinimap.GetDotArrayTilesMS(Dot: ERSMinimapDot; Locs: TPointArray; Radius: Int32; TileVector: Vector3; Offset, RadiusOffset: TPoint = [0, 0]): TRectArray; overload;
function TRSMinimap.GetDotArrayTilesMS(Dot: ERSMinimapDot; Locs: TPointArray; Radius: Int32; Z: Double = 0): TRectArray; overload;

I’m not going to be too detailed on this one, if you read the previous functions documentations you can understand what this does. Depending on the function you use it either: Combines Minimap.GetTileArrayMS with Minimap.GetDotArrayInCircle to return the tiles of all minimap dots within a circle. Combines Minimap.GetTileArrayMS with Minimap.GetDotArrayInCircleArray to return the tiles of all minimap dots in each circle array we have.