作者:萧海豚泳_756 | 来源:互联网 | 2023-09-16 18:31
惊闻蜀门Online公测,面对200多M的客户端安装文件。吝啬硬盘空间的Me,有点心动了。于是便Down下来,注册帐号、创建角色、选择服务器分区之后,便开始了游戏之旅。总的来说,快捷键较少
惊闻蜀门Online公测,面对200多M的客户端安装文件。吝啬硬盘空间的Me,有点心动了。于是便Down下来,注册帐号、创建角色、选择服务器分区之后,便开始了游戏之旅。总的来说,快捷键较少(相对于武林外传,完美之类的游戏来说)。但是,至少选怪、攻击的快捷键是有的(可惜没有捡东西的快捷键),否则就能实现自动捡东东了。废话少说,直接开门见山了。
该脚本有两个文件:
一、vbs脚本文件(扩展名为.vbs)如下:
1
Dim
bstop,skill1,skill2,resku1,resku2,sleeptime,sleeptimes,nextfire,bfinish,i,confightml,beatcount
2
3
Set
confg
=
CreateObject
(
"
InternetExplorer.Application
"
)
4
set
Wshell
=
WScript.CreateObject(
"
Wscript.Shell
"
)
5
confg.visible
=
true
6
confg.navigate
"
E:\GM\Shumenol\config.html
"
7
While
(confg.Busy)
8
Sleep(
3000
)
9
Wend
10
i
=
1
11
LoadConfig(confg)
12
Call
AddLog(confg,
"
开始休眠10秒等待窗口激活
"
)
13
Sleep(
10000
)
14
15
While
(
not
bfinish)
16
IF
not
bstop
Then
17
Sleep(nextfire)
18
19
IF
(i
mod
sleeptimes)
=
0
Then
20
Call
AddLog(confg,
"
开始休眠
"
&
(sleeptime
/
1000
)
&
"
秒
"
)
21
'
发送休眠key
22
gmSleep
23
Sleep(sleeptime)
'
程序休眠
24
LoadConfig(confg)
'
加载配置信息
25
End
IF
26
27
i
=
i
+
1
'
增量
28
Call
AddLog(confg,
"
开始打怪.
"
)
29
showSkill
30
Else
31
Sleep(sleeptime)
'
程序休眠
32
LoadConfig(confg)
'
加载配置信息
33
End
IF
34
Wend
35
confg.quit
36
set
Wshell
=
nothing
37
38
39
'
****************Function******************
40
Function
showSkill()
41
Call
AddLog(confg,
"
选怪.
"
)
42
Wshell.SendKeys
"
{Tab}
"
43
Call
Sleep(nextfire)
'
休眠
44
45
Call
AddLog(confg,
"
开始使用技能.
"
)
46
IF
true
Then
47
For
k
=
1
to
beatcount
48
Call
Sleep(nextfire)
'
休眠
49
'
使用技能
50
Wshell.SendKeys
Cstr
(skill1)
51
Next
52
End
IF
53
54
End Function
55
56
Function
gmSleep()
57
Wshell.SendKeys
"
x
"
58
End Function
59
60
Function
Sleep(tim)
61
WScript.Sleep tim
62
End Function
63
64
Function
AddLog(ieobj,strLog)
65
IF
len
(ieobj.document.getElementById(
"
logwindow
"
).InnerHTML)
>
1000
Then
66
ieobj.document.getElementById(
"
logwindow
"
).InnerHTML
=
""
67
End
IF
68
ieobj.document.getElementById(
"
logwindow
"
).InnerHTML
=
Now
()
&
"
--
"
&
strLog
&
"
"
&
ieobj.document.getElementById(
"
logwindow
"
).InnerHTML
69
End Function
70
71
Function
getConfigValue(ieobj,strElID)
72
getConfigValue
=
ieobj.document.getElementById(strElID).value
73
End Function
74
75
Function
LoadConfig(coie)
76
'
Load Config Info
77
bstop
=
getConfigValue(coie,
"
isbeat
"
)
78
skill1
=
getConfigValue(coie,
"
skill1
"
)
79
skill2
=
getConfigValue(coie,
"
skill2
"
)
80
resku1
=
getConfigValue(coie,
"
skill1time
"
)
81
resku2
=
getConfigValue(coie,
"
skill2time
"
)
82
sleeptime
=
getConfigValue(coie,
"
sleeptime
"
)
83
sleeptimes
=
getConfigValue(coie,
"
sleepsplit
"
)
84
nextfire
=
getConfigValue(coie,
"
beatsplit
"
)
85
bfinish
=
getConfigValue(coie,
"
bfinish
"
)
86
beatcount
=
getConfigValue(coie,
"
beatcount
"
)
87
'
End of Load Config Info
88
End Function
89
二、配置文件(html类型的):用于配置相关参数以及日志显示。
1
<
html
>
2
<
head
>
3
<
title
>
配置信息
title
>
4
head
>
5
<
style
type
="text/css"
>
6.logwindow{}{ width:100%; height:200px; border:solid #999999 1px; overflow:scroll;}
7.datable{}{ width:100%; padding:4px;}
8
style
>
9
<
script
type
="text/Javascript"
>
10function chgvalue(obj)
11{
12 obj.value=(obj.value=="true"?"false":"true");
13}
14
script
>
15
<
body
>
16
<
fieldset
>
17
<
legend
>
系统配置信息
legend
>
18
<
table
class
="datable"
>
19
<
tr
>
20
<
th
colspan
="4"
>
是否退出:
<
input
type
="checkbox"
value
="false"
id
="bfinish"
onClick
="chgvalue(this)"
/>
th
>
21
tr
>
22
<
tr
>
23
<
th
colspan
="4"
>
打怪设置
th
>
24
tr
>
25
<
tr
>
26
<
td
>
是否打怪
27
<
input
type
="checkbox"
id
="isbeat"
name
="isbeat"
value
="1"
checked
="checked"
onClick
="chgvalue(this)"
/>
td
>
28
<
td
>
打怪次数
29
<
input
type
="text"
id
="beatcount"
name
="beatcount"
value
="5"
/>
td
>
30
<
td
>
打怪间隔
td
>
31
<
td
><
input
type
="text"
id
="beatsplit"
value
="3000"
/>
td
>
32
tr
>
33
<
tr
>
34
<
th
colspan
="4"
>
35
技能配置
36
th
>
37
tr
>
38
<
tr
>
39
<
td
>
技能一[优先使用]:
td
>
40
<
td
><
input
type
="text"
value
="1"
id
="skill1"
/>
td
>
41
<
td
>
冷却时间:
td
>
42
<
td
><
input
type
="text"
value
="2000"
id
="skill1time"
/>
td
>
43
tr
>
44
<
tr
>
45
<
td
>
技能二:
td
>
46
<
td
><
input
type
="text"
value
="-1"
id
="skill2"
/>
td
>
47
<
td
>
冷却时间:
td
>
48
<
td
><
input
type
="text"
value
="2000"
id
="skill2time"
/>
td
>
49
tr
>
50
<
tr
>
51
<
th
colspan
="5"
>
52
时间设定:
53
th
>
54
tr
>
55
<
tr
>
56
<
td
>
打坐时间:
td
>
57
<
td
><
input
type
="text"
value
="50000"
id
="sleeptime"
/>
td
>
58
<
td
>
打坐间隔:
td
>
59
<
td
><
input
type
="text"
value
="5"
id
="sleepsplit"
/>
td
>
60
tr
>
61
table
>
62
fieldset
>
63
<
hr
/>
64
<
h3
>
日志信息
h3
>
65
<
div
class
="logwindow"
id
="logwindow"
>
66
div
>
67
body
>
68
html
>
总体感觉还可以,等待系统添加捡东西的快捷键。否则会超级郁闷的,另外防外挂的机制暂没办法处理咯。使用的时候建议将vbs脚本中的配置文件路径修改为实际路径。注意:游戏窗口必须处于激活状态。
下图是本人使用的配置文件的截屏:
以下是下载地址 下载地址