//得到鼠標指向的窗口句柄
Hwnd = Plugin.Window.MousePoint()
UserVar sanxian=DropList{"傀儡":"1"|"魅影":"2"|"劍仙":"3"|"陰陽":"4"|"天師":"5"}=2 "招仙"
UserVar yanshi=60 "四靈陣間隔時間(分)"
UserVar lingen=80 "招多少靈根以上的仙"
Rem 開始
Call 定位角色()
For yanshi/10
Call 招仙()
Next
Delay 1000*60*yanshi
Goto 開始
Sub 招仙()
Rem 招仙
//點擊人物
Call Plugin.Bkgnd.LeftClick(Hwnd, 340, 558)
Delay 1000
Rem 招仙界面
XY = Plugin.Bkgnd.FindColor(Hwnd, 538,91, 582,102, "A6F4FF")
ZB = InStr(XY, "|")
X = Clng(Left(XY, ZB - 1)): Y = Clng(Right(XY, Len(XY) - ZB))
If x>0 then
Call Plugin.Bkgnd.LeftClick(Hwnd, x, y)
Delay 1000
Else
Delay 500
Goto 招仙界面
End If
If sanxian=1
aa=383:bb=401
Call 招募()
End If
If sanxian=2
aa=505:bb=523
Call 招募()
End If
If sanxian=3
aa=627:bb=645
Call 招募()
End If
If sanxian=4
aa=749:bb=767
Call 招募()
End If
If sanxian=5
aa=871:bb=889
Call 招募()
End If
Call 識別靈根()
If group>=lingen
Call Plugin.Bkgnd.LeftClick(Hwnd, 919,68)
Delay 1000
Else
Call Plugin.Bkgnd.LeftClick(Hwnd, 390,453)
Delay 1000
Call Plugin.Bkgnd.LeftClick(Hwnd, 440,330)
Delay 1000
Call Plugin.Bkgnd.LeftClick(Hwnd, 919,68)
Delay 1000
Delay 1000*60*10
Goto 招仙
End If
End Sub
Sub 招募()
Rem 招募
XY = Plugin.Bkgnd.FindColor(Hwnd, aa, 272, bb, 281, "FFE3B7")
ZB = InStr(XY, "|")
X = Clng(Left(XY, ZB - 1)): Y = Clng(Right(XY, Len(XY) - ZB))
If x>0
Call Plugin.Bkgnd.LeftClick(Hwnd, x, y)
Delay 1000
Else
Delay 500
Goto 招募
End If
End Sub
Sub 識別靈根()
ux=340
uy=445
For 2
code=""
y=uy
For 8
x=ux
For 7
GetColor = Plugin.Bkgnd.GetPixelColor(Hwnd, x, y)
If GetColor ="FFFFFF" or GetColor ="9AFA00" or GetColor ="FF8200" or GetColor ="FD1EFD" Then
i="1"
Else
i="0"
End If
code=code & i
x=x+1
next
y=y+1
next
//Call Plugin.File.WriteFileEx("C:\Log.txt", code)
//漢字特徵碼
Num0="01111001000010100001010000101000010100001010000101000010"
Num1="00010000111000000100000010000001000000100000010000001000"
Num2="01111001000010100001000000100000100001100001000001000000"
Num3="01111001000010000001000000100011100000001000000101000010"
Num4="00001000001100001010001001001000100111111100001000000100"
Num5="11111101000000100000011111000000010000001000000101000010"
Num6="00111000100000100000011111001000010100001010000101000010"
Num7="11111100000010000010000001000001000000100000100000010000"
Num8="01111001000010100001010000100111100100001010000101000010"
Num9="01111001000010100001010000101000010011111000000100000100"
If code=Num0 then
num="0"
ElseIf code=Num1 then
num="1"
ElseIf code=Num2 then
num="2"
ElseIf code=Num3 then
num="3"
ElseIf code=Num4 then
num="4"
ElseIf code=Num5 then
num="5"
ElseIf code=Num6 then
num="6"
ElseIf code=Num7 then
num="7"
ElseIf code=Num8 then
num="8"
ElseIf code=Num9 then
num="9"
Else
num=""
End If
ux=ux+8
group=group & num
Next
//MessageBox group
End Sub
Sub 定位角色()
G(0)="6DDCFC":G(1)="36CBFB":G(2)="15ADD6":G(3)="3DC0E4":G(4)="6FD0E5":G(5)= "6ED0E5":i=0
For 6
XY = Plugin.Bkgnd.FindColor(Hwnd, 265,0, 962,513, G(i))
ZB = InStr(XY, "|")
X = Clng(Left(XY, ZB - 1)): Y = Clng(Right(XY, Len(XY) - ZB))
If x>0
Call Plugin.Bkgnd.LeftClick(Hwnd, x-40, y-2)
Else
i=i+1
End If
Next
Delay 2000
End Sub
這是腳本但 按了卻不會動 請問高手 問題出在哪? |