Wc3 Auto Stats @Bnet Ladder

This is a discussion on Wc3 Auto Stats @Bnet Ladder within the Warcraft 3 Hacks, bots and tools board part of the Warcraft 3 forum category; Use function: const char* GetPlayerName(DWORD slot); do not reinvent bycicle. oohh, there is no such function in wHack 1.3 sources... ...

Page 2 of 6 FirstFirst 1234 ... LastLast
Results 11 to 20 of 57
  1. #11
    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
    Use function:
    const char* GetPlayerName(DWORD slot);

    do not reinvent bycicle.

    oohh, there is no such function in wHack 1.3 sources...
    ok here u go:
    FUNCPTR(GAME_GetPlayerName, CHAR* __fastcall, (DWORD slot), 0x2F8F90)



    for 1.26a
    Last edited by wc3noobpl; 07-27-2012 at 04:17 PM.

  2. #12
    BlauSchlumpf is offline Member
    Array
    Join Date
    Jul 2012
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    6
    Reputation
    1
    Quote Originally Posted by wc3noobpl View Post
    Use function:
    const char* GetPlayerName(DWORD slot);

    do not reinvent bycicle.

    oohh, there is no such function in wHack 1.3 sources...
    ok here u go:
    FUNCPTR(GAME_GetPlayerName, CHAR* __fastcall, (DWORD slot), 0x2F8F90)

    for 1.26a
    Oh so 0x2F8F90 is the right offset. I thought about this in autoit:

    Code:
    HotKeySet("{PAUSE}", "stats")
    Func stats()
       Send("/stats "$playername) 
    EndFunc   ;==>stats
    how would I give the playername from the function FUNCPTR(GAME_GetPlayerName, CHAR* __fastcall, (DWORD slot), 0x2F8F90) to autoit in $playername?
    Would you actually recommend to use autoit for this? (i suppose it's faster/easier than to implement this in 100% c++)

    Also would you recommend to add this to whack because whack already has warden protection? (I found whack's source on d3scene.ru.) Not sure if that script actually needs warden protection because it is not changing any value but grabing only the playersname right?
    Last edited by BlauSchlumpf; 07-27-2012 at 06:11 PM.

  3. #13
    Tracky's Avatar
    Tracky is offline Administrator

    Array
    Join Date
    Dec 2007
    Location
    Germany
    Posts
    9,854
    Mentioned
    158 Post(s)
    Tagged
    2 Thread(s)
    Rep Power
    42
    Reputation
    5606
    Quote Originally Posted by BlauSchlumpf View Post
    Oh so 0x2F8F90 is the right offset. I thought about this in autoit:

    Code:
    HotKeySet("{PAUSE}", "stats")
    Func stats()
       Send("/stats "$playername) 
    EndFunc   ;==>stats
    how would I give the playername from the function FUNCPTR(GAME_GetPlayerName, CHAR* __fastcall, (DWORD slot), 0x2F8F90) to autoit in $playername?
    Would you actually recommend to use autoit for this? (i suppose it's faster/easier than to implement this in 100% c++)

    Also would you recommend to add this to whack because whack already has warden protection? (I found whack's source on d3scene.ru.) Not sure if that script actually needs warden protection because it is not changing any value but grabing only the playersname right?
    You will have to see in which way the name is stored in Warcraft III's memory and then see whether you'll need to convert it or not.
    Again, I do not have much knowledge about Warcraft III and it's way of storing information.
    Using AutoIT is probably a simple task but also requires you to include other libraries which then allow you to read/write memory (Reading is the only thing you'll need at this point though ).

  4. The Following User Says Thank You to Tracky For This Useful Post:


  5. #14
    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 BlauSchlumpf View Post
    Oh so 0x2F8F90 is the right offset. I thought about this in autoit:

    Code:
    HotKeySet("{PAUSE}", "stats")
    Func stats()
       Send("/stats "$playername) 
    EndFunc   ;==>stats
    how would I give the playername from the function FUNCPTR(GAME_GetPlayerName, CHAR* __fastcall, (DWORD slot), 0x2F8F90) to autoit in $playername?
    Would you actually recommend to use autoit for this? (i suppose it's faster/easier than to implement this in 100% c++)

    Also would you recommend to add this to whack because whack already has warden protection? (I found whack's source on d3scene.ru.) Not sure if that script actually needs warden protection because it is not changing any value but grabing only the playersname right?
    Those codes cannot be converted to AutoIt, you have to create a Dll and inject it to WC3 process.
    i suppose it's faster/easier than to implement this in 100% c++
    Faster?! Never.
    http://faridaghili.ir

  6. #15
    BlauSchlumpf is offline Member
    Array
    Join Date
    Jul 2012
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    6
    Reputation
    1
    Well that function is already implemented in whack (in WC3PTrs.h), so how and where would I add the hotkey and the send chat function?

  7. #16
    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
    Maybe there is an infinite loop that monitors hotkeys (GetAsyncKeyState) or maybe a window hook. Just add your desired key to call your desired function,
    http://faridaghili.ir

  8. The Following User Says Thank You to Farid.Agl For This Useful Post:


  9. #17
    BlauSchlumpf is offline Member
    Array
    Join Date
    Jul 2012
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    6
    Reputation
    1
    Quote Originally Posted by GoDLiKe.ON3 View Post
    Maybe there is an infinite loop that monitors hotkeys (GetAsyncKeyState) or maybe a window hook. Just add your desired key to call your desired function,
    Well i found following hook:
    Code:
    KeyboardProc
    ------------------------------------------------------------------------------*/
    LRESULT CALLBACK KeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)
    {    // note: because of this hook we won't receive DLL_PROCESS_DETACH until unhook.
        // i use MessageProc instead of Thread, because Thread not synchronized with
        // some of wc3 functions (for example SendPacket),
        // so i tryed to use windows hook for messages and this works fine,
        // because wc3 also checks windows messages so it dont call other
        // functions while we processing messages, and we can use
        // legal (not hack) windows hook instead of easy detectable wc3 interceptions
        // and hooks (c) wc3noobpl.
    I put the hotkeys within the hook and the function into MapHack.cpp (i suppose it shouldn't make any difference if i put it into MapHack.cpp). Check the code, not sure if my syntax and logic is correct : Ubuntu Pasteb

    Also I
    Not sure if I can just use GetName(DWORD slot) to get the playersname ^^
    Code:
    PrintText(30, "/stats " GetName(DWORD slot));
    The sourcefile WC3.cpp "GetPlayersName" should use a string instead of a char *.
    So you can use the + operator for concentation.

    But anyways we won't be able to use Printtext() for entering /stats ingame because with Printtext()
    Bnet Commands don't work. Using QuequeChatCommand from GhostPlusPlus (bnet.h) is also tricky and won't work
    eventually... So iam thinking about calling the GetPlayerName function from AutoIt. What do you think about that?
    I read that this can be done e.g. by this function: http://www.autoitscript.com/autoit3/...ns/DllCall.htm

    So what would be the .dll process name of whack? I don't know how whack works maybe wc3noobpl explains us?

    And in AutoIt we could use the script above posted.

    Greetings Blauschlumpf
    Last edited by BlauSchlumpf; 07-27-2012 at 11:39 PM.

  10. #18
    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
    Yep.
    6Fxxxxxx is static.

  11. #19
    BlauSchlumpf is offline Member
    Array
    Join Date
    Jul 2012
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    6
    Reputation
    1
    Quote Originally Posted by wc3noobpl View Post
    Use function:
    const char* GetPlayerName(DWORD slot);

    do not reinvent bycicle.

    oohh, there is no such function in wHack 1.3 sources...
    ok here u go:
    FUNCPTR(GAME_GetPlayerName, CHAR* __fastcall, (DWORD slot), 0x2F8F90)

    for 1.26a
    Well the function already exists in WC3.cpp and WC3Ptrs.cpp.
    I can compile Whack 1.3 Sourcecode without errors, but in Warcraft 3 it crashes instantly when you click anything after starting a game. There's a wrong calling convention: http://i.imgur.com/apyLi.jpg

    Can you provide wHack v2.2 Sourcecode or can you help adding "Auto stats" to wHack v2.2 please.

    The idea is to just save the Playersname to an .ini file and then the scripting language "Autoit" can easily use
    the playersname to check the stats of the opponent ingame.

    Writing the playersname to an .ini file would look like this:

    Code:
    #include <stdio.h>
    int main ()
    {
      FILE * pFile;
      pFile = fopen ("C:/run.ini","w");
      if (pFile!=NULL)
      {
    fputs ("[SETTINGS] \n",pFile);
        fputs ("name=/stats " GetName(0060),pFile);
        fclose (pFile);
      }
      return 0;
    }
    Note: I don't know what value the function GetName requires for slot. In WC3.h I read a comment with the hex value of 0x30, so would I have to put that hexvalue or its binary number inside? Also I think latter code would be put into main.cpp, not?

    The .ini Output would look like this:

    Code:
    // run.ini
    
    [[Settings]
    name = /stats Playernamet

    And then our second program "the autoit script" would be just this:

    Code:
    // auto_stats.au3   
    
    $name = IniRead("run.ini", "Settings", "name", "NotFound")
    Sleep(5000)
    Send("{ENTER}")
    Send($name)
    Sleep(400)
    Send("{ENTER}")



    Greetings, Blauschlumpf
    Last edited by BlauSchlumpf; 07-29-2012 at 12:51 PM.

  12. The Following User Says Thank You to BlauSchlumpf For This Useful Post:


  13. #20
    ELiteChiLd- is offline Banned User Array
    Join Date
    Oct 2011
    Location
    United States
    Posts
    1,122
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    624
    Very nice very nice once you get this working youll be awesome hehe

Page 2 of 6 FirstFirst 1234 ... LastLast

Similar Threads

  1. Finding IP of player on Bnet Ladder game
    By undead_warrior in forum Warcraft 3 Hacks, bots and tools
    Replies: 19
    Last Post: 09-08-2010, 04:23 PM
  2. actual wc3 (bnet) maphack which can block ladder games?
    By Boklog in forum Warcraft 3 forum
    Replies: 4
    Last Post: 02-17-2010, 09:42 PM
  3. Bnet Ladder Reset - 3/9/09
    By Archimonde in forum Warcraft 3 forum
    Replies: 6
    Last Post: 03-11-2009, 01:06 AM
  4. best stats in bnet....
    By niko123456 in forum Warcraft 3 forum
    Replies: 18
    Last Post: 06-10-2007, 04:07 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
  •