Results 1 to 6 of 6

Thread: Get your personal healthbar status

  1. #1
    Join Date
    Jun 2012
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default Get your personal healthbar status

    As the title states does anyone here have a method that gets the healthbar going down when you're in combat? It must be your own accurate healthbar no one elses. I hope to get some response i couldn't find any function for it nor do i know how to use the skill list fonts if anyone could help me that would be very much apreciated.

    Greetings tombraider

  2. #2
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Simba Code:
    Program testP06;
    {$I SRL/SRL.Simba}
    {$I SRL/SRL/Misc/Debug.Simba}
    {$I P07Include.Simba}
    Const
      YourHealth = 10;
    var
      GreenP,RedP,MyHP:Integer;
      Health,HealthPercent,AllP,HpPercentMissing,Missing_Health:Extended;
      PercentHP:Extended;
    Procedure ShowHealth;
    Begin
      if (RedP < 1) or (GreenP < 1) Then
      Begin
        Exit;
      End;
      AllP := (RedP + GreenP);
      HpPercentMissing := (RedP/AllP);
      Missing_Health := (MyHP*HpPercentMissing);
      Health := ((MyHp) - (Missing_Health));
      PercentHP := ((RedP/AllP)*100);
      Writeln('I have about ' + ToStr(Health)+ ' HP left');
      Writeln('Percent:' + ToStr(PercentHP));
    End;
    Procedure WriteColors;
    Begin
      Writeln('Green:' + IntToStr(GreenP));
      Writeln('Red:' + IntToStr(RedP));
    End;
    Procedure CountColors;
    Begin
      GreenP := CountColorTolerance(65280,245,140,281,154,3);
      RedP := CountColorTolerance(255,245,140,281,154,3);
    End;
    Begin
      SetupP07Include;
      ActivateClient;
      Wait(500);
      P07_MakeCompassNorth;
      P07_MakeCameraAngleHigh;
      MyHP := YourHealth;
      CountColors;
      WriteColors;
      ShowHealth;
    End.

    Make sure it searches for your health bar It may be slightly off

  3. #3
    Join Date
    Jun 2012
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Thank you very much for your response! I have a script wich is a area full of other players around wich could get attacked aswell since the player that is attacked might be on my spot it will find his HPbar instead of mine.. could we make it more specific?

  4. #4
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Simba Code:
    GreenP := CountColorTolerance(65280,245,140,281,154,3);
      RedP := CountColorTolerance(255,245,140,281,154,3);

    Make sure that is the coords of your hp bar

  5. #5
    Join Date
    Jun 2012
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Shal that be accurate enough? Because when i'm standing on someones spot and he gets the hp bar he will have the same coordinates.

  6. #6
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    as long as it's on your health bar

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
  •