-
Member
how do i getLocalizedText when i am not enter the world
it's the code below which i used to get the api return value,but when i try to get the value without character logging,client crashes.
how do i get the value?who can share me some code to do this would be appreciated
public string GetLocalizedText(string variable)
{
// offset:
ClntObjMgrGetActivePlayerObj = wowBaseAddr + ClntObjMgrGetActivePlayerObj;
FrameScript__GetLocalizedText = wowBaseAddr + FrameScript__GetLocalizedText;
// Write variable in the allocated memory
uint codeCave = Memory.AllocateMemory(Encoding.UTF8.GetBytes(variable).Length + 1);
Memory.WriteBytes(codeCave, Encoding.UTF8.GetBytes(variable));
String[] asm = new String[]
{
"call " + ClntObjMgrGetActivePlayerObj,
"mov ecx, eax",
"push -1",
"mov edx, " + codeCave + "",
"push edx",
"call " + FrameScript__GetLocalizedText,
"retn",
};
// get value
string varResult = Encoding.ASCII.GetString(InjectAndExecute(asm));
Memory.FreeMemory(codeCave);
return varResult;
}
-
Code:
__asm {
push 0
push -1
mov edx, cave
push edx
call FrameScript_GetText
add esp, 0Ch
mov result, eax
}
cave = write the variable name here
FrameScript_GetText = Wow.exe + 0x004278F0
result = pointer to return value
Last edited by Jadd; 11-28-2011 at 07:20 AM.
-
Post Thanks / Like - 1 Thanks
lsjaf3297 (1 members gave Thanks to Jadd for this useful post)
-
Member
that's perfect,Jadd i would rep you 1000000000000000000 but i can't
thanks a lot
-
Member
btw,0x004278F0,this offset can't be found in the dump thread
-
Contributor
8278F0 FrameScript_GetText
0x8278F0 - 0x400000 = 0x4278F0
-
Private
you must to do this:
1.hook d3d9.
2.use Lua Stack And C++ to Access .(lua access c++ and c++ access lua). In the wow,you only learn c++ access lua.
there is Keywords maybe help you to search:
lua_gettop,lua_settop,lua_open,luaL_loadbuffer,*lua_Reader,lua_pcall,Lua_ToLStri ng
thanks.