分享自己找到的代码资源,D2目录下新建TXT写字板文件,复制代码修改后,另存为vbs文件启动即可(可发送快捷方式到桌面)。
请把游戏目录、地图目录和AA中账号和密码设置为自己的,地图参数根据自己使用实际更改,需要多开几个人物请自行删减代码。以下是代码:
Dim AA(8,2),Mappath,D2file,NN
NN=1 '第几人物
name1On=1 '是否启动name1,0不启动,1启动
RRON=0 'RR人物是否启动,0不加载,1加载
MapOn=1 'RR人物地图是加载,0不加载,1加载
name2ON=1 'name2人物是否启动,0不加载,1加载
AA(0,0)="账号" :AA(0,1)="密码" 'name2 帐号和密码
AA(8,0)="账号" :AA(8,1)="密码" 'name1 帐号和密码
REM RR 的帐号和密码
AA(1,0)="账号" :AA(1,1)="密码"
AA(2,0)="账号" :AA(2,1)="密码"
AA(3,0)="账号" :AA(3,1)="密码"
AA(4,0)="账号" :AA(4,1)="密码"
AA(5,0)="账号" :AA(5,1)="密码"
AA(6,0)="账号" :AA(6,1)="密码"
AA(7,0)="账号" :AA(7,1)="密码"
D2file="G:\暗黑破坏神2\D2Loader.exe" '游戏载入路径
Mappath="G:\暗黑破坏神2\113map" '游戏地图载入路径
dim program,i,PP
program=D2file + " -direct -txt -pdir 113map -locale chi -skiptobnet -nofixaspect -w -title Traditional-Chinese<
www.anhei3.net>" '载入参数
Set Wshell=CreateObject("Wscript.Shell")
REM name1 登录
If name1On=1 then
PP=program +" -pdir "+Mappath+" -title name1"
set oexec=Wshell.Exec(PP)
Wscript.Sleep 3000
Wshell.SendKeys AA(8,1)
Wscript.Sleep 200
Wshell.SendKeys "{TAB}"
Wscript.Sleep 200
Wshell.SendKeys AA(8,0)
Wscript.Sleep 200
Wshell.SendKeys "{ENTER}"
Wscript.Sleep 2000
Wshell.SendKeys "{ENTER}"
end if
REM name2 登录
if name2ON=1 then
PP=program +" -pdir "+Mappath+" -title name2"
set oexec=Wshell.Exec(PP)
Wscript.Sleep 3000
Wshell.SendKeys AA(0,1)
Wscript.Sleep 200
Wshell.SendKeys "{TAB}"
Wscript.Sleep 200
Wshell.SendKeys AA(0,0)
Wscript.Sleep 200
Wshell.SendKeys "{ENTER}"
Wscript.Sleep 2000
Wshell.SendKeys "{ENTER}"
end if
REM RR小号登录
if RRON=1 then
for i=1 to 7 '登陆RR号个数(1—8)
if MapOn=1 then
PP=program +" -pdir "+Mappath+" -title " & i
else
PP=program +" -title " & i
end if
set oexec=Wshell.Exec(PP)
Wscript.Sleep 2000
Wshell.SendKeys AA(i,1)
Wscript.Sleep 200
Wshell.SendKeys "{TAB}"
Wscript.Sleep 200
Wshell.SendKeys AA(i,0)
Wscript.Sleep 200
Wshell.SendKeys "{ENTER}"
Wscript.Sleep 2000
Select case NN
case 1 '第一人物
case 2 '第二人物
Wshell.SendKeys "{RIGHT}"
Wscript.Sleep 200
case 3 '第三人物
Wshell.SendKeys "{DOWN}"
Wscript.Sleep 200
case 4 '第四人物
Wshell.SendKeys "{RIGHT}"
Wscript.Sleep 200
Wshell.SendKeys "{DOWN}"
Wscript.Sleep 200
case 5 '第五人物
Wshell.SendKeys "{DOWN}"
Wscript.Sleep 200
Wshell.SendKeys "{DOWN}"
Wscript.Sleep 200
case 6 '第六人物
Wshell.SendKeys "{DOWN}"
Wscript.Sleep 200
Wshell.SendKeys "{DOWN}"
Wscript.Sleep 200
Wshell.SendKeys "{RIGHT}"
Wscript.Sleep 200
case 7 '第七人物
Wshell.SendKeys "{DOWN}"
Wscript.Sleep 200
Wshell.SendKeys "{DOWN}"
Wscript.Sleep 200
Wshell.SendKeys "{DOWN}"
Wscript.Sleep 200
case 8 '第八人物
Wshell.SendKeys "{DOWN}"
Wscript.Sleep 200
Wshell.SendKeys "{DOWN}"
Wscript.Sleep 200
Wshell.SendKeys "{DOWN}"
Wscript.Sleep 200
Wshell.SendKeys "{RIGHT}"
Wscript.Sleep 200
End Select
Wshell.SendKeys "{ENTER}"
Wscript.Sleep 2000
Wshell.SendKeys "{ENTER}"
next
end if
REM
[
本帖最后由 iuie 于 2021-9-28 19:45 编辑 ]