not sure if you are brain dead or just can't read in general but I gave him the answer already lmaoQuote:
Don't pay too much attention to this account ruikangzhu1990, is just another clown harambe all over the topics here. PM the thread creator and might have some valid info at least
Quote:
I could give you the direct answer but then you are not learning
Quote:
if you actually read the code you would know whats wrong with it
Quote:
its hooking gettop not local player, localplayer is for animation speed which is outdated anyway.
If that is an answare for you, I believe you are a troll out of finesse. Get some style, would ya :heh:Quote:
not sure if you are brain dead or just can't read in general but I gave him the answer already lmao
its hooking gettop not local player, localplayer is for animation speed which is outdated anyway.Quote:
If that is an answare for you, I believe you are a troll out of finesse. Get some style, would ya :heh:
::MH_CreateHook(((void*) ATA_LUA_GETTOP), &hf_lua_gettop, reinterpret_cast<void**>(&g_fp_lua_gettop))
(void*) ATA_LUA_GETTOP
&hf_lua_gettop
uint64_t __fastcall hf_lua_gettop(void* lua_state)
static ft_lua_gettop g_fp_lua_gettop = nullptr;
return g_fp_lua_gettop(lua_state);
I presume you talk about the offsets to find :Quote:
localplayer is for animation speed which is outdated anyway.
you dont need to know what the parameters for gettop are since its already given, all you have to do is update the addresses and the offsets.Quote:
Ahh, so when I hook with the ATA_LUA_GETTOP
I define 3 parameters:Code:::MH_CreateHook(((void*) ATA_LUA_GETTOP), &hf_lua_gettop, reinterpret_cast<void**>(&g_fp_lua_gettop))
pTarget [in] A pointer to the target function, which will be overridden by the detour function. In our case with ATA_LUA_GETTOP, we were overridden every call to a lua function by casting the address into a (void*)
pDetour[in] A pointer to the detour function, which will override the target function. In our case, we give the address of our function:Code:(void*) ATA_LUA_GETTOP
Question about that though. How do I know that the call I override takes 1 argument?Code:&hf_lua_gettop
ppOriginal [out] A pointer to the trampoline function, which will be used to call the original target function. This is stored inCode:uint64_t __fastcall hf_lua_gettop(void* lua_state)
and we call it at the end of our function by giving it the argument it was supposed to receive.Code:static ft_lua_gettop g_fp_lua_gettop = nullptr;
So I actualy need to do the same thing but for the ADA_LOCAL_PLAYER.Code:return g_fp_lua_gettop(lua_state);
I just need to figure out how many argument the call that I inject is receiving, if that make sense.
I actually removed everything for market, I'm trying to change the animation speed only :/Quote:
I dont remember exactly what the original code does since its been a while but you can take out local player if you dont need to change the animation.
You don't need any lua files to make this code work.Quote:
Good evening, first off: thanks a lot for providing the code! Much appreciated.
So far I managed to create dump -> find gettop adress -> compile and inject dll -> crash game. Sadly the decompiled lua files provided by r3p are no longer available. unpacking the paz files was no issue but as of now I am unable to decompile the luac files. Any help is appreciated.