PHP Code:
BlackMagic _magic = Globals.Magic;
if (_magic.IsProcessOpen)
{
while (true)
{
//check the looting window is opened
if (_magic.ReadInt64((uint)0xB71B48) != 0L)
{
uint codeCave = _magic.AllocateMemory();
try
{
_magic.Asm.Clear();
_magic.Asm.AddLine("mov ecx, 0");
//call auto loot
_magic.Asm.AddLine("call " + (uint)0x4C1FA0);
_magic.Asm.AddLine("retn");
_magic.Asm.InjectAndExecute(codeCave);
_magic.Asm.Clear();
}
catch (Exception ee)
{
MessageBox.Show(ee.ToString());
}
_magic.FreeMemory(codeCave);
}
Thread.Sleep(1000);
}
}
else
{
_magic.OpenProcessAndThread(SProcess.GetProcessFromProcessName("Wow"));
}
Most of the time it worked, sometimes crash,could anyone tell me why ,thx!