WC3 HP Bar Color Range

This is a discussion on WC3 HP Bar Color Range within the Warcraft 3 Hacks, bots and tools board part of the Warcraft 3 forum category; RGB Colors are made up of 3 values in the range of 0-255 (or 00-FF) for each color. So the ...

Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13
  1. #11
    BullJam's Avatar
    BullJam is offline Wannabe Member
    Array
    Join Date
    Feb 2012
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    6
    Reputation
    5
    RGB Colors are made up of 3 values in the range of 0-255 (or 00-FF) for each color. So the hex colorcode will look like 0xRRGGBB.
    I haven't tested this but I doubt the health bars use anything more complicated than a linear gradient. If this is true, then the all you must find are the colors at 1% and at 100%. Then you can multiply the differences for each color by whatever the health% actually is at the moments you're looking for to find the colors.

    Ex.
    If:
    1% = FF0000 (pure red)
    100% = 00EE1F (very green and a little blue)
    Then:
    30% = (0.7*FF) for red, (0.3*EE) for green, and (0.3*1F) or ~B24C09.



    That's if it changes linearly.

    One note about grabbing the pixel: I've noticed when grabbing pixels of the UI that changing the size of the war3 window/resolution changes the color of pixels (even at the modified coordinate). It may be the same for healthbars. So test this.

  2. The Following User Says Thank You to BullJam For This Useful Post:


  3. #12
    Sosha's Avatar
    Sosha is offline :)



    Array
    Join Date
    Oct 2011
    Location
    Iran
    Posts
    516
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    12
    Reputation
    1008
    I'm going to check a Dota AI jass script to find lasthit section
    I'll copy it , here for ya

  4. #13
    el patron is offline Advanced Hacker
    Array
    Join Date
    Oct 2008
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    9
    Reputation
    81
    terrible idea to get hp from units.....
    Quote Originally Posted by wc3noobpl
    omfg kid,im professional C++/C# programmer,with 10 years exp.lol you dont even know what is data types and its role in programming and you even talking?

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Who was Range? :O
    By GodOfWar in forum Entertainment
    Replies: 13
    Last Post: 12-19-2007, 07:55 PM
  2. Range
    By ZeD in forum Entertainment
    Replies: 17
    Last Post: 09-12-2007, 10:21 PM
  3. Range ~~
    By RangeAccForNow in forum Entertainment
    Replies: 20
    Last Post: 07-20-2007, 09:30 PM

Posting Permissions

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