万王之王 KOK King of Kings

 找回密码
 加入我们
查看: 3060|回复: 22

(按键精灵)智能cast机,自动识别ID,可后台,提供思路,欢迎大家回帖扩充

[复制链接]
发表于 2017-9-30 14:56 | 显示全部楼层 |阅读模式
本帖最后由 colin340 于 2017-9-30 15:17 编辑

有一定编程经验的伙伴可以,根据这个思路自行扩充代码,临时给内侧编写的,有很多不完善和BUG大家见谅,就不设置购买了,觉得有用的自行打点赏。。。

  1. //代码说明:
  2. //本代码由按键精灵9+大漠插件编写,通过文字识别ID的cast机,这段代码功能比较单一,只提供思路。
  3. //有一定编程基础的伙伴们,可以举一反三,实现自动远程开人,召唤国民、咒术跑坑带人、断线重连、智能识别屏幕文字图形内容智能挂机,
  4. //虽然不能完全实现zkok的强大,但是过度期实现zkok的伪bc判定功能还是可以的,当然了由于不是全局判定,涉及代码量会异常庞大,闲的蛋疼的伙伴可以扩充一下功能。
  5. //指令不需要游戏中单独alias,代码中绝对路径、法术、喊话内容等请自行根据实际情况修改。
  6. //游戏中在下方消息窗口中关闭所有对话,防止识别到无用信息。
  7. //可后台,但是需要将识别区域露出来,由于测试的时候是老电脑,有兴趣的伙伴可以通过修改显示模式实现窗口最小化,修改窗口绑定模块中的normal为dx即可。
  8. //其中字库文件请自行制作添加。
  9. //字库说明,目前论坛里的版本为ver1.3.0.2,字体为大部分台湾通用简体字,细明体,字号9号。
  10. //dm_soft.txt为添加全部简体字,用于识别喊话。
  11. //dm_soft2.txt为只添加大小写英文字母,用于识别ID。

  12. PutAttachment "c:C:\Program Files (x86)\按键精灵9","*.*"
  13. set ws=createobject("Wscript.Shell")
  14. ws.run "regsvr32 c:\C:\Program Files (x86)\按键精灵9\dm.dll /s"
  15. set ws=nothing
  16. Delay 1500
  17. Set dm = CreateObject("dm.dmsoft")
  18. ver = dm.Ver()
  19. If len(ver) = 0 Then
  20.     MessageBox "创建对象失败,检查系统是否禁用了vbs脚本权限"
  21.     EndScript
  22. End If
  23. Hwnd = dm.GetMousePointWindow()
  24. dm_ret = dm.BindWindow(Hwnd,"normal","windows","windows",1)
  25. intX = -1

  26. //喊话主程序
  27. Rem sing
  28. If intX = - 1  Then
  29.    //识别游戏中下方消息窗口最后一行绿色字体,可根据实际情况修改识别区域坐标及颜色
  30.    dm_ret = dm.SetDict(0, "dm_soft.txt")
  31.    dm_ret = dm.FindStr(181, 575, 593, 591, "加加加", "9cffa5-000000", 1.0, intX, intY)
  32.    dm_ret = dm.SetDict(0, "dm_soft2.txt")
  33.    ID = dm.Ocr(181, 575, 593, 591, "9cffa5-000000", 1.0)
  34. Call Plugin.Bkgnd.SendString(Hwnd, "hi 通过识别ID的cast机,测试代码,需要cast请tell 加加加")
  35. Delay 200
  36. Call Plugin.Bkgnd.KeyPress(Hwnd,13)
  37.   Delay 200
  38.   Goto sing
  39. End if

  40. //如果识别到ID则跳转到cast机子程序
  41. Rem cast
  42. Call Plugin.Bkgnd.SendString(Hwnd, "sing "&ID&"准备开始,测试号,cast效果见谅。。。。。")
  43. Delay 200
  44. Call Plugin.Bkgnd.KeyPress(Hwnd,13)
  45. Delay 200
  46. //双倍医疗
  47. Call Plugin.Bkgnd.SendString(Hwnd, "cast double_heal on "&ID)
  48. Delay 200
  49. Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
  50. Delay 6000
  51. //强力恢复
  52. Call Plugin.Bkgnd.SendString(Hwnd, "cast restore on "&ID)
  53. Delay 200
  54. Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
  55. Delay 6000
  56. //漂浮
  57. Call Plugin.Bkgnd.SendString(Hwnd, "cast float on "&ID)
  58. Delay 200
  59. Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
  60. Delay 6000
  61. //侦测隐形
  62. Call Plugin.Bkgnd.SendString(Hwnd, "cast detect_invi on "&ID)
  63. Delay 200
  64. Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
  65. Delay 6000  
  66. //强壮
  67. Call Plugin.Bkgnd.SendString(Hwnd, "cast strong on "&ID)
  68. Delay 200
  69. Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
  70. Delay 6000
  71. //硬皮术
  72. Call Plugin.Bkgnd.SendString(Hwnd, "cast stone_skin on "&ID)
  73. Delay 200
  74. Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
  75. Delay 6000
  76. //朦胧术
  77. Call Plugin.Bkgnd.SendString(Hwnd, "cast hazy on "&ID)
  78. Delay 200
  79. Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
  80. Delay 6000
  81. //神圣之力
  82. Call Plugin.Bkgnd.SendString(Hwnd, "cast holy_power on "&ID)
  83. Delay 200
  84. Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
  85. Delay 6000
  86. //天使尘
  87. Call Plugin.Bkgnd.SendString(Hwnd, "cast divine_dust on "&ID)
  88. Delay 200
  89. Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
  90. Delay 6000
  91. //天使之音
  92. Call Plugin.Bkgnd.SendString(Hwnd, "cast angel_voice on "&ID)
  93. Delay 200
  94. Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
  95. Delay 6000
  96. //圣光术
  97. Call Plugin.Bkgnd.SendString(Hwnd, "cast sanctuary on "&ID)
  98. Delay 200
  99. Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
  100. Delay 6000
  101. //月光术
  102. Call Plugin.Bkgnd.SendString(Hwnd, "cast moon_light on "&ID)
  103. Delay 200
  104. Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
  105. Delay 6000
  106. Call Plugin.Bkgnd.SendString(Hwnd, "sing 结束了,就这么草草的完事了,仅供测试。。。。")
  107. Delay 200
  108. Call Plugin.Bkgnd.KeyPress(Hwnd,13)
  109. Delay 5000
  110. //冥想
  111. Call Plugin.Bkgnd.SendString(Hwnd, "meditate")
  112. Delay 200
  113. Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
  114. Delay 15000
  115. intX = -1
  116. Goto sing
  117. //End Sub

  118. //上一妖怪军团:痛苦的软中华
  119. //正式开服后等着你们,重现辉煌....
  120. //PS:黑泽光是猪!
