本脚本创作思路:字符串对比(
BOSS名称对比)
QUOTE:
VBS dim X,Mey,DiTu,YuBing
VBS X=""
//UserVar Mey=&h00607A00 显示当前屏幕怪的内存地址
//UserVar DiTu=1 1=雷鸣大陆,2=隐雾沼泽,3=砺风戈壁,4=迷梦沼泽,5=雪狼冰原,6=亚维特岛,7=自然女神之怒
VBS Mey=&h00607A00
//横坐标地址+5FDC=本屏地址
VBS DiTu=1
//选择打
BOSS地图:1=雷鸣大陆,2=隐雾沼泽,3=砺风戈壁,4=迷梦沼泽,5=雪狼冰原,6=亚维特岛,7=自然女神之怒
set voice = createobject("SAPI.SpVoice")
//调用Windows自带的语音库
//----------------窗口句柄------------------
MessageBox "请先点击游戏窗口,然后按F5获得游戏窗口的窗口句柄"
Rem 记录窗口句柄
VBS dim F5
VBS F5=""
WaitKey F5
If F5=116
Plugin YuBing=Window.MousePoint()
//调用插件获得鼠标所在窗口的窗口句柄,并保存在变量YuBing
Else
Goto 记录窗口句柄
EndIf
//----------------主程序------------------
Rem 程序开始
If DiTu=1
Gosub 雷鸣大陆
Gosub 进行对比
EndIf
If DiTu=2
Gosub 隐雾沼泽
Gosub 进行对比
EndIf
If DiTu=3
Gosub 砺风戈壁
Gosub 进行对比
EndIf
If DiTu=4
Gosub 迷梦沼泽
Gosub 进行对比
EndIf
If DiTu=5
Gosub 雪狼冰原
Gosub 进行对比
EndIf
If DiTu=6
Gosub 亚维特岛
Gosub 进行对比
EndIf
If DiTu=7
Gosub 自然女神之怒
Gosub 进行对比
EndIf
Goto 程序开始
//----------------对比子程序------------------
Sub 进行对比
Plugin X=Memory.ReadString(YuBing,Mey,20)
//调用插件读取字符串,保存在变量X
N=0
While N<P
If X=
BOSS(N)
//VBSCall MessageBox("发现
BOSS "&X&"")
voice.Speak "
BOSS"
//语音提示发现
BOSS N=P+100
EndIf
N=N+1
EndWhile
EndIf
Return 进行对比
//----------------
BOSS名字子程序------------------
Sub 雷鸣大陆
VBS DIM P
VBS P=6
dim
BOSS(5),N
BOSS(0)="GnomeLvL12"
BOSS(1)="GnomeLvL13"
BOSS(2)="GnomeLvL14"
//地精
BOSSBOSS(3)="DragonkinLvl14"
BOSS(4)="DragonkinLvl15"
BOSS(5)="DragonkinLvl16"
//龙怪
BOSSReturn 雷鸣大陆
Sub 隐雾沼泽
VBS DIM P
VBS P=15
dim
BOSS(14),N
BOSS(0)="GreenDevilLvl16"
BOSS(1)="GreenDevilLvl17"
BOSS(2)="GreenDevilLvl18"
//绿魔精
BOSSBOSS(3)="EyeballLvl21"
BOSS(4)="EyeballLvl22"
BOSS(5)="EyeballLvl23"
//杰克灯笼
BOSSBOSS(6)="BansheeLvl26"
BOSS(7)="BansheeLvl27"
BOSS(8)="BansheeLvl28"
//冰妖剑士
BOSSBOSS(9)="SatyrLvl28"
BOSS(10)="SatyrLvl29"
BOSS(11)="SatyrLvl30"
//沼泽招魂使
BOSSBOSS(12)="OgreLvl31"
BOSS(13)="OgreLvl32"
BOSS(14)="OgreLvl33"
//提风
BOSSReturn 隐雾沼泽
Sub 砺风戈壁
VBS DIM P
VBS P=15
dim
BOSS(14),N
BOSS(0)="BigFangLvl36"
BOSS(1)="BigFangLvl37"
BOSS(2)="BigFangLvl38"
//望齿魔人
BOSSBOSS(3)="Golemlvl41"
BOSS(4)="Golemlvl42"
BOSS(5)="Golemlvl43"
//巴洛骨
BOSSBOSS(6)="LizardLvl46"
BOSS(7)="LizardLvl47"
BOSS(8)="LizardLvl48"
//角蜥
BOSSBOSS(9)="GhostKnightLvl51"
BOSS(10)="GhostKnightLvl52"
BOSS(11)="GhostKnightLvl53"
//骑士亡魂
BOSSBOSS(12)="WyvernLvl53"
BOSS(13)="WyvernLvl54"
BOSS(14)="WyvernLvl55"
//塔亚龙
BOSSReturn 砺风戈壁
Sub 迷梦沼泽
VBS DIM P
VBS P=12
dim
BOSS(11),N
BOSS(0)="WraithLvl56"
BOSS(1)="WraithLvl57"
BOSS(2)="WraithLvl58"
//死神战将
BOSSBOSS(3)="MarshSatyrLvl61"
BOSS(4)="MarshSatyrLvl62"
BOSS(5)="MarshSatyrLvl63"
//招魂使
BOSSBOSS(6)="DeadKnightLvl66"
BOSS(7)="DeadKnightLvl67"
BOSS(8)="DeadKnightLvl68"
//死亡骑士
BOSSBOSS(9)="BlackMagaLvl71"
BOSS(10)="BlackMagaLvl72"
BOSS(11)="BlackMagaLvl73"
//黑翼法师
BOSSReturn 迷梦沼泽
Sub 雪狼冰原
VBS DIM P
VBS P=12
dim
BOSS(11),N
BOSS(0)="DwarfApeLvl76"
BOSS(1)="DwarfApeLvl77"
BOSS(2)="DwarfApeLvl78"
//雪山矮猿
BOSSBOSS(3)="SnowApeLvl81"
BOSS(4)="SnowApeLvl82"
BOSS(5)="SnowApeLvl83"
//冰原
BOSSBOSS(6)="YetiLvl86"
BOSS(7)="YetiLvl87"
BOSS(8)="YetiLvl88"
//冰雪巨人
BOSSBOSS(9)="OrcLvl91"
BOSS(10)="OrcLvl92"
BOSS(11)="OrcLvl93"
//守卫者
BOSSReturn 雪狼冰原
Sub 亚维特岛
VBS DIM P
VBS P=9
dim
BOSS(8),N
BOSS(0)="FishDemonLvl71"
BOSS(1)="FishDemonLvl72"
BOSS(2)="FishDemonLvl73"
//鱼妖
BOSSBOSS(3)="DinothereLvl75"
BOSS(4)="DinothereLvl76"
BOSS(5)="DinothereLvl77"
//恐兽
BOSSBOSS(6)="AxDemonLvl81"
BOSS(7)="AxDemonLvl82"
BOSS(8)="AxDemonLvl83"
//巨斧怪
BOSSReturn 亚维特岛
Sub 自然女神之怒
VBS DIM P
VBS P=9
dim
BOSS(8),N
BOSS(0)="WormanLvl86"
BOSS(1)="WormanLvl87"
BOSS(2)="WormanLvl88"
//刺虫人
BOSSBOSS(3)="FourTeethLvl91"
BOSS(4)="FourTeethLvl92"
BOSS(5)="FourTeethLvl93"
//四牙怪
BOSSBOSS(6)="FireGenasiLvl96"
BOSS(7)="FireGenasiLvl97"
BOSS(8)="FireGenasiLvl98"
//炎女
BOSSReturn 自然女神之怒
---------------------------------
精简高效版本
VBS dim X,Y,Mey,YuBing,Num
VBS X=""
VBS Y="Lvl"
VBS Mey=&h00607A00
//----------------获得窗口句柄------------------
MessageBox "请先点击游戏窗口,然后按F5获得游戏窗口的窗口句柄"
Rem 记录窗口句柄
VBS dim F5
VBS F5=""
WaitKey F5
If F5=116
Plugin YuBing=Window.MousePoint()
Else
Goto 记录窗口句柄
EndIf
//----------------
BOSS提醒主程序------------------
Rem 程序开始
Plugin X=Memory.ReadString(YuBing,Mey,20)
VBS Num=Instr(X,Y)
If Num>0
VBSCall MessageBox("发现
BOSS "&X&"")
EndIf
Goto 程序开始
----------------------------------------------------
> >