吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 1472|回复: 0
收起左侧

[求助] 这个宏代码在LGS里可以用,放到GHUB里就不循环了

[复制链接]
pieujff 发表于 2021-8-10 16:37
EnablePrimaryMouseButtonEvents (true)
local click = false
local recoil = false
local step = 2.0
function OnEvent(event, arg)
  OutputLogMessage("event = %s, arg = %d\n", event, arg)
  if (event == "PROFILE_ACTIVATED") then
    EnablePrimaryMouseButtonEvents(true)
  end

  if (event == "MOUSE_BUTTON_PRESSED" and arg == 3) then
    recoil = false
  end

  if (event == "MOUSE_BUTTON_PRESSED" and arg == 6) then
    recoil = false
  end

  if (event == "MOUSE_BUTTON_PRESSED" and arg == 5) then
    if (recoil == false) then
                step = 2.0
                recoil = true
        else
                    step = step * 0.8
        end
  end

  if (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then
        if (recoil == false) then
                step = 2.0
                recoil = true
        else
                    step = step * 1.25
        end
  end

  if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoil and not IsModifierPressed("lalt")) then
                click = true
                SetMKeyState(3)
  end

        if (event == "MOUSE_BUTTON_RELEASED" and arg == 1) then
                click = false
        end
        if (event == "M_RELEASED" and arg == 3 and click) then
                        PressMouseButton(1)
                        Sleep(30)
                        ReleaseMouseButton(1)
                        MoveMouseRelative(0, step)

                        if click then
                        SetMKeyState(3)
                        end
        end
end

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-11-25 23:20

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表