1、罗技官网下载安装罗技游戏软件。
2、打开罗技游戏软件,在罗技游戏软件中找到对应的G502游戏鼠标,将配置文件设置为自动游戏检测。
3、进入关键配置,选择配置文件,弹出菜单。选择“脚本编写”来设置脚本编写。
(相关资料图)
4、然后你可以写一个脚本来配置按键和游戏设置和宏。脚本可以参考下面自己写,也可以下载配置文件修改。下面附上一组网络上流行的《绝地求生》游戏的配置脚本。
5、local pubg={}
6、-------------------------------------------------------------------------------
7、-快捷键定义区域
8、-------------------------------------------------------------------------------
9、=8
10、=4 -直接按键
11、=1 - alt G定义
12、=8 - G定义
13、=7 - G定义
14、pubg。关键武器16 a4=7-定义
15、pubg。关键武器416=5-定义
16、=1 - G定义
17、-------------------------------------------------------------------------------
18、-可变定义区域
19、-------------------------------------------------------------------------------
20、-鼠标G键是否按下?
21、=false
22、-当鼠标G键被按下时,其他按钮是否被按下?
23、=false
24、-当前选择的武器
25、="NIL"
26、-------------------------------------------------------------------------------
27、-随机函数,负支出
28、-------------------------------------------------------------------------------
29、=function (min, max)
30、local nMin=1
31、local nMax=max - min
32、local randomNumber=(nMin, nMax)
33、return randomNumber + min - 1
34、end
35、-------------------------------------------------------------------------------
36、-a拾取装备=游戏中:从左边拉物品到武器栏。
37、-------------------------------------------------------------------------------
38、=function ()
39、local currentMouseX, currentMouseY=GetMousePosition()
40、PressMouseButton(1)
41、for i=1, 5 do
42、MoveMouseRelative((100, 120), (-10, 10))
43、Sleep(20)
44、end
45、ReleaseMouseButton(1)
46、Sleep(100)
47、MoveMouseTo(currentMouseX, currentMouseY)
48、end
49、-------------------------------------------------------------------------------
50、-一键丢东西=游戏中:ctrl拖拽
51、-------------------------------------------------------------------------------
52、=function ()
53、local currentMouseX, currentMouseY=GetMousePosition()
54、PressMouseButton(1);Sleep(20)
55、for i=1, 3 do
56、MoveMouseRelative((-126, -100), (-10, 10))
57、Sleep(20)
58、end
59、ReleaseMouseButton(1)
60、Sleep(100)
61、MoveMouseTo(currentMouseX, currentMouseY)
62、end
63、-------------------------------------------------------------------------------
64、-一键跑=在游戏中:按=确定
65、-------------------------------------------------------------------------------
66、=function ()
67、PressKey(0x0d)
68、Sleep(400)
69、ReleaseKey(0x0d)
70、end
71、-------------------------------------------------------------------------------
72、-自动环顾四周
73、-------------------------------------------------------------------------------
74、=function ()
75、PressMouseButton(1)
76、repeat
77、MoveMouseRelative((30, 70), (-1, 2))
78、Sleep(20)
79、until not IsMouseButtonPressed(1)
80、ReleaseMouseButton(1)
81、end
82、-------------------------------------------------------------------------------
83、-当按下单独的G键时。
84、-------------------------------------------------------------------------------
85、=function ()
86、="NIL"
87、end
88、-------------------------------------------------------------------------------
89、-选择UMP9枪。
90、-------------------------------------------------------------------------------
91、=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((-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、=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、=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((-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、=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((-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、=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、="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、=true
185、=false
186、elseif event=="MOUSE_BUTTON_RELEASED" and arg==6 then
187、=false
188、end
189、-当G键被按下时,其他键是否被按下?
190、if event=="MOUSE_BUTTON_PRESSED" and arg ~=6 and then
191、=true
192、end
193、-按下单独的g键。
194、if event=="MOUSE_BUTTON_RELEASED" and arg==6 and ==false then
195、()
196、-一键取物。
197、elseif event=="MOUSE_BUTTON_PRESSED" and arg== and ==false then
198、()
199、-一键丢弃物品。
200、elseif event=="MOUSE_BUTTON_PRESSED" and arg== and ==true then
201、()
202、-一键运行
203、elseif event=="MOUSE_BUTTON_PRESSED" and arg== and ==false then
204、()
205、-自动环顾四周
206、elseif event=="MOUSE_BUTTON_PRESSED" and arg== and IsModifierPressed("alt") then
207、()
208、-选择UMP9。
209、elseif event=="MOUSE_BUTTON_PRESSED" and arg== and ==true then
210、="UMP9"
211、-选择AKM
212、elseif event=="MOUSE_BUTTON_PRESSED" and arg== and ==true then
213、="AKM"
214、-选择一六。
215、elseif event=="MOUSE_BUTTON_PRESSED" and arg== and ==false then
216、="M16A4"
217、-选择M416
218、elseif event=="MOUSE_BUTTON_PRESSED" and arg== and ==false then
219、="M416"
220、-鼠标左键被按下。
221、elseif event=="MOUSE_BUTTON_PRESSED" and arg==1 then
222、if ~="NIL" then
223、if =="UMP9" then
224、()
225、elseif =="AKM" then
226、()
227、elseif =="M16A4" then
228、()
229、elseif =="M416" then
230、()
231、end
232、end
233、end
234、end
235、-------------------------------------------------------------------------------
236、-驱动进入功能
237、-------------------------------------------------------------------------------
238、function OnEvent(event, arg)
239、(event, arg)
240、end
本文到此结束,希望对大家有所帮助。
关键词:
Copyright 2015-2022 北冰洋食品网 版权所有 备案号:沪ICP备2020036824号-3 联系邮箱:562 66 29@qq.com