罗技g502压枪怎样设置(罗技g502压枪宏脚本)

萧发姣
导读 大家好,小信来为大家解答以上问题。罗技g502压枪怎样设置,罗技g502压枪宏脚本很多人还不知道,现在让我们一起来看看吧!1、罗技官网下载

大家好,小信来为大家解答以上问题。罗技g502压枪怎样设置,罗技g502压枪宏脚本很多人还不知道,现在让我们一起来看看吧!

1、 罗技官网下载安装罗技游戏软件。

2、 打开罗技游戏软件,在罗技游戏软件中找到对应的G502游戏鼠标,将配置文件设置为自动游戏检测。

3、 进入按键配置,选择配置文件,弹出菜单,选择“写脚本”设置脚本编写。

4、 然后你可以写一个脚本来配置按钮和游戏设置和宏。脚本可以参考下面自己写,也可以下载配置文件修改。下面附上一组网络上流行的《绝地求生》游戏的配置和设置脚本。

5、 本地发布={}

6、 -

7、 -快捷键定义区域

8、 -

9、 pubg.keyPickupWeapon=8

10、 Pubg.keyAlwayRun=4 -直接按键

11、 出版keylookaround=1-alt g定义

12、 Pubg.keyWeaponUmp9=8 - G定义

13、 Pubg.keyWeaponAkm=7 - G定义

14、 pubg . keyweapon 16 a4=7-定义

15、 pubg . keyweapon 416=5-定义

16、 出版按键=1g定义

17、 -

18、 -可变定义区域

19、 -

20、 -鼠标g键按下了吗?

21、 pubg.isGKeyPressed=false

22、 -当鼠标G键被按下时,其他按钮是否被按下?

23、 pubg.isOKeyPressed=false

24、 -当前选择的武器

25、 pubg.currentWeapon='NIL '

26、 -

27、 -随机函数,负支出

28、 -

29、 pubg.random=function (min,max)

30、 本地nMin=1

31、 本地nMax=最大-最小

32、 local random number=math . random(nMin,nMax)

33、 返回最小为1的随机数

34、 目标

35、 -

36、 -一件拾取装备=游戏内:从左边拖动物品到武器栏。

37、 -

38、 pubg.onPickupWeapon=function()

39、 本地currentMouseX,currentMouseY=GetMousePosition()

40、 按鼠标按钮(1)

41、 因为i=1,5 do

42、 move mouse relative(pubg . random(100,120),pubg.random(-10,10))

43、 睡眠(20)

44、 目标

45、 释放鼠标按钮(1)

46、 睡眠(100)

47、 移动鼠标(当前鼠标,当前鼠标)

48、 目标

49、 -

50、 -一键扔东西=游戏内:ctrl拖拽

51、 -

52、pubg.onDrop = function ()

53、 local currentMouseX, currentMouseY = GetMousePosition()

54、 PressMouseButton(1);Sleep(20)

55、 for i = 1, 3 do

56、 MoveMouseRelative(pubg.random(-126, -100), pubg.random(-10, 10))

57、 Sleep(20)

58、 end

59、 ReleaseMouseButton(1)

60、 Sleep(100)

61、 MoveMouseTo(currentMouseX, currentMouseY)

62、end

63、

63、

64、-------------------------------------------------------------------------------

65、-- 一键奔跑 = 游戏中:按=好

66、-------------------------------------------------------------------------------

67、pubg.onAlwayRun = function ()

68、 PressKey(0x0d)

69、 Sleep(400)

70、 ReleaseKey(0x0d)

71、end

72、

72、

73、-------------------------------------------------------------------------------

74、-- 自动环视周围

75、-------------------------------------------------------------------------------

76、pubg.onLookAround = function ()

77、 PressMouseButton(1)

78、 repeat

79、 MoveMouseRelative(pubg.random(30, 70), pubg.random(-1, 2))

80、 Sleep(20)

81、 until not IsMouseButtonPressed(1)

82、 ReleaseMouseButton(1)

83、end

84、

84、

85、-------------------------------------------------------------------------------

86、-- 当单独的G键被按下

87、-------------------------------------------------------------------------------

