[QUESTION]How to check when lua_reload menu

User Tag List

Results 1 to 14 of 14
  1. #1
    zys924's Avatar Active Member
    Reputation
    20
    Join Date
    Nov 2009
    Posts
    113
    Thanks G/R
    0/7
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [QUESTION]How to check when lua_reload

    Im trying to keep a registered lua function alive.
    Is there a way to check lua reload action when the player is in-game?
    It is better to achieve this by memory-read or CFunction call.
    thx for helping me!

    [QUESTION]How to check when lua_reload
  2. #2
    mnbvc's Avatar Banned
    Reputation
    120
    Join Date
    Jul 2009
    Posts
    273
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you could set a variable, and if the variable is nil the user did a reload

  3. #3
    zzgw's Avatar Member
    Reputation
    6
    Join Date
    Mar 2008
    Posts
    31
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Currently a function invoked when all default WoW Lua functions are registered is present at 0x00713B10. You can hook that function and reregister your own lua_CFunctions there.

  4. #4
    zys924's Avatar Active Member
    Reputation
    20
    Join Date
    Nov 2009
    Posts
    113
    Thanks G/R
    0/7
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by zzgw View Post
    Currently a function invoked when all default WoW Lua functions are registered is present at 0x00713B10. You can hook that function and reregister your own lua_CFunctions there.
    great help! I'll try it. thx

  5. #5
    zys924's Avatar Active Member
    Reputation
    20
    Join Date
    Nov 2009
    Posts
    113
    Thanks G/R
    0/7
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by zzgw View Post
    Currently a function invoked when all default WoW Lua functions are registered is present at 0x00713B10. You can hook that function and reregister your own lua_CFunctions there.
    Ive got that CFunction. Also, I've used easyhook to hook that function successfully. Whereas none of my own code was called all through whenever the game is running. Nothing wrong seems happen though...
    When is this function called? Or is it a must to hook it right at the process start?

  6. #6
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes. (filler)

  7. #7
    zys924's Avatar Active Member
    Reputation
    20
    Join Date
    Nov 2009
    Posts
    113
    Thanks G/R
    0/7
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by lanman92 View Post
    Yes. (filler)
    yes what..? Hook right at the beginning? I dont think it is the time when WoW Lua functions are called. At lease I know that the 'print' function doesnt exist at the login screen.

  8. #8
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You think that the login screen is something other than lua?

  9. #9
    tesserajk's Avatar Member
    Reputation
    1
    Join Date
    Apr 2007
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One can call the DefaultLogin lua function on the login screen, so it must have been registered before. In my experience I found that I needed to register my own lua functions after login in order for them to be usable in game. I am not entirely sure of why this is. I do mine when the ObjMgr is initialized.

  10. #10
    eLaps's Avatar Active Member
    Reputation
    34
    Join Date
    Sep 2007
    Posts
    123
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can register it every time before you call it.
    Yes I'm evil.

  11. #11
    tesserajk's Avatar Member
    Reputation
    1
    Join Date
    Apr 2007
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Haha. That is one option.

  12. #12
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Guess the most failsafe way is to re-register every call to CGGameUI__EnterWorld
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

  13. #13
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Robske View Post
    Guess the most failsafe way is to re-register every call to CGGameUI__EnterWorld
    That, or you can hook one of the 'LoadScriptFunctions' funcs, and always reload your Lua whenever WoW reloads it's own.

  14. #14
    eLaps's Avatar Active Member
    Reputation
    34
    Join Date
    Sep 2007
    Posts
    123
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    or watch luastate changes

    Code:
            static void* laststate = 0;
            if (laststate != (GetLuaState)()) {
                laststate = (GetLuaState)();
                (FrameScript_RegisterFunction)("ipvtqpfgxkotn", (void*)CallbackFunction);
            }
    Last edited by eLaps; 05-04-2010 at 06:02 AM.

Similar Threads

  1. [QUESTION] How to check druid form?
    By -Ryuk- in forum WoW Memory Editing
    Replies: 5
    Last Post: 10-19-2010, 06:51 PM
  2. [Question] How do I extract .bin maps, when I have editted a zone?
    By Pretzal in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 04-17-2010, 06:33 AM
  3. [Question] How to add an item to the mpq when u finish editing it
    By VIEJO in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 06-30-2008, 12:51 AM
  4. Question: How to edit spells/procs.
    By Messages in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 06-28-2007, 01:17 PM
  5. Question: How to change from priv. serv to blizzards?
    By Bridude in forum World of Warcraft General
    Replies: 5
    Last Post: 03-21-2007, 10:07 PM
All times are GMT -5. The time now is 05:48 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search