Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: BorT on March 23, 2004, 04:16 PM

Title: Bot is VERY unstable.
Post by: BorT on March 23, 2004, 04:16 PM
Hey, My bot connects fine..most of the bugs are fixed so far but just recently the bot seems to disconnect from bnet alot on its own. Even if its in a channel where its not being flooded with text or join/rejoins it seems to drop about every 5mins. Any Ideas? Sorry I cant be more specific, but I do not know what code to post(if any) and hopefully you guys have some suggestions to make it more stable.
P.S.: using CSB. ::)

Thanks.
Title: Re:Bot is VERY unstable.
Post by: effect on March 23, 2004, 04:53 PM
Debug your bot , output some stuff when your differnt events fire , try and find the exact source of when you get disconnected , then come back and post the relevant code.
Title: Re:Bot is VERY unstable.
Post by: Archangel on March 23, 2004, 05:59 PM
Quote from: BorT on March 23, 2004, 04:16 PM
Hey, My bot connects fine..most of the bugs are fixed so far but just recently the bot seems to disconnect from bnet alot on its own. Even if its in a channel where its not being flooded with text or join/rejoins it seems to drop about every 5mins. Any Ideas? Sorry I cant be more specific, but I do not know what code to post(if any) and hopefully you guys have some suggestions to make it more stable.
P.S.: using CSB. ::)

Thanks.

Are you responding to the Packet 0x25?
Title: Re:Bot is VERY unstable.
Post by: UserLoser. on March 23, 2004, 06:02 PM
Quote from: Archangel on March 23, 2004, 05:59 PM
Are you responding to the Packet 0x25?

I don't use CleanSlateBot, but I'd imagine it automatically does respond to SID_PING
Title: Re:Bot is VERY unstable.
Post by: Gangz on March 23, 2004, 06:06 PM
You cant expect to much from CSB if you wrote your own connection using BNLS or hash you could make sure its responding to all packets. it will help insure stabaility a bit
Title: Re:Bot is VERY unstable.
Post by: effect on March 23, 2004, 06:13 PM
He wont have to worry about responding to anything with CSB , so thats not the problem , its likely your sending something to battle.net on one of your events , which is causing you to disconnect.
Title: Re:Bot is VERY unstable.
Post by: Archangel on March 23, 2004, 06:37 PM
Quote from: UserLoser. on March 23, 2004, 06:02 PM
Quote from: Archangel on March 23, 2004, 05:59 PM
Are you responding to the Packet 0x25?

I don't use CleanSlateBot, but I'd imagine it automatically does respond to SID_PING

Sorry, like i havnt used CSB never.
Title: Re:Bot is VERY unstable.
Post by: MyndFyre on March 23, 2004, 06:46 PM
Quote from: Archangel on March 23, 2004, 06:37 PM
Sorry, like i havnt used CSB never.

Then why would you make such a useless post??

BorT:

My bot automatically disconnected if I didn't send SID_NULL (0x00) or any other packet-- I don't ever respond to the SID_PING (0x25) packet except the first time I receive it.  I added a timer to send SID_NULL every 60 seconds.

I have a thought though -- why don't you packetlog the bot?  It seems to be a prudent course of action.

I would think that CSB would automatically send SID_NULL every so often, but maybe CupHead thought that lamer newbs would automatically make an anti-idle or something....
Title: Re:Bot is VERY unstable.
Post by: Archangel on March 23, 2004, 08:34 PM
Quote
Then why would you make such a useless post??

Like i didnt know how CSB worked?
Title: Re:Bot is VERY unstable.
Post by: GoSuGaMING on March 23, 2004, 09:07 PM
CSB (its just an ocx)has like the whole connection written already foryou... you just set a user/ pass and stuff and put a addchat and ur pretty much done... its for people that just start out and dont know that much about bnet
Title: Re:Bot is VERY unstable.
Post by: Zakath on March 23, 2004, 09:20 PM
As long as Battle.net thinks you're connected (under "normal" circumstances), it sends you packets every couple minutes to make sure you're still responsive. As long as your client responds properly to SID_NULL and SID_PING, you shouldn't have problems with disconnecting all the time.
Title: Re:Bot is VERY unstable.
Post by: effect on March 23, 2004, 09:22 PM
I thought the official clients ignored , SID_NULL?
Title: Re:Bot is VERY unstable.
Post by: Archangel on March 23, 2004, 09:25 PM
So i was right?
Title: Re:Bot is VERY unstable.
Post by: MyndFyre on March 23, 2004, 09:42 PM
Quote from: NuLL on March 23, 2004, 09:22 PM
I thought the official clients ignored , SID_NULL?
AFAIK, it is the client's responsibility to send SID_NULL.  The packet is empty and as far as anyone can tell, the only purpose it serves is to keep a connection alive.

Quote from: Archangel on March 23, 2004, 09:25 PM
So i was right?
You said that you didn't know CSB.  If you don't know CSB, then yes, you were right.
Title: Re:Bot is VERY unstable.
Post by: DarkMinion on March 23, 2004, 09:43 PM
QuoteAFAIK, it is the client's responsibility to send SID_NULL.  The packet is empty and as far as anyone can tell, the only purpose it serves is to keep a connection alive.

Real blizzard clients stopped responding to SID_NULL a long time ago.
Title: Re:Bot is VERY unstable.
Post by: Stealth on March 23, 2004, 10:10 PM
Quote from: DarkMinion on March 23, 2004, 09:43 PM
QuoteAFAIK, it is the client's responsibility to send SID_NULL.  The packet is empty and as far as anyone can tell, the only purpose it serves is to keep a connection alive.

Real blizzard clients stopped responding to SID_NULL a long time ago.

All of them?
Title: Re:Bot is VERY unstable.
Post by: Skywing on March 24, 2004, 12:09 PM
The Blizzard clients do send SID_NULL, but the timing is not directly related to how often they receive SID_NULL.  No action is taken immediately upon receiving SID_NULL.
Title: Re:Bot is VERY unstable.
Post by: DarkMinion on March 24, 2004, 12:58 PM
That's what I meant.  :P