| View previous topic :: View next topic |
| Author |
Message |
Deve Expert Cheater
Reputation: 0
Joined: 20 Jan 2007 Posts: 245 Location: Stockholm, Sweden
|
Posted: Sun Mar 15, 2009 10:15 am Post subject: [Solved] GetPixel help |
|
|
Hello all,
Im trying to make a autopotter in C# for Dekaron but i dont know how to get the pixels from:
but when i use:
| Code: | IntPtr WindowHandle = FindWindow("Renderer", "Dekaron");
backred = GetPixel(GetDC(WindowHandle), 745, 935); //HP
backblue = GetPixel(GetDC(WindowHandle), 615, 950); //MP |
the value stays the same when i consume my mana below that point.
Solution?
_________________
Leecher.
Last edited by Deve on Sun Mar 15, 2009 6:05 pm; edited 1 time in total |
|
| Back to top |
|
 |
AlbanainRetard Master Cheater
Reputation: 0
Joined: 02 Nov 2008 Posts: 494 Location: Canada eh?
|
Posted: Sun Mar 15, 2009 11:51 am Post subject: Re: [C#]GetPixel help |
|
|
| develito wrote: | Hello all,
Im trying to make a autopotter in C# for Dekaron but i dont know how to get the pixels from:
but when i use:
| Code: | IntPtr WindowHandle = FindWindow("Renderer", "Dekaron");
backred = GetPixel(GetDC(WindowHandle), 745, 935); //HP
backblue = GetPixel(GetDC(WindowHandle), 615, 950); //MP |
the value stays the same when i consume my mana below that point.
Solution? |
Are you 100% the Class name is right? Then just use a class name. Also check if there are any "Preventions" from using a straight forward GetPixel if so try to bypass. (I don't play)
Also you may of got the wrong color by one pixel, take a screen shot find the point in paint and get the color value.
_________________
|
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Sun Mar 15, 2009 11:52 am Post subject: |
|
|
| Is the game protected? (GameGuard, HackShield, XTrap?)
|
|
| Back to top |
|
 |
Deve Expert Cheater
Reputation: 0
Joined: 20 Jan 2007 Posts: 245 Location: Stockholm, Sweden
|
Posted: Sun Mar 15, 2009 11:57 am Post subject: |
|
|
| dnsi0 wrote: | | Is the game protected? (GameGuard, HackShield, XTrap?) |
The real game is but im playing on a private server so no.
and AlbanainRetard, what bypass? the one that 4ng3licDew used?
_________________
Leecher. |
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Sun Mar 15, 2009 11:58 am Post subject: |
|
|
| develito wrote: | | dnsi0 wrote: | | Is the game protected? (GameGuard, HackShield, XTrap?) |
The real game is but im playing on a private server so no.
and AlbanainRetard, what bypass? the one that 4ng3licDew used? |
Good. Then check if GetPixel is actually returning anything.
|
|
| Back to top |
|
 |
AlbanainRetard Master Cheater
Reputation: 0
Joined: 02 Nov 2008 Posts: 494 Location: Canada eh?
|
Posted: Sun Mar 15, 2009 11:59 am Post subject: |
|
|
| develito wrote: | | dnsi0 wrote: | | Is the game protected? (GameGuard, HackShield, XTrap?) |
The real game is but im playing on a private server so no.
and AlbanainRetard, what bypass? the one that 4ng3licDew used? |
Well if your testing were it is using GameGaurd just jump the first five bytes if not then check if you got the right color.
_________________
|
|
| Back to top |
|
 |
Deve Expert Cheater
Reputation: 0
Joined: 20 Jan 2007 Posts: 245 Location: Stockholm, Sweden
|
Posted: Sun Mar 15, 2009 12:07 pm Post subject: |
|
|
I made a simple label to show me the value | Code: | | label4.Text = Convert.ToString(backblue); |
and it shows me 4344134. I used the sampler in Paint.NET and can't find eny RGB values to 43, 44, 134
_________________
Leecher. |
|
| Back to top |
|
 |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Sun Mar 15, 2009 12:26 pm Post subject: Re: [C#]GetPixel help |
|
|
| develito wrote: | Hello all,
Im trying to make a autopotter in C# for Dekaron but i dont know how to get the pixels from:
but when i use:
| Code: | IntPtr WindowHandle = FindWindow("Renderer", "Dekaron");
backred = GetPixel(GetDC(WindowHandle), 745, 935); //HP
backblue = GetPixel(GetDC(WindowHandle), 615, 950); //MP |
the value stays the same when i consume my mana below that point.
Solution? |
Use some error checking! Make sure that each thing returned from a API is usable and was successful! Then you will find out your problem!
I too think it's with the FindWindow();
_________________
|
|
| Back to top |
|
 |
Deve Expert Cheater
Reputation: 0
Joined: 20 Jan 2007 Posts: 245 Location: Stockholm, Sweden
|
Posted: Sun Mar 15, 2009 3:40 pm Post subject: |
|
|
I remade the autopotter in C++ because it feels easier, i've got everything working with the GetPixel but now im missing a check.
Something to constantly check the RGB values, timer?
i have never seen codes for a timer in C++ so any tips?
_________________
Leecher. |
|
| Back to top |
|
 |
`unknown Grandmaster Cheater
Reputation: 0
Joined: 20 Nov 2006 Posts: 658 Location: You lost the game.
|
Posted: Sun Mar 15, 2009 4:05 pm Post subject: |
|
|
| I think you need to call GetDC() outside of the GetPixel, that is how I did mine. GetDC(NULL) for fullscreen, otherwise use the window handle of the app you want to get the pixel of.
|
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Sun Mar 15, 2009 4:28 pm Post subject: |
|
|
| `unknown wrote: | | I think you need to call GetDC() outside of the GetPixel, that is how I did mine. GetDC(NULL) for fullscreen, otherwise use the window handle of the app you want to get the pixel of. |
No you don't.
They work the same way.
|
|
| Back to top |
|
 |
Deve Expert Cheater
Reputation: 0
Joined: 20 Jan 2007 Posts: 245 Location: Stockholm, Sweden
|
Posted: Sun Mar 15, 2009 4:39 pm Post subject: |
|
|
So, tips for making a check for RGB values?
_________________
Leecher. |
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sun Mar 15, 2009 5:10 pm Post subject: |
|
|
| develito wrote: | I remade the autopotter in C++ because it feels easier, i've got everything working with the GetPixel but now im missing a check.
Something to constantly check the RGB values, timer?
i have never seen codes for a timer in C++ so any tips? |
SetTimer()
Also, you can use the RGB macro for the sake of ease.
COLORREF butt = GetPixel(hdc, 50, 50);
if(butt == RGB(255, 255, 255)){
//do something neat
}
|
|
| Back to top |
|
 |
Deve Expert Cheater
Reputation: 0
Joined: 20 Jan 2007 Posts: 245 Location: Stockholm, Sweden
|
Posted: Sun Mar 15, 2009 6:04 pm Post subject: |
|
|
Thank you everyone for your help.
Since i only use the potter while i play so the easiest solution was:
| Code: | if(GetAsyncKeyState(VK_F8))
{
while(DekaronWindow==GetForegroundWindow())
{
//autopot code
}
Sleep(500);
}
|
_________________
Leecher. |
|
| Back to top |
|
 |
|