From: Flight
That font is 'StatChars07'. AFAIK SRL-OSR already has functions for reading the MM orbs, if not you can add these:
http://villavu.com/forum/showthread.php?t=107639
oh, i didnt know you added those. i didnt see any in my osr include either so i decided to make them lol. any ways yours looks much cleaner and compressed then mine. i tried the stat chars and for some reason it wont recognize 2, 3, 4, or 9's.
even though u already did them here are mine. all the functions i edited from the from the orginal setrun functions. ideas on why it wont recognize those? is it the font or something to do with the gettext function??
program MiniMapToggles;
{$I SRL-OSR/SRL.Simba}
(*
GetHitPointsMM
~~~~~~~~~~~~
.. code-block:: pascal
function GetHitpointsMM: integer;
Returns the HitPoints on the MM Toggle
.. note::
by Sk1nyNerd
Example:
.. code-block:: pascal
*)
function GetHitPointsMM: integer;
begin
Result := -1;
Result := StrToIntDef(GetNumbers(GetTextAtExWrap(525, 57, 538, 67,
0, 5, 1, 0, 0, 'StatChars07')), - 1);
end;
(*
QuickPray
~~~~~~~~~~~~
.. code-block:: pascal
QuickPray(Pray: Boolean): Boolean;
Turns the Quick Prayers on or off using the Prayer Toggle on the MiniMap
.. note::
by Sk1nyNerd
Example:
.. code-block:: pascal
*)
function QuickPray(Pray: Boolean): Boolean;
var
CCountPurple, CCountWhite: integer;
begin
Result := False;
CCountPurple := CountColorTolerance(5056052, 550, 95, 565, 108, 45);
CCountWhite := CountColorTolerance(9723486, 550, 95, 565, 108, 22);
if ((CCountPurple < 1) and (CCountWhite < 1)) then
begin
Exit;
end;
if (Pray) then
begin
if (CCountWhite < 1) then
MouseBox(550, 95, 565, 108, mouse_left);
Result := True;
end else
begin
if (CCountWhite > 1) then
MouseBox(550, 95, 565, 108, mouse_left);
Result := True;
end;
end;
(*
GetPrayerPointsMM
~~~~~~~~~~~~
.. code-block:: pascal
function GetPrayerPointsMM: integer;
Returns the Prayer Points on the MM Toggle
.. note::
by Sk1nyNerd
Example:
.. code-block:: pascal
*)
function GetPrayerPointsMM: integer;
begin
Result := -1;
Result := StrToIntDef(GetNumbers(GetTextAtExWrap(524, 100, 540, 112,
0, 5, 1, 0, 0, 'StatChars07')), - 1);
end;
(*
QuickPrayAt
~~~~~~~~~
.. code-block:: pascal
function QuickPrayAt(PrayerPoints: integer): Boolean;
Toggles the Prayer icon on the MiniMap if the Prayer Points are greater than
or equal to the PrayerPoints
.. note::
by Sk1nyNerd
Example:
.. code-block:: pascal
*)
function QuickPrayAt(PrayerPoints: integer): Boolean;
var
CP: integer;
begin
Result := False;
CP := GetPrayerPointsMM;
if (CP >= PrayerPoints) then
begin
if QuickPray(True) then
Result := True;
end;
end;
(*
QuickRun
~~~~~~~~~~~~
.. code-block:: pascal
QuickRun(Run: Boolean): Boolean;
Sets Run on or off using the Run Toggle on the MiniMap
.. note::
by Sk1nyNerd
Example:
.. code-block:: pascal
*)
function QuickRun(Run: Boolean): Boolean;
var
CCountGold, CCountGrey: integer;
begin
Result := False;
CCountGold := CountColorTolerance(105406, 574, 133, 590, 144, 23);
CCountGrey := CountColorTolerance(9411739, 574, 133, 590, 144, 36);
if ((CCountGold < 1) and (CCountGrey < 1)) then
Exit;
if (Run) then
begin
if (CCountGold < 1) then
begin
MouseBox(574, 133, 590, 144, mouse_left);
Result := True;
end;
end else
begin
if (CCountGold > 1) then
begin
MouseBox(574, 133, 590, 144, mouse_left);
Result := True;
end;
end;
end;
(*
GetRunEnergyMM
~~~~~~~~~~~~
.. code-block:: pascal
function GetRunEnergyMM: integer;
Returns the Run percentage on the MM Run Toggle
.. note::
by Sk1nyNerd
Example:
.. code-block:: pascal
*)
function GetRunEnergyMM: integer;
begin
Result := -1;
Result := StrToIntDef(GetNumbers(GetTextAtExWrap(547, 136, 566, 149,
0, 5, 1, 0, 0, 'StatChars07')), - 1);
end;
(*
QuickRunAt
~~~~~~~~~
.. code-block:: pascal
function QuickRunAt(EnergyPercent: integer): Boolean;
Toggles the Run icon on the MiniMap if the Energy is greater than or equal
to the EnergyPercent
.. note::
by Sk1nyNerd
Example:
.. code-block:: pascal
*)
function QuickRunAt(EnergyPercent: integer): Boolean;
var
CR: integer;
begin
Result := False;
CR := GetRunEnergyMM;
if (CR >= EnergyPercent) then
begin
if QuickRun(True) then
Result := True;
end;
end;
begin
ClearDebug;
SetupSRL;
QuickPray(false);
QuickRun(true);
writeln(IntToStr(GetHitPointsMM));
writeln(IntToStr(GetPrayerPointsMM));
writeln(IntToStr(GetRunEnergyMM));
end.