lolifox Posted May 26, 2010 Share Posted May 26, 2010 (edited) Hello. ahem... this game is NOT online neither english game, so i assume its safe to post (since i wont mention it's name it moar safer )alright here's my problem... i just want that it would be auto on very short range, in other words just few clicks is involved based on pixel search... sooo that's what i gathered till now :expandcollapse popupGlobal $Pixel HotKeySet("{ESC}", "Close") HotKeySet("{SPACE}", "TogglePause") Sleep(2000) While 1 Sleep(100) Do $Pixel = PixelSearch(851, 420, 848, 371, 0x2C3D49) ; first click MouseClick("right", 497, 352, 5, 1) Sleep(300) Until Not IsArray($Pixel) Do $Pixel = PixelSearch(423, 282, 420, 233, 0xFDF7E7) ; searching for mobs MouseClick("left", 423, 282, 5, 1) Sleep(2600) Until Not IsArray($Pixel) Do $Pixel = PixelSearch(541, 330, 538, 281, 0xFFFFFF) ; clicking on info MouseClick("left", 541, 330, 5, 1) Sleep(200) Until Not IsArray($Pixel) Do $Pixel = PixelSearch(196, 317, 193, 268, 0x467C5E) ; starting auto-battle MouseMove(196, 317, 5) Sleep(100) MouseClick("left", 196, 317, 5, 1) Sleep(200) Until Not IsArray($Pixel) Do $Pixel = PixelSearch(453, 114, 450, 65, 0xE398C4) ; picking loot MouseClick("left", 510, 318, 5, 2) Sleep(300) Until Not IsArray($Pixel) Do $Pixel = PixelSearch(664, 286, 661, 237, 0xF5DF94) ; sccepting heal MouseClick("left", 510, 318, 5, 1) Sleep(200) Until Not IsArray($Pixel) Do $Pixel = PixelSearch(18, 606, 15, 557, 0x191A21) ; skipping text MouseClick("left", 510, 218, 15, 5) Sleep(200) Until Not IsArray($Pixel) WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc Func Close() Exit 0 EndFunc ;Terminatesooo it should just click on when when defined pixel is on screen, but... it looks like it doesn't do anything apart mouseclick line... maybe someone can enlighten me, how to work correctly with pixelsearchand second question, can i set the priority what pixel after another must go? like "clicking info" and "skipping text" would be top priority, when pixel is metthanks for any reply Edited May 26, 2010 by lolifox Link to comment Share on other sites More sharing options...
JohnOne Posted May 26, 2010 Share Posted May 26, 2010 As far as I can see your script does not do anything else other than mouseclick, so it seems as though its working just fine. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
lolifox Posted May 26, 2010 Author Share Posted May 26, 2010 thanks for reply, but no offense... that was the point of this thread, "Why it doesn't pixelsearch......" Link to comment Share on other sites More sharing options...
JohnOne Posted May 26, 2010 Share Posted May 26, 2010 How do you know its not doing a pixelsearch? I suspect it is infact carrying out the function, but you are not using the results in any fashion. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
AlmarM Posted May 26, 2010 Share Posted May 26, 2010 (edited) What if you try debbugging it? Edited May 26, 2010 by AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
lolifox Posted May 26, 2010 Author Share Posted May 26, 2010 well it just replies all clicks in a row... if battle prolongs, it starts messing up things, i know since i'm using autoclicker function pretty long time. i tried to add tool tips where and what clicks is used, and it showed it just spams them... as for debug didn't tried it, could you explain in more detailed way? Link to comment Share on other sites More sharing options...
JohnOne Posted May 26, 2010 Share Posted May 26, 2010 Like I said, If its performing the clicks, its acting exactly the way you have coded it to. Im struggling to see the problem. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Malkey Posted May 27, 2010 Share Posted May 27, 2010 (edited) Maybe, something like this.expandcollapse popupGlobal $Paused = False Local $Pixel1, $Pixel2, $Pixel3, $Pixel4, $Pixel5, $Pixel6, $Pixel7 HotKeySet("{ESC}", "Close") HotKeySet("{SPACE}", "TogglePause") Do While 1 Sleep(10) $Pixel1 = PixelSearch(851, 420, 848, 371, 0x2C3D49) ; first click $Pixel2 = PixelSearch(423, 282, 420, 233, 0xFDF7E7) ; searching for mobs $Pixel3 = PixelSearch(541, 330, 538, 281, 0xFFFFFF) ; clicking on info $Pixel4 = PixelSearch(196, 317, 193, 268, 0x467C5E) ; starting auto-battle $Pixel5 = PixelSearch(453, 114, 450, 65, 0xE398C4) ; picking loot $Pixel6 = PixelSearch(664, 286, 661, 237, 0xF5DF94) ; sccepting heal $Pixel7 = PixelSearch(18, 606, 15, 557, 0x191A21) ; skipping text Select Case IsArray($Pixel1) MouseClick("right", 497, 352, 5, 1) Sleep(300) Case IsArray($Pixel2) MouseClick("left", 423, 282, 5, 1) Sleep(2600) Case IsArray($Pixel3) MouseClick("left", 541, 330, 5, 1) Sleep(200) Case IsArray($Pixel4) MouseMove(196, 317, 5) Sleep(100) MouseClick("left", 196, 317, 5, 1) Sleep(200) Case IsArray($Pixel5) MouseClick("left", 510, 318, 5, 2) Sleep(300) Case IsArray($Pixel6) MouseClick("left", 510, 318, 5, 1) Sleep(200) Case IsArray($Pixel7) MouseClick("left", 510, 218, 15, 5) Sleep(200) EndSelect WEnd Until 0 Func TogglePause() $Paused = Not $Paused While $Paused Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc ;==>TogglePause Func Close() Exit 0 EndFunc ;==>Close Edited May 27, 2010 by Malkey Link to comment Share on other sites More sharing options...
lolifox Posted May 27, 2010 Author Share Posted May 27, 2010 whoa... malkey thank you very much, now i just need to fix correct colors and vualia 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