ecstatic Posted April 10, 2009 Share Posted April 10, 2009 K heres my code expandcollapse popupFunc Pindle() Send("{F1}") Sleep(250) MouseMove(444, 128) MouseDown("right") MouseUp("right") Sleep(250) MouseMove(700, 141) MouseDown("right") MouseUp("right") Sleep(250) MouseMove(728, 157) MouseDown("right") MouseUp("right") Sleep(250) MouseMove(687, 110) MouseDown("right") MouseUp("right") Sleep(250) Send("{F3}") Sleep(50) Do Sleep(20) $MonsterFind = PixelSearch(0, 0, 800, 600, $Monsters) If Not @error Then MouseClick("right", $MonsterFind[0], $MonsterFind[1]) EndIf Until 1 Send("{F1}") Sleep(250) MouseMove(673, 197) MouseDown("right") MouseUp("right") ; Pickit Sleep(250) MouseMove(673, 198) MouseDown("right") MouseUp("right") Sleep(250) ; Walk to halls of anguish so we dont get raped by the xtras MouseMove(536, 199) MouseDown("left") MouseUp("left") Sleep(250) EndGame() All this does is teleport to an area. Then it kills all the modded monsters which are orange, and it is supposed to kill all of them. Hence the loop Unfortunatly, it doesnt even perform the loop. Does anyone know why? Link to comment Share on other sites More sharing options...
hendrikhe Posted April 10, 2009 Share Posted April 10, 2009 what game? Link to comment Share on other sites More sharing options...
ecstatic Posted April 10, 2009 Author Share Posted April 10, 2009 Diablo II Link to comment Share on other sites More sharing options...
hendrikhe Posted April 10, 2009 Share Posted April 10, 2009 Hmm try: $MonsterFind = PixelSearch(0, 0, 800, 600, $Monsters,100) for a shade-variation Link to comment Share on other sites More sharing options...
BlackDragonBE Posted April 10, 2009 Share Posted April 10, 2009 Where's the EndFunc? Link to comment Share on other sites More sharing options...
ecstatic Posted April 10, 2009 Author Share Posted April 10, 2009 Ok now it is killing 1 monster but it will not loop until all are gone. Link to comment Share on other sites More sharing options...
ecstatic Posted April 11, 2009 Author Share Posted April 11, 2009 bump. Link to comment Share on other sites More sharing options...
Mat Posted April 11, 2009 Share Posted April 11, 2009 (edited) don't play the game personally but MouseMove(444, 128) MouseDown("right") MouseUp("right") ?? mouseclick surely as there is no gap between? 3 lines into 1! also: sleep (20) don't bother, thats 1/500 th of a second. until 1? try until @error = 1 ?? I can't run it I don't have the game, but try it! Edit: code! - Much neater! Send("{F1}") Sleep(250) MouseClick ("Right", 444, 128, 1) Sleep(250) MouseClick ("Right", 700, 141, 1) Sleep(250) MouseClick ("Right", 728, 157, 1) Sleep(250) MouseClick ("Right", 687, 110, 1) Sleep(250) Send("{F3}") Do $MonsterFind = PixelSearch(0, 0, 800, 600, $Monsters) If Not @error Then MouseClick("right", $MonsterFind[0], $MonsterFind[1]) EndIf Until @Error <> 0 Send("{F1}") Sleep(250) MouseClick ("Right", 673, 197, 1) ; Pickit Sleep(250) MouseClick ("Right", 673, 198, 1) Sleep(250) ; Walk to halls of anguish so we dont get raped by the xtras MouseClick ("Left", 536, 199, 1) Sleep(250) EndGame() Edited April 11, 2009 by mdiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
ecstatic Posted April 12, 2009 Author Share Posted April 12, 2009 don't play the game personally but MouseMove(444, 128) MouseDown("right") MouseUp("right") ?? mouseclick surely as there is no gap between? 3 lines into 1! also: sleep (20) don't bother, thats 1/500 th of a second. until 1? try until @error = 1 ?? I can't run it I don't have the game, but try it! Edit: code! - Much neater! Send("{F1}") Sleep(250) MouseClick ("Right", 444, 128, 1) Sleep(250) MouseClick ("Right", 700, 141, 1) Sleep(250) MouseClick ("Right", 728, 157, 1) Sleep(250) MouseClick ("Right", 687, 110, 1) Sleep(250) Send("{F3}") Do $MonsterFind = PixelSearch(0, 0, 800, 600, $Monsters) If Not @error Then MouseClick("right", $MonsterFind[0], $MonsterFind[1]) EndIf Until @Error <> 0 Send("{F1}") Sleep(250) MouseClick ("Right", 673, 197, 1) ; Pickit Sleep(250) MouseClick ("Right", 673, 198, 1) Sleep(250) ; Walk to halls of anguish so we dont get raped by the xtras MouseClick ("Left", 536, 199, 1) Sleep(250) EndGame()Heh the 3 lines were from a copy-tool. One novice question. Do $MonsterFind = PixelSearch(0, 0, 800, 600, $Monsters) If Not @error Then MouseClick("right", $MonsterFind[0], $MonsterFind[1]) EndIf Until @Error <> 0 Whats the <> Mean. Link to comment Share on other sites More sharing options...
Mat Posted April 12, 2009 Share Posted April 12, 2009 (edited) is not equal to. in maths terms, would be similar to: ----------//-- ---------//--- --------//---- =========== ------//------ =========== ----//-------- ---//--------- --//---------- (couldn't help it sorry) @error = 0 means success @error <> 0 means failure Edited April 12, 2009 by mdiesel AutoIt Project Listing 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