1.                             ColorCompare=ColorDifferentValue
  2.                             End If
  3.                         否则
  4.                             ColorCompare=0
  5.                             End If
  6.                             End Function
  7.                             '
  8.                             '09-05-29 修正怪物屏幕座标
  9.                             '重设战斗中怪物屏幕位置
  10.                             Function XMonsterPosArray(ByVal XPos, ByVal YPos)
  11.                             Dim RelX
  12.                             Dim RelY
  13.                             Dim XYi
  14.                             Dim XList
  15.                             Dim YList
  16.                             如果表达式 (Not(IsNumeric(XPos)) or Not(IsNumeric(YPos)) then) 为真,则
  17.                                 XMonsterPosArray=Array(0,0,-1)
  18.                                 Exit Function
  19.                                 End If
  20.                                 RelX=0
  21.                                 RelY=0
  22.                                 XYi=0
  23.                                 XList=Array(375,310,253,196,139,456,391,334,277,220)
  24.                                 YList=Array(296,350,408,465,522,334,388,446,503,560)
  25.                                 While(XYi<10 and RelY=0)
  26.                                 如果表达式 (Abs(XPos-XList(XYi))<6 then) 为真,则
  27.                                     RelX=XList(XYi)
  28.                                     RelY=YList(XYi)
  29.                                     End If
  30.                                     XYi=XYi+1
  31.                                     Wend
  32.                                     如果表达式 (RelY>0 then) 为真,则
  33.                                         XMonsterPosArray=Array(RelX,RelY,Abs(XPos-RelX))
  34.                                     否则
  35.                                         XMonsterPosArray=Array(XPos,YPos,-1)
  36.                                         End If
  37.                                         End Function
  38.                                         '
  39.                                     结束VBScript块
  40.                                 子程序结束,回到调用处
  41.                                 //=====================VBS===========================
  42.                                 //
  43.                                 子程序 等待设定之类似颜色出现
  44.                                     //需要以上自定义ColorCompare函数
  45.                                     //使用设定数组SetWaitColor=Array(颜色,最大等待时间ms,座标x,座标y,应设为0(返回剩余时间))
  46.                                     SetWaitColor(0)=UCase(SetWaitColor(0))
  47.                                     如果表达式 (IsNumeric(SetWaitColor(1)) and IsNumeric(SetWaitColor(2)) and IsNumeric(SetWaitColor(3))) 为真,则
  48.                                         如果表达式 (SetWaitColor(2)>0 and SetWaitColor(3)>0) 为真,则
  49.                                             如果表达式 ((SetWaitColor(1)>0 and (ColorCompare(GetPixelColor(SetWaitColor(2),SetWaitColor(3)),SetWaitColor(0),15))<=0)) 为真,则循环执行
  50.                                                 延时500毫秒
  51.                                                 SetWaitColor(1)=SetWaitColor(1)-500
  52.                                             循环结束
  53.                                             如果表达式 (SetWaitColor(1)>0) 为真,则
  54.                                                 SetWaitColor(4)=SetWaitColor(1)
  55.                                             条件结束
  56.                                         条件结束
  57.                                     条件结束
  58.                                 子程序结束,回到调用处
  59.                                 子程序 识别10号宋体字
  60.                                     调用插件命令 FontVal = DBSoft.OCR(0,SetFontx,SetFonty,SetFontx+SetFontCount*6+1,SetFonty+9,2,1,"SongTi_11_B.DLL",1,1,"ffffff",0,30,"")
  61.                                     //MessageBox FontVal
  62.                                 子程序结束,回到调用处
  63.                                 子程序 检查是否要输入防外挂验证
  64.                                     FontAddArr=Array(0,0)
  65.                                     如果表达式 ((ColorCompare(GetPixelColor(569,373),"b9c4ff",15) and ColorCompare(GetPixelColor(498,434),"686a2d",15))) 为真,则
  66.                                         //需要输入验证
  67.                                         FontVal = 0
  68.                                         SetFontx=484
  69.                                         SetFonty=398
  70.                                         SetFontCount=4
  71.                                         调用子程序 识别10号宋体字
  72.                                         如果表达式 ((Len(FontVal)=3)) 为真,则
  73.                                             FontAddArr=Split(FontVal,"+")
  74.                                             FontAddArr(0)=CInt(FontAddArr(0))
  75.                                             FontAddArr(1)=CInt(FontAddArr(1))
  76.                                             如果表达式 ((IsNumeric(FontAddArr(0)) and IsNumeric(FontAddArr(1)))) 为真,则
  77.                                                 //成功识别字符
  78.                                                 VInputValue=FontAddArr(0)+FontAddArr(1)
  79.                                                 鼠标移到 460 , 430
  80.                                                 左键单击
  81.                                                 延时500毫秒
  82.                                                 按键<BackSpace>
  83.                                                 延时100毫秒
  84.                                                 按键<BackSpace>
  85.                                                 输入文本 VInputValue
  86.                                                 延时500毫秒
  87.                                                 鼠标移到 471 , 459
  88.                                                 左键单击
  89.                                                 延时500毫秒
  90.                                             条件结束
  91.                                         条件结束
  92.                                     条件结束
  93.                                 子程序结束,回到调用处
  94.                                 子程序 DEBUGKEY
  95.                                     如果表达式 (LastDebugKey<=0) 为真,则
  96.                                         检测上次按键,保存到变量LastDebugKey中
  97.                                     否则
  98.                                         LastDebugKey=0
  99.                                     条件结束
  100.                                 子程序结束,回到调用处