lua - Lua脚本激活密钥编辑
问题描述
任何人都可以帮助将本地 Macro_Activation_Key = 更改为 capslock on = ak47 capslock off = m4a1 吗?是否可以在此脚本上添加?
这是链接:LUA脚本添加延迟
感谢您的帮助
解决方案
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
推荐阅读
- excel - 多个 TransferSpreadsheet 命令导致打开时选择所有创建的工作表
- python - 将 Json 转换为 CSV 文件,但分隔符因属性而异
- anylogic - 在 AnyLogic 中寻找一种方法来分析车间(密度图)上的运输车流量
- python - TF2.6 - 警告:tensorflow:以下变量用于 Lambda 层的调用,但不存在于其跟踪对象中
- microsoft-forms - Microsoft Forms多次发送如何分开
- ios - Razorpay pod 在颤动运行期间被覆盖
- c# - 带有 KeyDown 事件 C# UWP 的画布上的元素运动
- javascript - 当我添加 data-toggle="dropdown" 时,href 不起作用
- javascript - 更改路由时如何防止使用 react-router-dom 和 react-redux 重新渲染?
- python - Django:使用内置的用户模型字段创建模型实例