From 76f3f7884de04f4f46b8bf0282fee42fe766bfc7 Mon Sep 17 00:00:00 2001 From: kiccer <1072907338@qq.com> Date: Sun, 31 May 2020 10:51:19 +0800 Subject: [PATCH] =?UTF-8?q?update=201.=20=E5=A2=9E=E5=8A=A0=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=88=A4=E6=96=AD=E8=B9=B2=E4=B8=8B=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + Soldier76.lua | 20 +++++++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index fa81e87..29b2c32 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ :--: | --- `default` | 使用游戏初始默认的设置,即点击右键开镜,长按右键瞄准。(单纯点击操作时需要按住左shift) `recommend` | 使用此脚本推荐设置,即长按右键开镜,长按左ctrl瞄准。(脚本默认使用该设置) +`ctrlmode` | 此模式需要修改游戏设置为快速开镜,ctrl按住时为蹲下。(此模式没有腰射) `custom` | 自定义设置,使用在 `customAimingSettings` 中设置的判断条件。 ### 启动控制 diff --git a/Soldier76.lua b/Soldier76.lua index 3a034a6..4a056e8 100644 --- a/Soldier76.lua +++ b/Soldier76.lua @@ -41,7 +41,7 @@ userInfo = { -- 启动控制 (capslock - 使用大写锁定键控制 | numlock - 小键盘锁定键控制 | G_bind - 使用指令控制) | Start up control startControl = "capslock", - -- 瞄准设置 (default - 使用游戏默认设置 | recommend - 使用脚本推荐设置 | custom - 自定义设置) | Aiming setting + -- 瞄准设置 (default - 使用游戏默认设置 | recommend - 使用脚本推荐设置 | custom - 自定义设置 | ctrlmode - 下蹲模式) | Aiming setting aimingSettings = "recommend", -- 当 aimingSettings = "custom" ,需要在此处设置自定义判断条件,通常配合 IsMouseButtonPressed 或 IsModifierPressed 使用,使用方法请查阅 G-series Lua API 参考文档.docx @@ -257,6 +257,8 @@ function pubg.isAimingState (mode) return IsMouseButtonPressed(3) and not IsModifierPressed("lshift") elseif userInfo.aimingSettings == "default" then return not IsModifierPressed("lshift") and not IsModifierPressed("lalt") + elseif userInfo.aimingSettings == "ctrlmode" then + return IsMouseButtonPressed(3) and not IsModifierPressed("lshift") elseif userInfo.aimingSettings == "custom" then return userInfo.customAimingSettings.ADS() end @@ -272,6 +274,8 @@ function pubg.isAimingState (mode) end elseif userInfo.aimingSettings == "default" then return IsMouseButtonPressed(3) + elseif userInfo.aimingSettings == "ctrlmode" then + return false elseif userInfo.aimingSettings == "custom" then return userInfo.customAimingSettings.Aim() end @@ -420,9 +424,9 @@ pubg["UMP45"] = function () ballistic = { {1, 0}, {5, 70}, - {10, 94}, - {15, 97}, - {35, 106}, + {10, 97}, + {15, 100}, + {35, 109}, } }) @@ -627,7 +631,7 @@ function pubg.auto (options) local x = math.ceil((pubg.currentTime - pubg.startTime) / (options.interval * (pubg.bulletIndex - 1)) * d) - pubg.xCounter local y = math.ceil((pubg.currentTime - pubg.startTime) / (options.interval * (pubg.bulletIndex - 1)) * options.ballistic[pubg.bulletIndex]) - pubg.counter -- 4-fold pressure gun mode - local realY = pubg.getRealY(y) + local realY = pubg.getRealY(options, y) MoveMouseRelative(x, realY) -- Whether to issue automatically or not if options.autoContinuousFiring == 1 then @@ -659,15 +663,17 @@ function pubg.autoSleep (isTest) end --[[ get real y position ]] -function pubg.getRealY (y) +function pubg.getRealY (options, y) local realY = y if pubg.isAimingState("ADS") then realY = y * pubg[pubg.scope_current] - elseif pubg.isAimingState("Aim") then realY = y * userInfo.sensitivity.Aim * pubg.generalSensitivityRatio + end + if userInfo.aimingSettings == "ctrlmode" and IsModifierPressed("lctrl") then + realY = realY * 0.8 end return realY