- ColorCompare=ColorDifferentValue
- End If
- 否则
- ColorCompare=0
- End If
- End Function
- '
- '09-05-29 修正怪物屏幕座标
- '重设战斗中怪物屏幕位置
- Function XMonsterPosArray(ByVal XPos, ByVal YPos)
- Dim RelX
- Dim RelY
- Dim XYi
- Dim XList
- Dim YList
- 如果表达式 (Not(IsNumeric(XPos)) or Not(IsNumeric(YPos)) then) 为真,则
- XMonsterPosArray=Array(0,0,-1)
- Exit Function
- End If
- RelX=0
- RelY=0
- XYi=0
- XList=Array(375,310,253,196,139,456,391,334,277,220)
- YList=Array(296,350,408,465,522,334,388,446,503,560)
- While(XYi<10 and RelY=0)
- 如果表达式 (Abs(XPos-XList(XYi))<6 then) 为真,则
- RelX=XList(XYi)
- RelY=YList(XYi)
- End If
- XYi=XYi+1
- Wend
- 如果表达式 (RelY>0 then) 为真,则
- XMonsterPosArray=Array(RelX,RelY,Abs(XPos-RelX))
- 否则
- XMonsterPosArray=Array(XPos,YPos,-1)
- End If
- End Function
- '
- 结束VBScript块
- 子程序结束,回到调用处
- //=====================VBS===========================
- //
- 子程序 等待设定之类似颜色出现
- //需要以上自定义ColorCompare函数
- //使用设定数组SetWaitColor=Array(颜色,最大等待时间ms,座标x,座标y,应设为0(返回剩余时间))
- SetWaitColor(0)=UCase(SetWaitColor(0))
- 如果表达式 (IsNumeric(SetWaitColor(1)) and IsNumeric(SetWaitColor(2)) and IsNumeric(SetWaitColor(3))) 为真,则
- 如果表达式 (SetWaitColor(2)>0 and SetWaitColor(3)>0) 为真,则
- 如果表达式 ((SetWaitColor(1)>0 and (ColorCompare(GetPixelColor(SetWaitColor(2),SetWaitColor(3)),SetWaitColor(0),15))<=0)) 为真,则循环执行
- 延时500毫秒
- SetWaitColor(1)=SetWaitColor(1)-500
- 循环结束
- 如果表达式 (SetWaitColor(1)>0) 为真,则
- SetWaitColor(4)=SetWaitColor(1)
- 条件结束
- 条件结束
- 条件结束
- 子程序结束,回到调用处
- 子程序 识别10号宋体字
- 调用插件命令 FontVal = DBSoft.OCR(0,SetFontx,SetFonty,SetFontx+SetFontCount*6+1,SetFonty+9,2,1,"SongTi_11_B.DLL",1,1,"ffffff",0,30,"")
- //MessageBox FontVal
- 子程序结束,回到调用处
- 子程序 检查是否要输入防外挂验证
- FontAddArr=Array(0,0)
- 如果表达式 ((ColorCompare(GetPixelColor(569,373),"b9c4ff",15) and ColorCompare(GetPixelColor(498,434),"686a2d",15))) 为真,则
- //需要输入验证
- FontVal = 0
- SetFontx=484
- SetFonty=398
- SetFontCount=4
- 调用子程序 识别10号宋体字
- 如果表达式 ((Len(FontVal)=3)) 为真,则
- FontAddArr=Split(FontVal,"+")
- FontAddArr(0)=CInt(FontAddArr(0))
- FontAddArr(1)=CInt(FontAddArr(1))
- 如果表达式 ((IsNumeric(FontAddArr(0)) and IsNumeric(FontAddArr(1)))) 为真,则
- //成功识别字符
- VInputValue=FontAddArr(0)+FontAddArr(1)
- 鼠标移到 460 , 430
- 左键单击
- 延时500毫秒
- 按键<BackSpace>
- 延时100毫秒
- 按键<BackSpace>
- 输入文本 VInputValue
- 延时500毫秒
- 鼠标移到 471 , 459
- 左键单击
- 延时500毫秒
- 条件结束
- 条件结束
- 条件结束
- 子程序结束,回到调用处
- 子程序 DEBUGKEY
- 如果表达式 (LastDebugKey<=0) 为真,则
- 检测上次按键,保存到变量LastDebugKey中
- 否则
- LastDebugKey=0
- 条件结束
- 子程序结束,回到调用处