|
;怪物信息
$Youbase=_MemoryRead("0x" & Hex(0x9C1514), $Handle);游戏基址
$gwbase=_MemoryRead("0x" & Hex($Youbase+0x8), $Handle);周围环境基址
$gwbase=_MemoryRead("0x" & Hex($gwbase+0x24), $Handle);周围怪物基址
$gw_sl=_MemoryRead("0x" & Hex($gwbase+0x14), $Handle);周围怪物数量
$gw_slmax=_MemoryRead("0x" & Hex($gwbase+0x24), $Handle);周围怪物最大数量
Local $zwgwlb=_MemoryRead("0x" & Hex($gwbase+0x18), $Handle);周围怪物列表首基址
msgbox(0,"首怪物指针","首指针:"&$zwgwlb)
msgbox(0,"怪物数量","当前数量:"&$gw_sl)
msgbox(0,"怪物数量","最大数量:"&$gw_slmax)
For $I=1 To $gw_sl
$I_I="0x" &Hex($I-1)*4
$gw10=_MemoryRead("0x" & Hex($zwgwlb+$I_I), $Handle,"int");相应位置怪物地址偏移量i*4
msgbox(0,"相应怪物指针i*4","指针1:"&$gw10)
$gwbase0=_MemoryRead("0x" & Hex($gw10+0x4), $Handle) ;相应位置怪物指针
msgbox(0,"相应怪物指针+4","指针:"&$gwbase0)
$gw_gl=_MemoryRead("0x" & Hex($gwbase0+0x27C), $Handle) ;读取怪物距离
Local $Player_Name_Ptr0 = _MemoryRead("0x" & Hex($gwbase0+0x254), $Handle) ;读取怪物名称
$gw_Name = ""
For $NameCount0 = 0 To 32
$tmpName0 = _MemoryRead("0x" & Hex($Player_Name_Ptr0 + $NameCount0 * 2), $Handle, "ushort")
$gw_Name &= Unicode2Asc(Binary($tmpName0))
If $tmpName0 = 0 Then
ExitLoop
EndIf
Next
msgbox(0,"怪物名称","当前怪名:"&$gw_Name)
msgbox(0,"怪物距离","当前距离:"&$gw_gl)
Next
以上是我在完美国际中遍历的周围怪物的代码,能读出怪物的最大数组和当前数量,下一步要读取相应位置怪物指针就不行,总是为0,不知道为什么?请高手指导一下,谢谢 !@ |
|