AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

I have a Problem Shooting in my stupid Bunny Hopping program

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
iguessnot



Joined: 25 Jan 2010
Posts: 11

PostPosted: Mon Jan 25, 2010 3:05 am    Post subject: I have a Problem Shooting in my stupid Bunny Hopping program Reply with quote

    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 Question
Back to top
View user's profile Send private message
iguessnot



Joined: 25 Jan 2010
Posts: 11

PostPosted: Mon Jan 25, 2010 3:41 am    Post subject: Reply with quote

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
View user's profile Send private message
Micahs



Joined: 01 Dec 2006
Posts: 460

PostPosted: Mon Jan 25, 2010 3:49 am    Post subject: Reply with quote

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
View user's profile Send private message
iguessnot



Joined: 25 Jan 2010
Posts: 11

PostPosted: Mon Jan 25, 2010 3:59 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group