HC0 Posted July 4, 2006 Share Posted July 4, 2006 Ok, what I am trying to do is make a thing for an FPS that shoots when it detecs a certain colour on the screen. I have everything working except I encounter a probelm. The crosshair is obviously stuck in the middle of the screen so when you use the move mouse command or mouseclick or anything like that, it just spins because you can't actually move the crosshair. Is there anyway around this? I'll post my code if anyone can think of something it'd be awesome! sleep(5000) $coord = PixelSearch( 0, 0, 800, 600, 0x150b0a, 10) If Not @error Then MouseClick("left",$coord[0],$coord[1],20) EndIf Link to comment Share on other sites More sharing options...
HC0 Posted July 4, 2006 Author Share Posted July 4, 2006 No one? Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 4, 2006 Share Posted July 4, 2006 Hi, some games are protected. Try ControlClick So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
HC0 Posted July 4, 2006 Author Share Posted July 4, 2006 Ok, I'll try be back with a response later. Link to comment Share on other sites More sharing options...
HC0 Posted July 4, 2006 Author Share Posted July 4, 2006 ...No that's not the problem. I am able to control everything only because it is a crosshair, the crosshair is ALWAYS in the middle of the screen so if you do like "MouseClick('left",300,250") it just spins because the actual crosshair will not move even though AutoIt is trying to make it move. Any other suggestions? Link to comment Share on other sites More sharing options...
BuddyBoy Posted July 4, 2006 Share Posted July 4, 2006 Maybe this will help. http://www.autoitscript.com/forum/index.ph...4&hl=Aimbot Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 4, 2006 Moderators Share Posted July 4, 2006 ...No that's not the problem. I am able to control everything only because it is a crosshair, the crosshair is ALWAYS in the middle of the screen so if you do like "MouseClick('left",300,250") it just spins because the actual crosshair will not move even though AutoIt is trying to make it move. Any other suggestions?Figure out how much it's moving and how much the difference would have to be and do a loop until the the Mouse is in the position you want it. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
HC0 Posted July 4, 2006 Author Share Posted July 4, 2006 To answer BuddyBoy, those are for flash games, way easier, as a matter of fact I've written for flash games before. It's different because the crosshair actually moves. Akthough there are some features in there I will add. To answer SmOke_N, I don't really get what you mean. I could simply figure out the difference between my crosshair and the pixel just by doing a subtraction, that's simple but what after that? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 4, 2006 Moderators Share Posted July 4, 2006 (edited) To answer BuddyBoy, those are for flash games, way easier, as a matter of fact I've written for flash games before. It's different because the crosshair actually moves. Akthough there are some features in there I will add. To answer SmOke_N, I don't really get what you mean. I could simply figure out the difference between my crosshair and the pixel just by doing a subtraction, that's simple but what after that?Something like this:sleep(5000) $coord = PixelSearch( 0, 0, 800, 600, 0x150b0a, 10) If Not @error Then Local $xAdd = 0, $yAdd = 0 MouseMove($coord[0] + $xAdd, $coord[1] + $yAdd, 1) Do $xAdd += 1 $yAdd += 1 MouseMove($coord[0] + $xAdd, $coord[1] + $yAdd, 1) $Mpos = MouseGetPos() Sleep(10) Until $Mpos[0] = $coord[0] And $Mpos[1] = $coord[1] MouseClick("left",$coord[0],$coord[1],20) EndIf Edited July 4, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
HC0 Posted July 5, 2006 Author Share Posted July 5, 2006 (edited) I'm doing it in Wolf Enemy Territory.The first one gives me an error, but the second gives me the same problem. If you have ET you can put this video in your /etmain/demos/" folder and watch it.http://www.projectwasted.com/jmjl/demo0000.dm_84If you don't have ET it's a f ree download from www.enemy-territory.com I beliee. Edited July 5, 2006 by HC0 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 5, 2006 Moderators Share Posted July 5, 2006 I'm doing it in Wolf Enemy Territory.The first one gives me an error, but the second gives me the same problem. If you have ET you can put this video in your /etmain/demos/" folder and watch it.http://www.projectwasted.com/jmjl/demo0000.dm_84If you don't have ET it's a f ree download from www.enemy-territory.com I beliee.Yeah, sorry, I thought it might help, the first one needs Beta to work += is a beta option. As far as downloading it, I'm not going to personally do that, maybe someone would like too (Don't do online games). Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
gamerman2360 Posted July 5, 2006 Share Posted July 5, 2006 (edited) Nvm. Thought AutoIt moves the mouse until the mouses postion is over the place where it is supposed to be. (instead it checks a var, not sure how to word it) Edited July 5, 2006 by gamerman2360 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