1,first,i come to the location what i want my character come to,and use the code below to record the coordinate string.
Code:
public string GetCoordString()
{
uint playerBase = wowBaseAddr+0xCCA50C;
uint xCoordAddr = playerBase + 0xF0;
uint yCoordAddr = xCoordAddr + 4;
return Memory.ReadFloat(xCoordAddr).ToString() + "," + Memory.ReadFloat(yCoordAddr).ToString();
}
2,then,i run my character to a location nearby,and use the code below to move my character back
Code:
public void ClickToMove(string coord)
{
string x = coord.Substring(0, coord.IndexOf(","));
string y = coord.Substring(coord.IndexOf(",") + 1);
uint CTM_PUSH = CTM_Base + 0x1C;
uint CTM_X = CTM_Base + 0x8C;
uint CTM_Y = CTM_X + 0x4;
uint CTM_Distance =CTM_X+0xC;
Memory.WriteFloat(CTM_X, float.Parse(x));
Memory.WriteFloat(CTM_Y, float.Parse(y));
Memory.WriteUInt(CTM_PUSH, 4);
}
but it's not the location what i want,even not the correct direction
what's wrong with it?