Disconnect after PostMessage menu

Shout-Out

User Tag List

Results 1 to 12 of 12
  1. #1
    Mr.Sergey's Avatar Contributor
    Reputation
    117
    Join Date
    Apr 2009
    Posts
    201
    Thanks G/R
    6/23
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Disconnect after PostMessage

    Hi

    My bot uses keypresses to control char. I send wsad and camera up/down to move it. Everything was fine for 2years. But since this weekend it started to disconnect in 1-10 min after starting bot. It's quite cureous that problem appeared only on 2 realms first on panda zones, now more realms involved.

    Investigating the case i found a keypressing sending with PostMessage to be the reason of disconnects. Moreover keydown couses disconnect, keyup is ok.
    To find it i held few tests:

    1st test:

    Code:
    for (int i = 0; i < 1000; i++)
    {
        Key.Down(Key.a, wow.Handle);
        Key.Up(Key.a, wow.Handle);
    }
    result - disconnect in 2 seconds,

    2nd test:

    Code:
    for (int i = 0; i < 1000; i++)
    {
        Key.Down(Key.a, wow.Handle);
    }
    result - disconnect in 2 seconds,

    3rd test:
    Code:
    for (int i = 0; i < 1000; i++)
    {
        Key.Up(Key.a, wow.Handle);
    }
    result - all ok.

    where

    Code:
    public static bool Down(uint key, IntPtr hWnd)
    {
        return PostMessage(hWnd, (uint)WM.WM_Keydown, (IntPtr)key, IntPtr.Zero);
    }
    public static bool Up(uint key, IntPtr hWnd)
    {
        return PostMessage(hWnd, (uint)WM.WM_Keyup, (IntPtr)key, IntPtr.Zero);
    }
    private enum WM
    {
        WM_Keydown = 0x100,
        WM_Keyup = 0x101
    }
    Depending on zone and realm 1 and 2 my be ok. One more strange thing - disconnects take place only when fly mount is used, ground works fine.

    If someone has faced the same problem please advise some way to solve it.

    Disconnect after PostMessage
  2. #2
    kosacid's Avatar Active Member
    Reputation
    19
    Join Date
    May 2009
    Posts
    127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i found if you have a constant key press loop is bad you might be locking the client up try addin a dely between presses eg
    for (int i = 0; i < 1000; i++)
    {
    Key.Down(Key.a, wow.Handle);
    Key.Up(Key.a, wow.Handle);
    Sleep(50);
    }

  3. #3
    Mr.Sergey's Avatar Contributor
    Reputation
    117
    Join Date
    Apr 2009
    Posts
    201
    Thanks G/R
    6/23
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Loop without pauses it's just a fast way to identify a problem.
    If you insert ‘sleep’ into the code, there will no disconnect after 2 seconds. But it will come later it's just a matter of time. And of course in my code there is no such loops, I pressing buttons just when it needs, up to 10 times per second.

    I just can’t understand why PostMessage causes disconnect and not on every, only on some “selected” servers. Also unclear is why disc occurs only on fly mount. Maybe there is a glitch with buttons for up/down camera ?

    Maybe it need to check some "readiness" of the game, readiness to accept button press? If so tell me how.

  4. #4
    Frosttall's Avatar Active Member
    Reputation
    64
    Join Date
    Feb 2011
    Posts
    261
    Thanks G/R
    16/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm experiencing the same problems since a few days using CTM (memwrite) even if it worked for ages. the server disconnects me within 5-60 minutes.

    I've tried it with several accounts on different realms in the EU and even asked somebody to try it in the US an he is experiencing the same problem.

    Spamming CTM 5000 times in a row without and with delay didn't disconnect me. I'm very curious what is causing that problem.

    Sent from my GT-I9100 using Tapatalk 2

  5. #5
    Sacred's Avatar Contributor
    Reputation
    207
    Join Date
    Dec 2007
    Posts
    152
    Thanks G/R
    3/9
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It seems that all bots experiences that problem, even honorbuddy. I think that they're added some movement/teleport/other serverside detections, that affected these functions, so it's not about postmessage or ctm, of course i may be wrong.

  6. #6
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone know the function address for the func that fires disconnect?

    We could just hook it w/cheat engine + trace back?

    Edit: I just ran test 1 and 2 while in flight form on a druid, no d/cs. Strange? Anyone have any confirmed zones where this is a problem?
    Last edited by Tanaris4; 11-08-2012 at 10:01 AM.
    https://tanaris4.com

  7. #7
    Frosttall's Avatar Active Member
    Reputation
    64
    Join Date
    Feb 2011
    Posts
    261
    Thanks G/R
    16/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Tanaris4 View Post
    Anyone know the function address for the func that fires disconnect?

    We could just hook it w/cheat engine + trace back?

    Edit: I just ran test 1 and 2 while in flight form on a druid, no d/cs. Strange? Anyone have any confirmed zones where this is a problem?
    Happened to me in Towlong Steppes, but haven't tested it anywhere else. Tested only while flying with druidform aswell with a regular mount.

    Hooking the DC-Callback wouldn't help since it will lead you only to a packet handler which realized that you've disconnected from the server, but the action which caused this was sent a few milliseconds ago and won't be possible to trace back (unless you're able to travel back in time)


    Edit1: I've tried spamming 50000 CTMs to locations with random pitch and facing (to have direction changes), but this doesn't seem to cause the DC either.
    Last edited by Frosttall; 11-08-2012 at 11:44 AM.

  8. #8
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What realms is this happening on for people? I can't replicate on mine
    https://tanaris4.com

  9. #9
    Krack3n's Avatar Member
    Reputation
    11
    Join Date
    Feb 2010
    Posts
    101
    Thanks G/R
    231/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just tested with lazyBot in Wintersgrasp on Kirin Tor-US and all is fine so far. Memory writing on with out mouse hook. Been farming for about 30 mins and no disconnect.

    Update:
    Right after I posted about not haveing problems I disconnected.
    Last edited by Krack3n; 11-08-2012 at 01:03 PM.

  10. #10
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This definitely looks like a blizzard issue, there are posts all over there forums about it. Seems they're relating it to quick camera movements or casting druid form, strange.
    https://tanaris4.com

  11. #11
    Jaladhjin's Avatar Contributor Authenticator enabled
    Reputation
    286
    Join Date
    Jul 2012
    Posts
    1,151
    Thanks G/R
    246/139
    Trade Feedback
    16 (100%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Constant Disconnections - Forums - World of Warcraft
    Originally Posted by Jurannok
    Thanks for the reports guys. With your help we were able to narrow down what was causing these disconnections on our end. It's going to require a hotfix to resolve so the fix won't be immediate, but we'll roll it out as soon as we can.

    For the time being, try to pause for a moment before you switch into flight form and fly off. That should reduce these kinds of disconnections.

  12. #12
    Frosttall's Avatar Active Member
    Reputation
    64
    Join Date
    Feb 2011
    Posts
    261
    Thanks G/R
    16/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great, thank you two

Similar Threads

  1. [ArcEmu] Disconnected after making character
    By Radiohead in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 09-23-2010, 09:53 AM
  2. Disconnect after create character - "Project Retribution Blizzlike"
    By SirRFI in forum WoW EMU Questions & Requests
    Replies: 6
    Last Post: 01-27-2009, 12:35 PM
  3. Disconnect after new character
    By harisled in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 09-20-2008, 03:00 PM
  4. disconnection after logon.
    By elliotps932 in forum World of Warcraft Emulator Servers
    Replies: 16
    Last Post: 03-30-2008, 04:34 PM
  5. i disconnect right after i make a charactar
    By Donutman123 in forum World of Warcraft Emulator Servers
    Replies: 11
    Last Post: 12-26-2007, 03:26 PM
All times are GMT -5. The time now is 10:31 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