- 大学三年级
- 2453267
- 681
- 15
- 1235 朵
- 2419 个
- 633 个
- 17540
- 2014-04-06
|
1#
t
T
发表于 2022-03-06 16:06
|
|只看楼主
按键精灵一门非常用的脚本编程工具,功能非常强大。按键精灵可以memory和图色可以相互配合使用,脚本会更加强大。图色兄弟:你好! memory兄弟:拟好!!图色兄弟:只要是我眼睛能看到图色脚本,我都能做,你可以吗? memory兄弟:可以。你看不到的,我也能做。图色兄弟:开玩笑吧!我不信,我偏偏不信! memory兄弟:那就来吧!我带你memory遍历全图怪物boss,你看不到一样能识别
下面图片是一张图片,已经是飞到天上,看不到任何怪物和人物。但是我们右边却能出现所有地图数据的图标。证明怪物在被遍历。首先,结合 前面怪物数据分析,我们得到boss属性,遍历怪物,然后判断是否是boss - sub scan_boss
- mon_amount = dm.ReadInt(hwnd, "[EA840C]+30", 0)
- // TracePrint mon_amount
- nn = 0
- For mon_amount
- montype_addr = "[[[EA840C]+10]+" & Hex(nn) & "]+0e8"
- mon_type= dm.ReadInt(hwnd,montype_addr,0)
- call jude_boss
- nn=nn+4
- Next
- End Sub
复制代码我们如何显示boss的,不需要图色呢?我们可以通过一些点击地图call向服务器发送数据,然后服务器会传送数据过来怪物数据。这里用到的某游戏的显示call。显示数据的call里面包含地图数据和x,y,z坐标数据。 - Sub show_boss
- TracePrint map_id &"X="& map_x &" Y================= "& map_y
- dm_ret = dm.WriteInt(hwnd, Hex(addr), 0, map_x)
- dm_ret = dm.WriteInt(hwnd, Hex(addr + 4), 0, map_y)
- dm.AsmClear
- dm.AsmAdd "call "& GameLogicGet_call
- dm.AsmAdd "mov edx,dword ptr ds:[eax]"
- dm.AsmAdd "push 0"& Hex(addr)
- dm.AsmAdd "push 0"& Hex(map_id)
- dm.AsmAdd "mov ecx,eax"
- dm.AsmAdd "call dword ptr ds:[edx+0x844]"
- dm.AsmCall hwnd,1
- End Sub
复制代码memory 读取出来boss判断 - Function 特征码定位地址(模块名, 最大范围, 偏移, 特征码, 数值种类)//注意偏移是10进制,返回值0是地址,1是数值
- base_addr = dm.GetModuleBaseAddr(hwnd,模块名)
- 范围 = Hex(base_addr) & "-" & Hex(base_addr + 最大范围)
- TracePrint 范围
- 特征码= Replace(特征码," ","")//这里是去掉空格
- result = dm.FindData(hwnd,范围,特征码)
- result = split(result,"|")
- count = ubound(result)+1
- traceprint "找到"&count&"个地址"
- TracePrint result(0)
- If count>0 then
- ret1 = Lib.算法.十六进制转十进制(result(0))
- ret2 = 偏移
- 定位地址值 = int(ret1) + int(ret2)
- If 数值种类=0 Then
- 特征码定位地址 = 定位地址值
- TracePrint "call的的地址是:" & Hex(定位地址值)
- ElseIf 数值种类=1 Then
- value = dm.ReadInt(hwnd, Hex(定位地址值), 0)
- TracePrint "最终定位得到的数值:" & Hex(value)
- 特征码定位地址 = value
- Else
- TracePrint "出错,没有找到任何数值"
- 特征码定位地址 = 0
- End if
- End If
- End Function
- Sub warning_boss //读取boss,并且在列表打印输出
- montype_addr = "[[[EA840C]+10]+" & Hex(nn) & "]+0a0"//读取怪物bossX坐标
- boss_x= dm.ReadInt(hwnd,montype_addr,0)
- montype_addr = "[[[EA840C]+10]+" & Hex(nn) & "]+0a4"//读取怪物bossY坐标
- boss_y= dm.ReadInt(hwnd,montype_addr,0)
- Form1.ListBox1.list = boss_name & "," & boss_x & "," & boss_y &","&map_id &"|" & Form1.ListBox1.list
- End sub
- Sub godview
- dm.AsmClear
- dm.AsmAdd "mov esi,dword ptr ds:[0x"& GameLogicGet_call &"]"
- dm.AsmAdd "call esi"
- dm.AsmAdd "mov edx,dword ptr ds:[eax]"
- dm.AsmAdd "mov ecx,eax"
- dm.AsmAdd "mov ecx,eax"
- dm.AsmAdd "call dword ptr ds:[edx+0x83C]"
- dm.AsmCall hwnd,1
- Delay 500
- End sub
- Sub down_land(downland_map,boss_x,boss_y)
- boss_addr = dm.VirtualAllocEx(hwnd, 0, 8, 0)//分配内存空间是为了写入搜索的X,Y坐标
- dm_ret_boss = dm.WriteInt(hwnd, Hex(boss_addr ), 0, boss_x)
- dm_ret_boss = dm.WriteInt(hwnd, Hex(boss_addr + 4), 0, boss_y)
- dm.AsmClear
- dm.AsmAdd "call dword ptr ds:[0x"&GameLogicGet_call &"]"
- dm.AsmAdd "mov ecx,dword ptr ds:[0x"&down_land_parameter&"]"
- dm.AsmAdd "mov edx,dword ptr ds:[eax]"
- dm.AsmAdd "mov ecx,dword ptr ds:[ecx+0x1E8]"
- dm.AsmAdd "mov ecx,dword ptr ds:[ecx+0x7DC]"
- dm.AsmAdd "add ecx,0x3030"
- dm.AsmAdd "push 0"& Hex(boss_addr)
- dm.AsmAdd "push 0"& downland_map
- dm.AsmAdd "mov ecx,eax"
- dm.AsmAdd "call dword ptr ds:[edx+0x830]"
- dm.AsmCall hwnd, 1
- End sub
复制代码
|