taultunleashed logoGetPixelColor is kinda bugged... : EverQuest 2 Premium Discussions
newtopic  postreply
 [ 6 posts ] 
blue large dot

GetPixelColor is kinda bugged... : EverQuest 2 Premium Discussions

Posted: December 13th, 2004, 10:13 am
 
richyrich
richyrich's Reps:
User avatar
Well, this is not a new issue, I actually found the same problem when I was scripting SWG, but I thought I'd throw it out there again if there is something Admin/Wyv can do?

Here is the problem, the GetPixelColor() doesn't always return the right colors when it is reading from a "window" in game.
There is a quick way to reproduce the problem and that is to run the GetPixelColorDemo.vbs that comes with XU.
Go into EQ2 and put your cursor over the health bar of your character (will have to move away from the pop-up tip). Just leave it there and watch the color value swtich between the real colors and something else (usually 0, 0, 0, but can be anything).

I found this when coding SWG and rewrote my health/power bar functions to work around this by checking a pixel multiple times if it didn't match what was expected... and think it is pretty reliable now even in EQ2.

The problem is the more we rely on the function to get colors the more it will become a problem, especially if using to bitmap checks until we have other functions that do that.

I have found the problem does not happen if you are not reading from an in-game window. So, my theory is somehow the GetPixelColor() function is not in sync with the game redraw and when reading from a window in-game, it sometimes reads what is "behind" the window instead of the actual window color (health bar, etc.)

Any ideas?

Rich


Reply with quote
Posted: December 13th, 2004, 3:38 pm
 
Admin

Total Posts: 1168
Location: Waco
Joined: May 1st, 2004, 4:00 am
Admin's Reps: 4
User avatar
administrator
premium
You are right.

I have found the problem. I was using the WIN32API to call GetPIxel GetDC(0),x,y. I have modified the script to call GetPixel gameDC,x,y.

I'll post it here in a bit.

_________________
Help our site.. take a moment to click the Digg this post!!! v v v


Reply with quote
Posted: December 13th, 2004, 3:53 pm
 
richyrich
richyrich's Reps:
User avatar
Awesome! You have no idea how much code I have written to "work around" this bug :-) TY TY!


Reply with quote
Posted: December 15th, 2004, 2:16 am
 
djvj

Total Posts: 272
Joined: May 1st, 2004, 4:00 am
djvj's Reps: 0
User avatar
Active User > 50 Posts
That also always happens in FFXI, but it does not always goto 0,0,0 but some other random color code. Rather annoying but scripting still is possible obviously.


Reply with quote
Posted: December 15th, 2004, 3:54 am
 
richyrich
richyrich's Reps:
User avatar
It's not always 0,0,0, just see that a lot, I think it truly is reading what is "behind" the window...

Still waiting to see it released, tried it last night and it was still the old code.


Reply with quote
Posted: December 15th, 2004, 4:38 am
 
wyvernx

Total Posts: 6718
Joined: May 1st, 2004, 4:00 am
wyvernx's Reps: 21
User avatar
administrator
premium
I dont think he has posted a new scripthost yet

_________________
Use Search first, ask questions later!


Reply with quote
Want Advertisements After The Last Post Removed? Create A Free Account!

blue large dot Who is online
Users browsing this forum: No registered users and 132 guests

Popular Sections
SWTOR Cheats
Guild Wars 2 Cheats
Guild Wars 2 Hacks
Guild Wars 2 Bots
Diablo 3 Cheats
Guild Wars 2 Mods

Popular Sections
WoW Cataclysm Cheats & Exploits
WoW Cataclysm Hacks & Bots
Star Wars The Old Republic Cheats
SWTOR Mods
Torchlight 2 Cheats
SWTOR Space Mission Bots
Site Nav and RSS
RSS Feed of EverQuest 2 Premium Discussions RSS Feed 
Sitemap of EverQuest 2 Premium Discussions Sitemap 
SitemapIndex SitemapIndex
RSS Feed RSS Feed
Channel list Channel list
left bottom corner Site and Contents Copyright 2001-2012 All Rights Reserved TaultUnleashed.com bottom corner
top left
top right
createaccount
Username:   Password:   Remember Me?