ePrint "开始运行"
Hwnd = Plugin.Window.Find("TianLongBaBuHJ WndClass", "《新天龙八部》 0.02.7805 (怀旧二区:天下第一)")
TracePrint Hwnd
Call Plugin.Window.Move(Hwnd, 1, 1)
Call Plugin.Window.Top(Hwnd, 0)
Plugin.Window.Active Hwnd
Randomize
Delay 500
for 10
Call 找怪()
KeyPress "F1", 1
Call 打怪()
Next
Sub 找怪()
Do
KeyPress "F11", 1
Delay Int((500 - 300 + 1) * Rnd + 300)
IfColor 301,63,"0007CD",0 Then
//颜色一样
TracePrint "颜色一样"
Exit Do
End If
Delay Int((1000 - 100 + 1) * Rnd + 100)
Loop
End Sub
Sub 打怪()
Do
Delay Int((200 - 50 + 1) * Rnd + 50)
IfColor 287,63,"0007CD",1 Then
TracePrint "怪死亡"
Exit Do
End If
TracePrint "怪还没死亡"
IfColor 126,68, "0007CD", 1 Then'加血
KeyPress "F10", 1
Else
TracePrint "不用加血"
End If
Delay Int((500 - 100 + 1) * Rnd + 100)
Loop
End Sub
Sub OnScriptExit()
Call Plugin.Window.Top(Hwnd, 1)
End Sub