recoil

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: recoil

Re: recoil

Post by Yur » 14 Jan 2020, 23:34

Gostaria De Saber Se Alguem Consegue Fazer Um Script De No Recoil Que Funcione No CrossFire

Re: recoil

Post by lucasbr » 12 Jun 2019, 14:42

muito obrigado amigo !!
isso é realmente oq eu procurava !

Re: recoil

Post by Gio » 10 Jun 2019, 09:18

Bom dia Lucasbr.

Seja bem-vindo ao fórum da comunidade do AutoHotkey.

O código que você postou aparentemente faz o seguinte:

1. Verifica repetidamente (a cada 10 milisegundos, aproximadamente) o estado do botão esquerdo do mouse.
2. Em cada verificação, se o estado do botão for "apertado", a função MouseXY() será chamado com os parâmetros 0 e 15.
3. A função MouseXY efetua um DllCall() para uma função do windows que movimenta o mouse conforme o parâmetro informado (+0 no eixo X, +15 no eixo Y).

O eixo X é o eixo horizontal, enquanto que o eixo Y é o eixo vertical. Logo, se o botão do mouse for apertado, o mouse será movido 15 mickeys para baixo. Para mudar isso e mover o mouse 15 mickeys para cima, você só precisa trocar o valor da mudança do eixo Y para -15.

Code: Select all

#NoEnv
SendMode Input

_auto := true ;Toggle for the anti-recoil being on or off. default is on

~LButton::autofire() ; When the LButton is pressed run the autofire() function
!LButton::_auto := ! _auto ;Alt + F2 used to toggle the anti-recoil on and off
F1::ExitApp ; F1 used to exit the ahk script file

; autofire() function, name is misleading could easily be antiRecoil()
autofire()
{
global _auto
if _auto ; if _auto == true. i.e. is anti-recoil on?
{ ; anti-recoil on? If yes do this
Loop ; Continuously loop until a 'break' command
{
if GetKeyState("LButton", "P") ; If LButton is pressed
{ ; LButton pressed? If yes do this
Sleep 75 ; sleep for 85 milliseconds
mouseXY(0,-15) ;Call the mouseXY() function which moves the mouse the specified distance. mouseXY( X, Y,)
Sleep 45 ; sleep for 45milliseconds
}
else ;LButton pressed? If no do this, i.e. exit the loop
break ;will stop the loop
} ;; loop
} ;; if
} ;; autofire() ; anti-recoil on? If no do nothing

mouseXY(x,y)
{
DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0) ; moves the mouse could easily be the built in autohotkey MouseMove, X, Y
}

:arrow: Perceba que no códio acima, a única coisa que alterei foi a linha mouseXY(0,-15) ;Call the mouseXY() function which moves the mouse the specified distance. mouseXY( X, Y,), que passou a enviar o valor -15 no lugar de 15.

Espero ter ajudado, se precisar de algo mais, sinta-se livre para perguntar :thumbup:

recoil

Post by lucasbr » 09 Jun 2019, 18:27

eae rapaziada , bom é o seguinte eu estou com esse code para, no recoil , mas eu gostaria d inverter isso , e por mais recoil , ao invez do mouse descer, ele subir tem como alguem me dar uma ajuda , p favor?
#NoEnv
SendMode Input

_auto := true ;Toggle for the anti-recoil being on or off. default is on

~LButton::autofire() ; When the LButton is pressed run the autofire() function
!LButton::_auto := ! _auto ;Alt + F2 used to toggle the anti-recoil on and off
F1::ExitApp ; F1 used to exit the ahk script file

; autofire() function, name is misleading could easily be antiRecoil()
autofire()
{
global _auto
if _auto ; if _auto == true. i.e. is anti-recoil on?
{ ; anti-recoil on? If yes do this
Loop ; Continuously loop until a 'break' command
{
if GetKeyState("LButton", "P") ; If LButton is pressed
{ ; LButton pressed? If yes do this
Sleep 75 ; sleep for 85 milliseconds
mouseXY(0,15) ;Call the mouseXY() function which moves the mouse the specified distance. mouseXY( X, Y,)
Sleep 45 ; sleep for 45milliseconds
}
else ;LButton pressed? If no do this, i.e. exit the loop
break ;will stop the loop
} ;; loop
} ;; if
} ;; autofire() ; anti-recoil on? If no do nothing

mouseXY(x,y)
{
DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0) ; moves the mouse could easily be the built in autohotkey MouseMove, X, Y
}

Top