Page 1 of 1
how to get pixel position in another application?
Posted: Thu Sep 07, 2006 10:50 am
by acidburn
hello there!
i am planning to make a program that can detect the pixel/color position in another 3d program and process that pixel position to my program. is it posible? ummm is it posible to send command to that 3d program? sorry for my crazzzzzyness thing heh
ty in advance
Posted: Fri Sep 08, 2006 9:10 am
by acidburn
no one knows?

Posted: Fri Sep 08, 2006 5:29 pm
by netmaestro
I read your question and it may be just me being dense, but I'm not sure exactly what you're trying to accomplish. Could you clarify a bit?
Posted: Wed Sep 13, 2006 11:50 am
by acidburn
hello netmaestro!
thank you for replying. about my question, its a kinda AI type program that i would like to code (without any good backround in PB and am not that good programmer too heh). the idea is to capture the location (x and y axis) of pixel in the 3d Online game then if the condition is true then the program will send a command. I think hooking/injecting technique is much better than my idea but i dont have yet that kind of programming knowledge. actually this is my second project. my first project was KLOGS (its a keylogger program - using in good way)
Why do i have to create this AI program? my brother and i love to play Online games specially FLYFF, but since we're so buisy and we can't play it everyday, just like i said, i want to make a AI program that can help us levelling our skills - its skill spammer type program. hey am not that bad person, skill spamming is aloud in FLYFF. i hope you understand and thank you.
Posted: Wed Sep 13, 2006 12:00 pm
by PB
Your first program was a keylogger, and now you want to make a bot-type
app to keep up your skills against real human players when you're not there?
And I suppose you think nothing's wrong with that? Don't expect much help.
Posted: Wed Sep 13, 2006 12:59 pm
by acidburn
sir PB, all of the players already doing that in flyff by means of using toothpick or paper inserting to a keyboard function key to keep their skills levelling while theiy are sleeping or while they are doing something and i think game moderator knows that. and i think that's not illegal in flyff and its not against real human players. sir its a skills level not the players level we are talking about here.
if I said something stupid with my idea, sorry. am just looking for help. ...am not that bad person.
"i know my limits when it comes to my programs...." if you cant help me its OKAY.
Posted: Wed Sep 13, 2006 1:54 pm
by Kale
What is FLYFF?
I think i know what you want to do, as i used to use an official third party program (through their dev program) for Ultima Online. Basically it used to check the health bar on screen via a pixel reading. If that pixel turned green (rather than red) it mean't i was poisened, etc. and the macro program sent a key command to the UO client for the cure poisen spell. This helped train my magery and meditation in game as i cast poisen on myself. I also had macros running to check my health bar to make sure it didn't go below a certain level. This was acheived by making sure another pixel didn't turn black. If it did, i sent the command for a health spell to the client to heal myself. Simple stuff and very effective.
I guess it depends wether the game client runs in windowed or fullscreen mode, as i think fullscreen will be hard to check.
Also, one word of warning, unless official OK'ed these tools can be considered cheating and result in a ban.
Posted: Wed Sep 13, 2006 2:24 pm
by acidburn
thanks kale!
thanks GOD kale you hit the point. thats what am trying to say, i wanna know the exact pixel of the game. by checkng the health of the skills am now may be able to used potion without pressiing keys. my main goal is for skills only, bcoz levelling skills in flyff is to hard. by the way FLYFF means Fly For Fun you can visit the site here
www.flyffworld.com or check the forum
http://www.flyffworld.com/forums.
Posted: Wed Sep 13, 2006 10:27 pm
by PB
If it's not against real human players then it's not so bad, I agree.
Posted: Thu Sep 14, 2006 12:36 am
by Kale
This is a simple routine which i don't know if it would work with fullscreen applications:
Code: Select all
OpenConsole()
EnableGraphicalConsole(#True)
WindowDC.l = GetWindowDC_(#Null)
While GetAsyncKeyState_(#VK_ESCAPE) <> -32767
GetCursorPos_(Coords.POINT)
Colour = GetPixel_(WindowDC, Coords\x, Coords\y)
RedComponent.l = Red(Colour)
GreenComponent.l = Green(Colour)
BlueComponent.l = Blue(Colour)
ClearConsole()
PrintN("The colour at " + Str(Coords\x) + " x " + Str(Coords\y) + " is RGB(" + Str(RedComponent) + ", " + Str(GreenComponent) + ", " + Str(BlueComponent) + ")")
Delay(1)
Wend
CloseConsole()
End
To send keystroke to an application, try a search
http://www.purebasic.fr/english/viewtopic.php?t=3766
http://www.purebasic.fr/english/viewtopic.php?t=15503
Posted: Thu Sep 14, 2006 8:53 am
by acidburn
wow thank you guyz...
sir PB thank you very much and sir kale thanks for the code and the links. i'll try it now
EDITED:
yup its working on Ragna client, but not in FLYFF client, may be you're right, it will not work in fullscreen app coz flyff is running in fullscreen mode. but there is a trick in flyff client, by inserting word "sunkist" in exe ini file, it will run in window mode, but the problem is PB program can't detect the client axis, still the desktop axis detecting. hmmm