88、pubg.onGKeyPressed = function ()

89、 pubg.currentWeapon = "NIL"

90、end

91、

91、

92、-------------------------------------------------------------------------------

93、-- 选择UMP9枪

94、-------------------------------------------------------------------------------

95、pubg.onWeaponUmp9 = function ()

96、 local weaponRocilData = {5, 5, 5, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 2, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5}

97、 local weaponDuration = 20

98、 local currentRecoilPos = 1

99、 repeat

100、 MoveMouseRelative(pubg.random(-1,2), weaponRocilData[currentRecoilPos])

101、 currentRecoilPos = currentRecoilPos + 1

102、 Sleep(weaponDuration)

103、 OutputLogMessage(tostring(currentRecoilPos) .. " ")

104、 if currentRecoilPos == #weaponRocilData then

105、 currentRecoilPos = 1

106、 end

107、 until not IsMouseButtonPressed(1)

108、end

109、

109、

110、-------------------------------------------------------------------------------

111、-- 选择AKM枪

112、-------------------------------------------------------------------------------

113、pubg.onWeaponAkm = function ()

114、 local weaponRocilData = {5, 5, 5, 3, 2, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 2, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5}

115、 local weaponDuration = 20

116、 local currentRecoilPos = 1

117、 repeat

118、 MoveMouseRelative(0, weaponRocilData[currentRecoilPos])

119、 currentRecoilPos = currentRecoilPos + 1

120、 Sleep(weaponDuration)

121、 OutputLogMessage(tostring(currentRecoilPos) .. " ")

122、 if currentRecoilPos == #weaponRocilData then

123、 currentRecoilPos = 1

124、 end

125、 until not IsMouseButtonPressed(1)

126、end

127、

127、

128、-------------------------------------------------------------------------------

129、-- 选择M16A4枪

130、-------------------------------------------------------------------------------

131、pubg.onWeaponM16a4 = function ()

132、 local weaponRocilData = {5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 2, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5}

133、 local weaponDuration = 20

134、 local currentRecoilPos = 1

135、 repeat

136、 MoveMouseRelative(pubg.random(-1,2), weaponRocilData[currentRecoilPos])

137、 currentRecoilPos = currentRecoilPos + 1

138、 Sleep(weaponDuration)

139、 OutputLogMessage(tostring(currentRecoilPos) .. " ")

140、 if currentRecoilPos == #weaponRocilData then

141、 currentRecoilPos = 1

142、 elseif currentRecoilPos % 5 == 0 then

143、 ReleaseMouseButton(1)

144、 Sleep(10)

145、 PressMouseButton(1)

146、 Sleep(100)

147、 end

148、 until not IsMouseButtonPressed(1)

149、 OutputLogMessage("IsMouseButtonPressed == false\n")

150、end

151、

151、

152、-------------------------------------------------------------------------------

153、-- 选择M416枪

154、-------------------------------------------------------------------------------

155、pubg.onWeaponM416 = function ()

156、 ClearLog()

157、 local weaponRocilData = {5, 5, 5, 3, 2, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 2, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5}

158、 local weaponDuration = 20

159、 local currentRecoilPos = 1

160、 repeat

161、 MoveMouseRelative(pubg.random(-1,2), weaponRocilData[currentRecoilPos])

162、 currentRecoilPos = currentRecoilPos + 1

163、 Sleep(weaponDuration)

164、 OutputLogMessage(tostring(currentRecoilPos) .. " ")

165、 if currentRecoilPos == #weaponRocilData then

166、 currentRecoilPos = 1

167、 elseif currentRecoilPos % 5 == 0 then

168、 ReleaseMouseButton(1)

169、 Sleep(20)

170、 PressMouseButton(1)

171、 end

172、 until not IsMouseButtonPressed(1)

173、end

174、

174、

175、

175、

176、-------------------------------------------------------------------------------

177、-- pubg逻辑处理

178、-------------------------------------------------------------------------------

179、pubg.onEvent = function (event, arg)

180、 OutputLogMessage("event = %s, arg = %d\n", event, arg)

181、

