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.
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.
So, is there any way to work around it...?
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
Great, no fix, just my luck - I guess this'll take longer than anticipated - oh well, I'll solve it eventually...
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.
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
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 (http://www.google.com). Sorry I couldn't be more help.
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?
I think the BNLS documents will help you.
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
Since when does CSBs support of War3 work?
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)
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
Quote from: l3alla on July 11, 2004, 08:52 PM
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
if he used that, he would need to do GetStuff("Da`BoT", "Username")
Quote from: l3alla on July 11, 2004, 08:52 PM
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
Um........he got Run Time Error 9 which means Subscript out of range, meaning the CSB is trying to access an array index which has not been set. So, thanks for your suggestions, but that has absolutely nothing to do with anything.
I know it has nothing do to with his problem but if he did want to use your idea he might want to have it error free
Quote from: ChR0NiC on July 11, 2004, 09:22 PM
Quote from: l3alla on July 11, 2004, 08:52 PM
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
Um........he got Run Time Error 9 which means Subscript out of range, meaning the CSB is trying to access an array index which has not been set. So, thanks for your suggestions, but that has absolutely nothing to do with anything.
If you read what duel said maybe you wouldn't be writting this..
Thank you for your replies - the GetStuff code hasn't given me problems so far, so I'd like to think that's a done deal
I've also found a bit of information about the Login Sequence in another post, I'll work from there.
Ok, I'm facing a bit of a dilemma here...
I'm currently in the process of writing a BNLS-based Battle.net bot in VB from scratch, however, since I'm new to VB, this isn't exactly going perfectly.
While working, I created a little program in Java to test the stuff my bot sends out, and while doing so, I realised I can just as easily make the bot in Java, since I'm far more experienced with that language.
So here's the dilemma:
_ Do I switch to Java due to better understanding of the language and greater chance of succes?
_ Do I continue with VB for the learning opportunity?
Your opinion please
Do it in Java, Visual Basic is a language that will corrupt you. If you need some example bot projects in Java ask iago, and I'm sure he will help you out.
Quote from: TangoFour on July 13, 2004, 05:35 PM
Ok, I'm facing a bit of a dilemma here...
I'm currently in the process of writing a BNLS-based Battle.net bot in VB from scratch, however, since I'm new to VB, this isn't exactly going perfectly.
While working, I created a little program in Java to test the stuff my bot sends out, and while doing so, I realised I can just as easily make the bot in Java, since I'm far more experienced with that language.
So here's the dilemma:
_ Do I switch to Java due to better understanding of the language and greater chance of succes?
_ Do I continue with VB for the learning opportunity?
Your opinion please
Let me answer for iago before he sees this:
Go Java! Go Java!
(eww I feel dirty now).
But Java > VB. ;)