'MsgBox "价格正确可以进行下一步交易"
ifcolor 167,269,"44EEFF",0 //检查对方是否先点击了交易 
MoveTo 161,426 //交易逐步点击
Delay 400
LeftClick 2
Delay 400
LeftClick 2
Delay 150 
Else 
Goto jiancha
End If 
Else 
'MsgBox "价格不符合"
gosub 输入金钱
Delay 500
Gosub 检查并交易
End If 

End Sub 

Sub 检查交易是否提前结束
i=0
Rem star
FindPic 0,0,1024,768,"Attachment:\11.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
Delay 500 //2分钟内未交易完成则关闭交易框
Else 
gosub 站街自动喊话
Goto jiewei
End If
rem jiewei
End Sub 

Sub 检查是否有交易
Rem star
FindPic 0,0,1024,768,"Attachment:\11.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then

gosub 检查并交易
Delay 100

Else 

' Goto jiewei
End If
' rem jiewei
End Sub 

Sub 防掉线
kaiguan=0
For 2
MoveTo 33,439
Delay 600
KeyPress "w", 1
Delay 100
KeyPress "q", 1
Delay 100
MoveTo 89,202 
Delay 100
LeftClick 1
Delay 1000

IfColor 143,437,"6DA2B9",1 then
//接受任务
Delay 1000
MoveTo 143,437
Delay 100
LeftClick 1
Delay 100
KeyPress "Esc", 1
Delay 100
MoveTo 419,405
Delay 600
LeftClick 2
Else
Delay 1000
//放弃任务
MoveTo 419,402
Delay 100
LeftClick 1
Delay 100
MoveTo 336,407 
Delay 100
LeftClick 1
Delay 100 
End If
KeyPress "Esc", 1
Next 
EndScript 
End Sub 

Sub 输出信息
Call Plugin.Bkgnd.SendString(Hwnd2, "内容")
Plugin.Window.Active hwnd2
KeyPress "enter",1
End Sub 

Function xiejiage(geshu,jq,wupin)
Set fso = CreateObject("Scripting.FileSystemObject") 
b=Plugin.File.ExistFile("c:\testfile.txt")