Results 1 to 2 of 2

Thread: Enemy health %

  1. #1
    Join Date
    Mar 2006
    Location
    NW US
    Posts
    210
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default Enemy health %

    Here is the function for getting the adrenaline bar %:
    Simba Code:
    function GetAdrenalinePercent(): Integer;
    var
      BarX1,BarX2,BarY1,BarY2 : Integer;
      tpa : TPointArray;
      box : TBox;
    begin
      Result := -1;
      if isActionBarOpen then
      begin
        Result := 100;
        BarY1 := 334 - SRL_NAVBAR_INGAME_Y;
        BarY2 := 337- SRL_NAVBAR_INGAME_Y;
        BarX1 := 49 - SRL_NAVBAR_INGAME_X;
        BarX2 := 469 - SRL_NAVBAR_INGAME_X;
        if FindColorsTolerance(tpa,1776411,BarX1,BarY1,BarX2,BarY2,15) then
        begin
          box := GetTPABounds(tpa);
          Result := Floor(100 - ((BarX2 - box.X1)*1.0 / (BarX2-BarX1) * 1.0) * 100);
        end;
       end;
    end;

    i want to modify this function to read the green health bar of my target enemy. The one in the combat tab. I think this above function can be changed so that it reads that green HP bar rather than the adrenaline bar. Can anyone help me adapt this properly?

  2. #2
    Join Date
    Dec 2011
    Location
    The Netherlands
    Posts
    1,631
    Mentioned
    47 Post(s)
    Quoted
    254 Post(s)

    Default

    Change the BoxY1 and BoxY2 coords. Colors should be the same? Not sure about EOC combat.

    Script source code available here: Github

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
  •