ecstatic Posted April 14, 2009 Share Posted April 14, 2009 Hey guys. Heres my codeexpandcollapse popupFunc Pindle() $Message = "OK, lets go kill pindle" Chat() Sleep(2000) Send($TeleportKey) Sleep(400) MouseMove(463, 88) MouseDown("right") MouseUp("right") Sleep(400) MouseMove(732, 156) MouseDown("right") MouseUp("right") Sleep(400) MouseMove(700, 186) MouseDown("right") MouseUp("right") Sleep(400) MouseMove(571, 173) MouseDown("right") MouseUp("right") Sleep(200) MouseMove(490, 250) MouseDown("right") MouseUp("right") If $Class = "Light Sorc" Then Send($ChainLightningKey) Sleep(100) Do CheckDeath() $MonsterFind = PixelSearch( 148, 34, 800, 291, $monsters ) If Not @error Then MouseClick("right", $monsterfind[0], $Monsterfind[1]) EndIf Until @error <> 0 EndIf If $Class = "Hammerdin" Then MouseClick("Right", 709, 173) Sleep(100) Send($ConcentrationKey) Send("{ShiftDown}") Do CheckDeath() $MonsterFind = PixelSearch( 148, 34, 800, 291, $monsters ) If Not @error Then MouseDown("Left") Sleep(2500) MouseUp("Left") EndIf Until @error <> 0 EndIf Endgame() $PindleKilled = $PindleKilled + 1 Stats() EndFunc ;==>PindleBasically $Message = "OK, lets go kill pindle" Chat() Sleep(2000) Send($TeleportKey) Sleep(400) MouseMove(463, 88) MouseDown("right") MouseUp("right") Sleep(400) MouseMove(732, 156) MouseDown("right") MouseUp("right") Sleep(400) MouseMove(700, 186) MouseDown("right") MouseUp("right") Sleep(400) MouseMove(571, 173) MouseDown("right") MouseUp("right") Sleep(200) MouseMove(490, 250) MouseDown("right") MouseUp("right") Get to the boss. I KNOW MESSY!ThenIf $Class = "Light Sorc" Then Send($ChainLightningKey) Sleep(100) Do CheckDeath() $MonsterFind = PixelSearch( 148, 34, 800, 291, $monsters ) If Not @error Then MouseClick("right", $monsterfind[0], $Monsterfind[1]) EndIf Until @error <> 0 EndIf If $Class = "Hammerdin" Then MouseClick("Right", 709, 173) Sleep(100) Send($ConcentrationKey) Send("{ShiftDown}") Do CheckDeath() $MonsterFind = PixelSearch( 148, 34, 800, 291, $monsters ) If Not @error Then MouseDown("Left") Sleep(2500) MouseUp("Left") EndIf Until @error <> 0 EndIfDepending on the person's character, it kills the boss.Heres why my problem liesEndgame() Here is my endgame Func EndGame() Sleep(2000) Send("{ESC}") Sleep(500) Send("{Up}") Sleep(500) Send("{Enter}") EndFunc ;==>EndGameNow after my bot has killed the monsters, and has teleported up there.And when it is time to endgame, it kills the script and doesnt perform the ESC + UP + Enter.Can anyone tell me why >.< Link to comment Share on other sites More sharing options...
Mat Posted April 14, 2009 Share Posted April 14, 2009 (edited) you are sending them seperately, i presume you want them together. look at send in the helpfile, it shows you how to group items. edit. something like: Send("{ESC}{Up}{Enter}") Edited April 14, 2009 by mdiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
ecstatic Posted April 14, 2009 Author Share Posted April 14, 2009 you are sending them seperately, i presume you want them together.look at send in the helpfile, it shows you how to group items.edit.something like:Send("{ESC}{Up}{Enter}")Wont it just spam it instantly? Link to comment Share on other sites More sharing options...
Mat Posted April 14, 2009 Share Posted April 14, 2009 Wont it just spam it instantly???not sure what you mean here. AutoIt Project Listing Link to comment Share on other sites More sharing options...
FinalVersion Posted April 14, 2009 Share Posted April 14, 2009 Wont it just spam it instantly?Try Opt("SendKeyDelay", Delay Here) [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
ecstatic Posted April 14, 2009 Author Share Posted April 14, 2009 Still closes script instead of leaving game Link to comment Share on other sites More sharing options...
Authenticity Posted April 14, 2009 Share Posted April 14, 2009 Put ConsoleWrite() or MsgBox() after the Send("{ESC}") call. If you don't see any output or message box then try Opt("GUICloseOnESC", 0) although I don't see any GUICreate call... 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