Need help with wc3 functions offsets

This is a discussion on Need help with wc3 functions offsets within the Warcraft 3 Hacks, bots and tools board part of the Warcraft 3 forum category; You can use it like I do: Code: // Very simplified. BOOL IsChatboxOpen( ) { DWORD dwGameDLL = (DWORD)GetModuleHandle( "Game.dll" ...

Page 3 of 7 FirstFirst 12345 ... LastLast
Results 21 to 30 of 61
  1. #21
    ZeD's Avatar
    ZeD
    ZeD is offline RoR 0x266E


    Array
    Join Date
    Feb 2007
    Location
    Germany
    Posts
    1,440
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    14
    Reputation
    698
    You can use it like I do:

    Code:
    // Very simplified.
    BOOL IsChatboxOpen( )
    {
          DWORD dwGameDLL = (DWORD)GetModuleHandle( "Game.dll" );
          DWORD Game_ChatboxPtr = (dwGameDLL+0xAD15F0);
          
          return (*(int*)Game_ChatboxPtr ? TRUE:FALSE);
    }
    Returns 1 (TRUE) if the Chatbox is open, otherwise 0 (FALSE) if Chatbox is not open.

    Last edited by ZeD; 01-14-2012 at 05:39 PM.

  2. The Following User Says Thank You to ZeD For This Useful Post:


  3. #22
    wc3noobpl's Avatar
    wc3noobpl is offline Hacker Array
    Join Date
    Dec 2011
    Posts
    154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    189
    GetModuleHandle("Game.dll") == 0
    GetLastError = The specified module could not be found.
    .... "Game.dll" could not be found ? wtf ? )
    Last edited by wc3noobpl; 01-14-2012 at 05:59 PM.

  4. #23
    YourName's Avatar
    YourName is offline THE ONE AND ONLY DARK KNIGHTY


    Array
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    1,553
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    16
    Reputation
    1088
    Quote Originally Posted by wc3noobpl View Post
    GetModuleHandle("Game.dll") == 0
    GetLastError = The specified module could not be found.
    .... "Game.dll" could not be found ? wtf ? )
    You must be inside of Warcraft 3 in order for it to work.
    Providing you with foolish stuff since 2007.

  5. #24
    Farid.Agl's Avatar
    Farid.Agl is offline Advanced Hacker

    Array
    Join Date
    Sep 2011
    Posts
    448
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    8
    Reputation
    322
    I think what Dennis posted is the func that can be used if you are injecting your dll in WC3 process.
    http://faridaghili.ir

  6. #25
    wc3noobpl's Avatar
    wc3noobpl is offline Hacker Array
    Join Date
    Dec 2011
    Posts
    154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    189
    Quote Originally Posted by YourName View Post
    You must be inside of Warcraft 3 in order for it to work.
    y thx, just found this also : c# - PInvoke errors calling external SetWindowsHookEx and GetModuleHandle - Stack Overflow

    so i need inject dll to wc3 process to make GetModuleHandle work ?
    or may be there is another way ? for example what if i will use:

    Process proc = Process.GetProcessById( ProcID ); // ProcID of opened wc3 process.
    if( proc != null )
    {
    foreach( ProcessModule module in proc.Modules )
    {
    if( module.ModuleName.Equals( "game.dll", StringComparison.InvariantCultureIgnoreCase ) )
    {
    // module.BaseAddress == 0ED30000
    }
    }
    }

    so what if i just: moduleHandleOffset = 6F000000 - 0ED30000 = 602D0000
    module.BaseAddress + moduleHandleOffset = 6F000000 ?
    does 6F000000 relative to 0ED30000 ?

  7. #26
    YourName's Avatar
    YourName is offline THE ONE AND ONLY DARK KNIGHTY


    Array
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    1,553
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    16
    Reputation
    1088
    yup that works too.
    Providing you with foolish stuff since 2007.

  8. #27
    Farid.Agl's Avatar
    Farid.Agl is offline Advanced Hacker

    Array
    Join Date
    Sep 2011
    Posts
    448
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    8
    Reputation
    322
    Quote Originally Posted by wc3noobpl View Post
    so i need inject dll to wc3 process to make GetModuleHandle work ?
    or may be there is another way ? for example what if i will use:
    Of course there are other ways, the func Dennis posted was a simple example to give you the idea.
    http://faridaghili.ir

  9. #28
    wc3noobpl's Avatar
    wc3noobpl is offline Hacker Array
    Join Date
    Dec 2011
    Posts
    154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    189
    Quote Originally Posted by GoDLiKe.ON3 View Post
    Of course there are other ways, the func Dennis posted was a simple example to give you the idea.
    Dennis used GetModuleHandle ) also.

    ok thx guys, i think i got enaugh info for today to make it work with my C# prog.

    would be still very appreciate if some one knows wc3 function offset and params for SendGoldWood action,
    so i possibly could make feed bot without emulation F11 + enter, and without blinking FeedDialogBox.
    also function: WriteBackgroundLine or smth, which writes line of text in wc3 game screen, so i could inform FeedStart and FeedStop.

    also may be there is some BOOL value for indicating game ended or not ? and lose or win.

  10. #29
    Farid.Agl's Avatar
    Farid.Agl is offline Advanced Hacker

    Array
    Join Date
    Sep 2011
    Posts
    448
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    8
    Reputation
    322

  11. #30
    wc3noobpl's Avatar
    wc3noobpl is offline Hacker Array
    Join Date
    Dec 2011
    Posts
    154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    189
    Ok, so how does zMap do it ?
    Or zMap also uses emulation F11 + Enter ?
    Also zMap can show background messages..

    so everything is possible, i just need one example )
    Last edited by wc3noobpl; 01-14-2012 at 07:08 PM.

Page 3 of 7 FirstFirst 12345 ... LastLast

Similar Threads

  1. 1.4.2 offsets (help please)
    By james666 in forum Starcraft 2 Coding
    Replies: 7
    Last Post: 01-21-2012, 03:13 AM
  2. [1.26] List of all JASS functions (SEACH)
    By Skino in forum Warcraft 3 Hacks, bots and tools
    Replies: 4
    Last Post: 06-29-2011, 03:01 PM
  3. Replies: 0
    Last Post: 03-28-2010, 10:29 PM
  4. Functions of the forums.
    By Kevin in forum Entertainment
    Replies: 15
    Last Post: 07-30-2007, 07:04 PM
  5. About offsets
    By Range in forum Warcraft 3 forum
    Replies: 0
    Last Post: 05-27-2007, 03:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •