Warcraft 3 PrintChat, SendPacket?

This is a discussion on Warcraft 3 PrintChat, SendPacket? within the Warcraft 3 Hacks, bots and tools board part of the Warcraft 3 forum category; Hello everyone! I am looking for a way to send colored chat text Wc3 game or PvPGN ladder using a ...

Results 1 to 2 of 2
  1. #1
    LPVOID's Avatar
    LPVOID is offline Newbie
    Array
    Join Date
    Oct 2016
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    3
    Reputation
    2

    Lightbulb Warcraft 3 PrintChat, SendPacket?

    Hello everyone!
    I am looking for a way to send colored chat text Wc3 game or PvPGN ladder using a mixtape plugin.

    So far I've come to a conclusion that I need to send W3GS_CHAT_FROM_HOST or W3GS_CHAT_TO_HOST packet.
    I am more inclined to the latter, because the host is always a bot and not me.

    All I could find on internet was following function implemented here

    Code:
    /*------------------------------------------------------------------------------
        SendPacket
    ------------------------------------------------------------------------------*/
    
    void SendPacket(BYTE* packetData, DWORD size)
    {
        // @warning: this function thread-unsafe, do not use it in other thread.
        // note: this is very useful function, in fact this function
        // does wc3 ingame action, so you can use it for anything you want,
        // including unit commands and and gameplay commands,
        // i suppose its wc3 single action W3GS_INCOMING_ACTION (c) wc3noobpl.
    
    
        if(!IsInGame())
            return;
    
    
        Packet packet;
        memset(&packet, 0, sizeof(Packet));
    
    
        packet.PacketClassPtr = (DWORD)GAME_PacketClassPtr; // Packet Class
        packet.PacketData = packetData;
        packet.Size = size;
        packet._3 = 0xFFFFFFFF;
        GAME_SendPacket(&packet, 0);
    }
    I have tried to use it and send the following test packet
    Code:
        BYTE packet[20];
        packet[0] = 247;
        packet[1] = 15;
        packet[2] = (unsigned char)20; // size
        packet[3] = (unsigned char)(20 >> 8);
        packet[4] = 10; // number of receivers
        packet[5] = 1;
        packet[6] = 2;
        packet[7] = 3;
        packet[8] = 4;
        packet[9] = 5;
        packet[10] = 7;
        packet[11] = 8;
        packet[12] = 9;
        packet[13] = 10;
        packet[14] = 11;
        packet[15] = 1; // sender
        packet[16] = 32; // flag
        packet[17] = 'H';
        packet[18] = 'i';
        packet[19] = '\0';
        SendPacket(packet, 20);
    But it failed. I guess there's a reason for comments in the above function, so it, most likely, only applies for W3GS_INCOMING_ACTION.
    The problem now is I cannot find a WC3 function to send these packets.
    I am not very skilled at reversing. So I appeal for your help, my D3Scene folks.
    Last edited by LPVOID; 05-03-2019 at 04:02 PM.

  2. #2
    LPVOID's Avatar
    LPVOID is offline Newbie
    Array
    Join Date
    Oct 2016
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    3
    Reputation
    2
    If anyone is interested, it is not possible to send colored text to other players.
    Because, even after successfully sending correct packet, each client substitutes any received colored text with normal text to display ingame.
    Here's how to reproduce the test.
    Warcraft 1.26a

    Game.dll+676D54 - the spot just before sending a message of "To all" type.
    Game.dll+6DF08E - the spot just before sending a packet (WS2_32.send).

    Используем CheatEngine
    1) Use a break at Game.dll+676D54
    2) Go to wc3 and hit shift+enter, write any message, and fill some space for our color format codes.
    example xx123456ccHello worldxx
    it is necessary to fill space for color format codes, because we will substitue the message in already formed packet, after wc3 have already trimmed all color codes from any outgoing text.
    3) Hit Enter to send the message, CE will stop
    4) Jump until Game.dll+6DF08E
    5) Use the scanner to find our message string and replace the color code in it.
    example |cffffcc00Hello world|r
    6) Now continue execution.
    7) ???
    8) Profit!

Similar Threads

  1. Warcraft III Themes - Customize Your Warcraft 3 Appearance
    By CafeSaiGon in forum Warcraft 3 Hacks, bots and tools
    Replies: 11
    Last Post: 01-08-2018, 05:52 PM
  2. [WTS] WTS Warcraft 2, Warcraft 3, Diablo 2, Starcraft 1 Keys.
    By Toxiktraktor in forum CD-Keys
    Replies: 2
    Last Post: 05-21-2012, 07:06 AM
  3. Replies: 0
    Last Post: 02-02-2011, 10:37 AM
  4. Noob Question: Warcraft 3 Maphack triggers off "World of Warcraft's Warden"?
    By xelaeon in forum Warcraft 3 Hacks, bots and tools
    Replies: 7
    Last Post: 03-15-2010, 06:06 PM
  5. Replies: 15
    Last Post: 03-28-2009, 04:38 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
  •