Jump to content
Sign in to follow this  
Claist

Call of duty 2 Autofire

Recommended Posts

Claist

Hello,

Im new to Autoit and this is basicaly my first time using it, I got this code from someone (can' t remember who) at the forum(Thanks) and modified it a bit. But somehow I can' t get it to deactivate func _shootingtest(). It presses the left mouse button if the center pixel changes in color. This means when I move the mouse it will also auto fire. Is there any command which can make it stop and go to func _waitstart() on a mousemove or any keyboard press?

CODE
#include <GUIConstants.au3> ; include whatever you want, the more you include the more functions and commands you can use

#include <GUIComboBox.au3>

#include <File.au3>

#include <Array.au3>

#Include <Misc.au3>

Global $Paused

hotkeyset("{1}", "_shootingtest") ; hotkeys are set this means 1

hotkeyset("^{1}", "_shootingtest") ; this means CTRL+1 (for being ducked that you can activate it)

hotkeyset("{2}", "_fastshoot")

hotkeyset("{F8}", "_exit")

HotKeySet("{3}", "TogglePause")

_waituntilstart() ; starts the whole thing and jumps to Func_waituntilstart() one line below

func _fastshoot()

mouseclick("")

sleep(10)

mouseclick("")

sleep(10)

mouseclick("")

sleep(10)

mouseclick("")

sleep(10)

mouseclick("")

sleep(10)

mouseclick("")

sleep(10)

mouseclick("")

sleep(10)

mouseclick("")

sleep(10)

mouseclick("")

sleep(10)

mouseclick("")

sleep(10)

mouseclick("")

sleep(10)

mouseclick("")

sleep(10)

mouseclick("")

sleep(10)

mouseclick("")

sleep(10)

mouseclick("")

sleep(10)

mouseclick("")

sleep(10)

mouseclick("")

sleep(10)

Endfunc

Func _waituntilstart() ; Function starts with FUNC and ends with ENDFUNC

while 1

sleep(300)

wend

EndFunc ; this will only sleep and wait until you press C or CTRL+C

func _shootingtest() ; this FUNCTION will check if any movement is in the center of the screen(means crosshair here)

$check = pixelgetcolor( 640 , 398 )

_waituntilstart()

Do

$test = pixelgetcolor( 640 , 398 )

sleep(1)

Until $check <> $test Or _IsPressed(31) ; DO XXX until YYY means he checks pixels until the colors change in the center(means that enemy is now with his head in your aim)

if _IsPressed(31) Then

Endif

_fire()

sleep(300)

_waituntilstart()

EndFunc

func _fire()

mouseclick("")

sleep(50)

mouseclick("")

sleep(50)

mouseclick("")

sleep(50)

mouseclick("")

sleep(50)

mouseclick("")

sleep(10)

mouseclick("")

sleep(10)

mouseclick("")

sleep(10)

mouseclick("")

sleep(10)

mouseclick("")

sleep(10)

mouseclick("")

sleep(10)

_waituntilstart() ; jumps back to the wait function until you press C or CTRL C to start the thing again

EndFunc

Func TogglePause() ; the pause function

EndFunc

func _exit()

Exit

EndFunc

Thanks! And excuse me for my noobness(A)


Satan made pointless addictive games, God made bots.Claist,

Share this post


Link to post
Share on other sites
FireFox

@Claist

Welcome to the autoit forum :)

Take a look for MouseSetOnEvent UDF by MrCreator on example scripts forum :lmao:

Cheers, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
Claist

@Claist

Welcome to the autoit forum :)

Take a look for MouseSetOnEvent UDF by MrCreator on example scripts forum :lmao:

Cheers, FireFox.

Thanks a lot firefox I think I will be able to fix it now:>,


Satan made pointless addictive games, God made bots.Claist,

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×