double pump script to game

Ask gaming related questions
kamil456
Posts: 1
Joined: 07 Feb 2018, 04:01
Facebook: https://www.facebook.com/kamil.struzek.9
Google: https://www.google.pl/?gfe_rd=cr&dcr=0&ei=UsB6WvXo
GitHub: kamil

double pump script to game

Post by kamil456 » 07 Feb 2018, 05:10

Hello!
I am new here
can anyone help ?
Script description:
it has to be a program that changes slots in the game.
Pressing LAlt activates or deactivates the script, and after holding XButton1, press once 2 and then wait 450ms and click, then press 3, wait 540ms and click.
Unfortunately, in my script something does not work. I would ask for help!
The following is the script below:
Thank you!

Code: Select all

~LAlt::
If ScriptActive = 1
{
ScriptActive = 0
SoundBeep, 400, 400
}
else if ScriptActive = 0
{
ScriptActive = 1
SoundBeep, 1000, 100
SoundBeep, 1000, 100
}
return
~XButton1:: 
SendInput, 2 
sleep, 540 
Click   
SendInput, 3 
sleep, 540 
Click 
return 
Rohwedder
Posts: 1358
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: double pump script to game

Post by Rohwedder » 07 Feb 2018, 08:01

Hallo,
I changed the activate/deactivate part:

Code: Select all

~LAlt:: ;Pressing LAlt activates or deactivates the script
	Suspend
	If A_IsSuspended
		SoundBeep, 400, 400
	Else
	{
		SoundBeep, 1000, 100
		SoundBeep, 1000, 100
	}
Return
~XButton1:: 
	SendInput, 2 
	sleep, 450
	Click
	SendInput, 3 
	sleep, 540 
	Click 
Return
Post Reply

Return to “Gaming”