Skip to content

Commit

Permalink
Update minimap.simba
Browse files Browse the repository at this point in the history
  • Loading branch information
Torwent committed Sep 7, 2021
1 parent 2d164e7 commit 60454e8
Showing 1 changed file with 23 additions and 19 deletions.
42 changes: 23 additions & 19 deletions osr/interface/minimap.simba
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Gives **Minimap.WaitPlayerMoving** the ability to perform antiban tasks while mo
Example
-------

.. code-block:: pascal

Minimap.WaitMoving;
*)
procedure TRSMinimap.WaitMoving(DoAntiban: Boolean = True);
Expand All @@ -44,23 +46,6 @@ begin
until Timeout.IsFinished or Countdown.IsFinished or not Minimap.HasFlag or not Moving;
end;

(*
Minimap.GetOrbLevel
~~~~~~~~~~~~~~~~~~~~~~
.. pascal:: function TRSMinimap.GetOrbLevel(Orb: TCircle): Int32; override;

Override to fix SRL's **Minimap.GetOrbLevel**. Should add it to SRL in the future.

Example
-------

WriteLn Minimap.GetOrbLevel(Minimap.GetHPCircle);
*)
function TRSMinimap.GetOrbLevel(Orb: TCircle): Int32; override;
begin
Result := OCR.RecognizeNumber([Orb.X-35, Orb.Y-1, Orb.X-15, Orb.Y+9], TOCRShadowRule.Create(), RS_FONT_PLAIN_11);
end;

(*
Minimap.GetSpecLevel
~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -71,6 +56,8 @@ Minimap.GetSpecLevel
Example
-------

.. code-block:: pascal

Writeln Minimap.GetSpecLevel;
*)
function TRSMinimap.GetSpecLevel: Int32;
Expand All @@ -88,6 +75,8 @@ Minimap.IsSpecEnabled
Example
-------

.. code-block:: pascal

Writeln Minimap.IsSpecEnabled;
*)
function TRSMinimap.IsSpecEnabled: Boolean;
Expand All @@ -106,6 +95,9 @@ Returns false if the special attack level is at 0 or if the weapon doesn't have
Example
-------

.. code-block:: pascal


Writeln Minimap.IsSpecWeapon;
*)
function TRSMinimap.IsSpecWeapon: Boolean;
Expand All @@ -124,6 +116,8 @@ Minimap.EnableSpec
Example
-------

.. code-block:: pascal

Minimap.EnableSpec(25);
*)
function TRSMinimap.EnableSpec(MinSpec: Int32): Boolean;
Expand Down Expand Up @@ -159,6 +153,8 @@ Minimap.DisableSpec
Example
-------

.. code-block:: pascal

Minimap.DisableSpec;
*)
function TRSMinimap.DisableSpec: Boolean;
Expand All @@ -182,6 +178,7 @@ begin
end;
end;


(*
Minimap.HasStamina
~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -192,6 +189,8 @@ Minimap.HasStamina
Example
-------

.. code-block:: pascal

WriteLn Minimap.HasStamina;
*)
function TRSMinimap.HasStamina: Boolean;
Expand All @@ -201,14 +200,17 @@ end;

(*
Minimap.OnGroundLevel
~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~
.. pascal:: function TRSMinimap.OnGroundLevel;

**Minimap.OnGroundLevel** returns true if we are likely to be on the ground level.
This works by counting the amount of black in the minimap and might give false positives/negatives if there's more than 3500 black pixels on the minimap.

Example
-------

.. code-block:: pascal

WriteLn Minimap.OnGroundLevel;
*)
function TRSMinimap.OnGroundLevel: Boolean;
Expand All @@ -219,7 +221,7 @@ end;

(*
Minimap.InPOH
~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~
.. pascal:: function TRSMinimap.InPOH;

**Minimap.InPOH** returns true if we are in a POH.
Expand All @@ -229,6 +231,8 @@ It might also give false negatives if the POH is crowded.
Example
-------

.. code-block:: pascal

WriteLn Minimap.InPOH;
*)
function TRSMinimap.InPOH: Boolean;
Expand Down

0 comments on commit 60454e8

Please sign in to comment.