I want to show the creating new character sence by calling the lua function,so please help me when i push the button "create new character" ,which lua function will be triggered ? and what the function address is?
I want to show the creating new character sence by calling the lua function,so please help me when i push the button "create new character" ,which lua function will be triggered ? and what the function address is?
CreateCharacter 0x483210
Maybe ?
Here is a dump of all available lua functions before the world is entered: http://nopaste.org/p/aW1BOojUbb
thanks flo8464
but i want to show the creating character sence before creating new character.
just like this lua function: RequestRealmList 0x480d90
when i call RequestRealmList, a new frame with all of the realms will be shown.
I'm not sure about this, but I think you have to use SetGlueXML or something like that.
It's SetCurrentScreen. 0x47ED60.
Last edited by lanman92; 09-05-2009 at 11:55 AM.
DoString("SetGluescreen(\"charcreate\")");
you have to run that from the render thread it won't work with remote threads it will throw an ASyncRead != FALSE exception.
Wasn't there a thread on that issue a LONG time ago?
There was one on gd, I started it I. Was having problems calling SetGluescreen but it was because wows mainthread keeps acessing the models or something
Thanks to Nesox
DoString("SetGluescreen(\"charcreate\")"); it works!
Where can i get more information about "SetGluescreen" ?
Last edited by leather; 09-05-2009 at 08:29 PM.
I don't think that's built into the code. Might be in Interface/ files inside locale.mpq. That'd be my guess.
I'm rightInterface/GlueXML/GlueParent.lua. Turns out SetGlueScreen is just a wrapper around SetCurrentScreen.
Last edited by lanman92; 09-05-2009 at 09:23 PM.
Code:int __cdecl lua_SetCurrentScreen(lua_State *L) { char ST10_1_0; // ST10_1@0 lua_State *refL; // esi@1 int result; // eax@2 char *pszScreen; // eax@3 refL = L; if ( sub_801BA0() ) { pszScreen = FrameScript_ToString(refL, 1, 0); CGlueMgr__UpdateCurrentScreen(pszScreen); AsyncFileReadWaitAll(); result = 0; } else { FrameScript_DisplayError(refL, "Usage: SetCurrentScreen(\"screen\")", ST10_1_0); result = 0; } return result; }The relevant stuff.Code:.text:0047ED60 ; <"Usage: SetCurrentScreen("screen")"> .text:0047ED60 ; Attributes: bp-based frame .text:0047ED60 .text:0047ED60 ; int __cdecl lua_SetCurrentScreen(lua_State *L) .text:0047ED60 lua_SetCurrentScreen proc near ; DATA XREF: .data:01036D54o .text:0047ED60 .text:0047ED60 L = dword ptr 8 .text:0047ED60 .text:0047ED60 000 push ebp .text:0047ED61 004 mov ebp, esp .text:0047ED63 004 push esi .text:0047ED64 008 mov esi, [ebp+L] .text:0047ED67 008 push 1 .text:0047ED69 00C push esi .text:0047ED6A 010 call sub_801BA0 ; Call Procedure .text:0047ED6F 010 add esp, 8 ; Add .text:0047ED72 008 test eax, eax ; Logical Compare .text:0047ED74 008 jnz short loc_47ED89 ; Jump if Not Zero (ZF=0) .text:0047ED76 008 push offset aUsageSetcurren ; "Usage: SetCurrentScreen(\"screen\")" .text:0047ED7B 00C push esi ; L .text:0047ED7C 010 call FrameScript_DisplayError ; Call Procedure .text:0047ED81 010 add esp, 8 ; Add .text:0047ED84 008 xor eax, eax ; Logical Exclusive OR .text:0047ED86 008 pop esi .text:0047ED87 004 pop ebp .text:0047ED88 000 retn ; Return Near from Procedure .text:0047ED89 ; --------------------------------------------------------------------------- .text:0047ED89 .text:0047ED89 loc_47ED89: ; CODE XREF: lua_SetCurrentScreen+14j .text:0047ED89 008 push 0 ; length .text:0047ED8B 00C push 1 ; index .text:0047ED8D 010 push esi ; L .text:0047ED8E 014 call FrameScript_ToString ; Call Procedure .text:0047ED93 014 push eax .text:0047ED94 018 call CGlueMgr__UpdateCurrentScreen ; Call Procedure .text:0047ED99 018 add esp, 10h ; Add .text:0047ED9C 008 call AsyncFileReadWaitAll ; <"AsyncFileReadWaitAll() Leave", "AsyncFileReadWaitAll() Enter"> .text:0047EDA1 008 xor eax, eax ; Logical Exclusive OR .text:0047EDA3 008 pop esi .text:0047EDA4 004 pop ebp .text:0047EDA5 000 retn ; Return Near from Procedure .text:0047EDA5 lua_SetCurrentScreen endp
Strange, my output is showing something different....
Most notably, the call to LuaError has two params...Code:// <"Usage: SetCurrentScreen("screen")"> int __cdecl lua_SetCurrentScreen(void *pState) { int Result; // eax@2 char *pScreen; // eax@3 if ( sub_801BA0(pState, 1) ) { pScreen = LuaToString(pState, 1, 0); sub_47B500(pScreen); AsyncFileReadWaitAll(); Result = 0; } else { LuaError(pState, "Usage: SetCurrentScreen(\"screen\")"); Result = 0; } return Result; }
EDIT:
@Apoc, do you really need the instruction comments enabled? :s
EDIT:
The disassembly agrees with me. It says you fail:
push offset aUsageSetcurren ; "Usage: SetCurrentScreen(\"screen\")"
push esi
call LuaError
Last edited by Cypher; 09-06-2009 at 01:03 AM.
Na, don't need them enabled at all. Just lets me skim through ASM much faster with it enabled. (Saves me ~5-10s per function I read)
Also, I'm fairly certain its just the difference in HexRays versions. It is passing 2 args to the sub_801BA0 call. HexRays just sees it not used, and assumes it's 'bogus'. (Complete, utter, speculation there...)
Edit; Er... that function call is just a sanity check anyway.
Last edited by Apoc; 09-06-2009 at 01:58 AM.
Is there a cracked hexrays? That's pretty nice looking.