 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
iguessnot
Joined: 25 Jan 2010 Posts: 11
|
Posted: Mon Jan 25, 2010 3:05 am Post subject: I have a Problem Shooting in my stupid Bunny Hopping program |
|
|
ok so i am trying to make a bunny hopper for my shooting game so when i hold left click and scroll lock is enabled it preforms my action but i don't know where abouts to include the click so it shoots smoothly like normal,
Here is my script
| Code: | *$LButton::
GetKeyState, ScrollState, ScrollLock, T
If (ScrollState = "D")
Loop
if not GetKeyState("LButton", "P")
{
break
}
else
{
{
Send {space}
send {c}
send {space}
Sleep 50
Send {space}
Send {space}
}
}
else
{
Click Down
}
return
*LButton Up::Click up
|
I tryed adding send click in this section of my code before but when i let go of mouse click it starts shooting!
| Code: |
*$LButton::
GetKeyState, ScrollState, ScrollLock, T
If (ScrollState = "D")
send {click} ;<~~~~~
loop
| Can i please have some help  |
|
| Back to top |
|
 |
iguessnot
Joined: 25 Jan 2010 Posts: 11
|
Posted: Mon Jan 25, 2010 3:41 am Post subject: |
|
|
What if i could add in another loop,
| Code: |
loop
{
{
Send {click}
sleep 40
}
} |
would that work? i just dont know where to add it in =( |
|
| Back to top |
|
 |
Micahs
Joined: 01 Dec 2006 Posts: 460
|
Posted: Mon Jan 25, 2010 3:49 am Post subject: |
|
|
If you want to substitute the hopping for shooting while the ScrollLock is on, try this: | Code: | SetKeyDelay, 75, 75
Gosub, Init ;do at startup to sync hotkey state with scrolllock toggle state
Return
Init:
~ScrollLock Up::
If GetKeyState("ScrollLock", "T")
{ Hotkey, *$LButton, On
}
Else
{ Hotkey, *$LButton, Off
}
Return
*$LButton::
keepHopping=1
Loop
{ IfEqual, keepHopping, 0, Break ;if lbutton released and "keepHopping=0" stop loop
Send {space}
send {c}
send {space}
Sleep 50
Send {space}
Send {space}
}
return
~LButton Up::
keepHopping=0
Return
| If you want to shoot while hopping, it would need to be changed... _________________
 |
|
| Back to top |
|
 |
iguessnot
Joined: 25 Jan 2010 Posts: 11
|
Posted: Mon Jan 25, 2010 3:59 am Post subject: |
|
|
i fixed it and finished it hit scroll lock and then hold z for it 2 work and let go of z for it 2 stop! only works for COD4
http://www.megaupload.com/?d=21DNMSSP |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|