/// <summary> /// Target an player/mob usefull for friendly players and bg peps. /// </summary> public void Target() { try { uint CodeLocation = 0x0725AA0; uint codeCave = Memory.AllocateMemory(0x108); ThreadManager.suspendMainThread(objectList.getProcessId()); Memory.WriteUInt64(codeCave + 0x100, GUID); Memory.Asm.Clear(); Memory.Asm.AddLine("MOV EAX,[0x{0}]", (codeCave + 0x100 + 0x4).ToString("X")); Memory.Asm.AddLine("PUSH EAX"); Memory.Asm.AddLine("MOV EAX,[0x{0}]", (codeCave + 0x100 + 0x0).ToString("X")); Memory.Asm.AddLine("PUSH EAX"); Memory.Asm.AddLine("CALL 0x{0}", CodeLocation.ToString("X")); Memory.Asm.AddLine("ADD ESP, 0x08"); Memory.Asm.AddLine("RETN"); Memory.Asm.InjectAndExecute(codeCave); Memory.FreeMemory(codeCave); Thread.Sleep(50); ThreadManager.resumeMainThread(objectList.getProcessId()); objectList.DoString("TargetUnit(\"playertarget\")"); } catch { }; }
public void SelectTarget(UInt64 GUID) { wow.WriteUInt64(0x00C4EB48, GUID); }
/// <summary> Move the player to the given guid npc, object or whatever and iteract with it. /// </summary> <param name="pos">Vector3 containing the X,y & Z coordinates</param> <param /// name="guid">guid of the entity</param> <param name="action">CTM Interaction to perform</param> public static void InteractWithGUID(Vector3 pos, ulong guid, InteractionType action) { AmeisenLogger.Instance.Log(LogLevel.DEBUG, $"Interacting[{action}]: X [{pos.X}] Y [{pos.Y}] Z [{pos.Z}] GUID [{guid}]", "AmeisenCore"); BlackMagic.WriteUInt64(Offsets.ctmGUID, guid); MovePlayerToXYZ(pos, action); }