I have this code written.
I stand in front of the object. nothing happens 
PHP Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Magic;
struct ADDRESSES
{
// Current Player Life
static public uint MainPlayerCurHealthBase = 0x00CF2EE8;
static public uint[] MainPlayerCurHealthOffsets = new uint[] { 0x0, 0xBC, 0x74, 0x4, 0x58 };
// Maximum Player Life
static public uint MainPlayerMaxHealthBase = 0x00CF2EE8;
static public uint[] MainPlayerMaxHealthOffsets = new uint[] { 0x0, 0xBC, 0x74, 0x4, 0x58 };
// Current Player Mana
static public uint MainPlayerCurManaBase = 0x00CF2EE8;
static public uint[] MainPlayerCurManaOffsets = new uint[] { 0x0, 0xBC, 0x74, 0x4, 0x5C };
// Maximum Player Mana
static public uint MainPlayerMaxManaBase = 0x00CF2EE8;
static public uint[] MainPlayerMaxManaOffsets = new uint[] { 0x0, 0xBC, 0x74, 0x4, 0x74 };
// Current Player Position
static public uint MainPlayerPositionX = 0xC88FF0;
static public uint MainPlayerPositionY = 0xC88FF4;
static public uint MainPlayerPositionZ = 0xC88FF8;
// Current Target
static public uint MainPlayerTargetGuid = 0xD4FF50;
static public uint MainPlayerTargetEntryID = 0xD4FF54;
// CTM
static public uint CTM_Action = 0xD01C1C;
static public uint CTM_GUID = 0xD01C20;
static public uint CTM_ENTRYID = 0xD01C24;
static public uint CTM_TARGET_X = 0xD01C8C;
static public uint CTM_TARGET_Y = 0xD01C90;
static public uint CTM_TARGET_Z = 0xD01C94;
// OBJECTS
static public uint clientConnection = 0xEADA68;
static public uint objectManager = 0x462C;
static public uint firstObject = 0xCC;
static public uint nextObject = 0x3C;
static public uint objectGUID = 0x30;
static public uint objectType = 0x10;
static public uint objectX = 0xF0;
static public uint objectY = 0xF4;
static public uint objectZ = 0xF8;
static public uint objectDescriptor = 0x8;
static public uint objectDisplayID = 0x24;
static public uint objectRightClick = 0x486780;
}
namespace WindowsFormsApplication5
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnRead_Click(object sender, EventArgs e)
{
BlackMagic wow = new BlackMagic();
wow.OpenProcessAndThread(SProcess.GetProcessFromProcessName("wow"));
// Leeren der Box
lBoxResult.Items.Clear();
IntPtr wowBase = wow.MainModule.BaseAddress;
uint clientConnection = wow.ReadUInt((uint)wowBase + ADDRESSES.clientConnection);
uint objMgr = wow.ReadUInt(clientConnection + ADDRESSES.objectManager);
uint curObject = wow.ReadUInt(objMgr + ADDRESSES.firstObject);
while (curObject != 0 && (curObject % 2) == 0)
{
uint curType = wow.ReadUInt(curObject + ADDRESSES.objectType);
if (curType == 5)
{
uint curGUID = wow.ReadUInt(curObject + ADDRESSES.objectGUID);
if (Convert.ToInt32(txtGUID.Text) == curGUID && Convert.ToInt32(txtGUID.Text) != 0)
{
RightClickObject(wow, curObject);
}
lBoxResult.Items.Add(curGUID.ToString());
}
curObject = wow.ReadUInt(curObject + ADDRESSES.nextObject);
}
}
// RIGHT CLICK TO OBJECT
private void RightClickObject( BlackMagic wow , uint _curObject)
{
wow.Asm.AddLine("mov ecx, {0}", _curObject);
wow.Asm.AddLine("call {0}", (uint)wow.MainModule.BaseAddress + ADDRESSES.objectRightClick);
wow.Asm.AddLine("retn");
}
private void lBoxResult_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
}
Help please!
thx
EDIT
OK my bad!
PHP Code:
// RIGHT CLICK TO OBJECT
private void RightClickObject( BlackMagic wow , uint _curObject)
{
uint codecave = wow.AllocateMemory();
wow.Asm.Clear();
wow.Asm.AddLine("mov ecx, {0}", _curObject);
wow.Asm.AddLine("call {0}", (uint)wow.MainModule.BaseAddress + ADDRESSES.objectRightClick);
wow.Asm.AddLine("retn");
wow.Asm.InjectAndExecute(codecave);
}