I've searched, but have not found anything which fixes my problem. From what I've read (and I've read a lot in search of this), I'm doing this exactly how I should be.
I'm implementing a simple CTM method to my bot via memory writes with Blackmagic in C#. I've written my XYZ values, then written 0x4 to action type. My character DOES move, but the XYZ values do not seem to have worked properly, as I do not move towards the point specified.
If I click somewhere in-game first (so the game sets those XYZ values I assume) and then call this function, it will move to where I last clicked and disregard the values that I have written.
Code:
public static uint ctmBase = 0x0CB9788;
enum ctmOffsets : uint
{
turnScale = 0x4,
distance = 0xC,
action = 0x1C,
guid = 0x20,
x = 0x74,
y = 0x78,
z = 0x7C,
}
public static void MoveTo(float x, float y, float z)
{
Mem.WriteFloat((ctmBase + (uint)ctmOffsets.x), x);
Mem.WriteFloat((ctmBase + (uint)ctmOffsets.y), y);
Mem.WriteFloat((ctmBase + (uint)ctmOffsets.z), z);
Mem.WriteInt((ctmBase + (uint)ctmOffsets.action), 4);
}
I do realize how tedious these questions are, but I have searched and searched and have not solved my problem.