Obtaining WoW Events menu

Shout-Out

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    nitrogrlie's Avatar Member
    Reputation
    11
    Join Date
    Oct 2009
    Posts
    81
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Obtaining WoW Events

    Besides:

    a) Hooking FrameScript_SignalEvent()
    b) Intercepting server PACKETS (and I realize that not all events generate their own packets anyways)

    Is there a way to obtain wow events (combat and non-combat)?

    I was thinking something along the lines of perhaps registering a chatframe to receive all events and using some form of Lua functions to obtain all those messages, but I'm not sure if that's possible. Thoughts?

    Obtaining WoW Events
  2. #2
    berserk85's Avatar Member
    Reputation
    8
    Join Date
    Apr 2008
    Posts
    35
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by berserk85 View Post
    Moron.

    He already said he doesn't want to hook SignalEvent...

    @The OP:
    What you suggested (registering events on a frame then passing them through) is indeed possible. Give it a go.

  4. #4
    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)
    It's quite possible. Just make sure you take into account that all frames, and functions, are wiped during the login process. (Char select -> Lua is wiped -> you enter the world)

    You'll need to re-register things.

  5. #5
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Apoc View Post
    It's quite possible. Just make sure you take into account that all frames, and functions, are wiped during the login process. (Char select -> Lua is wiped -> you enter the world)

    You'll need to re-register things.
    I use a per-frame re-register (I could throttle it, but it doesn't seem to be hurting framerate, so why bother?). That way I don't worry about it -- it "just works." The interesting thing was finding a non-custom function to act as a "relay" that was available at both the glue screens AND in-game. That was fun.

    You can hook the event broadcaster, but I have yet to find a clean, pure-hooking way to get all events (combat and non-combat) in a single hook. I found the fork point where the C_L_E and C_L_E_U events split off, so I might have been able to hook that, but I only have four debug break registers to use...

    (ninja-edited to remove something stoopid I said )
    Last edited by amadmonk; 01-07-2010 at 01:38 PM.
    Don't believe everything you think.

  6. #6
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by amadmonk View Post
    I use a per-frame re-register (I could throttle it, but it doesn't seem to be hurting framerate, so why bother?). That way I don't worry about it -- it "just works." The interesting thing was finding a non-custom function to act as a "relay" that was available at both the glue screens AND in-game. That was fun.

    You can hook the event broadcaster, but I have yet to find a clean, pure-hooking way to get all events (combat and non-combat) in a single hook. I found the fork point where the C_L_E and C_L_E_U events split off, so I might have been able to hook that, but I only have four debug break registers to use...

    (ninja-edited to remove something stoopid I said )
    What do you mean you needed to find a "relay" function? Couldn't you just register your own?

    As for doing it per-frame, it's not hard to detect when you need to reinject your Lua stuff. From memory I did it whenever the LocalPlayer pointer changed, or the global InGame boolean changed, and I never had problems.

    But yes, you're right, the impact is minimal.

  7. #7
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Remember that I don't register any Lua functions at all; I use DRx hooks on existing functions as a piggyback. There are some Lua functions that are simply never, ever called by the cilent (nor by any of the addons I'm using), so they become my victims.

    The tricky bit was finding a Lua function that's available at both the glue screens and in-game, since there are different sets of functions available at different times. But this was only tricky for, like, 5 minutes.

    Yeah, I forgot, I think my re-register is inside an "if playerguid != 0" block. So actually that's a bug; I'll use your suggestion and just do it when the guid changes (which should be sufficient to catch all in world/out of world transitions, including glue screens).
    Don't believe everything you think.

  8. #8
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by amadmonk View Post
    Remember that I don't register any Lua functions at all; I use DRx hooks on existing functions as a piggyback. There are some Lua functions that are simply never, ever called by the cilent (nor by any of the addons I'm using), so they become my victims.

    The tricky bit was finding a Lua function that's available at both the glue screens and in-game, since there are different sets of functions available at different times. But this was only tricky for, like, 5 minutes.

    Yeah, I forgot, I think my re-register is inside an "if playerguid != 0" block. So actually that's a bug; I'll use your suggestion and just do it when the guid changes (which should be sufficient to catch all in world/out of world transitions, including glue screens).
    Eeew. Why do you use DRx hooks on existing functions? That seems so nasty.

  9. #9
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, two reasons.

    1) To avoid registering a Lua function. This was during my not-infrequent paranoid phases. I know, I know, it's easy to carve a code cave out of a text section and register that. But... I didn't want to register anything, and I don't have to.

    2) Because it was my use-case for implementing DRx hooks, which I was really interested in at the time. It would be easy for me change my code to standard hooks or a registered function, but hey... it works perfectly, so why not keep with a winner? If they ever push out a silent Warden check for "unauthorized registered Lua functions," I'll be the one guy who DOESN'T get nailed by that check...
    Don't believe everything you think.

  10. #10
    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)
    Code:
    /script local frame = CreateFrame('Frame');
    frame:RegisterAllEvents(); 
    frame:SetScript('OnEvent', function(self, event, ...)  
           print(event, ...);  
    end);
    "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

  11. #11
    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)
    Meh; I just take all the major headaches out of the equation. WoW has a func at 0x004B7B70 to re-register everything when you log in. (LoadScriptFunctions)

    Just hook that, viola. You have automatic registration.

  12. #12
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by amadmonk View Post
    Well, two reasons.

    1) To avoid registering a Lua function. This was during my not-infrequent paranoid phases. I know, I know, it's easy to carve a code cave out of a text section and register that. But... I didn't want to register anything, and I don't have to.

    2) Because it was my use-case for implementing DRx hooks, which I was really interested in at the time. It would be easy for me change my code to standard hooks or a registered function, but hey... it works perfectly, so why not keep with a winner? If they ever push out a silent Warden check for "unauthorized registered Lua functions," I'll be the one guy who DOESN'T get nailed by that check...
    1. I can understand and appreciate that. But your alternative is using DR hooks? o.O

    2. And what if they push out a silent check for DR hooks?

    Just sayin'...


    Originally Posted by Robske View Post
    Code:
    /script local frame = CreateFrame('Frame');
    frame:RegisterAllEvents(); 
    frame:SetScript('OnEvent', function(self, event, ...)  
           print(event, ...);  
    end);
    ^ This.

    Originally Posted by Apoc View Post
    Meh; I just take all the major headaches out of the equation. WoW has a func at 0x004B7B70 to re-register everything when you log in. (LoadScriptFunctions)

    Just hook that, viola. You have automatic registration.
    Rofl, that's so unnecessary. Just use the player pointer and InGame bool. >.<

  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 Cypher View Post
    1. I can understand and appreciate that. But your alternative is using DR hooks? o.O

    2. And what if they push out a silent check for DR hooks?

    Just sayin'...




    ^ This.



    Rofl, that's so unnecessary. Just use the player pointer and InGame bool. >.<
    I'd rather have it called whenever the game actually reloads scripts, rather than check something every frame for no apparent reason. (The LoadScriptFunctions func is only called in CGGameUI__EnterWorld, which is pretty obvious as to what it's for)

  14. #14
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Apoc View Post
    I'd rather have it called whenever the game actually reloads scripts, rather than check something every frame for no apparent reason. (The LoadScriptFunctions func is only called in CGGameUI__EnterWorld, which is pretty obvious as to what it's for)
    The 'checks' evaluate to a half-dozen instructions. (Checking two variables) The performance impact is negligible.

    And it's not a check for 'no apparent reason'. First off, hooks are dangerous, so avoiding them in order to err on the side of caution is usually a good idea. This is especially true of engine hooks. Second, if you're using DR hooks, which would be the 'safest' hook available without going overboard and sacrificing performance (by using page guard hooks or something) you only have 4 at your disposal.

    Why would you waste one on something unnecessary? Would it be better utilized adding functionality that can't be added any other way? (Like adding a hack of some sort)

  15. #15
    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 Cypher View Post
    The 'checks' evaluate to a half-dozen instructions. (Checking two variables) The performance impact is negligible.

    And it's not a check for 'no apparent reason'. First off, hooks are dangerous, so avoiding them in order to err on the side of caution is usually a good idea. This is especially true of engine hooks. Second, if you're using DR hooks, which would be the 'safest' hook available without going overboard and sacrificing performance (by using page guard hooks or something) you only have 4 at your disposal.

    Why would you waste one on something unnecessary? Would it be better utilized adding functionality that can't be added any other way? (Like adding a hack of some sort)
    Who still hacks this game?

    There are other ways to do the same thing; but they too can cause issues. Not to mention that the way I do it, I'm 100% sure that my functions are being registered on top of WoW's (if in the odd case that I need/want to to override one of WoW's Lua funcs), since the local player's pointer can be non-null before the WoW reregisters everything. (The 'InGame' bool is also set before WoW registers stuff last I checked.)

Page 1 of 2 12 LastLast

Similar Threads

  1. [Code] How to hook wow events!
    By -Ryuk- in forum WoW Memory Editing
    Replies: 10
    Last Post: 10-12-2016, 12:42 AM
  2. [Selling] No Longer Obtainables WoW ; Cheap and Rare WoW Collection Stuffs for Players
    By Nim-Gi in forum WoW-US Account Buy Sell Trade
    Replies: 1
    Last Post: 01-03-2015, 03:03 PM
  3. [Selling] No Longer Obtainables WoW ; Cheap and Rare WoW Collection Stuffs for Players
    By Nim-Gi in forum WoW-EU Account Buy Sell Trade
    Replies: 1
    Last Post: 01-03-2015, 11:04 AM
  4. Hooking WoW Events without LUA-Handler Proc?
    By berlinermauer in forum WoW Memory Editing
    Replies: 1
    Last Post: 01-03-2014, 08:46 PM
  5. Help Obtaining wow path from the directory
    By rbbroncoman in forum Programming
    Replies: 2
    Last Post: 11-13-2008, 08:19 PM
All times are GMT -5. The time now is 01:46 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