找回密码
 注册帐号
查看: 4569|回复: 16

[源码分享] [丝路传说-官服]怪物,物品,玩家,NPC,宠物等遍例,适用1.177

[复制链接]
发表于 2011-4-9 20:27:17 | 显示全部楼层 |阅读模式
本帖最后由 piaorou 于 2011-4-10 12:03 编辑

  1. #Region ;**** 参数创建于 ACNWrapper_GUI ****
  2. #AutoIt3Wrapper_UseUPX=n
  3. #EndRegion ;**** 参数创建于 ACNWrapper_GUI ****

  4. ;------------文章来源
  5. ;------------网站:精灵领域 丝路传说
  6. ;------------网址:w w w . s r o 5 . c o m
  7. ;------------作者:精灵

  8. Opt("TrayMenuMode", 1)
  9. $kernel32 = DllOpen('kernel32.dll')
  10. $GUI = GUICreate('丝路传说 遍历', 780, 200)
  11. $list_belt = GUICtrlCreateCombo('', 10, 15, 700, -1, 3)
  12. $data_input = GUICtrlCreateInput('', 10, 60, 700)
  13. $guolv_input = GUICtrlCreateInput('', 10, 90, 700)
  14. $button = GUICtrlCreateButton('刷新', 710, 90, 65, 23)
  15. GUISetState()
  16. While 1
  17. $msg = GUIGetMsg()
  18. If $msg = -3 Then
  19. DllClose($kernel32)
  20. Exit
  21. EndIf
  22. If $msg = -4 Then Tray()
  23. If $msg = $list_belt Then
  24. GUICtrlSetData($data_input, GUICtrlRead($list_belt))
  25. EndIf
  26. If $msg = $button Then
  27. $ItemIDLIST = ""
  28. $pid = WinGetProcess("SRO_Client")
  29. $mid = memopen($pid)
  30. GUICtrlSetData($list_belt, '')
  31. $eax = memread($mid, 0xEC0B74)
  32. While 1
  33. $ecx = $eax - 0xDC
  34. $type = memread($mid, memread($mid, $ecx))
  35. If memread($mid, $ecx + 0x128) > 0x8 Then
  36. $name = memread($mid, memread($mid, $ecx + 0x114), 'wchar[200]')
  37. Else
  38. $name = memread($mid, $ecx + 0x114, 'wchar[200]')
  39. EndIf
  40. $ID = Hex(memread($mid, $ecx + 0xF8))
  41. $x_y = 'X:' & BitShift(BitAND(memread($mid, $ecx + 0x7c, "short"), 0xFF) * 3 - 0x195, -6) - Int(memread($mid, $ecx + 0x80, "float") / (-10))
  42. $x_y = $x_y & ' Y:' & BitShift(BitShift(memread($mid, $ecx + 0x7c, "short"), 0x8) * 3 - 0x114, -6) - Int(memread($mid, $ecx + 0x88, "float") / (-10))
  43. $itemdata = ""
  44. $itemdata &= " 类型:" & GetTypeName($type)
  45. $itemdata &= " 名称:" & $name
  46. $itemdata &= " 坐标:" & $x_y
  47. $itemdata &= " 在线ID:" & $ID
  48. If $type = 0x009E13D0 Then $itemdata &= " HP:" & memread($mid, $ecx + 0x458) & '/' & memread($mid, $ecx + 0x460)
  49. $itemdata &= " ECX=" & Hex($ecx)
  50. $guolv = GUICtrlRead($guolv_input)
  51. If $guolv = "" Then
  52. GUICtrlSetData($list_belt, $itemdata)
  53. Else
  54. If StringInStr($itemdata, $guolv) > 0 Then
  55. GUICtrlSetData($list_belt, $itemdata)
  56. EndIf
  57. EndIf
  58. $eax = memread($mid, $eax + 0xC)
  59. If $eax = 0 Then ExitLoop
  60. WEnd
  61. $pid = 0
  62. memclose($mid)
  63. EndIf
  64. Switch TrayGetMsg()
  65. Case -13
  66. Tray()
  67. EndSwitch
  68. WEnd
  69. Func Tray()
  70. If BitAND(WinGetState($GUI), 2) Then
  71. WinSetState($GUI, "", @SW_HIDE)
  72. Else
  73. WinSetState($GUI, "", @SW_SHOW)
  74. EndIf
  75. EndFunc ;==>Tray
  76. Func GetTypeName($type)
  77. $typeName = ''
  78. Switch $type
  79. Case 0x009E87A0
  80. $typeName = '自己'
  81. Case 0x009D3CD0
  82. $typeName = '宠物'
  83. Case 0x009EA1C0
  84. $typeName = '玩家'
  85. Case 0x009E24F0
  86. $typeName = 'NCP '
  87. Case 0x009E13D0
  88. $typeName = '怪物'
  89. Case 0x009EFC20
  90. $typeName = '物品'
  91. Case 0x009F8700
  92. $typeName = '传送'
  93. Case Else
  94. $typeName = $type
  95. EndSwitch
  96. Return $typeName & '-' & Hex($type)
  97. EndFunc ;==>GetTypeName
  98. Func memopen($pid)
  99. Local $mid = DllCall($kernel32, 'int', 'OpenProcess', 'int', 0x1F0FFF, 'int', 1, 'int', $pid)
  100. Return $mid[0]
  101. EndFunc ;==>memopen
  102. Func memread($mid, $adress, $type = 'dword')
  103. Local $struct = DllStructCreate($type)
  104. DllCall($kernel32, 'int', 'ReadProcessMemory', 'int', $mid, 'int', $adress, 'ptr', DllStructGetPtr($struct), 'int', DllStructGetSize($struct), 'int', '')
  105. Return DllStructGetData($struct, 1)
  106. EndFunc ;==>memread
  107. Func memwrite($mid, $adress, $hex)
  108. Local $struct = DllStructCreate('byte[' & BinaryLen('0x' & $hex) & ']')
  109. For $i = DllStructGetSize($struct) To 1 Step -1
  110. DllStructSetData($struct, 1, BinaryMid('0x' & $hex, $i, 1), $i)
  111. Next
  112. Local $x = DllCall($kernel32, 'int', 'VirtualProtectEx', 'int', $mid, 'ptr', $adress, 'int', DllStructGetSize($struct), 'dword', 0x40, 'dword*', 0)
  113. DllCall($kernel32, 'int', 'WriteProcessMemory', 'int', $mid, 'int', $adress, 'ptr', DllStructGetPtr($struct), 'int', DllStructGetSize($struct), 'int', 0)
  114. DllCall($kernel32, 'int', 'VirtualProtectEx', 'int', $mid, 'ptr', $adress, 'int', DllStructGetSize($struct), 'dword', $x[5], 'dword*', 0)
  115. EndFunc ;==>memwrite
  116. Func memclose($mid)
  117. DllCall($kernel32, 'int', 'CloseHandle', 'int', $mid)
  118. EndFunc ;==>memclose
