首页 > 解决方案 > 脚本罗技

问题描述

如何在大写锁定中包含配置文件激活 (9) 以及如何包含 rapidfire?我也有一个罗技 g pro 键盘,我会放上大写锁以减少枪的后坐力

local recoil_mode  -- possible values: false, 8, 7, 6
 local recoil_loops = {
       [8] = {
          {x=-1, y=2, delay=7},
          {x=1, y=2, delay=7},
          {x=-1, y=3, delay=8},
          {x=1, y=3, delay=5},
       },
       [7] = {
          {x=0, y=5, delay=5},
          {x=0, y=6, delay=7},
          {x=0, y=7, delay=6},
          {x=0, y=8, delay=4},
          {x=0, y=9, delay=6},
          {x=0, y=11, delay=5},
       },
       [6] = {
          {x=0, y=8, delay=50},
          {x=0, y=8, delay=50},
          {x=0, y=8, delay=50},
          {x=0, y=8, delay=50},
          {x=0, y=9, delay=50},
          {x=0, y=11, delay=50},
       },
    }
    
    function OnEvent(event, arg)
       if event == "PROFILE_ACTIVATED" then
          OutputLogMessage("PROFILE_ACTIVATED")
          EnablePrimaryMouseButtonEvents(true)
       elseif event == "PROFILE_DEACTIVATED" then
          OutputLogMessage("PROFILE_DEACTIVATED")
          ReleaseMouseButton(1) -- to prevent it from being stuck on
       elseif event == "MOUSE_BUTTON_PRESSED" and recoil_loops[arg] then
          recoil_mode = recoil_mode ~= arg and arg
          OutputLogMessage("Recoil mode is now "..tostring(recoil_mode))
       elseif event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoil_mode then
          local loop = recoil_loops[recoil_mode]
          local j = 0
          repeat
             j = j % #loop + 1
             if IsMouseButtonPressed(3) then  -- only when RMB pressed
                MoveMouseRelative(loop[j].x, loop[j].y)
             end
             Sleep(loop[j].delay)
          until not IsMouseButtonPressed(1)
       end
     end

标签: lualogitechlogitech-gaming-software

解决方案


推荐阅读