Go Back   UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats > Anti-Cheat Software & Programming > Programming for Beginners

- Sponsored Advertisement -
http://www.myfpscheats.com/

Welcome to the UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats.
You have to register before you can post and see and access any of the advanced forum features, please click the register link to proceed to the registration form. To start viewing threads or posts, select a forum that you want to visit from the selection below.
Programming for Beginners
This section is for those just beginning in the programming world.
You are Unregistered, please register to gain Full access.    
Reply
 
Thread Tools

Aimbot in AHK script
Old 09-07-2010, 10:08 AM   #1
1337 H4x0!2

leopard's Avatar

Join Date: Sep 2009
Posts: 144
Reputation: -392
Rep Power: 0
leopard is likely going to get bannedleopard is likely going to get bannedleopard is likely going to get bannedleopard is likely going to get banned
Last Achievements
Aimbot in AHK script

Hi i have find a aimbot for bf2 in AHK script. But it is aiming in the air and not on the enemy when i press the Lalt button
Because i im not know whit AHK script.Maby can someone me help whit this

#NoEnv
#SingleInstance force
#InstallKeybdHook
#InstallMouseHook
#Persistent
return

ggg=0
swich=0
LAlt::
MouseGetPos, xposm, yposm
MouseGetPos, xposb, yposb
xposm-=100
xposb+=100
yposm-=100
yposb+=100
PixelSearch, Px, Py, %xposm%, %yposm%, %xposb%, %yposb%, 0x152027, 3, Fast

if (ErrorLevel){
}
else{
ggg+=1
Mousemove, %Px%,%Py%
if(swich=1){
Sleep 40
MouseClick, Left, , , , , D
sleep 40
MouseClick, Left, , , , , U
}
}
Return
Del::
MsgBox Found %ggg% times. Switch is %swich%!
Return
F9::
if(swich=1){
swich=0
}
else{
swich=1
}
SoundBeep, 500, 100
Return
$Scrolllock::
ExitApp
leopard is online now

Reply With Quote


Old 09-07-2010, 11:57 AM   #2
◄ Super Moderator ►

Hanoi22's Avatar

Join Date: Dec 2009
Posts: 3,197
Reputation: 81929
Rep Power: 909
Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!
Fire At Will Champion Hot Pepper vs The Water Champion Krabbyball Champion If Pigs Can Fly Champion Muay Thai Champion Tadpole Champion Jumping Nutty Champion Blood Shed Champion Badger Racing Champion
Points: 55,908, Level: 35
Points: 55,908, Level: 35 Points: 55,908, Level: 35 Points: 55,908, Level: 35
Activity: 100.0%
Activity: 100.0% Activity: 100.0% Activity: 100.0%
Last Achievements
Award-Showcase
Tbh aimbots can't be done in ahk... and you can't just copypaste some random script and wait it to aim enemies...
Most likely it's just searching for a color to aim at but in game it'd be impossible to define a proper color ranges for it.
__________________
Cal Hockley: Where are you going? To him? To be a whore to a gutter rat?
Rose: I'd rather be his whore than your wife.
-----------------------------------------------------
Georg Henrik von Wright: If one is satisfied with things, one doesn't complain about the downsides that exist, either.

Quote:
Winslow: Hanoi, your 'english' is not understandable
Quote:
AdilAA: not sure if i should release my incomplete BF P4F Hack with non-working toggles

Roverturbo: Hanoi22 is just a bitch, and it's hard to please bitches unless you let them get their own way.
Style by lowHertz.
Hanoi22 is offline

Reply With Quote

Old 09-07-2010, 12:20 PM   #3
Super Moderator

Kiwinz's Avatar

Join Date: Jan 2008
Location: New Zealand
Posts: 2,553
Reputation: 73932
Rep Power: 840
Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!
Points: 47,223, Level: 32
Points: 47,223, Level: 32 Points: 47,223, Level: 32 Points: 47,223, Level: 32
Activity: 26.4%
Activity: 26.4% Activity: 26.4% Activity: 26.4%
Last Achievements
Scanning for colours in a proper language takes an enormous amount of time as it is already. A Macro simply put, couldn't keep up.
The enemy would also always have to be in your line of sight.
__________________



