MasterX Posted June 20, 2008 Posted June 20, 2008 I started to make a Pixelbot ToolTip("Point at the mob to be fighted!") Sleep(5000) $m=MouseGetPos() $color=PixelGetColor($m[0],$m[1]);Looks for the colour of the mob. $coord = PixelSearch( 0, 0, 300, 300,$color );Searches the pixel While 1 MouseMove($coord[0],$coord[1]); Ok heres the problem it says $coord is not an array variable. Sleep(3000) MouseClick() WEnd
Clipper34 Posted June 20, 2008 Posted June 20, 2008 here try this: ToolTip("Point at the mob to be fighted!") Sleep(5000) $m=MouseGetPos() $color=PixelGetColor($m[0],$m[1]);Looks for the colour of the mob. $coord = PixelSearch( 0, 0, 300, 300,$color );Searches the pixel While 1 If $coord IsArray Then MouseMove($coord[0],$coord[1]); Ok heres the problem it says $coord is not an array variable. Sleep(3000) MouseClick() WEnd Hope that helps, Clipper34
MasterX Posted June 21, 2008 Author Posted June 21, 2008 Ok if i use IsArray there is an error, Error parsing function call Oo?
Kiti Posted June 21, 2008 Posted June 21, 2008 (edited) ToolTip("Point at the mob to be fighted!") Sleep(5000) $m=MouseGetPos() $color=PixelGetColor($m[0],$m[1]);Looks for the colour of the mob. $coord = PixelSearch( 0, 0, 300, 300,$color );Searches the pixel While 1 If $coord IsArray Then MouseMove($coord[0],$coord[1]); Ok heres the problem it says $coord is not an array variable. Sleep(3000) MouseClick() ENDIF WEnd Edited June 21, 2008 by Kiti Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30
MasterX Posted June 21, 2008 Author Posted June 21, 2008 Err i said there is an error^^ If $coord IsArray Then; Error parsing function call
MasterX Posted June 21, 2008 Author Posted June 21, 2008 Err i said there is an error^^If $coord IsArray Then; Error parsing function callOk i switched the pixelsearch to PixelSearch( 1,1, 1023, 767,$color ) now it works!
FreeFry Posted June 21, 2008 Posted June 21, 2008 (edited) Incorrect usage of IsArray: If $coord IsArray Then Should be: If IsArray($Coord) Then Also, one might want to loop the PixelSearch too(note the use of the @error macro instead of IsArray): ToolTip("Point at the mob to be fighted!") Sleep(5000) $m=MouseGetPos() $color=PixelGetColor($m[0],$m[1]);Looks for the colour of the mob. While 1 $coord = PixelSearch( 0, 0, 300, 300,$color );Searches the pixel If Not @Error Then MouseMove($coord[0],$coord[1]) Sleep(3000) MouseClick() EndIf WEnd Edited June 21, 2008 by FreeFry
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