本帖最后由 muscipular 于 2021-11-25 00:45 编辑
只支持 21.2a
- local enablePetRandomShot = nil;
- function NLG.SetPetRandomShot(enable)
- if enablePetRandomShot == nil then
- ffi.hook.inlineHook("int (__cdecl *)(uint32_t a)", function(charPtr)
- if enablePetRandomShot ~= true or Char.GetDataByPtr(charPtr, CONST.CHAR_类型) ~= 3 then
- Char.SetDataByPtr(charPtr, CONST.CHAR_BattleCom1, CONST.BATTLE_COM.BATTLE_COM_ATTACK);
- Char.SetDataByPtr(charPtr, CONST.CHAR_BattleCom3, -1);
- else
- ffi.setMemoryDWORD(0x09202B10, 4);
- end
- return 0;
- end, 0x0048612D, 0x14, {
- 0x60,
- 0x52, --push edx
- }, {
- 0x58, --pop eax
- 0x61,
- }, { ignoreOriginCode = true })
- end
- enablePetRandomShot = enable == true;
- end
复制代码
lua.7z
(12.32 KB, 下载次数: 0)
|