复制代码

评分

1

查看全部评分

发表于 2017-9-30 16:13 | 显示全部楼层
强大,开服后有没zkok用呢?
 楼主| 发表于 2017-10-1 01:10 | 显示全部楼层
不知道,现在内测应该没有人去研究那个
发表于 2017-10-1 07:53 | 显示全部楼层
牛 厉害   太猛了
发表于 2017-10-2 19:27 | 显示全部楼层
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)
发表于 2017-10-2 19:28 | 显示全部楼层
这些代码是什么意思?

还有
Set dm = CreateObject("dm.dmsoft")dm_ret = dm.BindWindow(Hwnd,"normal","windows","windows",1)
发表于 2017-10-2 21:19 | 显示全部楼层
请问有完整的压缩包吗?虽然看的懂一点代码,可是有的东西还是不懂。
 楼主| 发表于 2017-10-2 22:43 | 显示全部楼层
羲皇tomyfree 发表于 2017-10-2 19:27
dm_ret = dm.SetDict(0, "dm_soft.txt")
   dm_ret = dm.FindStr(181, 575, 593, 591, "加加加", "9cffa5- ...

这个是识别tell的对话内容的,如果有人tell 加加加,就获取其中的ID,然后存成变量ID,然后cast ID
 楼主| 发表于 2017-10-2 22:44 | 显示全部楼层
羲皇tomyfree 发表于 2017-10-2 19:28
这些代码是什么意思?

还有

这个是设置后台绑定模式
发表于 2017-10-3 11:04 | 显示全部楼层
colin340 发表于 2017-10-2 22:43
这个是识别tell的对话内容的,如果有人tell 加加加,就获取其中的ID,然后存成变量ID,然后cast ID

能不能详细解释一下?
您需要登录后才可以回帖 登录 | 加入我们

本版积分规则

小黑屋|手机版|万王之王 king of kings

GMT+8, 2024-3-29 14:30

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表