复制代码

编译环境 AutoIt
发表于 2011-4-10 03:42:41 | 显示全部楼层
坐标是怎么找到的? LZ 能说下思路吗
回复 支持 反对

使用道具 举报

发表于 2011-4-10 11:25:01 | 显示全部楼层
Au3做##的很少看到
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-4-10 12:09:38 | 显示全部楼层
不好意思。修正1下。
  1. $x_y = 'X:' & BitShift(BitAND(memread($mid, $ecx + 0x7c, "short"), 0xFF) * 3 - 0x195, -6) - Int(memread($mid, $ecx + 0x7c, "float") / (-10))
复制代码



正确的是
  1. $x_y = 'X:' & BitShift(BitAND(memread($mid, $ecx + 0x7c, "short"), 0xFF) * 3 - 0x195, -6) - Int(memread($mid, $ecx + 0x80, "float") / (-10))
复制代码




找坐标算法。来“精灵领域”看吧,陆续会发布所有的算法,找法和公开源代码。
回复 支持 反对

使用道具 举报

发表于 2011-4-11 00:22:15 | 显示全部楼层
这么好的帖子,不顶不行,鄙视不回帖的。
回复 支持 反对

使用道具 举报

发表于 2011-4-15 16:38:15 | 显示全部楼层
搞啥灰机啊!这玩意儿可以用易语言写?!
回复 支持 反对

使用道具 举报

发表于 2011-4-15 19:53:55 | 显示全部楼层
为什么我用CE找不出人物坐标呢?
回复 支持 反对

使用道具 举报

发表于 2011-4-20 15:04:44 | 显示全部楼层
好东西吖!学习了!!!
回复 支持 反对

使用道具 举报

发表于 2011-4-23 10:12:11 | 显示全部楼层
AutoIt写的.学习了.{:1_83:}
回复 支持 反对

使用道具 举报

发表于 2011-4-24 09:53:35 | 显示全部楼层
想学下 但看上去太难了         
回复 支持 反对

使用道具 举报

发表于 2011-4-24 17:54:43 | 显示全部楼层
楼主打广告吗?{:1_83:}
回复 支持 反对

使用道具 举报

发表于 2011-5-6 21:19:17 | 显示全部楼层
好难啊,不是易语言的....
回复 支持 反对

使用道具 举报

发表于 2011-5-7 12:07:13 | 显示全部楼层
我怎么什么都 看不懂呢
回复 支持 反对

使用道具 举报

发表于 2011-5-13 16:14:45 | 显示全部楼层
是啊  搞啥灰机啊! 啥都看不懂
回复 支持 反对

使用道具 举报

发表于 2011-8-27 10:09:35 | 显示全部楼层
先回复一下再说吧,到时找不到就惨了
回复 支持 反对

使用道具 举报

发表于 2011-10-3 10:46:18 | 显示全部楼层
啥语言  怎么发现这里了
回复 支持 反对

使用道具 举报

发表于 2011-10-22 08:43:35 | 显示全部楼层
电脑盲,来学习一下!!!!!!!!!!!!!!!!!!头都老大的哎
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册帐号

本版积分规则

QQ|Archiver|手机版|小黑屋|依人网络官方网站 ( 陕ICP备19025998号-1 )

GMT+8, 2024-4-25 23:52 , Processed in 0.075956 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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