• Welcome to Valhalla Legends Archive.
 

[VB6] CleanSlateBot - subscript out of range

Started by TangoFour, July 11, 2004, 06:06 AM

Previous topic - Next topic

TangoFour

Greetings,

I've been lurking this forum for quite a while now, and recently started working on a bot with VB, using the CleanSlateBot2 OCX control. After several unsuccesful attempts (due to me not knowing the proper number for the Accept field), my bot is now able to sign in as a WarCraft 3 Client.

The problem is staying signed in - because at the moment I receive the 0x0A (logged in as) packet, an error pops up, titled CSBOXC (in other words: CleanSlateBot) stating SubScript out of Range - error 9.

My code for the LoggedOnAs event is never executed - though my bot does appear in the channel for the duration of the error (if I click it away, it signs off)

I've also added some code to the UnhandledPackets event, which determined that the packet received before 0x0A (being 0x75 - Clan Info) doesn't cause any errors.

So, does anyone have an idea what I'm doing wrong? I can post code if needed

______

There is nothing your doing wrong, you dont need to post code, that happens within the ocx itself.

BinaryzL

Quote from: TangoFour on July 11, 2004, 06:06 AM
Greetings,

I've been lurking this forum for quite a while now, and recently started working on a bot with VB, using the CleanSlateBot2 OCX control. After several unsuccesful attempts (due to me not knowing the proper number for the Accept field), my bot is now able to sign in as a WarCraft 3 Client.

The problem is staying signed in - because at the moment I receive the 0x0A (logged in as) packet, an error pops up, titled CSBOXC (in other words: CleanSlateBot) stating SubScript out of Range - error 9.

My code for the LoggedOnAs event is never executed - though my bot does appear in the channel for the duration of the error (if I click it away, it signs off)

I've also added some code to the UnhandledPackets event, which determined that the packet received before 0x0A (being 0x75 - Clan Info) doesn't cause any errors.

So, does anyone have an idea what I'm doing wrong? I can post code if needed

Poorly error prevention coding (in this case some array error) on the OCX's authors part.

TangoFour

So, is there any way to work around it...?

ChR0NiC

Quote from: TangoFour on July 11, 2004, 02:20 PM
So, is there any way to work around it...?

Parse the W3 yourself so that you don't have to use CSB for it.
Then CSB will never do this to you again :P

TangoFour

Great, no fix, just my luck - I guess this'll take longer than anticipated - oh well, I'll solve it eventually...

ChR0NiC

Quote from: TangoFour on July 11, 2004, 04:21 PM
Great, no fix, just my luck - I guess this'll take longer than anticipated - oh well, I'll solve it eventually...

Sorry man, but it seems that...you cannot edit an OCX without it's source. And since I am sure you do not know ASM, you should just work around it.

TangoFour

Well, I have worked with a few simple assembly languages a few times, but I'm guessing that's not the kind you're hinting at.

Still, it shouldn't be that hard for me to make my own login code that utilizes BNLS to log into Battle.net.

At least, so I hope

Thanks for your help though

ChR0NiC

The reason I was talking about ASM, is that there are many disassemblers out there you can use to convert the program into ASM code. You can easily find them on Google. Sorry I couldn't be more help.

TangoFour

Thought so - and you're right, I don't have the knowledge to comprehend what the disassembler throws at me.

I do have quite a bit of programming knowledge in languages other than Visual Basic - but I'm doing this in VB because I'm interested in learning how it works.

Still, I first need to find out how the WarCraft 3 Login Sequence works... I've checked with bnetdocs but it doesn't say, or I'm looking wrong...

Does anyone know if there are any documents describing this?

Adron

I think the BNLS documents will help you.

BinaryzL

#11
Quote from: TangoFour on July 11, 2004, 06:34 PM
Thought so - and you're right, I don't have the knowledge to comprehend what the disassembler throws at me.

I do have quite a bit of programming knowledge in languages other than Visual Basic - but I'm doing this in VB because I'm interested in learning how it works.

Still, I first need to find out how the WarCraft 3 Login Sequence works... I've checked with bnetdocs but it doesn't say, or I'm looking wrong...

Does anyone know if there are any documents describing this?

This could help with the BNLS stuff.

(Each packet information starts about 1/3 the way down)
http://www.valhallalegends.com/yoni/BNLSProtocolSpec.txt

hismajesty

Since when does CSBs support of War3 work?

ChR0NiC

Quote from: hismajesty[yL] on July 11, 2004, 08:09 PM
Since when does CSBs support of War3 work?

I am not 100% sure about this, but I believe Cuphead did release one update of CSB a while before he left and it had W3 support in it. But I believe this was rushed and it has many bugs (or so I am told)

l3alla

Tango, our you using GetStuff code? If so then make sure the info you put in your source is the same in config.ini. for ex

GetStuff("Da`BoT", "User")
Make sure Da`BoT is in your config ex.
[Da`BoT]
Username=BLAH
Password=BLAH an so on
Hope this maby helps