"Those who seek revenge must dig two graves, one for his enemy and another for himself."


On the internet I will - in no shape or form - take personal offence to peoples comments, idea's or views, I assume the people who I reply to won't either.
Kiwinz is online now

Reply With Quote

Old 09-07-2010, 12:27 PM   #4
Senior Member

COMPR3SSOR's Avatar

Join Date: Dec 2009
Posts: 78
Reputation: 1280
Rep Power: 40
COMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for me
Points: 2,429, Level: 4
Points: 2,429, Level: 4 Points: 2,429, Level: 4 Points: 2,429, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
for starters ahk aimbots are real.. not effective at all but real

@ your code.
most games dont use clicking on parts of the screen(this is what your codes doing), you move the mouse to change the camera matrix.
realistically if you were to use external image searching, you would want:
1) a neural net to find the head of your enemy within the current frame, it would be much more accurate than a direct picture comparison, as the chances of finding that exact picture on the screen are tiny in a 3d game
2) the ability to measure the distance from the identified 'head' to the cursor (fairly simple)
3) the ability to rotate the mouse at a given speed within the game (also fairly simple)
4) you then stop the mouse when it is over the head and pull the trigger. you cant just use the first head tracking point though, because enemies move a lot, you would need to update the target point just before fireing

PHP Code:
Right Click::
{
ImageSearchFoundXFoundY0020002000,  C:\Documents and Settings\Will -Work  space-\Desktop\AutoHotkey\programs\screens\HeadShot
click 
foundx 30, %foundy 30 
helpfull?
__________________

Last edited by COMPR3SSOR; 09-07-2010 at 12:30 PM.
COMPR3SSOR is offline

Reply With Quote

Old 09-07-2010, 03:18 PM   #5
I see what u did there

scrapdizle's Avatar

Join Date: Jun 2009
Location: pbcl.dll
Posts: 1,183
Reputation: 36186
Rep Power: 417
scrapdizle has a huge epeen!scrapdizle has a huge epeen!scrapdizle has a huge epeen!scrapdizle has a huge epeen!scrapdizle has a huge epeen!scrapdizle has a huge epeen!scrapdizle has a huge epeen!scrapdizle has a huge epeen!scrapdizle has a huge epeen!scrapdizle has a huge epeen!scrapdizle has a huge epeen!
Commando Arena Champion George Wants Beer Champion Domino Champion Shotgun: Defend The Flag Champion Elroy Learns To Fly Champion Mini Putt 2 Champion Lumpy Artist Champion Homerun Frenzy Champion Dr.Strangeblix Champion Export Extreme Champion Americas Army Champion X-Training Champion YetiSports 8 - Jungle Swing Champion
Points: 22,478, Level: 21
Points: 22,478, Level: 21 Points: 22,478, Level: 21 Points: 22,478, Level: 21
Activity: 1.1%
Activity: 1.1% Activity: 1.1% Activity: 1.1%
Last Achievements
The source you provided is for a pixel aimbot.. Although they are generally frowned upon by real coders they are in a sense somewhat useful. Start by getting the color value(usually RGB) and edit the script to match your aim color (ie. head color) use a image editing program like PS to obtain the correct rgb or hex color code..
scrapdizle is online now

Reply With Quote

Old 09-07-2010, 11:47 PM   #6
1337 H4x0!2

leopard's Avatar

Threadstarter
Join Date: Sep 2009
Posts: 144
Reputation: -392
Rep Power: 0
leopard is likely going to get bannedleopard is likely going to get bannedleopard is likely going to get bannedleopard is likely going to get banned
Last Achievements
@Joshdajosh must i copy the code? And where putt this one
Sorry but i am total not know whit AHK script

[Auto Merged - 2:50:19 Europe/Moscow]

Quote:
Originally Posted by scrapdizle View Post
The source you provided is for a pixel aimbot.. Although they are generally frowned upon by real coders they are in a sense somewhat useful. Start by getting the color value(usually RGB) and edit the script to match your aim color (ie. head color) use a image editing program like PS to obtain the correct rgb or hex color code..
@scrapdizle how find the coler value
and program PS whats is that where can i find that
leopard is online now

Reply With Quote

Old 09-07-2010, 11:58 PM   #7
Retired Admin

learn_more's Avatar

Join Date: Sep 2006
Posts: 5,249
Reputation: 93628
Rep Power: 1106
learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (2)
sieg heil Nazi
Points: 70,490, Level: 39
Points: 70,490, Level: 39 Points: 70,490, Level: 39 Points: 70,490, Level: 39
Activity: 24.7%
Activity: 24.7% Activity: 24.7% Activity: 24.7%
Last Achievements
Award-Showcase
Quote:
Originally Posted by leopard View Post
@Joshdajosh must i copy the code? And where putt this one
Sorry but i am total not know whit AHK script

[Auto Merged - 2:50:19 Europe/Moscow]



@scrapdizle how find the coler value
and program PS whats is that where can i find that
stop copypasting everything you find,
and do some research when there is a tiny little bit not explained.....
__________________
learn_more is offline

Reply With Quote

Old 09-08-2010, 12:30 AM   #8
Senior Member

COMPR3SSOR's Avatar

Join Date: Dec 2009
Posts: 78
Reputation: 1280
Rep Power: 40
COMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for me
Points: 2,429, Level: 4
Points: 2,429, Level: 4 Points: 2,429, Level: 4 Points: 2,429, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
I just posted a tiny code for an external screen image search that i just did as proof of concept (it will work with some work) :S

There is no point in making aimbots in ahk. But if you want to learn ahk the best place is their website. Hows about we start off a little smaller and try some macro's? or key bindings?
__________________
COMPR3SSOR is offline

Reply With Quote

Old 09-08-2010, 01:47 AM   #9
1337 H4x0!2

leopard's Avatar

Threadstarter
Join Date: Sep 2009
Posts: 144
Reputation: -392
Rep Power: 0
leopard is likely going to get bannedleopard is likely going to get bannedleopard is likely going to get bannedleopard is likely going to get banned
Last Achievements
Oke thanks for the answer.but there is noway making aimbot whit ahk?
leopard is online now

Reply With Quote

Old 09-08-2010, 02:25 AM   #10
Super Moderator

Kiwinz's Avatar

Join Date: Jan 2008
Location: New Zealand
Posts: 2,553
Reputation: 73932
Rep Power: 840
Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!Kiwinz has a huge epeen!
Points: 47,223, Level: 32
Points: 47,223, Level: 32 Points: 47,223, Level: 32 Points: 47,223, Level: 32
Activity: 26.4%
Activity: 26.4% Activity: 26.4% Activity: 26.4%
Last Achievements
Quote:
Originally Posted by leopard View Post
Oke thanks for the answer.but there is noway making aimbot whit ahk?
You are making a pixel aimbot. It is an aim assistance none the less. So yes, you can make an aimbot in AHK language.
__________________



"Those who seek revenge must dig two graves, one for his enemy and another for himself."


On the internet I will - in no shape or form - take personal offence to peoples comments, idea's or views, I assume the people who I reply to won't either.
Kiwinz is online now

Reply With Quote

Old 09-08-2010, 03:47 AM   #11
I see what u did there

scrapdizle's Avatar

Join Date: Jun 2009
Location: pbcl.dll
Posts: 1,183
Reputation: 36186
Rep Power: 417
scrapdizle has a huge epeen!scrapdizle has a huge epeen!scrapdizle has a huge epeen!scrapdizle has a huge epeen!scrapdizle has a huge epeen!scrapdizle has a huge epeen!scrapdizle has a huge epeen!scrapdizle has a huge epeen!scrapdizle has a huge epeen!scrapdizle has a huge epeen!scrapdizle has a huge epeen!
Commando Arena Champion George Wants Beer Champion Domino Champion Shotgun: Defend The Flag Champion Elroy Learns To Fly Champion Mini Putt 2 Champion Lumpy Artist Champion Homerun Frenzy Champion Dr.Strangeblix Champion Export Extreme Champion Americas Army Champion X-Training Champion YetiSports 8 - Jungle Swing Champion
Points: 22,478, Level: 21
Points: 22,478, Level: 21 Points: 22,478, Level: 21 Points: 22,478, Level: 21
Activity: 1.1%
Activity: 1.1% Activity: 1.1% Activity: 1.1%
Last Achievements
Quote:
Originally Posted by leopard View Post
Oke thanks for the answer.but there is noway making aimbot whit ahk?
yes, its a working pixel aimbot source(tested)

you will want to focus on this line:
PixelSearch, Px, Py, %xposm%, %yposm%, %xposb%, %yposb%, 0x152027, 3, Fast


edit it to your needs.

here is the function reference:
Quote:
PixelSearch, OutputVarX, OutputVarY, X1, Y1, X2, Y2, ColorID [, Variation, Fast|RGB]
Parameters

OutputVarX/Y The names of the variables in which to store the X and Y coordinates of the first pixel that matches ColorID (if no match is found, the variables are made blank). Coordinates are relative to the active window unless CoordMode was used to change that.
Either or both of these parameters may be left blank, in which case ErrorLevel (see below) can be used to determine whether a match was found.
X1, Y1 The X and Y coordinates of the upper left corner of the rectangle to search, which can be expressions. Coordinates are relative to the active window unless CoordMode was used to change that. X2, Y2 The X and Y coordinates of the lower right corner of the rectangle to search, which can be expressions. Coordinates are relative to the active window unless CoordMode was used to change that. ColorID The decimal or hexadecimal color ID to search for, in Blue-Green-Red (BGR) format, which can be an expression. Color IDs can be determined using Window Spy (accessible from the tray menu) or via PixelGetColor. For example: 0x9d6346 Variation A number between 0 and 255 (inclusive) to indicate the allowed number of shades of variation in either direction for the intensity of the red, green, and blue components of the color (can be an expression). This parameter is helpful if the color sought is not always exactly the same shade. If you specify 255 shades of variation, all colors will match. The default is 0 shades. Fast|RGB This parameter may contain the word Fast, RGB, or both (if both are present, separate them with a space; that is, Fast RGB).
Fast: Uses a faster searching method that in most cases dramatically reduces the amount of CPU time used by the search. Although color depths as low as 8-bit (256-color) are supported, the fast mode performs much better in 24-bit or 32-bit color. If the screen's color depth is 16-bit or lower, the Variation parameter might behave slightly differently in fast mode than it does in slow mode. Finally, the fast mode searches the screen row by row (top down) instead of column by column. Therefore, it might find a different pixel than that of the slow mode if there is more than one matching pixel.
RGB: Causes ColorID to be interpreted as an RGB value instead of BGR. In other words, the red and blue components are swapped.
ErrorLevel

ErrorLevel is set to 0 if the color was found in the specified region, 1 if it was not found, or 2 if there was a problem that prevented the command from conducting the search.
Remarks

The region to be searched must be visible; in other words, it is not possible to search a region of a window hidden behind another window. By contrast, pixels beneath the mouse cursor can usually be detected. The exception to this is cursors in games, which in most cases will hide any pixels beneath them.
Slow mode only: By default, the search starts at the upper-left pixel of the region and checks all pixels vertically beneath it for a match. If no match is found there, the search continues to the right, column by column, until it finds a matching pixel. The default left-to-right search order can be inverted by swapping X1 and X2 in the parameter list. In other words, if X1 is greater than X2, the search will be conducted from right to left, starting at column X1. Similarly, if Y1 is greater than Y2, each column of pixels to be searched starting at the bottom rather than the top. Finally, if the region to be searched is large and the search is repeated with high frequency, it may consume a lot of CPU time. To alleviate this, keep the size of the area to a minimum.
Now get to work.

Last edited by scrapdizle; 09-08-2010 at 03:55 AM.
scrapdizle is online now

Reply With Quote

Old 09-08-2010, 11:16 AM   #12
1337 H4x0!2

leopard's Avatar

Threadstarter
Join Date: Sep 2009
Posts: 144
Reputation: -392
Rep Power: 0
leopard is likely going to get bannedleopard is likely going to get bannedleopard is likely going to get bannedleopard is likely going to get banned
Last Achievements
Wow this is me far seized

But i will this aimbot working you have tested so it will work.
So as i understand must i change the colorID and the variation
and must i fill at the %
Or must i change this one. PixelSearch, Px, Py, %xposm%, %yposm%, %xposb%, %yposb%, 0x152027, 3, Fast.To this one.PixelSearch, OutputVarX, OutputVarY, X1, Y1, X2, Y2, ColorID [, Variation, Fast|RGB

I am not know whit this so take me blame
leopard is online now

Reply With Quote

Old 09-09-2010, 10:32 AM   #13
1337 H4x0!2

leopard's Avatar

Threadstarter
Join Date: Sep 2009
Posts: 144
Reputation: -392
Rep Power: 0
leopard is likely going to get bannedleopard is likely going to get bannedleopard is likely going to get bannedleopard is likely going to get banned
Last Achievements
So must i make photo/screenie of bf2?
and than search for X1 Y1 X2 Y2

i have a program used but i get not a colorID. Maby i dont ride used the program
Look for the screenie that it ride used is
Attached Thumbnails
Aimbot in AHK script-1.jpg  
leopard is online now

Reply With Quote

Old 09-10-2010, 07:08 AM   #14
Junior Member

TehExploit's Avatar

Join Date: Oct 2009
Posts: 35
Reputation: 399
Rep Power: 32
TehExploit has learned Kazaa is not a third world countryTehExploit has learned Kazaa is not a third world countryTehExploit has learned Kazaa is not a third world countryTehExploit has learned Kazaa is not a third world country
Points: 1,957, Level: 3
Points: 1,957, Level: 3 Points: 1,957, Level: 3 Points: 1,957, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
No offense to the OP but i think this is way beyond your knowledge

As joshdajosh, start off with the basics instead of just jumping into something far beyond what you know.
TehExploit is offline

Reply With Quote

Old 09-10-2010, 10:10 AM   #15
1337 H4x0!2

leopard's Avatar

Threadstarter
Join Date: Sep 2009
Posts: 144
Reputation: -392
Rep Power: 0
leopard is likely going to get bannedleopard is likely going to get bannedleopard is likely going to get bannedleopard is likely going to get banned
Last Achievements
Quote:
Originally Posted by TehExploit View Post
No offense to the OP but i think this is way beyond your knowledge

As joshdajosh, start off with the basics instead of just jumping into something far beyond what you know.
Maby you can help
leopard is online now

Reply With Quote

Old 09-10-2010, 12:32 PM   #16
Senior Member

COMPR3SSOR's Avatar

Join Date: Dec 2009
Posts: 78
Reputation: 1280
Rep Power: 40
COMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for meCOMPR3SSOR -- Punk buster made a most wanted list for me
Points: 2,429, Level: 4
Points: 2,429, Level: 4 Points: 2,429, Level: 4 Points: 2,429, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
this is an outdated 1 m8. use it, compare it, c what they have done and try to imatate it but still use ur code as a base.

taken from ahk site..

just change crosshaircolor and mycolor=target
i need to work on the speed, part of the speed is ; .02
movex *= .02
movey *= .02

the tolerances for
red, green blue is
xr = 0.5
xm = 0.20
xl = 0.20

coux > 1000 is x scanning range
hit spacebar twice to set pixel in game, / to activate

***********

Code:
xr = 0.5
xm = 0.20
xl = 0.20


mycolor = 0x00004d








;;;;


con = 3


MouseMove 640, 500

crosshaircolor := 0x00FE00

screenwidth := 1280
screenheight := 1024


;CoordMode, Pixel, Relative
;CoordMode, Mouse, Relative


coordmode,mouse,screen
coordmode,pixel,screen


steady = 0



couy := 400  
coux := 300  
xx := 1
yy := 1
foundcolor := 0


;mycolor = 0xffffff




StringMid, myl, mycolor, 3,2
StringMid, mym, mycolor, 5,2
StringMid, myr, mycolor, 7,2

myl = 0x%myl%
mym = 0x%mym%
myr = 0x%myr%

SetFormat, integer, d
myl -= 0
mym -= 0
myr -= 0


;Tooltip, %myl%     %mym%   %myr%
;sleep 400


;mycolor = 0xFFD8E8

foundx := MouseX
foundy := MouseY
; 
; AutoHotkey      Version: 1.1.2878+ 
; Language:       English 
; Platform:       Win9x/NT 
; 
; 
; Only run this script when bf2.exe is running in the foreground 
; 
#SingleInstance force 
#InstallKeybdHook 
#InstallMouseHook 
#NoEnv 
SendMode, Input 



;;;;;;;;;;;;;;;;;;;;;;;


loop
{


GetKeyState, you, u, P
GetKeyState, down, d, P


if you = D
{
xr += 0.05

if xr > 1
xr  = 0.99
;xm += 0.05
;xl += 0.05
Tooltip, %xr%      %color%
Sleep 200
}

if down = D
{
xr -= 0.05

if xr < 0
xr =  0

;xm -= 0.05
;xl -= 0.05
Tooltip, %xr%      %color%
Sleep 200
}



GetKeyState, state, Space, P
if state = D
{
steady = 1

foundx := MouseX
foundy := MouseY

MouseMove, 640, 480
MouseGetPos, MouseX, MouseY


PixelGetColor, color, %MouseX%, %MouseY% ;;, Slow  ;;, Slow ;  RGB

mycolor = %color%


StringMid, myl, mycolor, 3,2
StringMid, mym, mycolor, 5,2
StringMid, myr, mycolor, 7,2

myl = 0x%myl%
mym = 0x%mym%
myr = 0x%myr%

SetFormat, integer, d
myl -= 0
mym -= 0
myr -= 0



} 
  

MouseGetPos, MouseX, MouseY



;1152x864






  

ranger = %myr%
ranger *= %xr% 
if ranger = %0%
ranger = 1
rangeru := myr + ranger 
rangerd := myr - ranger 


;
rangel = %myl%
rangel *= %xl% 
if rangel = %0%
rangel = 1
rangelu := myl + rangel 
rangeld := myl - rangel 
;
rangem = %mym%
rangem *= %xm% 
if rangem = %0%
rangem = 1
rangemu := mym + rangem
rangemd := mym - rangem



;;;;;;;;;;;;;;;;;;;



;if (rangeru >= r && r >= rangerd)
;if (rangemu >= m && m >= rangemd)
;if (rangelu >= l && l >= rangeld)
{
;foundcolor = 1
;Tooltip, %rangemu%  %rangemu%  %m%   %color%   

}
;else
;foundcolor = 0

 
;Tooltip, %color%
;Sleep 400 






;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;if foundcolor = 1
;if mycolor = %color%

;if beer
if (rangeru > r && r > rangerd)
if (rangemu > m && m > rangemd)
if (rangelu > l && l > rangeld)
if steady = 0
{

Goto, ppp
;Tooltip, %ranger%  %rangel%  %rangem%    %r%   %l%    %m%   %color%
;Tooltip, %color%

foundx := coux
foundy := couy



movex := foundx
movey := foundy


movex -= %MouseX% 
movey -= %MouseY% 


;gg

;Tooltip, %foundx%            ;  %movex%      %movey%
;sleep 400
;;;;;;;;;;;;;;;;;;;;;;;;;;



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;coux, foundx = position of pixel

;MouseX = position of mouse


superposx := MouseX*65535/screenwidth
superposy := MouseY*65535/screenheight


foundx := foundx*65535/screenwidth
foundy := foundy*65535/screenheight



movex := foundx
movex -= superposx

movey := foundy
movey -= superposy

movex := abs(movex)
movey := abs(movey)


;Tooltip, %superposx%     %superposy%       %foundx%  %foundy%     %movex%      %movey% 
;sleep 1400


;MouseEvent(foundx,foundy)








;if foundx > %superposx% 
;MouseEvent(movex,0)

;if foundx < %superposx% 
;MouseEvent(movex,0)

;if foundy > %superposy% 
;MouseEvent(0,movey)

;if foundy < %superposy% 
;MouseEvent(0,movey)


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ppp:



foundx := coux
foundy := couy
;compare  PixelGetColor to center of screen

;movex := 640
;movex -= %foundx%
;movey := 480
;movey -= %foundy%
;;;;;;;;;;;;;;;;;;;;;;;

if con = 1
{


;foundx := 300
;foundy := 300



movex := crossx
movex -= foundx

movey := crossy
movey -= foundy

;Tooltip, %crossx%  %crossy%      %foundx%  %foundy%      %movex%  %movey%   
;Tooltip, %holdx% %holdy%     %foundx%  %foundy%
;Sleep 500


;MouseEvent(movex,movey)

; .02
movex *= .02
movey *= .02



}

;;;;;;;;;;;;;;;;;;;;;;;;


if (holdx != foundx)
{

holdx := foundx

MouseEvent(-movex,0)

;sleep 400
;MouseMove crossx,crossy,


;tooltip, X moving
;sleep 1000

;;;;;;;;;;MouseEvent(-movex,0)
;tooltip, X set

}


if (holdy != foundy)
{


holdy := foundy

MouseEvent(0,movey)
;sleep 4
;MouseMove crossx,crossy
;tooltip, Y moving
;sleep 1000

;;;;;;;;;;;MouseEvent(0,movey)
;tooltip, Y set
;tooltip, %foundx%    %foundy%          %movex%   %movey%   
;sleep 500
}



;ppp:
g := 0




;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;if foundx > %MouseX% 
;MouseEvent(movex,0)

;if foundx < %MouseX% 
;MouseEvent(movex,0)

;if foundy > %MouseY% 
;MouseEvent(0,movey)

;if foundy < %MouseY% 
;MouseEvent(0,movey)

;;;;;;;;;;;;;;;

;if foundx > %MouseX% 
;MouseEvent(10,0)

;if foundx < %MouseX% 
;MouseEvent(-10,0)

;if foundy > %MouseY% 
;MouseEvent(0,10)

;if foundy < %MouseY% 
;MouseEvent(0,-10)

;;;;;;;;;;;

;Tooltip,  %color% 
;sleep 100
;Tooltip, %myr%  %myl%  %mym%    %r%   %l%    %m%
;RegWrite, REG_SZ, HKEY_LOCAL_MACHINE, SOFTWARE\TestKey, color, %color%
}





foundcolor := 0




 if coux > 1000 
    {
    coux := 300
    couy += 10
    }
    if couy > 600
    {    
    couy := 400  
    coux := 300  
    ;break
    }
coux +=10


PixelGetColor, color, %coux%, %couy%  ;;, Slow   ;, Slow




;mix := coux*65535/screenwidth
;miy := couy*65535/screenheight
;MouseEvent (mix, miy)

;MouseMove, coux, couy






if color = %crosshaircolor%   
if con = 3
{

;tooltip, found crosshairs!!!
;sleep 2000
crossx := coux
crossy := couy
con := 1

;MouseMove crossx,crossy
;sleep 2000

}




   

;Tooltip, %ranger%  %rangem%  %rangel%     %r%    %m%   %l%        %MouseX%      %MouseY%






;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
VariableContainingAnInteger := color


SetFormat, integer, d
VariableContainingAnInteger -= 0
SetFormat, integer, hex


;;;;;;;;;;;;;;
;color = 0x0102F0
String = %color% 





StringMid, lefty, String, 3,2 


StringMid, middly, String, 5,2 


StringMid, righty, String, 7,2 



l := lefty

m := middly


r := righty



l = 0x%l%
m = 0x%m%
r = 0x%r%



SetFormat, integer, d
l -= 0
SetFormat, integer, hex


;;
SetFormat, integer, d
m -= 0
SetFormat, integer, hex
;;


SetFormat, integer, d
r -= 0
SetFormat, integer, hex


;Tooltip, %r%        %m%        %l%                       %color%


addup = %r%%m%%l%   



rback = %r%
SetFormat, integer, hex
rback += 0
SetFormat, integer, d
;;
mback = %m%
SetFormat, integer, hex
mback += 0
SetFormat, integer, d
;;
lback = %l%
SetFormat, integer, hex
lback += 0
SetFormat, integer, d
;;


if StrLen(lback) < 4
{
StringRight, lback, lback, 1
lback = 0%lback%
}
;
if StrLen(mback) < 4
{
StringRight, mback, mback, 1
mback = 0%mback%
}
;
if StrLen(rback) < 4
{
StringRight, rback, rback, 1
rback = 0%rback%
}




StringRight, ls, lback, 2
StringRight, ms, mback, 2
StringRight, rs, rback, 2



final = 0x%ls%%ms%%rs%
;Tooltip, %r%  %m%   %l%    %color%  %final%  %lback% %mback% %rback%   ;  %ls% %ms% %rs%   



;;;;;;;;;;;;;


;Tooltip, %color%
;Tooltip, %VariableContainingAnInteger%


}





MouseEvent(a_xpos, a_ypos) 
{ 
   DllCall("mouse_event", uint,1, int,a_xpos, int,a_ypos, uint,0, int,0 ) 
   ; DllCall("mouse_event", uint,0x8001, int,a_xpos, int,a_ypos, uint,0, int,0 )
} 



;~$Space::
;Pause, Toggle,
;return 


$Pause::

Pause, Toggle,

return 

~$/::

;Pause, Toggle,
steady = 0
return 



~Esc::

ExitApp 
return


;~,::
;MouseMove crossx,crossy
;return
Credits: a 1 second search on AHK
__________________
COMPR3SSOR is offline

Reply With Quote

Old 09-10-2010, 02:54 PM   #17
Affiliate VIP

zoomgod's Avatar

Join Date: Aug 2007
Posts: 2,491
Reputation: 73953
Rep Power: 843
zoomgod has a huge epeen!zoomgod has a huge epeen!zoomgod has a huge epeen!zoomgod has a huge epeen!zoomgod has a huge epeen!zoomgod has a huge epeen!zoomgod has a huge epeen!zoomgod has a huge epeen!zoomgod has a huge epeen!zoomgod has a huge epeen!zoomgod has a huge epeen!
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (2)
The UC Member of the Month award is a prestigious award given to a single community member on a monthly basis. Based on a vote by UnKnoWnCheaTs staff, the award is given to the forum member that has shown exemplary achievement and potential in the UnKnoWnCheaTs community, and has shown great commitment to upholding the principles upon which UnKnoWnCheaTs stands for. A member who has been awarded the Member of the Month award has been distinguished as an asset to the UnKnoWnCheaTs community. Member of the Month
Points: 46,850, Level: 32
Points: 46,850, Level: 32 Points: 46,850, Level: 32 Points: 46,850, Level: 32
Activity: 43.5%
Activity: 43.5% Activity: 43.5% Activity: 43.5%
Last Achievements
This seems so pointless. While yes you could make a pixel based bot it's going to totally suck especially when done in a script. Your probably better off aiming on your own and a good player is still going to shoot you dead.

Why not learn to code a real one instead. And before you even ask how learn C++ first then come back and search the forums for everything you need to make one.
__________________
I'm like a virus, you can delete me but I am never really gone.
Links die, searching does not. (Fravia : searchlores.org)
Solving problems requires effort not a college degree.
zoomgod is offline

Reply With Quote

Old 09-10-2010, 11:16 PM   #18
1337 H4x0!2

leopard's Avatar

Threadstarter
Join Date: Sep 2009
Posts: 144
Reputation: -392
Rep Power: 0
leopard is likely going to get bannedleopard is likely going to get bannedleopard is likely going to get bannedleopard is likely going to get banned
Last Achievements
@joshdajosh thanks for the answer.But again this is me far seized
And you no where to look it .I not but i have you help necessary
how get i this to work. Can you let it me see
How i change the crosshaircolor and mycolor
this is the first time to do this so dont me blame
leopard is online now

Reply With Quote
Reply  

  • Submit Thread to Digg
  • Submit Thread to del.icio.us
  • Submit Thread to StumbleUpon
  • Submit Thread to Google
  • Submit Thread to Facebook
  • Submit Thread to My Yahoo!
  • Submit Thread to MySpace
  • Submit Thread to Twitter
  • Submit Thread to Reddit



Tags
ahk, aimbot, script
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT +1. The time now is 10:41 AM.