I've just got into wow memory, and this forum is the best resource I've found, I just started a bot, and had a lot of success OOP, but have decided to try injected / memory writes. I can get simple function like CGPlayer_C::AcceptQuest to work fine but can't get CTM for the life of me.
My code atm is
Code:
public static void CGPlayer_C__ClickToMove(float x, float y, float z, float precision = 2.5f, Int32 clickType = 0x4)
{
UInt32 clickPos_P = Memory.AllocateMemory(0x4 * 3);
UInt32 interactGuid_P = Memory.AllocateMemory(0x8);
Memory.Write<UInt64>(interactGuid_P, 0);
Memory.Write<float>(clickPos_P, x);
Memory.Write<float>(clickPos_P + 0x4, y);
Memory.Write<float>(clickPos_P + 0x8, z);
string[] asm = new string[]
{
"push, " + precision,
"push, " + clickPos_P,
"push, " + interactGuid_P,
"push, " + clickType,
"mov ecx, " + ObjectManager.Me.getPointer(),
"call " + (uint)Offsets.CTM.CGPlayer_C__ClickToMove,
"retn",
};
Hook.InjectAndExecute(asm);
Memory.FreeMemory(clickPos_P);
Memory.FreeMemory(interactGuid_P);
}
Where CGPlayer_C__ClickToMove = 0x001B7D20
Can anyone help?
Thanks.