Results 1 to 4 of 4

Thread: srl_infight (osr-srl) broken?

  1. #1
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Exclamation srl_infight (osr-srl) broken?

    does srl_infight in osr-srl works? because my script keeps attacking other npcs even its in a fight :/
    need answer asap

  2. #2
    Join Date
    Dec 2011
    Location
    United States
    Posts
    960
    Mentioned
    21 Post(s)
    Quoted
    504 Post(s)

    Default

    Are you using one within the OSR include?

  3. #3
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by Wetish View Post
    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

  4. #4
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

    Default

    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •