Lua脚本激活密钥编辑

问题描述

有人可以帮助将本地Macro_Activation_Key =更改为capslock on = ak47 capslock off = m4a1吗? 是否可以添加此脚本?

以下是链接LUA Script add Delay

感谢您的帮助

解决方法

Selection_Key已删除,现在已由Capslock选择武器

-- capslock on  = ak47 
-- capslock off = m4a1
local Macro_Activation_Key = 4    -- mouse button for turning macro on/off

-- d = delay to wait before moving the mouse (d=9 by default)
local AK47_Pattern = {{x=0,y=2},{d=11,x=0,{d=12,{x=0,y=3},y=4},y=5},y=8},y=8}} 
local M4A1_Pattern = {{x=0,y=1},{d=5,{d=7,{x=-1,y=5}} 

local function OutputLogs(s)
   OutputLogMessage(s.."\n")
   OutputDebugMessage(s.."\n")
   ClearLCD()
   OutputLCDMessage(s)
end 

local Recoil_Activator

function OnEvent(event,arg) 
   if event == "PROFILE_ACTIVATED" then
      EnablePrimaryMouseButtonEvents(true)
   elseif event == "MOUSE_BUTTON_PRESSED" and arg == Macro_Activation_Key then
      Recoil_Activator = not Recoil_Activator 
      OutputLogs(Recoil_Activator and "ON_Macro" or "OFF_Macro") 
   elseif event == "MOUSE_BUTTON_PRESSED" and arg == 1 and Recoil_Activator then
      local pattern = IsKeyLockOn("capslock") and AK47_Pattern or M4A1_Pattern
      for i = 1,#pattern do 
         Sleep(pattern[i].d or 9) 
         MoveMouseRelative( pattern[i].x,pattern[i].y ) 
         if not IsMouseButtonPressed(1) then 
            break
         end 
      end 
   end 
end