public static string GetText(string commandline)
{
try
{
string s = commandline;
if (s.Replace(" ", "").Length <= 0)
return "";
uint address = wManager.Wow.Memory.WowMemory.Memory.AllocateMemory(Encoding.UTF8.GetBytes(s).Length + 1);
if (address <= 0U)
return "";
//uint ClntObjMgrGetActivePlayerObj = 0x4038F0;
//uint FrameScript__GetLocalizedText = 0x7225E0;
uint FrameScript_GetText = 0x0819d40;
wManager.Wow.Memory.WowMemory.Memory.WriteBytes(address, Encoding.UTF8.GetBytes(s));
string[] asm = new string[]
{
"push 0",
"push -1",
"mov edx, " + address,
"push edx",
"call " + (FrameScript_GetText + wManager.Wow.Memory.WowMemory.Memory.MainModuleAddress) ,
"add esp, 0Ch",
"retn"
};
string _Text = Encoding.UTF8.GetString(wManager.Wow.Memory.WowMemory.InjectAndExecute(asm,true));
wManager.Wow.Memory.WowMemory.Memory.FreeMemory(address);
return _Text;
}
catch (Exception ex)
{
Logging.WriteError("[GetText]: error " + ex);
}
return "";
}
This code just kills the client wow, I don't understand what's wrong with it, it's very similar to the code from the forum link you posted on