Hello
I have made a CTM function using asm using many other old threads I can get it to move my character, but not where I want it to move to.
here is my code:
Code:
public static void CTM(float precision, float Xloc, float Yloc, float Zloc, ulong interactGuid, int ClickType)
{
// Allocate memory for commands
uint Me = WoW.EndScene.BlackMagic.AllocateMemory(0x4);
uint interactactionGuid = WoW.EndScene.BlackMagic.AllocateMemory(0x8);
uint ClickedPos = WoW.EndScene.BlackMagic.AllocateMemory(0x2000); // Not sure how much, so alot ^^
// Write commands in the allocated memory
WoW.Memory.WriteUInt(Me, Player.Base);
WoW.Memory.WriteUInt64(interactactionGuid, interactGuid);
WoW.Memory.WriteObject(ClickedPos, Xloc + "," + Yloc + "," + Zloc);
WoW.EndScene.Hook_AsmAddLine("push " + precision); // Distance
WoW.EndScene.Hook_AsmAddLine("push " + ClickedPos); // XYZ location
WoW.EndScene.Hook_AsmAddLine("push " + interactactionGuid); // GUID
WoW.EndScene.Hook_AsmAddLine("push "+(uint)ClickType);
WoW.EndScene.Hook_AsmAddLine("mov ecx, [" + Me + "]");
WoW.EndScene.Hook_AsmAddLine("call " + Offsets.LUA.CTMOffset);
WoW.EndScene.Hook_AsmAddLine("retn");
//Inject
WoW.EndScene.Hook_AsmInject();
// Free memory allocated for command
WoW.EndScene.BlackMagic.FreeMemory(Me);
WoW.EndScene.BlackMagic.FreeMemory(interactactionGuid);
WoW.EndScene.BlackMagic.FreeMemory(ClickedPos);
}
I call it with:
Code:
LUA.CTM(2.5f, XLoc, YLox, Xloc, 0, 0x4);
My player moves but not to my desired cords.
Any help?