Добавить автоклик в код

Помощь в написании скриптов для игр.
Djo
Posts: 1
Joined: 17 Jan 2024, 09:32

Добавить автоклик в код

17 Jan 2024, 09:44

В даный скрипт нужно добавить автокликер.

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 + LButton used to toggle the anti-recoil on and off

; 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 20      
        mouseXY(0,10) ;Call the mouseXY() function which moves the mouse the specified distance. mouseXY( X, Y,)
        sleep 20
      }
      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
}

Return to “Скрипты для Игр”

Who is online

Users browsing this forum: No registered users and 51 guests