|
本帖最后由 colin340 于 2017-9-30 15:17 编辑
有一定编程经验的伙伴可以,根据这个思路自行扩充代码,临时给内侧编写的,有很多不完善和BUG大家见谅,就不设置购买了,觉得有用的自行打点赏。。。
- //代码说明:
- //本代码由按键精灵9+大漠插件编写,通过文字识别ID的cast机,这段代码功能比较单一,只提供思路。
- //有一定编程基础的伙伴们,可以举一反三,实现自动远程开人,召唤国民、咒术跑坑带人、断线重连、智能识别屏幕文字图形内容智能挂机,
- //虽然不能完全实现zkok的强大,但是过度期实现zkok的伪bc判定功能还是可以的,当然了由于不是全局判定,涉及代码量会异常庞大,闲的蛋疼的伙伴可以扩充一下功能。
- //指令不需要游戏中单独alias,代码中绝对路径、法术、喊话内容等请自行根据实际情况修改。
- //游戏中在下方消息窗口中关闭所有对话,防止识别到无用信息。
- //可后台,但是需要将识别区域露出来,由于测试的时候是老电脑,有兴趣的伙伴可以通过修改显示模式实现窗口最小化,修改窗口绑定模块中的normal为dx即可。
- //其中字库文件请自行制作添加。
- //字库说明,目前论坛里的版本为ver1.3.0.2,字体为大部分台湾通用简体字,细明体,字号9号。
- //dm_soft.txt为添加全部简体字,用于识别喊话。
- //dm_soft2.txt为只添加大小写英文字母,用于识别ID。
- PutAttachment "c:C:\Program Files (x86)\按键精灵9","*.*"
- set ws=createobject("Wscript.Shell")
- ws.run "regsvr32 c:\C:\Program Files (x86)\按键精灵9\dm.dll /s"
- set ws=nothing
- Delay 1500
- Set dm = CreateObject("dm.dmsoft")
- ver = dm.Ver()
- If len(ver) = 0 Then
- MessageBox "创建对象失败,检查系统是否禁用了vbs脚本权限"
- EndScript
- End If
- Hwnd = dm.GetMousePointWindow()
- dm_ret = dm.BindWindow(Hwnd,"normal","windows","windows",1)
- intX = -1
- //喊话主程序
- Rem sing
- If intX = - 1 Then
- //识别游戏中下方消息窗口最后一行绿色字体,可根据实际情况修改识别区域坐标及颜色
- dm_ret = dm.SetDict(0, "dm_soft.txt")
- dm_ret = dm.FindStr(181, 575, 593, 591, "加加加", "9cffa5-000000", 1.0, intX, intY)
- dm_ret = dm.SetDict(0, "dm_soft2.txt")
- ID = dm.Ocr(181, 575, 593, 591, "9cffa5-000000", 1.0)
- Call Plugin.Bkgnd.SendString(Hwnd, "hi 通过识别ID的cast机,测试代码,需要cast请tell 加加加")
- Delay 200
- Call Plugin.Bkgnd.KeyPress(Hwnd,13)
- Delay 200
- Goto sing
- End if
- //如果识别到ID则跳转到cast机子程序
- Rem cast
- Call Plugin.Bkgnd.SendString(Hwnd, "sing "&ID&"准备开始,测试号,cast效果见谅。。。。。")
- Delay 200
- Call Plugin.Bkgnd.KeyPress(Hwnd,13)
- Delay 200
- //双倍医疗
- Call Plugin.Bkgnd.SendString(Hwnd, "cast double_heal on "&ID)
- Delay 200
- Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
- Delay 6000
- //强力恢复
- Call Plugin.Bkgnd.SendString(Hwnd, "cast restore on "&ID)
- Delay 200
- Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
- Delay 6000
- //漂浮
- Call Plugin.Bkgnd.SendString(Hwnd, "cast float on "&ID)
- Delay 200
- Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
- Delay 6000
- //侦测隐形
- Call Plugin.Bkgnd.SendString(Hwnd, "cast detect_invi on "&ID)
- Delay 200
- Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
- Delay 6000
- //强壮
- Call Plugin.Bkgnd.SendString(Hwnd, "cast strong on "&ID)
- Delay 200
- Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
- Delay 6000
- //硬皮术
- Call Plugin.Bkgnd.SendString(Hwnd, "cast stone_skin on "&ID)
- Delay 200
- Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
- Delay 6000
- //朦胧术
- Call Plugin.Bkgnd.SendString(Hwnd, "cast hazy on "&ID)
- Delay 200
- Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
- Delay 6000
- //神圣之力
- Call Plugin.Bkgnd.SendString(Hwnd, "cast holy_power on "&ID)
- Delay 200
- Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
- Delay 6000
- //天使尘
- Call Plugin.Bkgnd.SendString(Hwnd, "cast divine_dust on "&ID)
- Delay 200
- Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
- Delay 6000
- //天使之音
- Call Plugin.Bkgnd.SendString(Hwnd, "cast angel_voice on "&ID)
- Delay 200
- Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
- Delay 6000
- //圣光术
- Call Plugin.Bkgnd.SendString(Hwnd, "cast sanctuary on "&ID)
- Delay 200
- Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
- Delay 6000
- //月光术
- Call Plugin.Bkgnd.SendString(Hwnd, "cast moon_light on "&ID)
- Delay 200
- Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
- Delay 6000
- Call Plugin.Bkgnd.SendString(Hwnd, "sing 结束了,就这么草草的完事了,仅供测试。。。。")
- Delay 200
- Call Plugin.Bkgnd.KeyPress(Hwnd,13)
- Delay 5000
- //冥想
- Call Plugin.Bkgnd.SendString(Hwnd, "meditate")
- Delay 200
- Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
- Delay 15000
- intX = -1
- Goto sing
- //End Sub
- //上一妖怪军团:痛苦的软中华
- //正式开服后等着你们,重现辉煌....
- //PS:黑泽光是猪!
复制代码 |
评分
-
1
查看全部评分
-
|