AutoHotkey Community

It is currently May 27th, 2012, 7:51 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 1913 posts ]  Go to page Previous  1 ... 25, 26, 27, 28, 29, 30, 31 ... 128  Next
Author Message
 Post subject:
PostPosted: October 14th, 2006, 11:17 pm 
Offline

Joined: September 3rd, 2006, 5:34 am
Posts: 601
Location: Iowa, U.S.
Lol no it's all good here. Just briefly read the help file and search the forum for your answers before posting next time. Welcome :D


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 16th, 2006, 3:01 am 
would anyone know how to make a macro of...

L+ctrl
space bar
L+crtl
Z
L+ctrl
..if you would know how its very apreciated


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 16th, 2006, 4:01 am 
Offline

Joined: September 3rd, 2006, 5:34 am
Posts: 601
Location: Iowa, U.S.
Looking at the controls I am guessing this is a dolphin diving macro,..am I correct?

Code:
$F12::
Loop
{
Loop
{

GetKeyState, state, P
if state = D
break

Send, {LCtrl down}
Sleep 50
Send, {Space down}
Sleep 50
Send, {LCtrl up}
Sleep 50
Send, {z down}
Sleep 50
Send, {Space up}
Sleep 50
Send, {Z up}
return
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 17th, 2006, 9:35 pm 
Offline

Joined: November 6th, 2005, 5:25 am
Posts: 182
Here's a REALLY snipe snippet for scanning the skys in a turret...when you press the Left Mouse Button it will stop turning in a circle:
Code:
;
; Move the mouse relative to its current position
; 0,0 is upper left
MouseEvent(a_xDelta,a_yDelta)
{
   DllCall("mouse_event", uint, 1, int, a_xDelta, int, a_yDelta, uint,0, int,0 )
}

;
; Returns 1 if %a_szKeyName% is currently being pressed, 0 otherwise
;
IsKeyPressed(a_szKeyName)
{
   ; Check to see if the %a_szKeyName% key has been pressed
   GetKeyState, state, %a_szKeyName%, P
    if state = D  ; The key has been pressed
    {
      return 1
    }
    return 0
}

$Numpad4::
$NumpadLeft::
   Loop
   {
      if IsKeyPressed("LButton")
         break
      MouseEvent(-20,0)
      Sleep 10
   }
return



Here's a version with no helper functions (not tested):
Code:
$Numpad4::
$NumpadLeft::
   Loop
   {
   GetKeyState, state, LButton, P
    if state = D  ; The key has been pressed
         break
      DllCall("mouse_event", uint, 1, int, -20, int, 0, uint,0, int,0 )
      Sleep 10
   }
return

_________________
//TODO: Create kewl sig...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 18th, 2006, 1:55 am 
Offline

Joined: September 3rd, 2006, 5:34 am
Posts: 601
Location: Iowa, U.S.
This is an anti-recoil script. I am not 100% sure of its use but if it works as intented, it will be better than the rest made. Enjoy :D:D
Code:
#NoEnv
#Persistent
SetBatchLines, -1

;Made by: Slomz
;Anti-recoil of a sort...
;This script retrievs the position of the mouse when firing and keeps it there the whole time while firing.

$LButton::
CoordMode, Mouse, Relative
MouseGetPos, xp, yp
Loop
{
Loop
{

GetKeyState, state, LButton, P
if state = D
break
}

MouseClick, Left, %xp%, %yp%, D
sleep 35
MouseClick, Left, %xp%, %yp%, U
return
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 18th, 2006, 3:48 am 
Offline

Joined: November 6th, 2005, 5:25 am
Posts: 182
You actually got the MouseGetPos function to work? When I use it it keeps drifting around and giving inaccurate results.

_________________
//TODO: Create kewl sig...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 18th, 2006, 7:20 am 
Offline

Joined: August 15th, 2006, 2:25 pm
Posts: 43
slomz wrote:
This is an anti-recoil script. I am not 100% sure of its use but if it works as intented, it will be better than the rest made. Enjoy :D:D



Nice try but it don't work. I found it goes everywhere but normally ends up pointing the gun straight up at the sky or down at the dirt :(


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 18th, 2006, 7:52 am 
Interesting idea slomz, but Im not sure if this can be done like intended. How can we know the cursor position is actually affected by recoil? Maybe its an indipendent process that cannot be handled with methods like GetPos. I guess the cursor position is user side only controlled and stays the same until you move the mouse again.

I think the best approach for perfect anti recoil would be to decrypt the games recoil algorithm and countermeasure it, but :D

About the MouseGetPos function, maybe its more accurate if you run the game in windowed mode. Start it as usual, bring up the console and type:
Code:
game.allowToggleFullscreen 1
game.toggleFullscreen


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 18th, 2006, 8:34 am 
Offline

Joined: November 6th, 2005, 5:25 am
Posts: 182
Actually, if we just knew the following:

1. Which Gun
2. Are you standing, crouching, prone
3. Are you strafing left/right
4. Are you moving forward/back
5. Are you sprinting

With all the above information we could come up with a matrix of offsets for each gun in each situation. However, we don't know that information therefore this is the best that I've been able to come up (the below autocorrects 6 pixels for the G36E in burst mode while standing):
Code:
;
; Continually click Left Mouse Button while holding Middle Mouse button
;
$MButton::
   ; Pistol         9
   ; G36E (burst fire)  6
   ; G36E (single shot) 4
   ; G36E (zoomed)   2
   ; DAO 16
   iDeviationOffset = 6
   Loop
   {
      Sleep 90
      GetKeyState, MButtonState, MButton, P
      if MButtonState = U
         break
      MouseClick, left,,, 1, 0, D
      Sleep, 20
      MouseClick, left,,, 1, 0, U
      ; Correct for bullet deviation by moving down X pixels
      DllCall("mouse_event", uint, 1, int, 0, int, iDeviationOffset , uint,0, int,0 )
   }

return

_________________
//TODO: Create kewl sig...


Last edited by Harmor on October 18th, 2006, 9:23 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 18th, 2006, 9:13 pm 
Offline

Joined: November 6th, 2005, 5:25 am
Posts: 182
Here's another version of the "AA scanning" script that moves back and forth 600 pixels - covering a 180 degree arc. Because each time you change direction it skips a few pixels you have to adjust it a little bit - you can move your mouse while this script is running btw.

Instead of the LButton I use the LCtrl to stop the movement because if you're in a fixed gun position, pressing LButton would fire one of your 2 missiles.

Here's the script snippet:
Code:
;
; Returns 1 if %a_szKeyName% is currently being pressed, 0 otherwise
;
IsKeyPressed(a_szKeyName)
{
   ; Check to see if the %a_szKeyName% key has been pressed
   GetKeyState, state, %a_szKeyName%, P
    if state = D  ; The key has been pressed
    {
      return 1
    }
    return 0
}
;
; Scan in a 180 degree arc, back and forth
;
$Numpad5::
$NumpadClear::
   Loop
   {
      if IsKeyPressed("LCtrl")
         break
      Loop 55
      {
         MouseEvent(-20,0)
         Sleep 10
         if IsKeyPressed("LCtrl")
            break
      }
      if IsKeyPressed("LCtrl")
         break
      Loop 55
      {
         MouseEvent(20,0)
         Sleep 10
         if IsKeyPressed("LCtrl")
            break
      }
   }
return

_________________
//TODO: Create kewl sig...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 22nd, 2006, 7:05 pm 
Offline

Joined: September 3rd, 2006, 5:34 am
Posts: 601
Location: Iowa, U.S.
What this does is it switches weapons. I know you can use the mousewheel or number buttons or the f key to change but it takes too much time to take ur fingers off the movement keys and press 3 or f. What this does is all you have to do is scroll the mousewheel and it will switch the weapon for you, you don't even have to click. I tested this out of game and it works fine, if there are any problems tell me.

Edit: First script bugged.
Code:
$WheelDown:: 
 {
  GetKeyState, State, WheelDown, P
   if State = D
    sleep 150
   MouseClick, left
  }
 return

$WheelUp::
 {
  GetKeyState, state, WheelUp, P
   if State = D
    sleep 150
   MouseClick, Left
  }
 return

!#E::
 ExitApp

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 24th, 2006, 10:43 am 
Offline

Joined: November 6th, 2005, 5:25 am
Posts: 182
Well now that BF2142 is out...should we make a new thread?

_________________
//TODO: Create kewl sig...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 24th, 2006, 9:32 pm 
Offline

Joined: September 13th, 2006, 11:05 am
Posts: 31
no I'm still looking for good ones for bf2

hey anyone got one for the hook on sf ?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 28th, 2006, 6:40 pm 
Offline

Joined: September 13th, 2006, 11:05 am
Posts: 31
Anyone know why I can't get my joy stick button 14 to work ?
heres my script

press Joy14 to spot a target directly in front of you using the Cammo Rose while flying
;
$Joy14::
Send, {q Down}
Sleep 100
MouseClick, Left, , , , , D
sleep 40
MouseClick, Left, , , , , U
Send, {q Up}
return


it will work on all buttons but for 13,14,15,16


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 28th, 2006, 7:53 pm 
Offline

Joined: September 3rd, 2006, 5:34 am
Posts: 601
Location: Iowa, U.S.
Does your joystick have buttons 13-16?

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1913 posts ]  Go to page Previous  1 ... 25, 26, 27, 28, 29, 30, 31 ... 128  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Cristi®, nothing and 12 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group