Voidmaster Posted June 7, 2008 Share Posted June 7, 2008 (edited) I'm completely new to using AutoIt and desperately need some help. All I basically want this script to do is pixel seach, then left click the pixel when it finds it. I want it to be able to look for the first pixel, and if it can't find it, skip that and find the next one. This is all I got so far CODE While 1 = 1 Find1() Sleep(5000) Find2() Sleep(5000) Find3() WEnd Func Find1() PixelSearch(0, 0, 1280, 1024, 0xAA5300 [, 2] [, 2]] ) If isArray($Coords) then MouseClick("Left",$Coords[0], $Coords[1],1,1) EndIf EndFunc Func Find2() PixelSearch(0, 0, 1280, 1024, 0xC66B00 [, 2] [, 2]] ) If isArray($Coords) then MouseClick("Left",$Coords[0], $Coords[1],1,1) EndIf EndFunc Func Find3() PixelSearch(0, 0, 1280, 1024, 0x2FF731 [, 2] [, 2]] ) If isArray($Coords) then MouseClick("Left",$Coords[0], $Coords[1],1,1) EndIf EndFunc Func stop() Global $show = 1 EndFunc Any help is greatly appreciated, thanks Edited June 7, 2008 by Voidmaster Link to comment Share on other sites More sharing options...
yyyy273 Posted June 7, 2008 Share Posted June 7, 2008 While 1 = 1 Find1() Sleep(5000) Find2() Sleep(5000) Find3() WEnd Func Find1() $Coords = PixelSearch(0, 0, 1280, 1024, 0xAA5300 [, 2] [, 2]] ) If isArray($Coords) then MouseClick("Left",$Coords[0], $Coords[1],1,1) EndIf EndFunc Func Find2() $Coords = PixelSearch(0, 0, 1280, 1024, 0xC66B00 [, 2] [, 2]] ) If isArray($Coords) then MouseClick("Left",$Coords[0], $Coords[1],1,1) EndIf EndFunc Func Find3() $Coords = PixelSearch(0, 0, 1280, 1024, 0x2FF731 [, 2] [, 2]] ) If isArray($Coords) then MouseClick("Left",$Coords[0], $Coords[1],1,1) EndIf EndFunc Func stop() Global $show = 1 EndFunc You forgot to set $Coords to something Link to comment Share on other sites More sharing options...
newbiescripter Posted June 7, 2008 Share Posted June 7, 2008 Which game are you trying to make the bot for ? Link to comment Share on other sites More sharing options...
Voidmaster Posted June 7, 2008 Author Share Posted June 7, 2008 Tales of pirates. All my guy has to do is left click the monster after pixel searching for it about every 5 seconds Link to comment Share on other sites More sharing options...
Altayr Posted June 11, 2008 Share Posted June 11, 2008 hi, how is the bot working out so far? 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