Sign in to follow this  
Followers 0
jimmyxxx

Some noobi questions

4 posts in this topic

Hi all am new in this script things xD.

But i have start making my own one.

It is an auto" q " press, to use very fast potions in some games :lmao:

Now i have some noobie questions to make better my script:

1.How can i make a function to pause script with button F7

2.How to make a function to start it with F6

3.How can the script not to start when i oen it.

Thanks for helps :whistle:

Share this post


Link to post
Share on other sites



You could have a variable keep track of a 'run' state which is default as 'off'. Then you conditionally execute your 'q' send if the run state has been changed to on. As for the key presses, you should look at

CODE
HotKeySet ( "key" [, "function"] )
as it appears to be what your looking for.

Possible something like this

CODE
HotKeySet ( "{f6}", "SwitchToRUN" )

HotKeySet ( "{f7}", "SwitchToPAUSE" )

Dim $State = False

While(1)

If($State = True)Then

;; UNCOMMENT to have it send the q

;Send( "q" )

EndIf

Sleep(100)

WEnd

Func SwitchToRUN()

$State = True

EndFunc

Func SwitchToPAUSE()

$State = False

EndFunc

Darknecromancer

Share this post


Link to post
Share on other sites

You could have a variable keep track of a 'run' state which is default as 'off'. Then you conditionally execute your 'q' send if the run state has been changed to on. As for the key presses, you should look at

CODE
HotKeySet ( "key" [, "function"] )
as it appears to be what your looking for.

Possible something like this

CODE
HotKeySet ( "{f6}", "SwitchToRUN" )

HotKeySet ( "{f7}", "SwitchToPAUSE" )

Dim $State = False

While(1)

If($State = True)Then

;; UNCOMMENT to have it send the q

;Send( "q" )

EndIf

Sleep(100)

WEnd

Func SwitchToRUN()

$State = True

EndFunc

Func SwitchToPAUSE()

$State = False

EndFunc

Darknecromancer

Why not use one key to pause OR unpause it? It's what I used in GTA SA to auto-tap the left shift key :whistle: Guessing this is like you need it too :lmao:

This code starts out doing nothing, but when you press F3 (change that to whatever you want) it toggles the on/off state.

Opt("SendKeyDownDelay",50); <- be sure to experiment with this; many games don't register keypresses if they are only held down for the default length of 5 ms!

HotKeySet("{F3}","toggle")
$toggle = False

While 1
    If $toggle Then Send("{LSHIFT}")
    Sleep(250)
WEnd

Func Toggle()
    $toggle = Not $toggle
EndFunc

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites

Thanks for help its working :whistle:

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  
Followers 0