implite Posted August 3, 2009 Share Posted August 3, 2009 (edited) Im trying to make a simple chicken for if my life gets to low leave game. (diablo2) so im trying to do if not this color then goto my leave function. Any helpful tips would be nice. Thanks $life = PixelSearch(53,540,65,547,0x890000,50) if not $life = 0x890000 then Gleave() EndIf Edited August 3, 2009 by implite Link to comment Share on other sites More sharing options...
99ojo Posted August 3, 2009 Share Posted August 3, 2009 Im trying to make a simple chicken for if my life gets to low leave game. (diablo2) so im trying to do if not this color then goto my leave function. Any helpful tips would be nice. Thanks $life = PixelSearch(53,540,65,547,0x890000,50) if not $life = 0x890000 then Gleave() EndIf Hi, just a little look in helpfile PixelSearch: Success: Returns a two-element array of pixel's coordinates. (Array[0] = x, Array[1] = y) Failure: Sets @error to 1 if color is not found. This should give a massive hint, how to change the if statement. ;-)) Stefan Link to comment Share on other sites More sharing options...
implite Posted August 3, 2009 Author Share Posted August 3, 2009 (edited) Hi, just a little look in helpfile PixelSearch: Success: Returns a two-element array of pixel's coordinates. (Array[0] = x, Array[1] = y) Failure: Sets @error to 1 if color is not found. This should give a massive hint, how to change the if statement. ;-)) Stefan I know how to use pixelsearch. I dont know how to use if not statements on here or true false tables, any examples please? Edited August 3, 2009 by implite Link to comment Share on other sites More sharing options...
99ojo Posted August 3, 2009 Share Posted August 3, 2009 I know how to use pixelsearch. I dont know how to use if not statements on here or true false tables, any examples please? The solution is still in helpfile: change: if not $life = 0x890000 then ; PixelSearch doesn't return a color value to If @error Then ; Failure: Sets @error to 1 if color is not found or If Not IsArray ($life) ; Success: Returns a two-element array of pixel's coordinates. (Array[0] = x, Array[1] = y) ;-)) Stefan Link to comment Share on other sites More sharing options...
implite Posted August 4, 2009 Author Share Posted August 4, 2009 can I do? if not $life = 0x890000 then gleave() is this possible? Link to comment Share on other sites More sharing options...
implite Posted August 4, 2009 Author Share Posted August 4, 2009 $life = PixelSearch(53,540,65,547,0x890000,25) If Not $life = "0x890000" Then Gleave() Solved my own problem, lol forgot the "quotes"... cool. 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