Juggernaut Posted March 12, 2009 Share Posted March 12, 2009 I've got this code, but for some reason its not setting my mouse X and Y correctly...not sure why. expandcollapse popupglobal $coord, $aim_on HotKeySet("z", "qt") Func qt() Exit EndFunc HotKeySet("f", "on") Func on() $aim_on = 1 tooltip("Aimbot on!", 0, 0) EndFunc HotKeySet("g", "off") Func off() $aim_on = 0 tooltip("Aimbot off!", 0, 0) EndFunc while 1=1 if $aim_on = 1 then $coord = PixelSearch(158, 197, 798, 677, 0xA2FF2A, 3) If isarray($coord) Then MouseMove($coord[0], $coord[1]) ;MouseClick("left",$coord[0],$coord[1],1) EndIf $coord2 = PixelSearch(158, 197, 798, 677, 0x6BB214, 3) If isarray($coord2) Then MouseMove($coord2[0], $coord2[1]) ;MouseClick("left",$coord[0],$coord[1],1) EndIf $coord3 = PixelSearch(158, 197, 798, 677, 0x8AD620, 3) If isarray($coord3) Then MouseMove($coord3[0], $coord3[1]) ;MouseClick("left",$coord[0],$coord[1],1) EndIf EndIf Wend ;A2FF2A ;6BB214 ;8AD620 Link to comment Share on other sites More sharing options...
BrettF Posted March 12, 2009 Share Posted March 12, 2009 Well is the colour being found? Are you sure the game doesn't have any sort of bot protection? expandcollapse popupGlobal $coord, $aim_on HotKeySet("z", "qt") HotKeySet("f", "on") HotKeySet("g", "off") While 1 If $aim_on = 1 Then $coord = PixelSearch(158, 197, 798, 677, 0xA2FF2A, 3) $c1 = @error If IsArray($coord) Then MouseMove($coord[0], $coord[1]) ;MouseClick("left",$coord[0],$coord[1],1) EndIf $coord2 = PixelSearch(158, 197, 798, 677, 0x6BB214, 3) $c2 = @error If IsArray($coord2) Then MouseMove($coord2[0], $coord2[1]) ;MouseClick("left",$coord[0],$coord[1],1) EndIf $coord3 = PixelSearch(158, 197, 798, 677, 0x8AD620, 3) $c3 = @error If IsArray($coord3) Then MouseMove($coord3[0], $coord3[1]) ;MouseClick("left",$coord[0],$coord[1],1) EndIf ToolTip("Coord 1 Error = " & $c1 & @CRLF & _ "Coord 2 Error = " & $c2 & @CRLF & _ "Coord 3 Error = " & $c3) EndIf WEnd ;A2FF2A ;6BB214 ;8AD620 Func qt() Exit EndFunc ;==>qt Func on() $aim_on = 1 ToolTip("Aimbot on!", 0, 0) EndFunc ;==>on Func off() $aim_on = 0 ToolTip("Aimbot off!", 0, 0) EndFunc ;==>off Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Juggernaut Posted March 12, 2009 Author Share Posted March 12, 2009 (edited) Yeah, its detecting the color, and no the game doesn't have protection. It was working just the other day... By the way, that is returning error code 1 on all 3, im not sure what that means. Edited March 12, 2009 by Juggernaut Link to comment Share on other sites More sharing options...
BrettF Posted March 12, 2009 Share Posted March 12, 2009 RTFM. The code is not doing what you say it is Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Juggernaut Posted March 12, 2009 Author Share Posted March 12, 2009 Huh......? Link to comment Share on other sites More sharing options...
Juggernaut Posted March 12, 2009 Author Share Posted March 12, 2009 Can anyone give me a hand? Im not sure what is wrong... Link to comment Share on other sites More sharing options...
BrettF Posted March 12, 2009 Share Posted March 12, 2009 Geeze dude, I said RTFM. I am showing the @ERROR for each function call, 1 means colour was not found. Can I make it simpler? Also, you have been here long enough to know not to bump your posts too quickly. Remember only once every 24 hours. Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Juggernaut Posted March 12, 2009 Author Share Posted March 12, 2009 I don't know what RTFM means... And at the error thing, i know its being detected, because it throws off my view. It moves my mouse, just not to the right location...its either all the way up, or all the way down. Link to comment Share on other sites More sharing options...
jvanegmond Posted March 12, 2009 Share Posted March 12, 2009 Bad programming habbits lead to bad code. So I've fixed both expandcollapse popup; Colors to look for: ; A2FF2A ; 6BB214 ; 8AD620 Dim $lPos, $bAimOn = False HotKeySet("z", "_Quit") HotKeySet("f", "_Aimbot_On") HotKeySet("g", "_Aimbot_Off") While True If $bAimOn == 1 Then $lPos = PixelSearch(158, 197, 798, 677, 0xA2FF2A, 3) If IsArray($lPos) And Not @error Then MouseMove($lPos[0], $lPos[1]) ;MouseClick("left",$coord[0],$coord[1],1) EndIf $lPos = PixelSearch(158, 197, 798, 677, 0x6BB214, 3) If IsArray($lPos) And Not @error Then MouseMove($lPos[0], $lPos[1]) ;MouseClick("left",$coord[0],$coord[1],1) EndIf $lPos = PixelSearch(158, 197, 798, 677, 0x8AD620, 3) If IsArray($lPos) And Not @error Then MouseMove($lPos[0], $lPos[1]) ;MouseClick("left",$coord[0],$coord[1],1) EndIf EndIf WEnd Func _Quit() Exit EndFunc ;==>_Quit Func _Aimbot_Off() $bAimOn = False ToolTip("Aimbot off!", 0, 0) EndFunc ;==>_Aimbot_Off Func _Aimbot_On() $bAimOn = True ToolTip("Aimbot on!", 0, 0) EndFunc ;==>_Aimbot_On github.com/jvanegmond Link to comment Share on other sites More sharing options...
Juggernaut Posted March 12, 2009 Author Share Posted March 12, 2009 Well, that one doesn't work now ;x Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now