182、 if event == "PROFILE_ACTIVATED" then

183、 EnablePrimaryMouseButtonEvents(true)

184、 elseif event == "PROFILE_DEACTIVATED" then

185、 EnablePrimaryMouseButtonEvents(false)

186、 pubg.currentWeapon = "NIL"

187、 ReleaseKey(0x1d)

188、 ReleaseMouseButton(1)

189、 ReleaseMouseButton(2)

190、 return

191、 end

192、

193、 -- G键按下逻辑

194、 if event == "MOUSE_BUTTON_PRESSED" and arg == 6 then

195、 pubg.isGKeyPressed = true

196、 pubg.isOKeyPressed = false

197、 elseif event == "MOUSE_BUTTON_RELEASED" and arg == 6 then

198、 pubg.isGKeyPressed = false

199、 end

200、

201、 -- 在G键按下的时候,其他键是否被按下

202、 if event == "MOUSE_BUTTON_PRESSED" and arg ~= 6 and pubg.isGKeyPressed then

203、 pubg.isOKeyPressed = true

204、 end

205、

206、 -- 单独G键被按下

207、 if event == "MOUSE_BUTTON_RELEASED" and arg == 6 and pubg.isOKeyPressed == false then

208、 pubg.onGKeyPressed()

209、 -- 一键拾取物品

210、 elseif event == "MOUSE_BUTTON_PRESSED" and arg == pubg.keyPickupWeapon and pubg.isGKeyPressed == false then

211、 pubg.onPickupWeapon()

212、 -- 一键丢弃物品

213、 elseif event == "MOUSE_BUTTON_PRESSED" and arg == pubg.keyDrop and pubg.isGKeyPressed == true then

214、 pubg.onDrop()

215、 -- 一键奔跑

216、 elseif event == "MOUSE_BUTTON_PRESSED" and arg == pubg.keyAlwayRun and pubg.isGKeyPressed == false then

217、 pubg.onAlwayRun()

218、 -- 自动环视周围

219、 elseif event == "MOUSE_BUTTON_PRESSED" and arg == pubg.keyLookAround and IsModifierPressed("alt") then

220、 pubg.onLookAround()

221、 -- 选择UMP9

222、 elseif event == "MOUSE_BUTTON_PRESSED" and arg == pubg.keyWeaponUmp9 and pubg.isGKeyPressed == true then

223、 pubg.currentWeapon = "UMP9"

224、 -- 选择AKM

225、 elseif event == "MOUSE_BUTTON_PRESSED" and arg == pubg.keyWeaponAkm and pubg.isGKeyPressed == true then

226、 pubg.currentWeapon = "AKM"

227、 -- 选择M16A4

228、 elseif event == "MOUSE_BUTTON_PRESSED" and arg == pubg.keyWeaponM16a4 and pubg.isGKeyPressed == false then

229、 pubg.currentWeapon = "M16A4"

230、 -- 选择M416

231、 elseif event == "MOUSE_BUTTON_PRESSED" and arg == pubg.keyWeaponM416 and pubg.isGKeyPressed == false then

232、 pubg.currentWeapon = "M416"

233、

234、 -- 鼠标左键被按下

235、 elseif event == "MOUSE_BUTTON_PRESSED" and arg == 1 then

236、 if pubg.currentWeapon ~= "NIL" then

237、 if pubg.currentWeapon == "UMP9" then

238、 pubg.onWeaponUmp9()

239、 elseif pubg.currentWeapon == "AKM" then

240、 pubg.onWeaponAkm()

241、 elseif pubg.currentWeapon == "M16A4" then

242、 pubg.onWeaponM16a4()

243、 elseif pubg.currentWeapon == "M416" then

244、 pubg.onWeaponM416()

245、 end

246、 end

247、 end

248、end

249、

249、

250、

250、

251、-------------------------------------------------------------------------------

252、-- 驱动入口函数

253、-------------------------------------------------------------------------------

254、function OnEvent(event, arg)

255、 pubg.onEvent(event, arg)

256、end

本文到此结束,希望对大家有所帮助。

标签:

免责声明:本文由用户上传,如有侵权请联系删除!