Hello everyone.
Time to contribute something
My bot died sometimes due to a calculation error... he tried to fly over the great sea :x I was able to fix this error, but in the same time I asked myself how to add an additional security layer to prevent those things in the future. So I decided to reverse the lua_GetMirrorTimerProgress() function and this is the outcome:
Code:
// Static Offsets
static uint currentTime_dword = 0xAC7318;
static uint mtpOffset = 0xAD76F8; // Mirror Timer Progress
// Types:
// 0 = Exhaustion
// 1 = Breath
// 2 = Feign Death
public static double getTimeRemaining(int type)
{
int currentTime = Memory.ReadInt((uint)Memory.MainModule.BaseAddress + currentTime_dword);
uint pMtpArray = (uint)Core.Memory.MainModule.BaseAddress + mtpOffset + (uint)(7 * type * 4); // 7 = ArraySize, 4 = Integer Size :>
int maxTime = Core.Memory.ReadInt(pMtpArray + (uint)4 * 1);
int modifier = Core.Memory.ReadInt(pMtpArray + (uint)4 * 3); // Seems always to be -1
int timerStarted = Core.Memory.ReadInt(pMtpArray + (uint)4 * 6);
return maxTime + modifier * (currentTime - timerStarted);
}
I hope this is helpful for someone
v(o.o)