PutAttachment ".\plugin","*.dll"
PutAttachment ".\plugin\大漠梦想","*.bmp"
PutAttachment ".\plugin\大漠梦想","*.txt"
PutAttachment ".\plugin\大漠梦想", "dm.dll"
Call Plugin.RegDll.Reg(".\plugin\大漠梦想\dm.dll")
Set dm = createobject("dm.dmsoft")
dm.SetPath ".\plugin\大漠梦想"
dm.SetDict 0, "单价.txt"
//hx= Plugin.Window.MousePoint()
//Call Plugin.Window.Move(hx, 0, 0)
dnf = dm.GetMousePointWindow()
dm_ht = dm.BindWindow(dnf,"normal", "windows2","dx", 1)
//dnf= Plugin.Window.MousePoint()
//Call Plugin.Window.Move(dnf, 0, 0)
dm.MoveWindow dnf, 0, 0


dm.KeyPress 78
Delay 200

Call 移动天空门口()
Sub 移动天空门口()
	


dm.MoveTo 540,228
dm.RightClick 
Delay 1000	

tk=dm.FindColor(509,214,546,240,"277bff-000000|0a6dc7-000000|099afe-000000|1866f6-000000|09cfff-000000",0.9,7,intx,inty) 
If 540- intx > 7 OR intx - 540 > 7 Then 
	
Call 移动天空门口()
Else 
dm.KeyPress 27
Delay 500
call 刷人偶()
End if
End Sub

Sub 刷人偶()
	
	 dm.KeyDown 39
	 Delay 500
	 dm.KeyUp 39
	Delay 1500
	dm.MoveTo 331, 435
Delay 100

dm.LeftClick 
Delay 100
	dm.MoveTo 296, 385
Delay 50

dm.LeftClick 
Delay 50

dm.MoveTo 331, 435
Delay 100

dm.LeftClick 
Delay 100
dm.LeftClick 
Delay 100
dm.LeftClick 
Delay 100
dm.LeftClick 
Delay 100
dm.MoveTo 296, 385
Delay 50
dm.LeftClick 
Delay 2000
dm.KeyDown 38
Delay 2200
 dm.KeyUp 38
  dm.KeyPress 38

 Delay 100
 dm.KeyDown 39
 Delay 500
 dm.KeyUp 39
 Delay 100
  dm.KeyDown 39
  Delay 100
  dm.KeyPress 71
  Delay 500
 dm.KeyPress 72 //技能
  Delay 100
 dm.KeyPress 72
  Delay 100
 dm.KeyPress 72
 Delay 100
 dm.KeyUp 39
Delay 700

dm.KeyPress 86  //移动物品
Delay 100

dm.KeyPress 88  //拾取
Delay 150