Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct MTStatusBar
- {
- Padding(0x2C48); //exp offset
- double dExp;
- };
- MTStatusBar*(__cdecl* TSingleton_MTStatusBar_GetInstance)() = NULL;
- bool x3NoDelay = false;
- void(__fastcall* CUserLocal_Delay)(void* lpvEcx, void* lpvEdx, void* lpv4, void* lpv8, void* lpvC, void* lpv10, void* lpv14) = NULL; //ret 0014
- void __fastcall CUserLocal_Delay_Hook(void* lpvEcx, void* lpvEdx, void* lpv4, void* lpv8, void* lpvC, void* lpv10, void* lpv14)
- {
- if (x3NoDelay)
- {
- double dExpMax = 95.0, dExpLow = 5.0:
- double dExp = TSingleton_MTStatusBar_GetInstance()->dExp;
- static int count = 0;
- if (dExp > dExpMax || dExpLow > dExp) // D/C bypass when you level up
- return CUserLocal_DelayHook(lpvEcx, lpvEdx, lpv4, lpv8, lpvC, lpv10, lpv14);
- else
- {
- count += 1;
- if (count < 3)
- return;
- }
- count = 0;
- }
- return CUserLocal_DelayHook(lpvEcx, lpvEdx, lpv4, lpv8, lpvC, lpv10, lpv14);
- }
- void x3_NoDelay()
- {
- *(void**)&TSingleton_MTStatusBar_GetInstance = reinterpret_cast<void*>(0x004AEDD0); //
- *(void**)&CUserLocal_Delay = reinterpret_cast<void*>(0x01584A20); //
- DetourFunction(true, reinterpret_cast<void**>(&CUserLocal_Delay), &CUserLocal_Delay_Hook);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement