-
关注Ta
-
- 注册时间 2012-05-24
- 最后登录 2014-03-03
-
- 发帖1330
- 在线299小时
- 精华0
- DB1116
- 威望436
- 保证金0
- 桃子0
- 鲜花0
- 鸡蛋0
-
访问TA的空间加好友用道具
|
自动挂机刷宝石实现原理及源码,共同交流改进 有很多不足之处,有木有同道中人,大家交流学习下 实现原理: 一、先将跑跑窗口置顶,然后通过代码,将置顶窗口移动到屏幕左上角。 二、在大厅时,通过判断“创建房间”图片区域的颜色值,判断是否创建房间,这是为了每10局被T出来设置的,然后一系列的鼠标和键盘操作进行创建房间; 三、进入房间后,选择地图和T去多余NPC也是鼠标操作,接下来会判断“开始”游戏图片区域的颜色值,判断能否开始游戏; 四 、在开始游戏前,还要再次判断领取在线奖励图片区域的颜色值,看看能否领取在线奖励,如果能,又是一系列鼠标操作领取奖励,如果不能,不进行任何操作; 五、开始游戏后,就是录制的一段操作,跑到箱子的位置站定刷宝石,后期做了一点小修改,就是每当NPC从旁边经过时,进行一次复位,这样就不怕被撞了。
最后,一直重复上面的二到五步骤, 选择S3频道的原因是让NPC更快的完成,减少时间。 源码:'==========将窗口置顶========== LeftClick 1 Delay 200 a=Plugin.Window.Foreground() Call Plugin.Window.Move(a, 0, 0) '============================ While true Delay 2000 '==========特殊中断情况处理========== IfColor 392,357,"0",0 Then '================================== MoveTo 392, 357 LeftClick 1 Delay 1000 End If '==========判断是否创建房间========== IfColor 650,123,"70DC70",0 Then '================================== MoveTo 673, 138 LeftClick 1 Delay 1000 LeftClick 1 Delay 1000 MoveTo 302, 454 LeftClick 1 Delay 1000 MoveTo 551, 442 LeftClick 1 Delay 1000 KeyDown "1", 1 Delay 200 KeyUp "1", 1 Delay 200 KeyDown "2", 1 Delay 200 KeyUp "2", 1 Delay 200 KeyDown "3", 1 Delay 200 KeyUp "3", 1 Delay 200 MoveTo 369, 501 LeftClick 1 Delay 2000 MoveTo 636, 103 LeftClick 1 Delay 1000 MoveTo 769, 103 LeftClick 1 Delay 1000 MoveTo 763, 320 LeftClick 1 Delay 1000 MoveTo 644, 323 LeftClick 1 Delay 1000 MoveTo 512, 323 LeftClick 1 Delay 1000 MoveTo 60, 458 LeftClick 1 Delay 1000 MoveTo 465, 119 LeftClick 1 Delay 1000 MoveTo 659, 254 LeftClick 1 Delay 1000 MoveTo 554, 533 LeftClick 1 Delay 1000 End If '==========判断是否开始游戏========== IfColor 56,120,"0",0 Then '================================== '==========判断是否领取在线奖励========== IfColor 614,502,"FFFFFF",0 Then '===================================== MoveTo 614, 502 LeftClick 1 Delay 1000 MoveTo 410, 226 LeftClick 1 Delay 1000 MoveTo 420, 477 LeftClick 1 Delay 2000 MoveTo 396, 357 LeftClick 1 Delay 1000 End If MoveTo 55, 105 LeftClick 1 Delay 5000 LeftClick 1 '==========跑到箱子位置站定,以下是按键精灵录制的内容========== MoveTo 393, 352 Delay 9000 KeyDown "Up", 1 Delay 533 Delay 33 KeyDown "Up", 1 Delay 50 Delay 33 KeyDown "Up", 1 Delay 34 Delay 33 KeyDown "Up", 1 Delay 50 Delay 34 KeyDown "Up", 1 Delay 33 Delay 33 KeyDown "Up", 1 Delay 50 Delay 34 KeyDown "Up", 1 Delay 34 Delay 32 KeyDown "Up", 1 Delay 34 Delay 49 KeyDown "Up", 1 Delay 34 Delay 33 KeyDown "Up", 1 Delay 50 Delay 33 KeyDown "Up", 1 Delay 33 Delay 33 KeyDown "Up", 1 Delay 34 Delay 50 KeyDown "Up", 1 Delay 33 Delay 34 KeyDown "Up", 1 Delay 33 Delay 50 KeyDown "Up", 1 Delay 33 Delay 33 KeyDown "Up", 1 Delay 34 Delay 49 KeyDown "Up", 1 Delay 34 Delay 33 KeyDown "Up", 1 Delay 33 Delay 51 KeyDown "Up", 1 Delay 33 Delay 33 KeyDown "Up", 1 Delay 33 Delay 50 KeyDown "Up", 1 Delay 34 Delay 33 KeyDown "Up", 1 Delay 34 Delay 33 KeyDown "Up", 1 Delay 50 Delay 33 KeyDown "Up", 1 Delay 33 Delay 50 KeyDown "Up", 1 Delay 34 Delay 33 KeyDown "Up", 1 Delay 33 Delay 50 KeyDown "Up", 1 Delay 34 Delay 33 KeyDown "Up", 1 Delay 35 Delay 48 KeyDown "Up", 1 Delay 34 Delay 33 KeyDown "Up", 1 Delay 33 Delay 50 KeyDown "Up", 1 Delay 34 Delay 33 KeyDown "Up", 1 Delay 33 Delay 35 KeyDown "Up", 1 Delay 49 Delay 33 KeyDown "Up", 1 Delay 33 Delay 33 KeyDown "Up", 1 Delay 51 Delay 33 KeyDown "Up", 1 Delay 33 Delay 34 KeyDown "Up", 1 Delay 50 Delay 33 KeyDown "Up", 1 Delay 33 Delay 34 KeyDown "Up", 1 Delay 50 Delay 33 KeyDown "Up", 1 Delay 66 KeyUp "Up", 1 Delay 68 KeyDown "R", 1 Delay 249 KeyUp "R", 1 Delay 30000 KeyDown "R", 1 Delay 249 KeyUp "R", 1 Delay 30000 KeyDown "R", 1 Delay 249 KeyUp "R", 1 '==========以上是按键精灵录制的内容========== End If Wend [ 此帖被╄→恋灬殇在2012-06-24 16:25重新编辑 ]
|