Jump to content

PixelGetColor() keep changing detected color


ronartos
 Share

Recommended Posts

I am making a macro for a game called mythwar online. And trying to see if screen changes...

Example is I got this HP bar on the upper left the screen and try to get some PixelGetColor() to see if my character still got HP, but everytime I move the PixelGetColor() changes the color detected.

I tried Pixelchecksum() and PixelSearch() too but not always detecting pecfectly.

I think the game changes color even the HP bar while your moving.

can someone help?

Link to comment
Share on other sites

I am making a macro for a game called mythwar online. And trying to see if screen changes...

Example is I got this HP bar on the upper left the screen and try to get some PixelGetColor() to see if my character still got HP, but everytime I move the PixelGetColor() changes the color detected.

I tried Pixelchecksum() and PixelSearch() too but not always detecting pecfectly.

I think the game changes color even the HP bar while your moving.

can someone help?

$color1 = pixelgetcolor(x,y)

If $color1 > 15000000 then do something ( basically looking for something close to white here )

endif

Also

If $color > 10000 AND $color < 10000000 Then... ( to check for some range of a colors )

Link to comment
Share on other sites

$color1 = pixelgetcolor(x,y)

If $color1 > 15000000 then do something ( basically looking for something close to white here )

endif

Also

If $color > 10000 AND $color < 10000000 Then... ( to check for some range of a colors )

By any chance I i use this on Hex() mode of that color, and also, example there is a character bar in the upper left of the screen, and from what I sees it never changes location nor color, but the pixel color keeps on detecting new color everytime my character moves to other direction. I hope I can use pixelchecksum() or PixelSearch() but not all the time it was success. and there's a big difference when I run script on windows 98 and on 2000/XP.

Edited by ronartos
Link to comment
Share on other sites

I am making a macro for a game called mythwar online. And trying to see if screen changes...

Example is I got this HP bar on the upper left the screen and try to get some PixelGetColor() to see if my character still got HP, but everytime I move the PixelGetColor() changes the color detected.

I tried Pixelchecksum() and PixelSearch() too but not always detecting pecfectly.

I think the game changes color even the HP bar while your moving.

can someone help?

I've found that in many games the controls are slightly translucent and therefore the colors change just enough to make PixelGetColor() not work.

I'm currently looking into searching for the memory locations instead.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...