Pudge 24 Posted March 12, 2023 Share Posted March 12, 2023 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? Link to comment https://wrobot.eu/forums/topic/15094-getting-offsetsopcodes/ Share on other sites More sharing options...
TechMecca 7 Posted March 13, 2023 Share Posted March 13, 2023 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. Link to comment https://wrobot.eu/forums/topic/15094-getting-offsetsopcodes/#findComment-67839 Share on other sites More sharing options...
Pudge 24 Posted March 14, 2023 Author Share Posted March 14, 2023 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? Link to comment https://wrobot.eu/forums/topic/15094-getting-offsetsopcodes/#findComment-67847 Share on other sites More sharing options...
TechMecca 7 Posted March 17, 2023 Share Posted March 17, 2023 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, Link to comment https://wrobot.eu/forums/topic/15094-getting-offsetsopcodes/#findComment-67866 Share on other sites More sharing options...
Pudge 24 Posted March 22, 2023 Author Share Posted March 22, 2023 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 Link to comment https://wrobot.eu/forums/topic/15094-getting-offsetsopcodes/#findComment-67881 Share on other sites More sharing options...
Droidz 2738 Posted March 23, 2023 Share Posted March 23, 2023 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; } Pudge 1 Link to comment https://wrobot.eu/forums/topic/15094-getting-offsetsopcodes/#findComment-67887 Share on other sites More sharing options...
Pudge 24 Posted March 26, 2023 Author Share Posted March 26, 2023 @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 Link to comment https://wrobot.eu/forums/topic/15094-getting-offsetsopcodes/#findComment-67900 Share on other sites More sharing options...
TechMecca 7 Posted March 26, 2023 Share Posted March 26, 2023 @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. Link to comment https://wrobot.eu/forums/topic/15094-getting-offsetsopcodes/#findComment-67901 Share on other sites More sharing options...
Pudge 24 Posted March 27, 2023 Author Share Posted March 27, 2023 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 Link to comment https://wrobot.eu/forums/topic/15094-getting-offsetsopcodes/#findComment-67909 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now