- UID
- 26543
- 帖子
- 61
- 积分
- 43
- 紫菀
- 0 朵
- 花瓣
- 0 片
- 花蕊
- 6 朵
- 野草莓
- 3 个
- 蒲公英
- 31 朵
- 社区等级
- 5 级
- 在线时间
- 63 小时
- 注册时间
- 2008-4-19
- 登录状态
-
当前离线
|
楼主
发表于 2008-6-22 12:59
| 只看该作者
按键精灵挂机
有没有自己写按键精灵挂机的?交流一下,或者就给过神医的办法。
VBS shj,byongct,bjsound,shg
UserVar byongct=2 备用的锄头数目(在装备包从左向右依次排开)
UserVar shj=10 检测背包情况间隔 单位"分
UserVar shg=15 回挂机点时间间隔 单位"分
UserVar bjsound=DropList{波形声音文件报警:1|机箱报警:2} 报警声音选择
jt=now
gj=now
ctnum=0
//定义变量
MoveTo 0 0
VBSCall Call FindPic(0,0,1280,767,"Attachment:\主确定.bmp",0.8,zx,zy)
//找到住确定图片的坐标,作为基础坐标
If zx>=0 and zy>=0
Else
msgbox "无法检测到QQ幻想窗口@.@!",16,"检测错误"
EndScript
EndIf
Rem 记录挂机点
Delay 200
KeyDown 18,1
Delay 200
KeyPress 77,1
Delay 200
KeyUp 18,1
Delay 800
//打开小地图
VBSCall FindCenterColor(zx-748,zy-559,zx+53,zy-42,"2222ff",gwzx,gwzy)
//找到人物在地图上的位置,记录挂机点
Delay 300
If gwzx>=0 and gwzy>=0
//找到人物位置,关闭小地图
Delay 200
KeyDown 18,1
Delay 200
KeyPress 77,1
Delay 200
KeyUp 18,1
Goto search
Else
Goto 记录挂机点
EndIf
Rem search
Delay 200
IfColor zx-663-53,zy-28-452,22ffff,1
//通过判断左上角的十字眼色,判断是否有神医降临
Delay 200
Gosub 过神医
EndIf
Delay 200
VBS jcbbsj=DateDiff("s",jt,now)
//自定义时间判断,检测背包材料栏的是否已满
If jcbbsj>=shj*60
Gosub 检测背包
jt=now
EndIf
VBS hgjdsj=DateDiff("s",gj,now)
//自定义时间判断,回挂机点
If hgjdsj>=shg*60
Gosub 回挂机点
gj=now
EndIf
Rem 检测状态
VBSCall Call FindPic(zx-748,zy-559,zx+53,zy-42,"Attachment:\hit.bmp",0.7,x,y)
//查找图片HIT,判断是否处于自动打怪状态
Delay 200
If x>0 and y>0
Else
Delay 200
KeyDown 18,1
Delay 200
KeyPress 87,1
Delay 200
KeyUp 18,1
Delay 200
EndIf
Rem 检测耐久
MoveTo zx-400 zy
VBSCall Call FindPic(zx-748,zy-559,zx+53,zy-42,"Attachment:\物品.bmp",0.7,bx,by)
//检测背包是否打开,如果打开影响判断装备耐久,关掉
If bx>=0 and by>=0
KeyDown 18,1
Delay 200
KeyPress 73,1
Delay 200
KeyUp 18,1
EndIf
Delay 500
IfColor zx-27,zy-74,1122aa,2
//装备眼色变红
Gosub 换锄头
EndIf
//形成循环判断
goto search
sub 过神医
Rem s
VBS m=1
Delay 1200
While m<=2
Delay 200
VBSCall Call FindPic(zx-748,zy-559,zx+53,zy-42,"Attachment:\sure.bmp",0.7,shx,shy)
//查找图片SURE判断神医位置
dian=rnd*10
//得到1-10直接的随机数,讲1-10分成三段数,得到第一段数之间的数,点第一个答案,得到第二段数,点第二个答案……
If dian>=0 and dian<3+1/3
MoveTo shx-50 shy+27
//第一个答案与图片SURE的相对坐标
EndIf
If dian>3+1/3 and dian<(3+1/3)*2
MoveTo shx-50 shy+27*2
//第二个答案与图片SURE的相对坐标
EndIf
If dian>(3+1/3)*2 and dian<=10
MoveTo shx-50 shy+27*3
//……
EndIf
Delay 500
LeftClick 1
Delay 1000
MoveTo zx-400 zy
IfColor zx-663-53,zy-28-452,22ffff,1
//点过后判断是否通过
Delay 200
VBS m=m+1
//变量递增,限制点击次数。
Else
Delay 200
VBSCall Call FindPic(zx-748,zy-559,zx+53,zy-42,"Attachment:\hit.bmp",0.7,x,y)
Delay 200
If x>0 and y>0
Goto 过神医结束
Else
Delay 200
KeyDown 18,1
Delay 200
KeyPress 87,1
Delay 200
KeyUp 18,1
Delay 200
Goto 过神医结束
EndIf
EndIf
EndWhile
//点过两次未过神医开始小腿
fight=1
//变量赋值,也是判断是否小腿过,如果小退过,再次进入游戏以后,需要回挂机点实现定点
VBSCall Call FindPic(zx-748,zy-559,zx+53,zy-42,"Attachment:\hit.bmp",0.7,x,y)
//检测是否处于打怪状态,如处于则关掉自动打怪
Delay 200
If x>0 and y>0
Delay 200
KeyDown 18,1
Delay 200
KeyPress 87,1
Delay 200
KeyUp 18,1
Delay 200
EndIf
Delay 800
KeyDown 18,1
Delay 200
KeyPress 82,1
Delay 800
KeyPress 82,1
Delay 200
KeyUp 18,1
Delay 1000
KeyDown 18,1
Delay 200
KeyPress 79,1
Delay 200
KeyUp 18,1
Delay 800
//打坐两次,摆脱战斗状态
MoveTo zx-663+312 zy-28-215
//选择角色按纽的坐标
Delay 200
LeftClick 1
Rem 检测是否已进入角色选择界面
Delay 200
IfColor zx-663+303,zy-28-35,66ccee,2
Delay 200
IfColor zx-663+305,zy-28-34,55ccee,2
Delay 500
KeyPress 13,1
EndIf
Else
Delay 200
Goto 检测是否已进入角色选择界面
EndIf
Rem 检测是否进入游戏
IfColor zx-663+303,zy-28-35,66ccee,1
Delay 800
MoveTo zx-663+312 zy-28-210+100
//选择角色按纽的坐标
Else
Goto 检测是否进入游戏
EndIf
Delay 800
LeftClick 1
Goto s
Rem 过神医结束
//判断是否小退过
If fight=1
fight=0
//将变量重新赋值,以便下次的判断
Gosub 回挂机点
EndIf
Return 过神医
Sub 检测背包
MoveTo zx zy
Rem ckbb
VBSCall Call FindPic(zx-748,zy-559,zx+53,zy-42,"Attachment:\物品.bmp",0.7,bx,by)
//背包打开的一个特征图片,找到位置
If bx>=0 and by>=0
MoveTo bx+17 by+42
//点材料栏的坐标
Delay 500
LeftClick 1
Delay 100
IfColor bx+100,by+236,000000,1
//材料栏最后一个格的眼色判断,判断是否矿已经满包
If bjsound=1
//选择报警方式
VBS strSoundFile = "C:\WINDOWS\Media\Windows XP 启动.wav"
VBS Set objShell = CreateObject("Wscript.Shell")
VBS strCommand = "sndrec32 /play /close " & chr(34) & strSoundFile & chr(34)
VBS objShell.Run strCommand, 0, True
EndIf
If bjsound=2
For 4
Beep
Beep
Beep
EndFor
EndIf
bg=now
SayString bg&">包包满了@.@!|||"
//报警后,在游戏输入框输入报警时间和原因
Goto bb结束
Else
Goto bb结束
EndIf
Else
KeyDown 18,1
Delay 200
KeyPress 73,1
Delay 200
KeyUp 18,1
Delay 1000
Goto ckbb
EndIf
Rem bb结束
KeyDown 18,1
Delay 200
KeyPress 73,1
Delay 200
KeyUp 18,1
//结束后关掉背包
Return 检测背包
Sub 换锄头
//检测备用锄头,无备用锄头报警
ctnum=ctnum+1
If ctnum>byongct
If bjsound=1
VBS strSoundFile = "C:\WINDOWS\Media\Windows XP 启动.wav"
VBS Set objShell = CreateObject("Wscript.Shell")
VBS strCommand = "sndrec32 /play /close " & chr(34) & strSoundFile & chr(34)
VBS objShell.Run strCommand, 0, True
EndIf
If bjsound=2
For 4
Beep
Beep
Beep
EndFor
EndIf
bg=now
SayString bg&">没有备用锄头了@.@!|||"
//报警报告
Goto 换锄头结束
EndIf
Rem 检测背包是否打开
MoveTo zx zy
VBSCall Call FindPic(zx-748,zy-559,zx+53,zy-42,"Attachment:\物品.bmp",0.7,bx,by)
If bx>=0 and by>=0
//换备用锄头
MoveTo bx+17+70 by+42
Delay 500
LeftClick 1
Delay 200
MoveTo (bx-65)+ctnum*35 by+67
Delay 500
LeftDoubleClick 1
Goto 换锄头结束
Else
KeyDown 18,1
Delay 200
KeyPress 73,1
Delay 200
KeyUp 18,1
Delay 1000
Goto 检测背包是否打开
EndIf
Rem 换锄头结束
KeyDown 18,1
Delay 200
KeyPress 73,1
Delay 200
KeyUp 18,1
// 换锄头结束,关掉背包
Return 换锄头
Sub 回挂机点
//回挂机原点,同时也可防止卡人
Delay 200
KeyDown 18,1
Delay 200
KeyPress 77,1
Delay 200
KeyUp 18,1
Delay 600
MoveTo gwzx gwzy
//记录的挂机原点坐标
Delay 400
RightClick 1
MoveTo zx-400 zy
Rem 检测人物是否已到达挂机点
VBSCall FindCenterColor(zx-748,zy-559,zx+53,zy-42,"2222ff",px,py)
If px>=0 and py>=0
If abs(px-gwzx)<=10 and abs(py-gwzy)<=10
//人物现在位置和记录的挂机点的差绝对比较,判断人物是否已到挂机点
Goto 回挂机点结束
Else
Goto 检测人物是否已到达挂机点
EndIf
Else
Delay 200
KeyDown 18,1
Delay 200
KeyPress 77,1
Delay 200
KeyUp 18,1
Goto 检测人物是否已到达挂机点
EndIf
Rem 回挂机点结束
Delay 200
KeyDown 18,1
Delay 200
KeyPress 77,1
Delay 200
KeyUp 18,1
Return 回挂机点
上面的脚本检测窗口有问题啊 |
|