From: Wetish
Are you using one within the OSR include?
(*
srl_InFight
~~~~~~~~~~~
.. code-block:: pascal
function srl_InFight: Boolean;
Checks whether player currently is in a fight, using mainscreen
HP bar presence detection. Returns True if Player's HP bar is detected.
Idea for improvement: Also check using PixelShift(); to see whether Player
is performing fighting animations to further improve the certainty of results.
.. note::
by Narcle
Example:
.. code-block:: pascal
while srl_InFight do
begin
CheckHP;
EatFood;
end;
*)
Function srl_InFight: Boolean;
begin
Result := InRange(Length(GetFightBarTPA(MFBox)), 30, 240);
end;
procedure Proc_WorldSwitcherEnabled;
begin
WorldSwitcherEnabled := WorldSwitcherEnabled;
end;
got this out from:
https://github.com/SRL/SRL-OSR/blob/master/SRL/core/globals.simba