PR3BI Posted February 10, 2009 Share Posted February 10, 2009 I've made a aimbot for this little game on the net, only for practice of course. And the script itself is working, though there are some errors. Here's the code expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <IE.au3> _IECreate("http://www.clockworkmonster.com/7-Love-Overdose.html") HotKeySet("{F9}", "start") HotKeySet("{F8}", "stop") HotKeySet("{ESC}", "terminate") $bot = False While 1 Sleep(30) $coord = PixelSearch(416, 200, 1030, 645, 0xC18702, 0) If Not @error Then MouseMove($coord[0], $coord[1], 0) MouseClick($coord[0], $coord[1], 0, 0) EndIf WEnd Func start() $bot = True EndFunc Func stop() $bot = False EndFunc Func terminate() Exit EndFunc As you can see, it's pretty basic. But the proble is that it will start clicking the chosen color, before I've pressed my start button (F9). The pause/stop button doesn't work either, but the Terminate button does. The script worked all fine, with no errors, but I over wrote the code without knowing it, and I lost the code. But I wrote it exactly the same, atleast I think so. Maybe something I've overlooked? If you've got a clue, please respond. I'd be very appreciated. PS: sorry if my spleling is vrong . Link to comment Share on other sites More sharing options...
TheOnlyOne Posted February 10, 2009 Share Posted February 10, 2009 (edited) global $idle =false hotkeyset ("{f9}","start") while 1 sleep (10) wend func pause () $Idle = Not $Idle Do; If $Idle = Sleep(30) $coord = PixelSearch(416, 200, 1030, 645, 0xC18702, 0) If Not @error Then MouseMove($coord[0], $coord[1], 0) MouseClick($coord[0], $coord[1], 0, 0) EndIf EndIf; until $Idle = false endfunc there you go click f9 for start and f9 for pause Edited February 10, 2009 by TheOnlyOne Link to comment Share on other sites More sharing options...
PR3BI Posted February 10, 2009 Author Share Posted February 10, 2009 (edited) global $idle =false hotkeyset ("{f9}","start") while 1 sleep (10) wend func pause () $Idle = Not $Idle Do; If $Idle = Sleep(30) $coord = PixelSearch(416, 200, 1030, 645, 0xC18702, 0) If Not @error Then MouseMove($coord[0], $coord[1], 0) MouseClick($coord[0], $coord[1], 0, 0) EndIf EndIf; until $Idle = false endfunc there you go click f9 for start and f9 for pause Thanks for reply. The script didn't work, should I just execute it, or put it together with mine? sorry, I'm seriously noob at this. PS. Is there no way that we can use my code? since it's the only way that I understand the script. I haven't used Do and until before. Edited February 10, 2009 by PR3BI Link to comment Share on other sites More sharing options...
TheOnlyOne Posted February 10, 2009 Share Posted February 10, 2009 Thanks for reply. The script didn't work, should I just execute it, or put it together with mine? sorry, I'm seriously noob at this. PS. Is there no way that we can use my code? since it's the only way that I understand the script. I haven't used Do and until before. okay i wil ltry to explain the do func then (im not 100% sure on this) the global means its the whole script the whole script =idle and when the script is running its =false then while 1 and sleep (10) wend is just for the pause and this is the whole script then the pause come up when you click f9 idle = not idle =idle =true do means it gonna do somethink until somethink else happends and then it gonna check about idle =true with the if $idle=true then it do you script ( i allready set in) and then there come until until $idle=false that will mean right now idle =true but when you click f9 idle =not idle so then i chance back to false and then its gonna pause the script agian... and btw i saw i made a mistake sorry here is the right code global $idle =false hotkeyset ("{f9}","start") while 1 sleep (10) wend func pause () $Idle = Not $Idle Do; If $Idle = true then Sleep(30) $coord = PixelSearch(416, 200, 1030, 645, 0xC18702, 0) If Not @error Then MouseMove($coord[0], $coord[1], 0) MouseClick($coord[0], $coord[1], 0, 0) EndIf until $Idle = false endfunc think it works now Link to comment Share on other sites More sharing options...
PR3BI Posted February 10, 2009 Author Share Posted February 10, 2009 Thank's everyone, but I found it out. My script was missing some stuff. Anyway, thanks for any reply! Anyways, here's my new one: expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <Misc.au3> HotKeySet("{ESC}", "terminate") HotKeySet("{F9}", "start") HotKeySet("{F8}", "stop") HotKeySet("{F7}", "color") $bot = False While 1 Sleep(30) If $bot = True Then $coord = PixelSearch(416, 210, 1000, 630, 0xC18702, 0) If Not @error Then MouseMove($coord[0], $coord[1], 0) MouseClick("left", $coord[0], $coord[1], 0, 0) EndIf EndIf WEnd Func color() $color = _ChooseColor(2, 0x0050C0, 2, "") EndFunc Func start() $bot = True EndFunc Func stop() $bot = False EndFunc Func terminate() Exit EndFuncThe buttons work now, and I've added a _ChooseColor function. I'm not interly sure if the _choosecolor func work, but to hell with it 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