HeruloS Posted March 27, 2008 Share Posted March 27, 2008 I've been using autoIT for a while now and i've searched through this whole site looking for the info i need to get this thing to work. Basically i have a script for an aimbot that i made with help from a various amounts of autoIT topics. My problem is that i can't get the script to work in Battlefield 2142 i can get it to run in a video that i made using FRAPS in BF2142, and it works like a charm but for some reason it won't work in game here is my script. CODEHotKeySet ( "{NUMPADMULT}" , "aimbot" ) HotKeySet ( "{NUMPADDIV}" , "team" ) $aimbot = 0 $team = 0 $aimcolour = 0xff26ff func team() if ($team = 1) then $team = 0 $aimcolour = 0xFF26FF SplashTextOn ( "", "Aim = EU" , 150 , 18 , 0 , 0 , 1 , "10") Sleep(2000) SplashOff() elseif ($team = 0) then $team = 1 $aimcolour = 0xDF0303 SplashTextOn ( "", "Aim = PAC" , 150 , 18 , 0 , 0 , 1 , "10") Sleep(2000) SplashOff() endif endfunc func aimbot() if ($aimbot=1) then $aimbot=0 SplashTextOn ( "", "Aimbot OFF" , 150 , 18 , 0 , 0 , 1 , "10") Sleep(2000) SplashOff() elseif ($aimbot=0) then $aimbot=1 SplashTextOn ( "", "Aimbot ON" , 150 , 18 , 0 , 0 , 1 , "10") Sleep(2000) SplashOff() endif endfunc While 1 If $aimbot = 1 Then; Snap-to $pos = MouseGetPos() $coord = PixelSearch(($pos[0] - 60) , ($pos[1] - 60) , ($pos[0] + 60) , ($pos[1] +60), $aimcolour, 75, 3) ; initial search area 50sq'pixels If Not @error Then If IsArray($coord) = 1 Then MouseMove($coord[0], $coord[1], 0) $found = "yes" EndIf EndIf $pos = MouseGetPos() $coord = PixelSearch(($pos[0] - 30) , ($pos[1] - 30) , ($pos[0] + 30) , ($pos[1] + 30), $aimcolour, 75, 3) ; locked on search area 10sq'pixels If IsArray($coord) = 1 Then MouseMove($coord[0], $coord[1], 0) Else $found = "no" EndIf Endif WEnd Any help would be greatly appreciated Thanks HeruloS Link to comment Share on other sites More sharing options...
monoceres Posted March 27, 2008 Share Posted March 27, 2008 I might me wrong, but most newer games will not be fooled with the MouseMove() function. They're probably accesing the mouse on a lower level. Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
HeruloS Posted March 27, 2008 Author Share Posted March 27, 2008 If so is there anyway i can use another command to get around it Link to comment Share on other sites More sharing options...
HeruloS Posted March 28, 2008 Author Share Posted March 28, 2008 *Bump* Link to comment Share on other sites More sharing options...
the1venom Posted March 28, 2008 Share Posted March 28, 2008 have you tried this udf for moving the mouse ?_MouseMovePlus Link to comment Share on other sites More sharing options...
HeruloS Posted March 28, 2008 Author Share Posted March 28, 2008 i havent tried it, and to be honest im not sure what to do with it can someone please incorparate this into my script please Link to comment Share on other sites More sharing options...
HeruloS Posted March 30, 2008 Author Share Posted March 30, 2008 Bump Link to comment Share on other sites More sharing options...
Swift Posted March 30, 2008 Share Posted March 30, 2008 No, were not going to do some random work for you. Stop tring to cheat at games, play the games right and you don't have to worry about asking people to write stuff for you when they wont. And...Please stop bumping this thread if your not going to put any effort towards anything..... Link to comment Share on other sites More sharing options...
HeruloS Posted March 30, 2008 Author Share Posted March 30, 2008 Um how have i not put any effort in i wrote the whole damn script and it works fine outside the game, but what i dont understand is how do you get it to work IN game i have also tried using the MoveMousePlus function but it doesnt recognise it as a valid function, maybe im putting it in wrong? Link to comment Share on other sites More sharing options...
HeruloS Posted March 31, 2008 Author Share Posted March 31, 2008 Ok well iv have taken some time and tried to put the mousemoveplus function into this code, but i've tried running the script and it comes up with an error saying variable used without being declared which im not sure what that means here is how i have incorparated the function into my script CODEHotKeySet ( "{NUMPADMULT}" , "aimbot" ) HotKeySet ( "{NUMPADDIV}" , "team" ) $aimbot = 0 $team = 0 $aimcolour = 0xff26ff Func _MouseMovePlus($X, $Y,$absolute = 0) Local $MOUSEEVENTF_MOVE = 1 Local $MOUSEEVENTF_ABSOLUTE = 32768 DllCall("user32.dll", "none", "mouse_event", _ "long", $MOUSEEVENTF_MOVE + ($absolute*$MOUSEEVENTF_ABSOLUTE), _ "long", $X, _ "long", $Y, _ "long", 0, _ "long", 0) EndFunc func team() if ($team = 1) then $team = 0 $aimcolour = 0xFF26FF SplashTextOn ( "", "Aim = EU" , 150 , 18 , 0 , 0 , 1 , "10") Sleep(2000) SplashOff() elseif ($team = 0) then $team = 1 $aimcolour = 0xDF0303 SplashTextOn ( "", "Aim = PAC" , 150 , 18 , 0 , 0 , 1 , "10") Sleep(2000) SplashOff() endif endfunc func aimbot() if ($aimbot=1) then $aimbot=0 SplashTextOn ( "", "Aimbot OFF" , 150 , 18 , 0 , 0 , 1 , "10") Sleep(2000) SplashOff() elseif ($aimbot=0) then $aimbot=1 SplashTextOn ( "", "Aimbot ON" , 150 , 18 , 0 , 0 , 1 , "10") Sleep(2000) SplashOff() endif endfunc While 1 If $aimbot = 1 Then; Snap-to $pos = MouseGetPos() $coord = PixelSearch(($pos[0] - 60) , ($pos[1] - 60) , ($pos[0] + 60) , ($pos[1] +60), $aimcolour, 75, 3) ; initial search area 60sq'pixels If Not @error Then If IsArray($coord) = 1 Then _MouseMovePlus($X*(65535/@DesktopWidth), $Y*(65535/@DesktopHeight),1) $found = "yes" EndIf EndIf $pos = MouseGetPos() $coord = PixelSearch(($pos[0] - 30) , ($pos[1] - 30) , ($pos[0] + 30) , ($pos[1] + 30), $aimcolour, 75, 3) ; locked on search area 30sq'pixels If IsArray($coord) = 1 Then _MouseMovePlus($X*(65535/@DesktopWidth), $Y*(65535/@DesktopHeight),1) Else $found = "no" EndIf Endif WEnd Can someone please help me correct this thanks Link to comment Share on other sites More sharing options...
Distrophy Posted March 31, 2008 Share Posted March 31, 2008 You have to declare your variables before you can use them. You use $x and $y on line 8, but haven't assigned them values. Link to comment Share on other sites More sharing options...
HeruloS Posted April 1, 2008 Author Share Posted April 1, 2008 Thank you so much I'll give it a whirl Link to comment Share on other sites More sharing options...
everseeker Posted April 1, 2008 Share Posted April 1, 2008 No, were not going to do some random work for you. Stop tring to cheat at games, play the games right and you don't have to worry about asking people to write stuff for you when they wont. And...Please stop bumping this thread if your not going to put any effort towards anything.....Give him a break. He IS at least trying...He didn't come here completly empty handed Everseeker Link to comment Share on other sites More sharing options...
weaponx Posted April 1, 2008 Share Posted April 1, 2008 Give him a break. He IS at least trying...He didn't come here completly empty handedHe didn't put in enough effort to play the game on his own merit. Link to comment Share on other sites More sharing options...
HeruloS Posted April 2, 2008 Author Share Posted April 2, 2008 well i gave $X = 0 and $Y = 1 which im pretty sure is what i was suposed to have, and then ran the script, this time there wer no errors but the corner of the mouse goes to the top left corner of my screen on the desktop...so i tried it ingame and no luck no response at all, and the text that i have splashed doesnt come up either but im not quite sure if its suposed to anyway. Any other suggestions Link to comment Share on other sites More sharing options...
Matz Posted March 20, 2009 Share Posted March 20, 2009 How is this script going for you? I'm interested in developing it further. What exactly is the bot aiming at? Link to comment Share on other sites More sharing options...
weaponx Posted March 20, 2009 Share Posted March 20, 2009 How is this script going for you?Probably not that well since it has seen no activity for an entire year and you brought it back from the dead with nothing to contribute.What exactly is the bot aiming at?My guess would be the enemy. Link to comment Share on other sites More sharing options...
Matz Posted March 21, 2009 Share Posted March 21, 2009 (edited) Probably not that well since it has seen no activity for an entire year and you brought it back from the dead with nothing to contribute.My guess would be the enemy.Wow... what an informative reply. Having trouble with the mrses? Or no mrses at all I was actuallly wondering about the technique behind the aiming. Edited March 21, 2009 by Matz Link to comment Share on other sites More sharing options...
Developers Jos Posted March 21, 2009 Developers Share Posted March 21, 2009 Wow... what an informative reply. Having trouble with the mrses? Or no mrses at all lets not go there... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts