does srl_infight in osr-srl works? because my script keeps attacking other npcs even its in a fight :/
need answer asap
does srl_infight in osr-srl works? because my script keeps attacking other npcs even its in a fight :/
need answer asap
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/.../globals.simba
Try testing it out - attack something and have the script so if infight then writeln something repeating until false - it worked fine in testing and works fine for combat randoms
Red & Green Salamander Hunter // Construction // Gilded Altar // Major help w/ Kyles Runespan // VWB Smither // PhoenixFeathers // GemCutter // Bonfire // LRC Miner // Spell Tab Maker // ApeAtollAgility // IvyWC // RoguesCooker // Herblore // AshamanButterfly // AshamanPowerMiner // Fletcher // LividFarm
There are currently 1 users browsing this thread. (0 members and 1 guests)