pixartist Posted July 19, 2008 Share Posted July 19, 2008 (edited) Hi, i wrote a bot for a certain game which uses the pixelgetcolor function to get some information. i found that my bot showed very unexpected behavior all the time... i worked quite some time on it and came to the conclusion that getpixelcolor is definatly bugged for me. as a proof:this is a log from my bot->17:56:10:Target found, $notarget: 0->17:56:17:Target found, $notarget: 0->17:56:24:Target found, $notarget: 0->17:56:31:Target found, $notarget: 0->17:56:38:PixelGetColor failed, returned 0->17:56:45:NO Target found, $notarget: 1 //these 5 lines are the only lines supposed to say NO target found....->17:56:52:NO Target found, $notarget: 2->17:56:59:NO Target found, $notarget: 3->17:57:06:NO Target found, $notarget: 4->17:57:13:NO Target found, $notarget: 5->17:57:16: Selecting new Target->17:57:33:NO Target found, $notarget: 1->17:57:40:NO Target found, $notarget: 2->17:57:47:NO Target found, $notarget: 3->17:57:54:Target found, $notarget: 2->17:58:01:Target found, $notarget: 1->17:58:08:PixelGetColor failed, returned 0->17:58:15:NO Target found, $notarget: 2->17:58:22:Target found, $notarget: 1->17:58:29:NO Target found, $notarget: 2->17:58:36:Target found, $notarget: 1->17:58:43:Target found, $notarget: 0->17:58:50:Target found, $notarget: 0->17:58:57:Target found, $notarget: 0->17:59:04:Target found, $notarget: 0->17:59:11:PixelGetColor failed, returned 0->17:59:18:NO Target found, $notarget: 1->17:59:25:NO Target found, $notarget: 2->17:59:32:Target found, $notarget: 1->17:59:39:Target found, $notarget: 0->17:59:46:Target found, $notarget: 0->17:59:53:NO Target found, $notarget: 1->18:00:00:NO Target found, $notarget: 2->18:00:07:Target found, $notarget: 1->18:00:14:Target found, $notarget: 0->18:00:21:PixelGetColor failed, returned 0->18:00:28:NO Target found, $notarget: 1->18:00:35:Target found, $notarget: 0->18:00:42:PixelGetColor failed, returned 0->18:00:49:NO Target found, $notarget: 1->18:00:56:Target found, $notarget: 0->18:01:03:Target found, $notarget: 0->18:01:10:NO Target found, $notarget: 1->18:01:17:Target found, $notarget: 0->18:01:24:PixelGetColor failed, returned 0$notarget is a variable which filters out any wrong values, the program has to validate 5 times in a row that the target was lost in order to get a new target.as you can see, several lines state: PixelGetColor failed, returned 0. Those lines are the really interesting ones, because they only occur when getpixelcolor returns 0 (black) which is impossible in this case. the checked pixel CAN ONLY be white or medium grey, but NEVER full black(and yes i double and triple checked using screenshots to look for pixels closeby in any given situation...there was never EVER a black pixel). this means pixelGetColor gives me wrong results -> it's definatly not working correctlyanyone getting similar problems using that function with fullscreen 3d apps?edit: whats also interesting is that even though in this case the target was lost only ONCE right at the start, there are several lines stating that no target was found even though the checked pixel was DEFINATLY white(which is again proven by the following lines actually FINDING the white pixel !!)...very very weird Edited July 19, 2008 by pixartist Link to comment Share on other sites More sharing options...
cppman Posted July 19, 2008 Share Posted July 19, 2008 Are you taking into account the color variations due to lighting, shadows, shader effects, etc? That could be a problem. Miva OS Project Link to comment Share on other sites More sharing options...
pixartist Posted July 19, 2008 Author Share Posted July 19, 2008 Are you taking into account the color variations due to lighting, shadows, shader effects, etc? That could be a problem.YES of course i do... Link to comment Share on other sites More sharing options...
pixartist Posted August 11, 2008 Author Share Posted August 11, 2008 YES of course i do...bump...please guys..i found several other threads reporting unexpected results for pixelgetcolor... someone gotta have an idea what causes this Link to comment Share on other sites More sharing options...
Zusias Posted August 26, 2008 Share Posted August 26, 2008 I'm bumping this because I've got the same issue only strangely it seems to be in reverse. I'm checking several pixels in a UI window with 100% opacity that should be 100% black. I've watched it during these checks and the pixels are completely black. I started saving the pixels into a log, thinking they might have just been a very very dark grey for a few frames. No dice. 0x373240 0x766872 On a pixel that checks positive for 0x000000 90+% of the time, is black for several pixels in all directions, and I can't see any change as it creates these false positives. Any ideas or help on the issue would be appreciated. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 26, 2008 Moderators Share Posted August 26, 2008 Ya'll should keep in mind, that if you are not using client coords, and the hwnd of the window in the provided parameter, that if that window should ever lose focus for even a moment, it could throw the results off. So what should you do? Make sure your window is always active before searching with WinActivate() or use the Hwnd parameter (may still have to make sure it's not covered). Use the client coords of the window you are trying to get colors of rather than screen coords that most of you use. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
weaponx Posted August 26, 2008 Share Posted August 26, 2008 I think I found the problem. Games were meant to be played by humans, not scripts. Link to comment Share on other sites More sharing options...
Bert Posted August 26, 2008 Share Posted August 26, 2008 Also, Gameguard is designed by humans to make sure humans play games! The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Smiley357 Posted August 26, 2008 Share Posted August 26, 2008 Gameguard sucks. It is easily bypassed. I would love to play the games. But you know the expression. If you cant beat them, join them! No way you can outdo a bot. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now