Jump to content

Call of duty 2 Autofire


Claist
 Share

Recommended Posts

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,

Link to comment
Share on other sites

@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,

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...