Results 1 to 12 of 12

Thread: How to find if your in a fight in colour

  1. #1
    Join Date
    Oct 2010
    Location
    Under a bridge
    Posts
    648
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default How to find if your in a fight in colour

    Ok so im trying to make a all colour script, so how could i check if im in a fight while im here?



    Thanks

    E: pic not showing for me so here is a link http://i55.tinypic.com/2s0epnm.png

    Edit again: What part of the include handles health or do i have to find a way myself?
    Last edited by Troll; 04-15-2011 at 05:20 PM.
    Quote Originally Posted by DD on IRC
    wanted to troll the troll

  2. #2
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Find the color of your healthbar and if it is on a certain location (above your head), then in fight ?

  3. #3
    Join Date
    Oct 2010
    Location
    Under a bridge
    Posts
    648
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    How do i find if thats my health bar because its not always in the middle?

    Thanks for the help tho
    Quote Originally Posted by DD on IRC
    wanted to troll the troll

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

    Default

    There's multiple ways of locating a health bar:
    1. Color searching. Search for the green and/or red color
    2. DTM. Make a DTM of the bar outline
    3. BMP. Search for a 1px wide BMP of the green part of the health bar

  5. #5
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Basically I believe this is impossible.. Due to the fact that if someone is standing under you and fighting your monsters, it will show up as your health bar.. tbh the only way to find out if your being attacked is to check your health.. like the number itself.

    You have 492 hp. Check to see if it keeps decreasing or something. If you have really high def and you never get hit, then good luck.

    I love how ideas pop into my head.. The possible best solution:
    You know how it shows the "29" damage you did in the pic? Yours will always be red/orange, etc or if you hit a 0, its blue.. other people's will be sorta maroon and if they hit 0, then it wont show up at all.. That is possibly the best way to tell if your in a fight. As far as I know, yours will never ever be maroon so you can still colour tolerance it.
    I am Ggzz..
    Hackintosher

  6. #6
    Join Date
    Feb 2009
    Posts
    1,447
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Hit-splashes are static images, and the hit-splashes made by you/to you have a unique colour, so look for the top/bottom of the hit-splash (DTM/Bitmap). Then, if the hitsplash doesn't show up for a while, or if your hp bar is gone, you are probably done fighting. You can also keep track of your enemy's hp bar for optimal performance.

  7. #7
    Join Date
    Oct 2010
    Location
    Under a bridge
    Posts
    648
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    So how can you check your hitpoint/ your life?
    How can you check your hitpoint XP.
    So if they change your in a fight
    Quote Originally Posted by DD on IRC
    wanted to troll the troll

  8. #8
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Troll View Post
    So how can you check your hitpoint/ your life?
    How can you check your hitpoint XP.
    So if they change your in a fight
    In Colour you simply look at the Upper Left area of the MM where your health is located in a circle in text. You can easily moderate changes in that.

    You can also attempt to implement pixel shift as a check as well, seeing how if a person is standing on your square, you show up on top of them and not animating. However I do not know how accurate this method is.
    “Ignorance, the root and the stem of every evil.”

  9. #9
    Join Date
    Oct 2010
    Location
    Under a bridge
    Posts
    648
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    So can you make BitMap/DTM on the go, so i can make in using set bounds?
    Quote Originally Posted by DD on IRC
    wanted to troll the troll

  10. #10
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Quote Originally Posted by TRiLeZ View Post
    Hit-splashes are static images, and the hit-splashes made by you/to you have a unique colour, so look for the top/bottom of the hit-splash (DTM/Bitmap). Then, if the hitsplash doesn't show up for a while, or if your hp bar is gone, you are probably done fighting. You can also keep track of your enemy's hp bar for optimal performance.
    I think hit splashes wouldn't be so accurate as they're located further away from the player. I would rely more on the health bar located at a certain static location, that'd be the simplest in my opinion.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  11. #11
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Animation.scar to see if your char is 'Animating' plus color check for HP bar.

  12. #12
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    srl_InFight?

    E:
    Simba Code:
    function AreWeFighting: Boolean;
    begin
      if srl_InFight then
        Result := PixelShift(IntToBox(MSCX - 15, MSCY - 15, MSCX + 15, MSCY + 15), 800) > 150;
    end;

    should work well
    Last edited by TomTuff; 04-17-2011 at 12:41 AM.

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
  •