@@ -214,7 +214,7 @@ pubg.xLengthForDebug = pubg.generalSensitivityRatio * 60 -- 调试模式下的
214
214
pubg .renderDom = {
215
215
separator = " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n " , -- 分割线
216
216
combo_key = " G-key" , -- 组合键
217
- cmd = " " , -- 指令
217
+ cmd = " cmd " , -- 指令
218
218
autoLog = " No operational data yet.\n " , -- 压枪过程产生的数据输出
219
219
}
220
220
774
774
--[[ autputLog render ]]
775
775
function pubg .outputLogRender ()
776
776
ClearLog ()
777
- OutputLogMessage ( table.concat ({
777
+ local outputScriptMessage = table.concat ({
778
778
" \n >> [\" " , pubg .renderDom .combo_key , " \" ] = \" " , pubg .renderDom .cmd , " \" <<\n " ,
779
779
pubg .renderDom .separator ,
780
780
pubg .outputLogGunSwitchTable (),
@@ -783,7 +783,16 @@ function pubg.outputLogRender ()
783
783
pubg .renderDom .separator ,
784
784
pubg .renderDom .autoLog ,
785
785
pubg .renderDom .separator ,
786
- }))
786
+ })
787
+ OutputLogMessage (outputScriptMessage )
788
+
789
+ -- local file = io.open('C:\\Soldier76_outputScriptMessage.json', 'w+')
790
+ -- file:write(table.concat({
791
+ -- "{\n",
792
+ -- "\toutputScriptMessage: '", outputScriptMessage, "'\n",
793
+ -- "}\n",
794
+ -- }))
795
+ -- file:close()
787
796
end
788
797
789
798
--[[ Output switching table ]]
@@ -864,16 +873,8 @@ function pubg.autoLog (options, y)
864
873
pubg .renderDom .autoLog = resStr
865
874
end
866
875
867
- --[[ Listener method ]]
868
- function OnEvent (event , arg , family )
869
-
870
- -- Whether to open the capitalization key or not
871
- if not pubg .ok then return false end
872
-
873
- -- OutputLogMessage("event = %s, arg = %s, family = %s\n", event, arg, family)
874
- -- OutputLogMessage("event = " .. event .. ", arg = " .. arg .. ", family = " .. family .. "\n")
875
-
876
- -- Automatic press gun
876
+ --[[ Automatic press gun ]]
877
+ function pubg .OnEvent_NoRecoil (event , arg , family )
877
878
if event == " MOUSE_BUTTON_PRESSED" and arg == 1 and family == " mouse" and pubg .ok then
878
879
if not pubg .runStatus () then return false end
879
880
if pubg .isAimingState (" ADS" ) or pubg .isAimingState (" Aim" ) then
@@ -892,10 +893,21 @@ function OnEvent (event, arg, family)
892
893
end
893
894
894
895
if event == " M_PRESSED" and arg == 1 and pubg .G1 and pubg .ok then
895
- -- PressAndReleaseMouseButton(1)
896
896
pubg .auto (pubg .gunOptions [pubg .bulletType ][pubg .gunIndex ])
897
897
SetMKeyState (1 )
898
898
end
899
+ end
900
+
901
+ --[[ Listener method ]]
902
+ function OnEvent (event , arg , family )
903
+
904
+ -- Whether to open the capitalization key or not
905
+ if not pubg .ok then return false end
906
+
907
+ -- OutputLogMessage("event = %s, arg = %s, family = %s\n", event, arg, family)
908
+ -- OutputLogMessage("event = " .. event .. ", arg = " .. arg .. ", family = " .. family .. "\n")
909
+
910
+ pubg .OnEvent_NoRecoil (event , arg , family )
899
911
900
912
-- Switching arsenals according to different types of ammunition
901
913
if event == " MOUSE_BUTTON_PRESSED" and arg >= 3 and arg <= 11 and family == " mouse" and pubg .ok then
0 commit comments