绝地求生吧 关注:6,776,027贴子:30,328,669
  • 1回复贴,共1

4倍镜压得住枪嘛

只看楼主收藏回复

function OnEvent(event, arg)
if (event == "PROFILE_ACTIVATED") then
EnablePrimaryMouseButtonEvents(true)
end
--以下是本体上面都是鼠标支持的配置
if (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then
--当按键4被按下时
forAKM = false
--程序AKM这一段代码 = 不执行
forM16 = true
--程序M16这一段代码 = 执行
end
if (event == "MOUSE_BUTTON_PRESSED" and arg == 5) then
--当按键5被按下时
forM16 = false
--程序M16这一段代码 = 不执行
forAKM = true
--程序AKM这一段代码 = 执行
end
if (event == "MOUSE_BUTTON_RELEASED" and arg == 1) then
--如果按下鼠标按键1
Click = false
--点击 = 不执行
end
if (IsKeyLockOn("capslock")) then
--如果键盘按键capslock打开时
if (event == "MOUSE_BUTTON_PRESSED" and arg == 1) then
--如果按下鼠标按键1
Click = true
--点击 = 执行
ShotTime = 0
--定义个ShotTume 也就是鼠标1键按下的时间长度
jici = 0
--按键点击次数
if forM16 then M16()
--如果程序M16被打开执行M16,如果不是向下执行
elseif forAKM then AKM()
--如果程序AKM被打开执行AKM,如果不是向下执行
end
end
if (event == "M_RELEASED" and arg == 3) then
if forM16 then M16()
elseif forKM then AKM()
end
end
end
end
function M16()
ReleaseMouseButton(1)
if ShotTime < 680 then MoveMouseRelative(0, 7)
--当按下时间<680 鼠标位置相对移动 x轴=0 y轴=7
elseif ShotTime > 680 then MoveMouseRelative(0, 12)
--当按下时间>680 鼠标位置相对移动 x轴=0 y轴=12
elseif ShotTime > 1000 then MoveMouseRelative(0, 10)
elseif ShotTime > 1840 then MoveMouseRelative(0, 8.8)
end
if Click then
jici = jici+1
Sleep(30)
ShotTime = ShotTime + 30
PressMouseButton(1)
SetMKeyState(3)
if(jici == 35) then Click =false end
else Click = false
end
end
function AKM()
ReleaseMouseButton(1)
if ShotTime &lt; 1000 then MoveMouseRelative(0, 25)
elseif ShotTime > 1000 then MoveMouseRelative(0, 25)
end
if Click then
Sleep(30)
ShotTime = ShotTime + 30
PressMouseButton(1)
SetMKeyState(3)
else Click = false
end
end


IP属地:内蒙古1楼2017-11-20 03:29回复
    请问楼主SetMKeyState(3)有什么用?if (event == "M_RELEASED" and arg == 3)这个什么意思?


    IP属地:广东2楼2017-11-21 13:35
    回复