Using Hook to execute code in WoWs mainthread menu

User Tag List

Results 1 to 6 of 6
  1. #1
    flo8464's Avatar Active Member
    Reputation
    30
    Join Date
    Apr 2009
    Posts
    434
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using Hook to execute code in WoWs mainthread

    Hi.

    I am referring a bit to my last thread about hooking.

    I am hooking EndScene now. So long, so good.

    But my code still looks like:

    Code:
    ... EndScene(...)
    {
    if(some_bool_which_indicates_something_should_be_done)
    {
    some_bool_which_indicates_something_should_be_done = false;
    //do some action
    }
    
    return EndScene(...);
    }
    Like Cypher said in my last thread about this...this isnt threadsafe.

    But how are you "telling your hook" that an action should be done and which action?
    I highly doubt anyone hooks EndScene, executes something, removes the hook every time.

    Using Hook to execute code in WoWs mainthread
  2. #2
    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)

    Most injected bots are 'pulse' driven. Which means that all the logic, desicions, actions, etc are performed on a 'pulse'. Typically this 'pulse' is frame-based, which means that for every call to endscene that's one 'pulse'.

    You shouldn't need to 'signal' anything to endscene, the decisions should be made INSIDE your hook.

  3. #3
    flo8464's Avatar Active Member
    Reputation
    30
    Join Date
    Apr 2009
    Posts
    434
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your answer, almost forget this thread.

    Well, I never learned much about different software design patterns, so its something to chew for some time.

    Do you have any idea where I can read more about this / (non-wow related) example code?

    Didn't find anything using Google. :/

    Greetings,
    Flo

  4. #4
    SKU's Avatar Contributor
    Reputation
    306
    Join Date
    May 2007
    Posts
    565
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  5. #5
    flo8464's Avatar Active Member
    Reputation
    30
    Join Date
    Apr 2009
    Posts
    434
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks SKU, will remember this if I might get bored and cintinue working on my bot.

    For testing purposes I thought about using mutex(s) now.

  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 flo8464 View Post
    Thanks SKU, will remember this if I might get bored and cintinue working on my bot.

    For testing purposes I thought about using mutex(s) now.
    Why the **** would you want to involve a mutex in your already over-complicated 'design' (i use the term lightly).

Similar Threads

  1. [Selling] 【Hot Sale】Use 8% Price off Code (MMXCODE) to Buy WOW Gold on MMOXE.com!
    By Ray Mmoxe in forum World of Warcraft Buy Sell Trade
    Replies: 2
    Last Post: 03-23-2016, 04:15 AM
  2. [Trading] WTT Reach full game Code for. WoW gamekey never used!
    By poblo in forum World of Warcraft Buy Sell Trade
    Replies: 0
    Last Post: 01-16-2012, 09:53 PM
  3. Replies: 11
    Last Post: 12-23-2010, 09:30 PM
  4. Using proxy/etc. ? to log into wow
    By minim in forum World of Warcraft General
    Replies: 0
    Last Post: 10-15-2007, 01:36 PM
All times are GMT -5. The time now is 02:41 PM. 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