Zibit Posted November 14, 2009 Share Posted November 14, 2009 ; Find a pure red pixel in the range 0,0-20,300 Opt("MustDeclareVars", 0) HotKeySet("+!d", "main") ;Shift-Alt-d HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") While 1 Sleep(100) WEnd func main() $hcoord = MouseGetPos() $coord = PixelSearch( 400, 300, 300, 100, 0xFF0000, 10 ) TrayTip("Working!", "Avp2 aimbot is working!", 5, 1) If Not @error Then sleep(100) MouseClick("left", $coord[0], $coord[1], 25) EndIf endfunc Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc could u help with this it says "Error: Subscript used with non-Array variable." Creator Of Xtreme DevelopersPixel Pattern UDFTray GUI UDFMathssend & recive register scriptMouse Control via Webcam Link to comment Share on other sites More sharing options...
Developers Jos Posted November 14, 2009 Developers Share Posted November 14, 2009 The "If Not @error Then" is done for TrayTip and not for Pixelsearch as you probably want. Jos 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...
Zibit Posted November 14, 2009 Author Share Posted November 14, 2009 no im pretty much sure that the problem is in "MouseClick("left", $coord[0], $coord[1], 25)" but ive been trying to fix it for quite a while... ( and dont worry, the only reason im doing this bot is to prove that character skins should be catagorized as hacks ) Creator Of Xtreme DevelopersPixel Pattern UDFTray GUI UDFMathssend & recive register scriptMouse Control via Webcam Link to comment Share on other sites More sharing options...
Developers Jos Posted November 14, 2009 Developers Share Posted November 14, 2009 no im pretty much sure that the problem is in "MouseClick("left", $coord[0], $coord[1], 25)" but ive been trying to fix it for quite a while... ( and dont worry, the only reason im doing this bot is to prove that character skins should be catagorized as hacks ) Again: You need to test for the success of Pixelsearch() because when it fails it will notr return an Array resulting in this error. Test for @error directly after the PixelSearch() statement! Jos 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
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