PR3BI Posted April 15, 2008 Posted April 15, 2008 (edited) I've made this script: expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.10.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here Dim $My_Color = 0xFFFFFF Dim $Game, $MID HotKeySet("{F8}") HotKeySet("{F9}") Opt("MouseCoordMode", 0) Opt("PixelCoordMode", 0) GUICreate("Aimbot Test", 614, 370) GUISetFont(9, 400, "MS Sans Serif") $B_oIE3 = ObjCreate("Shell.Explorer.2") $Breaktime = GUICtrlCreateObj($B_oIE3, -45, -140, 540, 510) $html2 = "about:<br><text> This is only a test.</text></br>" $B_oIE3.navigate ($html2) GUICtrlCreateLabel ("Game Bot", 503, 80, 150) GUICtrlSetFont( -1, 12, 700) GUICtrlCreateLabel ("PixelSearch", 505, 120, 150) GUICtrlSetFont (-1, 12, 700) $BrkStart = GUICtrlCreateButton("Enter Game", 505, 300, 80, 25) $BrkEnd = GUICtrlCreateButton("Exit", 505, 330, 80, 25) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $BrkEnd Then Exit EndIf If $msg = $BrkStart Then $B_oIE3.navigate ("file:///C:/Users/P/Desktop/pingpong.swf") Sleep(1500) $B_oIE3.navigate ("file:///C:/Users/P/Desktop/pingpong.swf") Sleep(1500) MsgBox(262208, "How to Play", "Move the racket to hit the ball" & @CRLF & "Or, press [F9] to use the Game Bot") ToolTip("Press F9 to use the Game Bot", 0, 0) EndIf WEnd Func Game_Bot() $Game = Not $Game if $Game then tooltip("Press F9 to exit the Game Bot", 0, 0) While $Game $ball = PixelSearch (375, 482, 638, 473, 904. 485, $My_Color, 50, 10) If Not @error Then MouseClick("left", $ball[0], $ball[1], 1, 0) WEnd ToolTip("") EndFunc Func Get_coord() $MID = NOT $MID While $MID $pos = MouseGetPos() ToolTip("Mouse Coordinates" & @CRLF & " X = " & $pos[0] & " Y = " & $pos[1], 0, 0) Sleep(20) WEnd ToolTip("") EndFunc And the problem is that the bot won't start when i hit the start button (of the bot it self). Perhaps I've put in the wrong color, but i think it's the right one, cuz the ball's white, and I've put in 0xFFFFFF in $My_Color. So, if u can figure out the problem, i would be very greatful. PS, It's my first script. Edited April 15, 2008 by PR3BI
Dampe Posted April 15, 2008 Posted April 15, 2008 (edited) Well I don't think your Hot Key's are going to do much Try editing HotKeySet ("{F9}") To: HotKeySet("{F9}", "Game_Bot") Considering f8 is the start key! Same would go to the F8 key too, but for whatever function it is meant to call =] Edited April 15, 2008 by Dampe
PR3BI Posted April 15, 2008 Author Posted April 15, 2008 Thx! I'll try it. PS: The F8 isn't the start button, it's a "quick" get coord for where i hold my mouse. :D
PR3BI Posted April 15, 2008 Author Posted April 15, 2008 Damn! I got that problem out, and got a new one x) Now there's something wrong with my coords. Which i don't understand, cuz they're right accourding 2 the game :/ Sooo i thill need help guys
Dampe Posted April 15, 2008 Posted April 15, 2008 (edited) Thx! I'll try it. PS: The F8 isn't the start button, it's a "quick" get coord for where i hold my mouse. Oh, sorry Mis-read that. Well if F9 is the start key, HotKeySet("{F8", "Get_coord") HotKeySet ("{F9}", "Game_Bot") Try that =] Edited April 15, 2008 by Dampe
PR3BI Posted April 15, 2008 Author Posted April 15, 2008 I did, but there's something wrong with my coords now =S
Craig321 Posted April 15, 2008 Posted April 15, 2008 See this line: $ball = PixelSearch (375, 482, 638, 473, 904. 485, $My_Color, 50, 10) Try change it to: $ball = PixelSearch (375, 482, 638, 473, 904, 485, $My_Color, 50, 10)
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