UserVar hong=100 红少于多少吃红药
UserVar lan=100 蓝少于多少吃蓝药
UserVar jn4=9 吃红键位
UserVar jn5=0 吃蓝键位
UserVar jn1=4 辅助技能1键位
UserVar jn2=5 辅助技能2键位
UserVar jn3=6 辅助技能3键位
UserVar s1=60 技能1施放间隔时间
UserVar s2=90 技能2施放间隔时间
UserVar s3=120 技能3施放间隔时间
UserVar huicheng=7 回程键位
UserVar sibaojing=DropList{是:0|否:1}=0 死亡报警
UserVar hongbaojing=DropList{报警:0|回程:1}=0 红药用完动作
UserVar lanbaojing=DropList{报警:0|回程:1}=0 蓝药用完报警
dim hong lan cq
dim key(5)
t1=now:t2=now:t3=now
zifuchuan=jn4&jn5&jn1&jn2&jn3&huicheng
//声明字符串
//-----------------------转换键码---------------------------
key(0)=Asc(UCase(jn1))
key(1)=Asc(UCase(jn2))
key(2)=Asc(UCase(jn3))
key(3)=Asc(UCase(jn4))
key(4)=Asc(UCase(jn5))
key(5)=Asc(UCase((huicheng)))
//-----------------------主程序-----------------------------
Plugin cq=Window.Foreground()
Rem 开始打怪
Gosub 检查红蓝
Gosub 读经验
Gosub 抓怪
Gosub 打怪
Gosub 二次读经验
Gosub 捡物
Gosub 开辅助技能
Goto 开始打怪
//---------------------查红蓝--------------------------
Sub 检查红蓝
Rem 查红
Plugin hp=Memory.Read16Bit(cq,&h06877094)
If hp=0 and sbaojing=0
VBS strSoundFile = "C:\WINDOWS\Media\ringin.wav"
VBS Set objShell = CreateObject("Wscript.Shell")
VBS strCommand = "sndrec32 /play /close " & chr(34) & strSoundFile & chr(34)
VBS objShell.Run strCommand, 0, True
Goto 等待
EndIf
If CInt(hp)<CInt(hong)
Plugin Window.SendKeyDown(cq,key(4))
Delay 32
Plugin Window.SendKeyUp(cq,key(4))
Gosub 再读一次红
EndIf
Rem 查蓝
Plugin sp=Memory.Read16Bit(cq,&h068770a4)
If CInt(sp)<CInt(lan)
Plugin Window.SendKeyDown(cq,key(5))
Delay 32
Plugin Window.SendKeyUp(cq,key(5))
Gosub 再读一次蓝
EndIf
Return
//--------------------再读一次红--------------------
Sub 再读一次红
Plugin hp2=Memory.Read16Bit(cq,&h06877094)
If hp2=hp and hongbaojing=0
VBS strSoundFile = "C:\WINDOWS\Media\ringin.wav"
VBS Set objShell = CreateObject("Wscript.Shell")
VBS strCommand = "sndrec32 /play /close " & chr(34) & strSoundFile & chr(34)
VBS objShell.Run strCommand, 0, True
Gosub 等待
EndIf
ElseIf hp2=hp and hongbaojing=1
Plugin Window.SendKeyDown(cq,key(5))
Delay 32
Plugin Window.SendKeyUp(cq,key(5))
Gosub 等待
EndIf
Return
//--------------------再读一次蓝--------------------
Sub 再读一次蓝
Plugin sp2=Memory.Read16Bit(cq,&h068770a4)
If sp2=sp1 and lanbaojing=0
VBS strSoundFile = "C:\WINDOWS\Media\ringin.wav"
VBS Set objShell = CreateObject("Wscript.Shell")
VBS strCommand = "sndrec32 /play /close " & chr(34) & strSoundFile & chr(34)
VBS objShell.Run strCommand, 0, True
Gosub 等待
ElseIf sp2=sp and lanbaojing=1
Plugin Window.SendKeyDown(cq,key(5))
Delay 32
Plugin Window.SendKeyUp(cq,key(5))
Gosub 等待
EndIf
Return
//--------------------第一次读经验------------------
Sub 读经验
Plugin jingyan=Memory.Read16Bit(cq,&h007e85d8)
Return