Delay 500
Plugin hwnd = aojiansoft.findWinName("大明龍權")
Delay 300
Plugin Window.Active(hwnd)
Delay 300
//移動窗口到(0.0)
Plugin Window.Move(hwnd, 0, 0)
Delay 500
PutAttachment .\plugin *.dll
Delay 300
Rem 開始
Gosub 藥
Gosub 組
Rem 找
//按TAB鍵找怪
Plugin BGKM5.KeyClick(hwnd,9)
Delay 400
Gosub 驗證
//檢查是否為可攻擊怪物
VBSCall FindPic(100,50,800,400,"Attachment:\卡.bmp",0.9,intX,intY)
If intX>=0 and intY>=0
Delay 500
Goto 找
EndIf
VBSCall FindPic(100,50,800,400,"Attachment:\卡2.bmp",0.9,intX,intY)
If intX>=0 and intY>=0
Delay 500
Goto 找
EndIf
//開始打怪了
Rem 檢查死怪
VBSCall FindPic(100,0,900,250,"Attachment:\怪.bmp",0.9,intX,intY)
If intX>=0 and intY>=0
//右鍵點擊進行攻擊
Plugin BGKM5.MMove(hwnd,300,10)
Delay 200
Plugin BGKM5.RClick(hwnd,300,10)
Delay 600
Else
Goto 找
EndIf
VBSCall FindPic(100,0,900,230,"Attachment:\已死怪.bmp",0.9,intX,intY)
If intX>=0 and intY>=0
Plugin BGKM5.MMove(hwnd,300,10)
Delay 200
Plugin BGKM5.RClick(hwnd,300,10)
Delay 600
//遊戲裏怪物血條沒血了,怪還有1口氣的,所以先打壹次再揀東西
Gosub 驗證
Gosub 拾取
Goto 開始
Else
Gosub 驗證
Plugin BGKM5.MMove(hwnd,300,10)
Delay 200
Plugin BGKM5.RClick(hwnd,300,10)
Delay 600
Gosub 藥
Goto 檢查死怪
EndIf
Goto 開始
//子程序
Sub 拾取
//拾取白色和蘭色物品,循環3次
For 3
VBSCall FindPic(200,205,750,450,"Attachment:\材料.bmp",0.9,intX,intY)
If intX>=0 and intY>=0
Plugin BGKM5.MMove(hwnd,intX,intY-29)
Delay 200
Plugin BGKM5.LClick(hwnd,intX,intY-29)
Delay 1000
EndIf
VBSCall FindPic(30,0,750,450,"Attachment:\藍裝備.bmp",0.9,intX,intY)
If intX>=0 and intY>=0
Plugin BGKM5.MMove(hwnd,intX,intY-29)
Delay 200
Plugin BGKM5.LClick(hwnd,intX,intY-29)
Delay 1000
EndIf
EndFor
Plugin BGKM5.MMove(hwnd,0,0)
Delay 200
Return
//反外掛驗證報警提示
Sub 驗證
VBSCall FindPic(150,100,900,300,"Attachment:\驗證.bmp",0.9,intX,intY)
If intX>=0 and intY>=0
Beep 1
Delay 100
Beep 1
Delay 100
Beep 1
Delay 100
Beep 1
Delay 100
Beep 1
Delay 100
For 1
VBS strSoundFile = "C:\WINDOWS\Media\Windows XP 啟動.wav"
VBS Set objShell = CreateObject("Wscript.Shell")
VBS strCommand = "sndrec32 /play /close " & chr(34) & strSoundFile & chr(34)
VBS objShell.Run strCommand, 0, True
Delay 2000
EndFor
EndIf
Return
Sub 藥
VBSCall FindPic(0,0,1200,300,"Attachment:\血60%.bmp",0.9,intX,intY)
If intX>=0 and intY>=0
Else
Plugin BGKM5.KeyClick(hwnd,112)
Delay 400
EndIf
VBSCall FindPic(0,0,1200,300,"Attachment:\藍50%.bmp",0.9,intX,intY)
If intX>=0 and intY>=0
Else
Plugin BGKM5.KeyClick(hwnd,113)
Delay 400
EndIf
Return
Sub 組
VBSCall FindPic(200,205,1200,550,"Attachment:\組隊.bmp",0.9,intX,intY)
If intX>=0 and intY>=0
Plugin BGKM5.MMove(hwnd,intX-3,intY-29)
Delay 200
Plugin BGKM5.LClick(hwnd,intX-3,intY-29)
Delay 600
EndIf
VBSCall FindPic(200,205,1200,550,"Attachment:\接受組隊.bmp",0.9,intX,intY)
If intX>=0 and intY>=0
Plugin BGKM5.MMove(hwnd,intX-3,intY-29)
Delay 200
Plugin BGKM5.LClick(hwnd,intX-3,intY-29)
Delay 600
EndIf
Return