Results 1 to 5 of 5

Thread: Checking for Combat

  1. #1
    Join Date
    Mar 2012
    Posts
    426
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default Checking for Combat

    I need some suggestions on a procedure for checking in my player is in combat. I am using this for my LRC fisher so the area is very crowded and I am still getting false positives. This is currently what I have, and I am looking for something to cut down on the false positives! Thanks.

    Simba Code:
    Procedure CheckFight;
    begin;
      if (InFight) then
      begin;
        Writeln('Checking pixelshift for fight...')
        PBox := IntToBox(245, 130, 285, 195);
          If (AveragePixelShift(PBox, 1000, 5000) > 1110) then
            begin;
              writeln('...looks like a fight, to bank!');
              ToBank;
            end;
        Writeln('...no fight detected! Back to fishing.');
      end else exit;
      exit;
    end;

  2. #2
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Looks like it should work fine, could you post the InFight function?

  3. #3
    Join Date
    Mar 2012
    Posts
    426
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by abu_jwka View Post
    Looks like it should work fine, could you post the InFight function?
    I'm just using the one that is in the srl/srl/skill/fighting.simba. Guess I might have to accept that there will be some false positives!

  4. #4
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Quote Originally Posted by abu_jwka View Post
    Looks like it should work fine, could you post the InFight function?
    InFight is actually just a wrapper for srl_InFight which is found in globals.simba.
    There used to be something meaningful here.

  5. #5
    Join Date
    Nov 2011
    Posts
    1,532
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Do you get hit often? If you do it might be good to check whether your HP actually decreased. It's an easy indicator as to whether you were in fight.

    I think in Narcle's fast fighter there's also something called OtherInFight to reduce the chances of getting false positives.
    Current activity: Recovering from vacation
    - Nulla pars vitae vacare officio potest -
    SRL membership? Can I buy that?
    Scripts - AGS - SWF - WAR - EMS - W100S-EM
    If you need scripting help, you can pm me. Remember, if you need help you have to ask for it properly though

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
  •