Results 1 to 8 of 8

Thread: Help Checking Health

  1. #1
    Join Date
    Dec 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Talking Help Checking Health

    I have been through these forums for a few days now looking at health checking options, here is a list of whats available.

    GetMMLevels('hp', Color) - Works ok, but returns the first 2 digits if you health is over 100

    HPPercent - Never got this to work, always returned -1.

    GetHp - Seen this referenced a few times, never could find it in any include files. Outdated?

    There are more options out there but a bit beyond what I can do. The GetMMLevel worked the best, but I believe it was setup for when RS had a max of 100 hitpoints or health.

    My main problem with using GetMMLevel() is that if your health is over 100, it returns 10 or the first 2 digits of the health.

    Can anyone point me to a fix for this or another method/ function that does this?

    Thanks for any help!

  2. #2
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Do you care if it is reflection?

  3. #3
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Yeah, I think you're correct; SRL is setup for 2-digit HP system...
    The only solution is to update the procedures and functions. It shouldn't be a very hard fix though

  4. #4
    Join Date
    Dec 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for verifying that. I will look over the code in the SRL and see if its something I can do, lol.

    Sorry MormonMan, I'm pretty new to SCAR, so I haven't looked into Reflection at all.

    Thanks for the Replies!

  5. #5
    Join Date
    Dec 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Instead of changing the SRL includes, I just utilized the use of the Color, if its Red = danger, Green = good to fight.

    Code:
    procedure CheckHealth;
    begin
      Health:= GetMMLevels('hp', Color);
      writeln('Health: ' + IntToStr(Health) + ', Color: ' + Color);
    end;
    Thanks for the help though!

  6. #6
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Glad you worked out a solution

    This is a bug that should be fixed though.. I'll look into it later (if I remember)

  7. #7
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by AllAces777 View Post
    I have been through these forums for a few days now looking at health checking options, here is a list of whats available.

    GetMMLevels('hp', Color) - Works ok, but returns the first 2 digits if you health is over 100

    HPPercent - Never got this to work, always returned -1.

    GetHp - Seen this referenced a few times, never could find it in any include files. Outdated?

    There are more options out there but a bit beyond what I can do. The GetMMLevel worked the best, but I believe it was setup for when RS had a max of 100 hitpoints or health.

    My main problem with using GetMMLevel() is that if your health is over 100, it returns 10 or the first 2 digits of the health.

    Can anyone point me to a fix for this or another method/ function that does this?

    Thanks for any help!
    Why not just multiply the answer u get by 10? It won't give you the correct hp down to three digits(Eg: hp of 600, using getmmlevel() u get 60, then multiply by 10 to get 600, hp of 599 or 591, using getmmlevel() u get 59, then multiply by 10 to get 590). I think this should be fine if you are going to use in a fighting script or something because the difference is negligible

  8. #8
    Join Date
    Dec 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the idea. That would definitely do what would be needed. For now I think I'm just gonna use the colors. I've tested it out for awhile now and it definitely does whats needed.

    Thanks again!

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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