Results 1 to 17 of 17

Thread: New HP Bars, Sudgested Fixes?

  1. #1
    Join Date
    Dec 2006
    Location
    Canada, BC
    Posts
    728
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default New HP Bars, Sudgested Fixes?

    im sorry i donno if anyones already talked about this.. but i havent found anyting in the runscape updates section. ok so im gonna try to make a new InFight function / Hp bar detection. i took some screen shots of the new HP bar:



    ok so Example1 shows a compleatly green and red HP bar, and the color outline of them. Green: 10496, Red:198716. now example 3 shows us how the outline on the HP bar changes (this will make things alittle harder, if it was just a black outline i woulda just surched for a black dtm.)
    due to the color changeing.. the only thing i can think of useing is a DDTM, or maby a TPA of fixed points? if anyone has some sudgestions of ways to make this more efficiant please tell me ;D
    Lance. Da. Pants.

  2. #2
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    I have all the colors:

    SCAR Code:
    Color Picked: 524453 at (387, 314)
    Color Picked: 590002 at (521, 418)
    Color Picked: 594402 at (386, 315)
    Color Picked: 401121 at (383, 315)
    Color Picked: 590010 at (382, 316)
    Color Picked: 131211 at (383, 318)
    Color Picked: 724439 at (387, 315)
    Color Picked: 262299 at (366, 314)
    Color Picked: 724439 at (552, 430)
    Color Picked: 655809 at (553, 430)
    Color Picked: 330180 at (438, 438)

    {--}

    Color Picked: 37659 at (520, 316)
    Color Picked: 50027 at (519, 317)
    Color Picked: 46132 at (516, 318)
    Color Picked: 39194 at (504, 320)
    Color Picked: 45868 at (519, 318)
    Color Picked: 54691 at (476, 318)
    Color Picked: 50820 at (475, 318)
    Color Picked: 43039 at (494, 320)
    Color Picked: 47721 at (476, 316)

    Top ones are green bottom ones are red

    Put them in all together find an average color + Tol and bham you have it

    Btw, AFAIK - 198716 is the outline of your bar.

  3. #3
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  4. #4
    Join Date
    Dec 2006
    Location
    Canada, BC
    Posts
    728
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    haha so you think just a simple FindColorTolerance will suffice?

    Edit: oh i hadnt thought of that shut ill see which one works better ;D
    Lance. Da. Pants.

  5. #5
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    I got an Idea, Do

    1)Get TPA Bounds of the black outline then do a GetColorsBox to find the colors

    Edit: Yea FindColors should do it.

  6. #6
    Join Date
    Dec 2006
    Location
    Canada, BC
    Posts
    728
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nauman there is no black outline, the outline of the hp bar changes as the colors change. but sure ill try that just FindColors i ssuppose it would be the fastest. DDTM's.. what was i thinking? XD

    Edit: actualy, if there is an enemy or another person standing by you, find color would catch there HP bar aswell... your enemies HP bar will go over top of yours. so if they are on the space to your left, then the green tip of the left side of yoru bar will be hidden by the red of there bar. so it might be more efficiant to surch for your enemys bar than your own...

    Edit: heres a picture of the hp bar behign hidden:
    Last edited by Lance; 05-29-2009 at 03:17 AM.
    Lance. Da. Pants.

  7. #7
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    There is a black outline, and if it does change have more than 1 color.

    Edit: Lance not a bad idea, though this could backfire if say your in a Cow field, other people are killing cows but you aren't and the script detects a HP bar.
    Last edited by Naum; 05-29-2009 at 03:19 AM.

  8. #8
    Join Date
    Dec 2006
    Location
    Canada, BC
    Posts
    728
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yeah this is kinda got me stumped haha. i cant think of a fail proof way of detecting the right HP bar, unless we look for the enemies by using reflection to check which direction your charicture is facing, and then looked for a HP bar within 50 pix of your position in that direction..
    Lance. Da. Pants.

  9. #9
    Join Date
    Jun 2006
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    But if you're using reflection anyways, you can just get the HP from there XD

  10. #10
    Join Date
    Mar 2007
    Location
    <3
    Posts
    2,683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Already fixed InFight and IsFightAt.
    Not much to worry about.

    Take a look in the puplic svn section ;D

  11. #11
    Join Date
    Dec 2006
    Location
    Canada, BC
    Posts
    728
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok lol thanks
    Lance. Da. Pants.

  12. #12
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

  13. #13
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Use a DTM of the last full-height row in the bar (dtm the pixel at the top of the outline & at the bottom)
    Interested in C# and Electrical Engineering? This might interest you.

  14. #14
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  15. #15
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    There are also new flags, and dungeon symbols :\

  16. #16
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Yeah, Cazax did exactly what I explained

  17. #17
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by lancerawks View Post
    haha so you think just a simple FindColorTolerance will suffice?

    Edit: oh i hadnt thought of that shut ill see which one works better ;D
    Yes. I've made functions with that before. FindColorsTolerance should suffice.
    EDIT: Seems like it has been done already. Will comment on that thread.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

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
  •