March 12, 20233 yr Hello how can i get offsets from wow memory? I need a methods which will return NetClient connection state, num characters in charselect menu, get characters names from characterselect menu or charractercreate functions for different wow versions, but i can't get returned value from Lua.DoStiring, while bot is not in game. The only way is reading data from wow memory? If is true, how i can get this offsets?
March 13, 20233 yr You need to use GetText to read if you are not ingame. here is the c++ code : note GetLocalizedText uses active client player object, but GetText doesnt.
March 14, 20233 yr Author 21 hours ago, Nax said: You need to use GetText to read if you are not ingame. here is the c++ code : note GetLocalizedText uses active client player object, but GetText doesnt. But how i can return value to variable?
March 17, 20233 yr So LuaDoString is FrameScriptExecute, and it casts the results of your code to a variable, then GetLocalizedText reads that veriable (@druids) just has LuaDoString return info. instead of two functions, he combinded both together. you need to write the asm for GetText Offset = 0x0819d40, Sample Asm code : https://www.ownedcore.com/forums/world-of-warcraft/world-of-warcraft-bots-programs/wow-memory-editing/407197-getlocalizedtext-problem.html not gonna lie, its kinda funny that GetLocalizedText uses GetText,
March 22, 20233 yr Author 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
March 23, 20233 yr Hi, the correct code is : public static string GetTextFixed(string commandline) { uint FrameScript_GetText = 0x0819d40; var commandByte = System.Text.Encoding.UTF8.GetBytes(commandline + "\0"); var luaGetLocalizedTextSpace = wManager.Wow.Memory.WowMemory.AllocData.Get(commandByte.Length); var rCodecave = wManager.Wow.Memory.WowMemory.AllocData.Get(IntPtr.Size); if (luaGetLocalizedTextSpace <= 0) return ""; wManager.Wow.Memory.WowMemory.Memory.WriteBytes(luaGetLocalizedTextSpace, commandByte); wManager.Wow.Memory.WowMemory.Memory.WritePtr(rCodecave, 0); var asm = new[] { wManager.Wow.Memory.WowMemory.CallWrapperCodeRebaseEsp(FrameScript_GetText, 0x0C, luaGetLocalizedTextSpace, -1, 0), "mov ecx, " + rCodecave, "mov [ecx], eax", wManager.Wow.Memory.WowMemory.RetnToHookCode }; wManager.Wow.Memory.WowMemory.InjectAndExecute(asm); var sResult = string.Empty; var a = wManager.Wow.Memory.WowMemory.Memory.ReadPtr(rCodecave); if (a > 0) sResult = wManager.Wow.Memory.WowMemory.Memory.ReadStringUTF8(a); if (string.IsNullOrEmpty(sResult)) sResult = string.Empty; wManager.Wow.Memory.WowMemory.AllocData.Free(luaGetLocalizedTextSpace); wManager.Wow.Memory.WowMemory.AllocData.Free(rCodecave); return sResult; }
March 26, 20233 yr Author @Droidz thank you for this snippet, it works and will be very useful for me. But old wrobot versions, like "WRobot_7.3.5_26365_final" does not have such class like "AllocData". Which method from the old libraries can replace the missing one? Spoiler
March 26, 20233 yr @Pudgeto be honest, that code might not work with patch 7.3.5, the code above is for wotlk. May need to use Ida and see what GetText asm is as they might of changed it.
March 27, 20233 yr Author On 3/26/2023 at 8:52 AM, Nax said: @Pudgeto be honest, that code might not work with patch 7.3.5, the code above is for wotlk. May need to use Ida and see what GetText asm is as they might of changed it. Hey, i understand it, but i cannot check new offsets because this snippet doesnot work on old wrobot legion
Create an account or sign in to comment