key1=DropList{"普通攻击":"0"|"法术攻击":"1"|"防御":"2"}=0 "请选择人物作战方式"
UserVar key2=DropList{"普通攻击":"0"|"法术攻击":"1"|"防御":"2"}=0 "请选择召唤兽作战方式"

UserVar red=DropList{"25%":"25"|"50%":"50"}=50 "当气血少于多少时自动补血"
UserVar blue=DropList{"25%":"25"|"50%":"50"}=50 "当魔法少于多少时自动补蓝"

UserVar vet=DropList{"是":"1"|"否":"0"}=0 "是否开启自动巫医"
UserVar mouth=DropList{"是":"1"|"否":"0"}=0 "是否开启自动呼叫巫医"
UserVar shout= "#23医下宝宝,谢谢" "输入要自动喊巫医的内容"

UserVar judge=DropList{"是":"1"|"否":"0"}=1 "是否遇到奖励随机判断"
UserVar leave=DropList{"是":"1"|"否":"0"}=1 "是否判断失败后自动离线"
UserVar small=DropList{"是":"1"|"否":"0"}=0 "是否以缩略模式运行(不建议)"


Hwnd = Plugin.Window.MousePoint()
Call Plugin.Window.Move(Hwnd, 0, 0)
Call Plugin.Window.Top(Hwnd, 0)
If small=1 Then 
	Call Plugin.Window.SetClientSize(Hwnd, 640, 120)
End If
sText = Plugin.Window.GetText(Hwnd)


//************************************************************************************

If small = 0 Then 
	
	vet = 0
	mouth = 0
	judge = 0
	leave = 0
End If

Call Plugin.Window.SetText(Hwnd, ""花°家族专用(运行中……)")

Rem start







//是否战斗模式
If small = 0 Then 
	
	GetColor = GetPixelColor(309, 100)
	Call Plugin.Color.ColorToRGB(GetColor, R, G, B)
	
	If R > 240 And G > 240 And B > 240 Then
		Goto 战斗
	Else 
		GetColor = GetPixelColor(362, 483)
		Call Plugin.Color.ColorToRGB(GetColor, R, G, B)
		If B < 100 Then 
			Goto 战斗后
		End If
	End If
Else 
GetColor = GetPixelColor(309, 100)
Call Plugin.Color.ColorToRGB(GetColor, R, G, B)

If R > 245 And G > 245 And B > 245 Then 
Rem 战斗
	//遇到奖励 
	GetColor = GetPixelColor(108, 82)
	Call Plugin.Color.ColorToRGB(GetColor, R, G, B)
	If R < 225 Then 
			If judge = 1 Then 
				Call Plugin.Window.Active(Hwnd)
				MoveTo 306, 245
				For 4
					LeftClick 1
				Next 
				Delay 1000
				GetColor = GetPixelColor(108, 82)
				Call Plugin.Color.ColorToRGB(GetColor, R, G, B)
				If R < 225 Then 
					Goto over
				Else 
					Goto start
				End If
			End If
	Rem  over
			For 5	
				Call Plugin.Media.Beep(698, 800)
			Next
			If leave = 1 Then 
				Call Plugin.Window.Active(Hwnd)
				KeyDown 18, 1
				KeyPress 115, 1
				KeyUp 18, 1
				MoveTo 170, 420
				Delay 500
				LeftDown 1
				Delay 200
				LeftUp 1
			End If
    		EndScript