n = 1 pos = 0 pos2= 0 Dim OnePoint_XY(100) CurShape_Kuang = 1372817910 Plugin hwnd = Window.Find("CJSH WndClass",0) Plugin ExistCjsh = Window.IsWindow(hwnd) If ExistCjsh = 0 MessageBox"警告:未发现成吉思汗窗口!" Else Plugin Window.SetClientSize(hwnd, 800, 600) Delay 2000 Plugin Window.Move(hwnd, 0, 0) Plugin Window.SetText(hwnd,"成吉思汗正在采集!!!") MessageBox"成吉思汗自动采集现在开始,按确定键继续" EndIf UserVar Var_List=DropList{自定义采集坐标:-1|哲别村初级矿:133,39;139,53;182,25;210,31;189,32;160,28| 哲别村中级矿:171,77;181,77;190,79;192,69;236,55;234,36;221,31|哲别村高级 矿:209,50;214,59;198,72;216,75;222,83;229,68|哲别村圣徒 矿:161,136;166,161;166,178;167,211;148,191;138,178|哲别村马 蜂:174,235;175,233;176,219;187,214;182,204;184,193|哲别村碧血蟾 蜍:201,199;207,190;194,182;206,170;204,158;212,163;219,136|哲别村吸血蝙 蝠:229,126;208,122;222,114;225,104;229,101;231,91|哲别村牛虻:221,127;201,127;200,115;197,99|哲别村甘 草:60,66;50,76;37,89;22,90;19,80;|哲别村红花:54,63;62,54;30,31;23,48;43,66;57,49|哲别村茯 苓:19,132;23,144;36,148;27,182;33,191;27,202|哲别村伸筋藤:74,39;80,45;93,58;108,64;118,54|哲别村防风 :70,179;76,192;101,197;115,181;81,197|哲别村朱 砂:83,163;87,176;101,175;113,160;106,164;116,178;106,171|哲别村天 麻:93,116;116,146;124,103;114,90;127,73;116,73|哲别村桂枝:82,200;78,216;115,218;119,205;74,204}=0 内 置的几个采集点 UserVar EveryPoint = 设置各采集点坐标(自定义采集点,坐标之间用分号(;)隔开,这个坐标就是你想采集的 坐标~~一定要改的): If Var_List <> -1 CurrentPlantPoint = Var_List Else CurrentPlantPoint = EveryPoint EndIf OnePoint = Split(CurrentPlantPoint, ";", -1, 1) PointCount = UBound(OnePoint)+1 For PointCount temp = Split(OnePoint(pos), ",", -1, 1) OnePoint_XY(pos2) = temp(0) OnePoint_XY(pos2+1) = temp(1) pos = pos + 1 pos2 = pos2 + 2 EndFor Rem 下一个矿点 For PointCount If i/2 = PointCount i = 0 EndIf n = 1 x = 402 y = 320 SetSimMode 2 Plugin Window.Active(hwnd) Delay 500 KeyPress 77,1 Delay 1000 CurrentX = OnePoint_XY(i)*2.13725+26 CurrentY = OnePoint_XY(i+1)*2.13725+66 MoveToS CurrentX,CurrentY Delay 1000 LeftDoubleClick 1 Delay 1000 KeyPress 77,1 Delay 1000 Plugin sTime1 = Sys.GetTime() VBSCall GetCursorPos(MouseX,MouseY) Rem 对比颜色 VBSCall CurColor=GetPixelColor(MouseX,MouseX) Delay 500 VBSCall NewColor=GetPixelColor(MouseX,MouseX) If CurColor <> NewColor Plugin sTime2 = Sys.GetTime() If sTime2 - sTime1 <15000 Goto 对比颜色 Else EndIf EndIf For 15 For n If n mod 2 = 1 y = y + 15 Else y = y - 15 EndIf If CurShape_Kuang = GetCursorShape(0) LeftClick 1 Delay 6000 i = i + 2 Goto 下一个矿点 EndIf MoveToS x,y Delay 20 EndFor For n If n mod 2 = 1 x = x - 15 Else x = x + 15 EndIf If CurShape_Kuang = GetCursorShape(0) LeftClick 1 Delay 6000 i = i + 2 Goto 下一个矿点 EndIf MoveToS x,y Delay 20 EndFor n = n + 1 EndFor i = i + 2