罗技g502压枪宏编写罗技g502压枪宏设置
你们好,最近小活发现有诸多的小伙伴们对于罗技g502压枪宏编写,罗技g502压枪宏设置这个问题都颇为感兴趣的,今天小活为大家梳理了下,一起往下看看吧。
1、 罗技官网下载安装罗技游戏软件。
2、 打开罗技游戏软件,在罗技游戏软件中找到对应的G502游戏鼠标,将配置文件设置为自动游戏检测。
3、 进入关键配置,选择配置文件,弹出菜单。选择“脚本编写”来设置脚本编写。
4、 然后你可以写一个脚本来配置按键和游戏设置和宏。脚本可以参考下面自己写,也可以下载配置文件修改。下面附上一组网络上流行的《绝地求生》游戏的配置脚本。
5、 local pubg={}
6、 -------------------------------------------------------------------------------
7、 -快捷键定义区域
8、 -------------------------------------------------------------------------------
9、 pubg.keyPickupWeapon=8
10、 pubg.keyAlwayRun=4 -直接按键
11、 pubg.keyLookAround=1 - alt G定义
12、 pubg.keyWeaponUmp9=8 - G定义
13、 pubg.keyWeaponAkm=7 - G定义
14、 pubg。关键武器16 a4=7-定义
15、 pubg。关键武器416=5-定义
16、 pubg.keyDrop=1 - G定义
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、 local nMin=1
31、 local nMax=max - min
32、 local randomNumber=math.random(nMin, nMax)
33、 return randomNumber min - 1
34、 end
35、 -------------------------------------------------------------------------------
36、 -a拾取装备=游戏中:从左边拉物品到武器栏。
37、 -------------------------------------------------------------------------------
38、 pubg.onPickupWeapon=function ()
39、 local currentMouseX, currentMouseY=GetMousePosition()
40、 PressMouseButton(1)
41、 for i=1, 5 do
42、 MoveMouseRelative(pubg.random(100, 120), pubg.random(-10, 10))
43、 Sleep(20)
44、 end
45、 ReleaseMouseButton(1)
46、 Sleep(100)
47、 MoveMouseTo(currentMouseX, currentMouseY)
48、 end
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、 -------------------------------------------------------------------------------
64、 -一键跑=在游戏中:按=确定
65、 -------------------------------------------------------------------------------
66、 pubg.onAlwayRun=function ()
67、 PressKey(0x0d)
68、 Sleep(400)
69、 ReleaseKey(0x0d)
70、 end
71、 -------------------------------------------------------------------------------
72、 -自动环顾四周
73、 -------------------------------------------------------------------------------
74、 pubg.onLookAround=function ()
75、 PressMouseButton(1)
76、 repeat
77、 MoveMouseRelative(pubg.random(30, 70), pubg.random(-1, 2))
78、 Sleep(20)
79、 until not IsMouseButtonPressed(1)
80、 ReleaseMouseButton(1)
81、 end
82、 -------------------------------------------------------------------------------
83、 -当按下单独的G键时。
84、 -------------------------------------------------------------------------------
85、 pubg.onGKeyPressed=function ()
86、 pubg.currentWeapon='NIL'
87、 end
88、 -------------------------------------------------------------------------------
89、 -选择UMP9枪。
90、 -------------------------------------------------------------------------------
91、 pubg.onWeaponUmp9=function ()
92、 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}
93、 local weaponDuration=20
94、 local currentRecoilPos=1
95、 repeat
96、 MoveMouseRelative(pubg.random(-1,2), weaponRocilData[currentRecoilPos])
97、 currentRecoilPos=currentRecoilPos 1
98、 Sleep(weaponDuration)
99、 OutputLogMessage(tostring(currentRecoilPos) . ' ')
100、 if currentRecoilPos==#weaponRocilData then
101、 currentRecoilPos=1
102、 end
103、 until not IsMouseButtonPressed(1)
104、 end
105、 -------------------------------------------------------------------------------
106、 -选择AKM枪
107、 -------------------------------------------------------------------------------
108、 pubg.onWeaponAkm=function ()
109、 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}
110、 local weaponDuration=20
111、 local currentRecoilPos=1
112、 repeat
113、 MoveMouseRelative(0, weaponRocilData[currentRecoilPos])
114、 currentRecoilPos=currentRecoilPos 1
115、 Sleep(weaponDuration)
116、 OutputLogMessage(tostring(currentRecoilPos) . ' ')
117、 if currentRecoilPos==#weaponRocilData then
118、 currentRecoilPos=1
119、 end
120、 until not IsMouseButtonPressed(1)
121、 end
122、 -------------------------------------------------------------------------------
123、 -选择一六枪。
124、 -------------------------------------------------------------------------------
125、 pubg.onWeaponM16a4=function ()
126、 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}
127、 local weaponDuration=20
128、 local currentRecoilPos=1
129、 repeat
130、 MoveMouseRelative(pubg.random(-1,2), weaponRocilData[currentRecoilPos])
131、 currentRecoilPos=currentRecoilPos 1
132、 Sleep(weaponDuration)
133、 OutputLogMessage(tostring(currentRecoilPos) . ' ')
134、 if currentRecoilPos==#weaponRocilData then
135、 currentRecoilPos=1
136、 elseif currentRecoilPos % 5==0 then
137、 ReleaseMouseButton(1)
138、 Sleep(10)
139、 PressMouseButton(1)
140、 Sleep(100)
141、 end
142、 until not IsMouseButtonPressed(1)
143、 OutputLogMessage('IsMouseButtonPressed==false\n')
144、 end
145、 -------------------------------------------------------------------------------
146、 ——选择M416枪。
147、 -------------------------------------------------------------------------------
148、 pubg.onWeaponM416=function ()
149、 ClearLog()
150、 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}
151、 local weaponDuration=20
152、 local currentRecoilPos=1
153、 repeat
154、 MoveMouseRelative(pubg.random(-1,2), weaponRocilData[currentRecoilPos])
155、 currentRecoilPos=currentRecoilPos 1
156、 Sleep(weaponDuration)
157、 OutputLogMessage(tostring(currentRecoilPos) . ' ')
158、 if currentRecoilPos==#weaponRocilData then
159、 currentRecoilPos=1
160、 elseif currentRecoilPos % 5==0 then
161、 ReleaseMouseButton(1)
162、 Sleep(20)
163、 PressMouseButton(1)
164、 end
165、 until not IsMouseButtonPressed(1)
166、 end
167、 -------------------------------------------------------------------------------
168、 - pubg逻辑处理
169、 -------------------------------------------------------------------------------
170、 pubg.onEvent=function (event, arg)
171、 OutputLogMessage('event=%s, arg=%d\n', event, arg)
172、 if event=='PROFILE_ACTIVATED' then
173、 EnablePrimaryMouseButtonEvents(true)
174、 elseif event=='PROFILE_DEACTIVATED' then
175、 EnablePrimaryMouseButtonEvents(false)
176、 pubg.currentWeapon='NIL'
177、 ReleaseKey(0x1d)
178、 ReleaseMouseButton(1)
179、 ReleaseMouseButton(2)
180、 return
181、 end
182、 - G键按下逻辑
183、 if event=='MOUSE_BUTTON_PRESSED' and arg==6 then
184、 pubg.isGKeyPressed=true
185、 pubg.isOKeyPressed=false
186、 elseif event=='MOUSE_BUTTON_RELEASED' and arg==6 then
187、 pubg.isGKeyPressed=false
188、 end
189、 -当G键被按下时,其他键是否被按下?
190、 if event=='MOUSE_BUTTON_PRESSED' and arg ~=6 and pubg.isGKeyPressed then
191、 pubg.isOKeyPressed=true
192、 end
193、 -按下单独的g键。
194、 if event=='MOUSE_BUTTON_RELEASED' and arg==6 and pubg.isOKeyPressed==false then
195、 pubg.onGKeyPressed()
196、 -一键取物。
197、 elseif event=='MOUSE_BUTTON_PRESSED' and arg==pubg.keyPickupWeapon and pubg.isGKeyPressed==false then
198、 pubg.onPickupWeapon()
199、 -一键丢弃物品。
200、 elseif event=='MOUSE_BUTTON_PRESSED' and arg==pubg.keyDrop and pubg.isGKeyPressed==true then
201、 pubg.onDrop()
202、 -一键运行
203、 elseif event=='MOUSE_BUTTON_PRESSED' and arg==pubg.keyAlwayRun and pubg.isGKeyPressed==false then
204、 pubg.onAlwayRun()
205、 -自动环顾四周
206、 elseif event=='MOUSE_BUTTON_PRESSED' and arg==pubg.keyLookAround and IsModifierPressed('alt') then
207、 pubg.onLookAround()
208、 -选择UMP9。
209、 elseif event=='MOUSE_BUTTON_PRESSED' and arg==pubg.keyWeaponUmp9 and pubg.isGKeyPressed==true then
210、 pubg.currentWeapon='UMP9'
211、 -选择AKM
212、 elseif event=='MOUSE_BUTTON_PRESSED' and arg==pubg.keyWeaponAkm and pubg.isGKeyPressed==true then
213、 pubg.currentWeapon='AKM'
214、 -选择一六。
215、 elseif event=='MOUSE_BUTTON_PRESSED' and arg==pubg.keyWeaponM16a4 and pubg.isGKeyPressed==false then
216、 pubg.currentWeapon='M16A4'
217、 -选择M416
218、 elseif event=='MOUSE_BUTTON_PRESSED' and arg==pubg.keyWeaponM416 and pubg.isGKeyPressed==false then
219、 pubg.currentWeapon='M416'
220、 -鼠标左键被按下。
221、 elseif event=='MOUSE_BUTTON_PRESSED' and arg==1 then
222、 if pubg.currentWeapon ~='NIL' then
223、 if pubg.currentWeapon=='UMP9' then
224、 pubg.onWeaponUmp9()
225、 elseif pubg.currentWeapon=='AKM' then
226、 pubg.onWeaponAkm()
227、 elseif pubg.currentWeapon=='M16A4' then
228、 pubg.onWeaponM16a4()
229、 elseif pubg.currentWeapon=='M416' then
230、 pubg.onWeaponM416()
231、 end
232、 end
233、 end
234、 end
235、 -------------------------------------------------------------------------------
236、 -驱动进入功能
237、 -------------------------------------------------------------------------------
238、 function OnEvent(event, arg)
239、 pubg.onEvent(event, arg)
240、 end
这篇好文章是转载于:知行礼动
- 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
- 本站站名: 知行礼动
- 本文地址: /news/detail/tanhbkieaj
-
Logitech MX Master 4的发布日期
xhjyxxw 11-12 -
qq邮箱人工客服电话95017qq邮箱人工电话是多少
xhjyxxw 12-13 -
长城M2改装系列 展示M2床车安装过程图
xhjyxxw 09-15 -
海尔消费金融客服电话是多少海尔消费金融客服电话
xhjyxxw 09-17 -
穿马扎子方法图解九孔穿马扎子方法图解
xhjyxxw 09-28 -
2的5次方是多少答案2的5次方是多少
xhjyxxw 11-17 -
简化版必到官网一键群发微信微信一键群发50群
xhjyxxw 09-15 -
huifuqqcom恢复qq群huifuqqcom恢复qq群主
xhjyxxw 09-17 -
小米电视破解版vip小米电视会员破解教程
xhjyxxw 11-17 -
一次性输液器结构图解和管内径一次性输液器结构图解
xhjyxxw 09-17