Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Smithsonian on July 17, 2005, 03:55 PM

Title: [C++] Anti-Idle methods
Post by: Smithsonian on July 17, 2005, 03:55 PM
What's the best method of doing an anti-idle? I've seen people do it several ways.
How would you do it within your MsgLoop? Right now I've got a variable holding how long in second i want it to wait before it sends the message. In my message loop, since it's constantly looping, I was going to have it check to see if that amount of time in seconds has expired or not. The loop though goes extremely fast obviouisly. How do I make it send exactly every X seconds? Or if theres a better method, mind sharing?

Thanks.
Title: Re: [C++] Anti-Idle methods
Post by: Eric on July 17, 2005, 03:59 PM
QuoteWhat's the best method of doing an anti-idle?

By responding to SID_PING.
Title: Re: [C++] Anti-Idle methods
Post by: Smithsonian on July 17, 2005, 04:05 PM
how often is SID_PING sent?
Title: Re: [C++] Anti-Idle methods
Post by: Eric on July 17, 2005, 04:15 PM
Quote from: Smithsonian on July 17, 2005, 04:05 PM
how often is SID_PING sent?

When idled, Battle.net will send it about every 30 seconds and you are expected to reply when it's received.
Title: Re: [C++] Anti-Idle methods
Post by: Tontow on July 17, 2005, 06:34 PM
try sending null when you get null
Title: Re: [C++] Anti-Idle methods
Post by: UserLoser. on July 17, 2005, 07:12 PM
Quote from: Tontow on July 17, 2005, 06:34 PM
try sending null when you get null

I'm sure that's not what he is asking, and doing that is rather pointless anyways since it's used to test the connection