Lua脚本激活密钥编辑 [英] Lua script Activation Key editing

查看:122
本文介绍了Lua脚本激活密钥编辑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Can anyone help to change local Macro_Activation_Key = to capslock on = ak47 capslock off = m4a1 ? Is it possible to add on this script ?

此处是链接: LUA脚本添加延迟

感谢您的帮助

推荐答案

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

Selection_Key removed, weapon now is selected by 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,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

这篇关于Lua脚本激活密钥编辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