Juri Posted October 9, 2009 Share Posted October 9, 2009 (edited) It's impossible to optimalization this: expandcollapse popupGlobal $Aimbot = 0 Global $found = "no" Global $speed = "1.5" global $coord global $coord2 global $coord3 dim $speed1 Global $shoot = "0" Global $aim="0" dim $searchcolor dim $searchcolor2 dim $searchcolor3 dim $searchcolort dim $searchcolort2 dim $searchcolort3 Global $team = "CT" dim $ppm $ppm=0 Opt("MouseCoordMode", 0) Opt("PixelCoordMode", 0) Opt("MouseClickDelay", 0) Opt("MouseClickDownDelay", 0) Hotkeyset ("{HOME}", "Aimbot") Hotkeyset ("{INS}", "AimShoot") HotKeySet ("{End}", "TurnoffAimbot") HotKeySet ("{Del}", "AutoLock") HotKeySet ("{F10}", "PPM") HotKeySet ("{PGUP}", "Faster") HotKeySet ("{PGDN}", "Slower") HotKeySet ("{F11}", "Team") GuiCreate("Simple Aimbot") GUISetState(@SW_SHOW) GUICtrlCreateLabel("HOME - Aim Style 1", 10, 20) Guictrlcreatelabel("INSERT - Dodanie strzału", 10, 40) GUICtrlCreateLabel("DELETE - Aim Style 2", 10, 60) GUICtrlCreateLabel("END - Wyłącza Aima", 10, 80) GUICtrlCreateLabel("F10 - Namierzanie prawym przyciskiem myszy - przytrzymujemy - namierza, puszczamy - przestaje", 10, 100) GUICtrlCreateLabel("F11 - Zmiana Teamu", 10, 120) GuiCtrlCreateLabel("Page Up - Szybsze namierzanie - gorsza wydajność", 10, 140) GuiCtrlCreateLabel("Page Down - Wolniejsze namierzanie - lepsza wydajność", 10, 160) $speed1=GuiCtrlCreateLabel("Aktualny speed:" & $speed, 10, 180) $teams=GuiCtrlCreateLabel("Aktualny team:" & $team, 10, 200) GUICtrlCreateLabel("Coded by Juri", 160, 300) While 1 If (_IsPressed('02') = 1) and ($ppm=1) Then Pressed() Sleep($speed) EndIf WEnd Func Pressed() If $found = "no" Then if $team=("CT") Then $coord = PixelSearch(0, 0, 800, 580, 0x0000FF, 2, 0) $coord2 = PixelSearch(0, 0, 800, 580, 0x0006A, 2, 0) $coord3 = PixelSearch(0, 0, 800, 580, 0x000041, 2, 0) else $coord = PixelSearch(0, 0, 800, 580, 0xFF0000, 2, 0) $coord2 = PixelSearch(0, 0, 800, 580, 0x750000, 2, 0) $coord3 = PixelSearch(0, 0, 800, 580, 0x4D0000, 2, 0) endif If IsArray($coord) = 1 Then MouseMove($coord[0], $coord[1], 0) $found = "yes" if $shoot=1 Then MouseClick("left") EndIf ElseIf IsArray($coord2) = 1 Then MouseMove($coord2[0], $coord2[1], 0) $found = "yes" if $shoot=1 Then MouseClick("left") EndIf ElseIf IsArray($coord3) = 1 Then MouseMove($coord3[0], $coord3[1], 0) if $shoot=1 Then MouseClick("left") EndIf EndIf Else $pos = MouseGetPos() if $team=("CT") Then $coord = PixelSearch(($pos[0] - 50) , ($pos[1] - 50) , ($pos[0] + 50) , ($pos[1] + 50), 0x0000FF, 2, 0) $coord2 = PixelSearch(($pos[0] - 50) , ($pos[1] - 50) , ($pos[0] + 50) , ($pos[1] + 50), 0x0006A, 2, 0) $coord3 = PixelSearch(($pos[0] - 50) , ($pos[1] - 50) , ($pos[0] + 50) , ($pos[1] + 50), 0x000041, 2, 0) else $coord = PixelSearch(($pos[0] - 50) , ($pos[1] - 50) , ($pos[0] + 50) , ($pos[1] + 50), 0xFF0000, 2, 0) $coord2 = PixelSearch(($pos[0] - 50) , ($pos[1] - 50) , ($pos[0] + 50) , ($pos[1] + 50), 0x750000, 2, 0) $coord3 = PixelSearch(($pos[0] - 50) , ($pos[1] - 50) , ($pos[0] + 50) , ($pos[1] + 50), 0x4D0000, 2, 0) endif If IsArray($coord) = 1 Then MouseMove($coord[0], $coord[1], 0) ElseIf IsArray($coord2) = 1 Then MouseMove($coord2[0], $coord2[1], 0) ElseIf IsArray($coord3) = 1 Then MouseMove($coord3[0], $coord3[1], 0) Else $found = "no" EndIF EndIf Sleep($speed) EndFunc ;In this little example pressing n will pop up a message ;pressing Esc will leave. Func _IsPressed($hexKey) ; $hexKey must be the value of one of the keys. ; _IsPressed will return 0 if the key is not pressed, 1 if it is. ; $hexKey should entered as a string, don't forget the quotes! ; (yeah, layer. This is for you)nnn Global $aR, $bO $hexKey = '0x' & $hexKey $aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey) If Not @error And BitAND($aR[0], 0x8000) = 0x8000 Then $bO = 1 Else $bO = 0 EndIf Return $bO EndFunc ;==>_IsPressed #cs 01 Left mouse button 02 Right mouse button 04 Middle mouse button (three-button mouse) 05 Windows 2000/XP: X1 mouse button 06 Windows 2000/XP: X2 mouse button 08 BACKSPACE key 09 TAB key 0C CLEAR key 0D ENTER key 10 SHIFT key 11 CTRL key 12 ALT key 13 PAUSE key 14 CAPS LOCK key 1B ESC key 20 SPACEBAR 21 PAGE UP key 22 PAGE DOWN key 23 END key 24 HOME key 25 LEFT ARROW key 26 UP ARROW key 27 RIGHT ARROW key 28 DOWN ARROW key 29 SELECT key 2A PRINT key 2B EXECUTE key 2C PRINT SCREEN key 2D INS key 2E DEL key 30 0 key 31 1 key 32 2 key 33 3 key 34 4 key 35 5 key 36 6 key 37 7 key 38 8 key 39 9 key 41 A key 42 B key 43 C key 44 D key 45 E key 46 F key 47 G key 48 H key 49 I key 4A J key 4B K key 4C L key 4D M key 4E N key 4F O key 50 P key 51 Q key 52 R key 53 S key 54 T key 55 U key 56 V key 57 W key 58 X key 59 Y key 5A Z key 5B Left Windows key 5C Right Windows key 60 Numeric keypad 0 key 61 Numeric keypad 1 key 62 Numeric keypad 2 key 63 Numeric keypad 3 key 64 Numeric keypad 4 key 65 Numeric keypad 5 key 66 Numeric keypad 6 key 67 Numeric keypad 7 key 68 Numeric keypad 8 key 69 Numeric keypad 9 key 6A Multiply key 6B Add key 6C Separator key 6D Subtract key 6E Decimal key 6F Divide key 70 F1 key 71 F2 key 72 F3 key 73 F4 key 74 F5 key 75 F6 key 76 F7 key 77 F8 key 78 F9 key 79 F10 key 7A F11 key 7B F12 key 7C-7F F13 key - F16 key 80H-87H F17 key - F24 key 90 NUM LOCK key 91 SCROLL LOCK key A0 Left SHIFT key A1 Right SHIFT key A2 Left CONTROL key A3 Right CONTROL key A4 Left MENU key A5 Right MENU key #ce Func PPM() if $ppm=0 Then $aimbot=2 Tooltip("Aim on key on!", 0, 0) $ppm=1 else $aimbot=0 Tooltip("Aim on key off!", 0, 0) $ppm=0 endif Dllclose("user32") EndFunc Func Team() if $team=("TT") then $team=("CT") $teams=GuiCtrlCreateLabel("Aktualny team:" & $team, 10, 200) Tooltip("Aktualny team" & $team) else $team=("TT") $teams=GuiCtrlCreateLabel("Aktualny team:" & $team, 10, 200) Tooltip("Aktualny team" & $team) Endif endfunc Func Faster() If $speed > 0.1 Then $speed=$speed-0.1 $speed1=GuiCtrlCreateLabel("Aktualny speed:" & $speed, 10, 180) Tooltip("Aktualny speed" & $speed) Else $speed=$speed Tooltip("Aktualny speed" & $speed) EndIf EndFunc Func Slower() If $speed > 0 Then $speed=$speed+0.1 $speed1=GuiCtrlCreateLabel("Aktualny speed:" & $speed, 10, 180) Tooltip("Aktualny speed" & $speed) Else $speed=$speed Tooltip("Aktualny speed" & $speed) EndIf EndFunc Func Aimbot() Tooltip("Aim Style 1 on !", 0 ,0) $aimbot = 3 While 1 If $aimbot=3 Then If $found = "no" Then if $team=("CT") Then $coord = PixelSearch(0, 0, 800, 580, 0x0000FF, 2, 0) $coord2 = PixelSearch(0, 0, 800, 580, 0x0006A, 2, 0) $coord3 = PixelSearch(0, 0, 800, 580, 0x000041, 2, 0) else $coord = PixelSearch(0, 0, 800, 580, 0xFF0000, 2, 0) $coord2 = PixelSearch(0, 0, 800, 580, 0x750000, 2, 0) $coord3 = PixelSearch(0, 0, 800, 580, 0x4D0000, 2, 0) endif If IsArray($coord) = 1 Then MouseMove($coord[0], $coord[1], 0) $found = "yes" if $shoot=1 Then MouseClick("left") EndIf ElseIf IsArray($coord2) = 1 Then MouseMove($coord2[0], $coord2[1], 0) $found = "yes" if $shoot=1 Then MouseClick("left") EndIf ElseIf IsArray($coord3) = 1 Then MouseMove($coord3[0], $coord3[1], 0) if $shoot=1 Then MouseClick("left") EndIf EndIf Else $pos = MouseGetPos() if $team=("CT") Then $coord = PixelSearch(($pos[0] - 50) , ($pos[1] - 50) , ($pos[0] + 50) , ($pos[1] + 50), 0x0000FF, 2, 1) $coord2 = PixelSearch(($pos[0] - 50) , ($pos[1] - 50) , ($pos[0] + 50) , ($pos[1] + 50), 0x0006A, 2, 1) $coord3 = PixelSearch(($pos[0] - 50) , ($pos[1] - 50) , ($pos[0] + 50) , ($pos[1] + 50), 0x000041, 2, 1) else $coord = PixelSearch(($pos[0] - 50) , ($pos[1] - 50) , ($pos[0] + 50) , ($pos[1] + 50), 0xFF0000, 2, 1) $coord2 = PixelSearch(($pos[0] - 50) , ($pos[1] - 50) , ($pos[0] + 50) , ($pos[1] + 50), 0x750000, 2, 1) $coord3 = PixelSearch(($pos[0] - 50) , ($pos[1] - 50) , ($pos[0] + 50) , ($pos[1] + 50), 0x4D0000, 2, 1) endif If IsArray($coord) = 1 Then MouseMove($coord[0], $coord[1], 0) ElseIf IsArray($coord2) = 1 Then MouseMove($coord2[0], $coord2[1], 0) ElseIf IsArray($coord3) = 1 Then MouseMove($coord3[0], $coord3[1], 0) Else $found = "no" EndIF EndIf EndIf Sleep($speed) WEnd EndFunc Func Autolock() Tooltip("Aim Style 2 On !", 0 ,0) $Aimbot = 1 While 1 If $Aimbot = 1 then if $team=("CT") Then $coord = PixelSearch(0, 0, 800, 580, 0x0000FF, 2, 0) $coord2 = PixelSearch(0, 0, 800, 580, 0x0006A, 2, 0) $coord3 = PixelSearch(0, 0, 800, 580, 0x000041, 2, 0) else $coord = PixelSearch(0, 0, 800, 580, 0xFF0000, 2, 0) $coord2 = PixelSearch(0, 0, 800, 580, 0x750000, 2, 0) $coord3 = PixelSearch(0, 0, 800, 580, 0x4D0000, 2, 0) endif If (IsArray($coord) = 1) Then MouseMove($coord[0], $coord[1], 0) if $shoot=1 Then MouseClick("left") EndIf Elseif (IsArray($coord2) = 1) Then MouseMove($coord2[0], $coord2[1], 0) if $shoot=1 Then MouseClick("left") EndIf Elseif (IsArray($coord3) = 1) Then MouseMove($coord3[0], $coord3[1], 0) if $shoot=1 Then MouseClick("left") EndIf EndIf EndIf Sleep($speed) Wend EndFunc Func AimShoot() if $shoot = 0 Then $shoot=1 Tooltip("Shoot After Aim On! !", 0 ,0) else $shoot=0 Tooltip("Shoot After Aim Off! !", 0 ,0) EndIf Endfunc Func TurnoffAimbot() $Aimbot = 0 $ppm = 0 Tooltip("Aimbot is Off", 0 ,0) Endfunc While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then GUIDelete() ExitLoop EndIf WEnd Now its huge cpu used ^^ and low fps in game ;p Edited October 9, 2009 by Juri Link to comment Share on other sites More sharing options...
Developers Jos Posted October 9, 2009 Developers Share Posted October 9, 2009 (edited) Global $speed = 10 ; ; While 1 If (_IsPressed('02') = 1) and ($ppm=1) Then Pressed() EndIf Sleep($speed) WEnd Edited October 9, 2009 by 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