首页 > 解决方案 > Lua脚本激活密钥编辑

问题描述

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

这是链接:LUA脚本添加延迟

感谢您的帮助

标签: lualogitechlogitech-gaming-software

解决方案


Selection_Key移除,武器现在由大写锁定选择

-- 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,y=2},{d=12,x=0,y=2},{x=0,y=3},{x=0,y=4},{x=0,y=4},{x=0,y=5},{x=0,y=8},{x=0,y=8},{x=0,y=8}} 
local M4A1_Pattern = {{x=0,y=1},{d=5,x=0,y=1},{d=7,x=0,y=2},{x=0,y=2},{x=0,y=1},{x=0,y=1},{x=0,y=2},{x=0,y=2},{x=0,y=3},{x=0,y=3},{x=0,y=3},{x=0,y=3},{x=0,y=3},{x=0,y=3},{x=0,y=3},{x=-1,y=4},{x=-1,y=4},{x=0,y=5},{x=-1,y=5},{x=-1,y=5},{x=0,y=5},{x=0,y=5},{x=0,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

推荐阅读