Thoranus Posted November 1, 2009 Share Posted November 1, 2009 Hey, I'm trying to make a aimbot, but it doesn't work. hotkeyset("{f1}","stop") hotkeyset("{f2}","pause") $color=0xFF0000 $pause=false while 1 $head_search=PixelSearch(0,0,1280,1024,$color,5,1) if $head_search= not @error then MouseClick ("left",$head_search[0],$head_search[1],1,1) EndIf sleep (5) WEnd func stop () Exit EndFunc func pause() $pause=not $pause if $pause=true Then Do sleep (5) until $pause=False EndIf EndFunc I don't know what to do. Link to comment Share on other sites More sharing options...
nixsoft Posted November 1, 2009 Share Posted November 1, 2009 For which shooter? Link to comment Share on other sites More sharing options...
Seagul Posted November 1, 2009 Share Posted November 1, 2009 your searching for a red pixel.. thats prolly not gonna work Link to comment Share on other sites More sharing options...
dantay9 Posted November 1, 2009 Share Posted November 1, 2009 Like Seagul said, searching for a pure red pixel probably isn't going to work. You need to find a unique pixel color in the object to look for. That way, the pixelsearch function doesn't get caught on another object. Link to comment Share on other sites More sharing options...
Seagul Posted November 1, 2009 Share Posted November 1, 2009 (edited) and im not so sure about this yours if $head_search= not @error then should be if @error then ; you already declared what headsearch was. your pause function isnt lookin quite right either do you write your stuff in scite it has a syntax checker. Edited November 1, 2009 by Seagul Link to comment Share on other sites More sharing options...
Zibit Posted November 15, 2009 Share Posted November 15, 2009 but i kinda have a better version use this perfect base... ; Find a pure red pixel in the range 0,0-20,300 Opt("MustDeclareVars", 0) local $pause HotKeySet("+!d", "main") ;Shift-Alt-d HotKeySet("{PAUSE}", "Pause") HotKeySet("{ESC}", "Terminate") While 1 Sleep(100) WEnd func main() while 1 $CoOrd = PixelSearch(400, 300, 600, 400, 0xff0000, 20) ; Looks for colour 0xff0000. If Not @error Then ;If it exists then MouseClick("Left", $CoOrd[0], $CoOrd[1], 1, 0) ;Clicks the first instance of that colour else EndIf wend endfunc Func Pause() $pause=not $pause if $pause=true Then Do sleep (5) until $pause=False EndIf ToolTip('Script is "Paused"',0,0) ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Creator Of Xtreme DevelopersPixel Pattern UDFTray GUI UDFMathssend & recive register scriptMouse Control via Webcam 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