MouseMove to Pixel X and Y Topic is solved

Ask gaming related questions
Letteen

MouseMove to Pixel X and Y

03 Dec 2015, 14:16

Hello!, well, I was trying to do an aimbot for Battlefield 4 with pixel colors but, there are alot of factors that change colors and I couldn't do it.

About 4 hours ago I realized that I played Blockade 3D in the past so I went to that game and I saw that the colors never change, there is no dynamic light(you can enable it) so I did this:

Code: Select all

LAlt:: 
MouseGetPos, xposm, yposm 
MouseGetPos, xposb, yposb 
xposm-=100 
xposb+=100 
yposm-=100 
yposb+=100 
PixelSearch, Px, Py, %xposm%, %yposm%, %xposb%, %yposb%, 0x31C308, 3, Fast 
Mousemove, %Px%,%Py%, 25
Any help with this? does not seem to work, it doesn't even move the mouse, thanks!
Letteen

Re: MouseMove to Pixel X and Y

03 Dec 2015, 14:40

Came up on a simpler one, that SHOULD work, it does not seem to, maybe the TargetX and Y should be in %%? Im not too familiarized with AHK

Code: Select all

color := "0x31C308"
CoordMode, Pixel, Screen
PixelSearch, TargetX, TargetY, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, %color%, 25, Fast
MouseMove, TargetX, TargetY
Peared
Posts: 12
Joined: 02 Dec 2015, 12:32

Re: MouseMove to Pixel X and Y

03 Dec 2015, 14:59

I have a fix that works for my similar use, drop the PixelSearch and use ImageSearch instead. Make an image 2x2 - 4x4 in size, and test it out, you might haveto jack up colorvariations to a level around *45-*80. If bot click on other items than intended try to use an image with Two seperate colors (light-dark).


Instead if using all those variables :

PixelSearch, Px, Py, xposm-100, yposm-100, xposm+100, yposm+100, 0x31C308, 3, Fast
ImageSearch, Px, Py, xposm-100, yposm-100, xposm+100, yposm+100, *n *wn *hn imagefile.bmp
Letteen

Re: MouseMove to Pixel X and Y

03 Dec 2015, 15:11

Thanks!, but it seems that it works, but not ingame, any solution for this?
Peared
Posts: 12
Joined: 02 Dec 2015, 12:32

Re: MouseMove to Pixel X and Y

03 Dec 2015, 15:32

Try this:

color := "0x31C308"
CoordMode, Pixel, Screen
PixelSearch, TargetX, TargetY, 1, 1, A_ScreenWidth, A_ScreenHeight, %color%, 25, Fast
MouseMove, %TargetX%, %TargetY%
Letteen

Re: MouseMove to Pixel X and Y

03 Dec 2015, 15:45

I think it does not work since its a FPS game and Fps games disable hardware cursor and hide it, so I'm not using the actual mouse but a variable than moves the mouse when the game refreshes, its like assigning a variable to a variable :u
Letteen

Re: MouseMove to Pixel X and Y  Topic is solved

03 Dec 2015, 15:56

Just found something, If you open the task manager and set it "always on top" and you get the game in the background and click it when the task manager is in the middle of the screen, the arrow comes up and you can aim, it doesn't track the enemies but I'm getting closer, it does not track because the color under the mouse is the color in the task manager, I should make some kind of GUI that is invisible and make it always on top, I think that's the solution, also I can't click, but that is easy to resolve, just make it when it aims shoot automatically
Peared
Posts: 12
Joined: 02 Dec 2015, 12:32

Re: MouseMove to Pixel X and Y

03 Dec 2015, 16:01

Try adding top top section of script : Sendmode Play
Letteen

Re: MouseMove to Pixel X and Y

03 Dec 2015, 16:09

Nah, does not work, I don't know what to do, It does not seem possible without .DLL injecting...
Peared
Posts: 12
Joined: 02 Dec 2015, 12:32

Re: MouseMove to Pixel X and Y

03 Dec 2015, 16:16

What game are you trying to make it work in? Battlefield or Blockade?

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 15 guests