蜀门Online 简单打怪脚本(vbs)
驚聞蜀門Online公測,面對200多M的客戶端安裝文件。吝嗇硬盤空間的Me,有點心動了。于是便Down下來,注冊帳號、創(chuàng)建角色、選擇服務器分區(qū)之后,便開始了游戲之旅。總的來說,快捷鍵較少(相對于武林外傳,完美之類的游戲來說)。但是,至少選怪、攻擊的快捷鍵是有的(可惜沒有撿東西的快捷鍵),否則就能實現(xiàn)自動撿東東了。廢話少說,直接開門見山了。
該腳本有兩個文件:
一、vbs腳本文件(擴展名為.vbs)如下:
1Dimbstop,skill1,skill2,resku1,resku2,sleeptime,sleeptimes,nextfire,bfinish,i,confightml,beatcount
2
3Setconfg=CreateObject("InternetExplorer.Application")
4setWshell=WScript.CreateObject("Wscript.Shell")
5confg.visible=true
6confg.navigate"E:\GM\Shumenol\config.html"
7While(confg.Busy)
8Sleep(3000)
9Wend
10i=1
11LoadConfig(confg)
12CallAddLog(confg,"開始休眠10秒等待窗口激活")
13Sleep(10000)
14
15While(notbfinish)
16IFnotbstopThen
17Sleep(nextfire)
18
19IF(imodsleeptimes)=0Then
20CallAddLog(confg,"開始休眠"&(sleeptime/1000)&"秒")
21'發(fā)送休眠key
22gmSleep
23Sleep(sleeptime)'程序休眠
24LoadConfig(confg)'加載配置信息
25EndIF
26
27i=i+1'增量
28CallAddLog(confg,"開始打怪.")
29showSkill
30Else
31Sleep(sleeptime)'程序休眠
32LoadConfig(confg)'加載配置信息
33EndIF
34Wend
35confg.quit
36setWshell=nothing
37
38
39'****************Function******************
40FunctionshowSkill()
41CallAddLog(confg,"選怪.")
42Wshell.SendKeys"{Tab}"
43CallSleep(nextfire)'休眠
44
45CallAddLog(confg,"開始使用技能.")
46IFtrueThen
47Fork=1tobeatcount
48CallSleep(nextfire)'休眠
49'使用技能
50Wshell.SendKeysCstr(skill1)
51Next
52EndIF
53
54EndFunction
55
56FunctiongmSleep()
57Wshell.SendKeys"x"
58EndFunction
59
60FunctionSleep(tim)
61WScript.Sleeptim
62EndFunction
63
64FunctionAddLog(ieobj,strLog)
65IFlen(ieobj.document.getElementById("logwindow").InnerHTML)>1000Then
66ieobj.document.getElementById("logwindow").InnerHTML=""
67EndIF
68ieobj.document.getElementById("logwindow").InnerHTML=Now()&"--"&strLog&"<br/>"&ieobj.document.getElementById("logwindow").InnerHTML
69EndFunction
70
71FunctiongetConfigValue(ieobj,strElID)
72getConfigValue=ieobj.document.getElementById(strElID).value
73EndFunction
74
75FunctionLoadConfig(coie)
76'LoadConfigInfo
77bstop=getConfigValue(coie,"isbeat")
78skill1=getConfigValue(coie,"skill1")
79skill2=getConfigValue(coie,"skill2")
80resku1=getConfigValue(coie,"skill1time")
81resku2=getConfigValue(coie,"skill2time")
82sleeptime=getConfigValue(coie,"sleeptime")
83sleeptimes=getConfigValue(coie,"sleepsplit")
84nextfire=getConfigValue(coie,"beatsplit")
85bfinish=getConfigValue(coie,"bfinish")
86beatcount=getConfigValue(coie,"beatcount")
87'EndofLoadConfigInfo
88EndFunction
89
二、配置文件(html類型的):用于配置相關參數以及日志顯示。
1<html>
2<head>
3<title>配置信息</title>
4</head>
5<styletype="text/css">
6.logwindow{}{width:100%;height:200px;border:solid#9999991px;overflow:scroll;}
7.datable{}{width:100%;padding:4px;}
8</style>
9<scripttype="text/javascript">
10functionchgvalue(obj)
11{
12obj.value=(obj.value=="true"?"false":"true");
13}
14</script>
15<body>
16<fieldset>
17<legend>系統(tǒng)配置信息</legend>
18<tableclass="datable">
19<tr>
20<thcolspan="4">是否退出:<inputtype="checkbox"value="false"id="bfinish"onClick="chgvalue(this)"/></th>
21</tr>
22<tr>
23<thcolspan="4">打怪設置</th>
24</tr>
25<tr>
26<td>是否打怪
27<inputtype="checkbox"id="isbeat"name="isbeat"value="1"checked="checked"onClick="chgvalue(this)"/></td>
28<td>打怪次數
29<inputtype="text"id="beatcount"name="beatcount"value="5"/></td>
30<td>打怪間隔</td>
31<td><inputtype="text"id="beatsplit"value="3000"/></td>
32</tr>
33<tr>
34<thcolspan="4">
35技能配置
36</th>
37</tr>
38<tr>
39<td>技能一[優(yōu)先使用]:</td>
40<td><inputtype="text"value="1"id="skill1"/></td>
41<td>冷卻時間:</td>
42<td><inputtype="text"value="2000"id="skill1time"/></td>
43</tr>
44<tr>
45<td>技能二:</td>
46<td><inputtype="text"value="-1"id="skill2"/></td>
47<td>冷卻時間:</td>
48<td><inputtype="text"value="2000"id="skill2time"/></td>
49</tr>
50<tr>
51<thcolspan="5">
52時間設定:
53</th>
54</tr>
55<tr>
56<td>打坐時間:</td>
57<td><inputtype="text"value="50000"id="sleeptime"/></td>
58<td>打坐間隔:</td>
59<td><inputtype="text"value="5"id="sleepsplit"/></td>
60</tr>
61</table>
62</fieldset>
63<hr/>
64<h3>日志信息</h3>
65<divclass="logwindow"id="logwindow">
66</div>
67</body>
68</html>
總體感覺還可以,等待系統(tǒng)添加撿東西的快捷鍵。否則會超級郁悶的,另外防外掛的機制暫沒辦法處理咯。使用的時候建議將vbs腳本中的配置文件路徑修改為實際路徑。注意:游戲窗口必須處于激活狀態(tài)。
下圖是本人使用的配置文件的截屏:
以下是下載地址下載地址
總結
以上是生活随笔為你收集整理的蜀门Online 简单打怪脚本(vbs)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 量子统计
- 下一篇: 风格的英文(freestyle是什么意思