Killzone21 Posted March 6, 2008 Share Posted March 6, 2008 (edited) Ok i wented to set up a script that finds the color Yellow and keeps clicking on it until i use the hotkey to stop it The script should start when i press the hotkey Pause and should stop when i press the hot key pause. Can someone please look at my code and edit it to do the following: start when the hotkey pause is pressed, works Find color Yellow, not working pressing other colors too, is not finding yellow. (fix that part too please) Left click it until stoped, doesnt work for me it wont stop pressing MY Code HotKeySet("{Pause}", "_click") While 1 sleep(5000) WEnd Func _click() While 2 $search = PixelSearch(0,0,1018,736,16776960,5) If Not @error Then $Coord = PixelSearch( 1, 1,748,1024, 0xFFFF00 ) ; 0x0000... its the color u want If IsArray($Coord) Then MouseClick("Left",$Coord[0], $Coord[1],1,0) ;This is where you add your own code. ConsoleWrite("Found pixel matching color, X: "&$search[0]&" Y: "&$search[1]&@crlf) EndIf WEnd Endfunc Edited March 6, 2008 by Killzone21 Link to comment Share on other sites More sharing options...
igotandrew Posted March 6, 2008 Share Posted March 6, 2008 Very simple, I'll just re-write it~ Link to comment Share on other sites More sharing options...
igotandrew Posted March 6, 2008 Share Posted March 6, 2008 HotKeySet("{PAUSE}", "_click") HotKeySet("{END}", "_stop") Global $Started = False While 1 ; I don't know why your using 2 Sleep(100) Wend Func _Stop() If $started = true Then $started = False ConsoleWrite("Stopped script.") Endif EndFunc Func _Click() Local $search = 0 Local $coord = 0 If $Started = False then ;Let's start the script $started = true ;toggles the start While $Started = true $search = PixelSearch(0, 0, 1018, 736, 16776960, 5) If not @error Then ; Woohoo, found pixel/color $Coord = PixelSearch(1, 1, 748, 1024, 0xFFFF00) If not @error Then MouseClick("left", $coord[0], $coord[1], 1, 0) ;this is one click, on the coord[0], coord[1] ; the mouse is moved instantly ConsoleWrite("Found pixel matching color, X: " & $search[0] & " Y: " & $search[1] & @crlf) EndIf EndIf Wend EndIf EndFunc I believe that should do it, let me know if you need me to explain anything. Link to comment Share on other sites More sharing options...
Killzone21 Posted March 6, 2008 Author Share Posted March 6, 2008 HotKeySet("{PAUSE}", "_click") HotKeySet("{END}", "_stop") Global $Started = False While 1 ; I don't know why your using 2 Sleep(100) Wend Func _Stop() If $started = true Then $started = False ConsoleWrite("Stopped script.") Endif EndFunc Func _Click() Local $search = 0 Local $coord = 0 If $Started = False then ;Let's start the script $started = true ;toggles the start While $Started = true $search = PixelSearch(0, 0, 1018, 736, 16776960, 5) If not @error Then ; Woohoo, found pixel/color $Coord = PixelSearch(1, 1, 748, 1024, 0xFFFF00) If not @error Then MouseClick("left", $coord[0], $coord[1], 1, 0) ;this is one click, on the coord[0], coord[1] ; the mouse is moved instantly ConsoleWrite("Found pixel matching color, X: " & $search[0] & " Y: " & $search[1] & @crlf) EndIf EndIf Wend EndIf EndFunc I believe that should do it, let me know if you need me to explain anything. Thx man the code works perfect!! but am creating a aimbot for a game named Paintball 2.0, standalone verison of moded quake. Anyways when ever i run the code the mouse wont go directly to there clothes, aim at them. But for all other things other then the game it works perfect. can u help me with the game thou. I will give u the pictures this game uses as texture Link to comment Share on other sites More sharing options...
Killzone21 Posted March 6, 2008 Author Share Posted March 6, 2008 (edited) am creating a aimbot for a game known as paintball 2.0, standalone verision of Quake. Here is my following codeHotKeySet("{PAUSE}", "_click")HotKeySet("{END}", "_stop")Global $Started = FalseWhile 1 Sleep(100)WendFunc _Stop() If $started = true Then $started = False ConsoleWrite("Stopped script.") EndifEndFuncFunc _Click() Local $search = 0 Local $coord = 0 If $Started = False then ;Let's start the script $started = true ;toggles the start While $Started = true $search = PixelSearch(0, 0, 1018, 736, 16776960, 5) If not @error Then ; Woohoo, found pixel/color $Coord = PixelSearch(1, 1, 748, 1024, 0x3256B6 ) If not @error Then MouseClick("left", $coord[0], $coord[1], 1, 0) ;this is one click, on the coord[0], coord[1] ; the mouse is moved instantly ConsoleWrite("Found pixel matching color, X: " & $search[0] & " Y: " & $search[1] & @crlf) EndIf EndIf Wend EndIfEndFuncThe function of this code is to aim and mouse click on a pixel color i choose. I decided to choose the color blue to aim for and click on. So i set the code 3256B6, blue, to find and click. But for some reason it wont click on it, in game, it does click on the color when am viewing the image, The Game Doesn't Have Any protection Against Hacks!!!. this game doesn't block anything, i set the color to find brown and it did inside the game. But when i set it to blue it wont click on the player. Can someone please Edit this code so it will search and click on for the following colors, pictures on bottom.Here is what the game uses as texture for the characters. Please set up my code so it could detect one of the colors. and if anyone could can u make the script search for blue, exp: if it cant find light blue it searches for dark blue, Different shades of blue. This aimbot does not go against the Terms of use of the game! this game is a free ware and is totally editable. Link of the game http://digitalpaint.planetquake.gamespy.com/news.php Edited March 6, 2008 by Killzone21 Link to comment Share on other sites More sharing options...
Killzone21 Posted March 7, 2008 Author Share Posted March 7, 2008 am creating a aimbot for a game known as paintball 2.0, standalone verision of Quake. Here is my following codeHotKeySet("{PAUSE}", "_click")HotKeySet("{END}", "_stop")Global $Started = FalseWhile 1Sleep(100)WendFunc _Stop()If $started = true Then$started = FalseConsoleWrite("Stopped script.")EndifEndFuncFunc _Click()Local $search = 0Local $coord = 0If $Started = False then ;Let's start the script$started = true ;toggles the startWhile $Started = true$search = PixelSearch(0, 0, 1018, 736, 16776960, 5)If not @error Then ; Woohoo, found pixel/color$Coord = PixelSearch(1, 1, 748, 1024, 0x3256B6 )If not @error ThenMouseClick("left", $coord[0], $coord[1], 1, 0) ;this is one click, on the coord[0], coord[1]; the mouse is moved instantlyConsoleWrite("Found pixel matching color, X: " & $search[0] & " Y: " & $search[1] & @crlf)EndIfEndIfWendEndIfEndFuncThe function of this code is to aim and mouse click on a pixel color i choose. I decided to choose the color blue to aim for and click on. So i set the code 3256B6, blue, to find and click. But for some reason it wont click on it, in game, it does click on the color when am viewing the image, The Game Doesn't Have Any protection Against Hacks!!!. this game doesn't block anything, i set the color to find brown and it did inside the game. But when i set it to blue it wont click on the player. Can someone please Edit this code so it will search and click on for the following colors, pictures on bottom.Here is what the game uses as texture for the characters. Please set up my code so it could detect one of the colors. and if anyone could can u make the script search for blue, exp: if it cant find light blue it searches for dark blue, Different shades of blue. This aimbot does not go against the Terms of use of the game! this game is a free ware and is totally editable. Link of the game http://digitalpaint.planetquake.gamespy.com/news.php Link to comment Share on other sites More sharing options...
Uriziel01 Posted March 7, 2008 Share Posted March 7, 2008 (edited) I think that the game lightning and shadows are changing the colors, have you tried to increase the shade-variation range from 5 to for ex. 25 or higher ?? p.s-or add this parametr to the second search (coord) Edited March 7, 2008 by Uriziel01 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 7, 2008 Moderators Share Posted March 7, 2008 Lets keep to one topic for the same subject, 3 separate posts are a bit rediculous when they all pertain to the same thing. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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