Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: ChR0NiC on August 16, 2004, 02:29 PM

Title: To Any Newbies Or Critics
Post by: ChR0NiC on August 16, 2004, 02:29 PM
For the last possibly 36 hours (not in a row) I have been working on an Active X Control that is the same as CleanSlateBot except it has W3 support and is in my mind a little more user friendly. I made this for anyone who has nothing better to do than bash my work and for any people for example like this

Quote from: Unfortunate on August 15, 2004, 01:44 PM
im working on a bot i just finished it ...
Quote from: Unfortunate on August 15, 2004, 02:03 PM
o and do you know what packet it is

I know I will never replace Cuphead, but I hope my Active X Control can pick up where his left off, I posted it up on the web and made a little tutorial for it and urge anybody with questions about it to contact me on AIM. I have posted this up here (http://turbonet.feeblegaming.org/blc), I have called this "BNLS Logon Control" and it is able to logon all clients including W3 and is able to change pw's, create accounts and is pretty stable and I am happy the way it turned out. I did not add Realm support because I did not feel it was necessary, and I didn't quite know in which way to handle it, especially if the users want to choose their characters from a list, so I left it up to them.

Edit: I might be doing updates for people who request them if there is a big enough interest here, but if not I will only leave the first version.
Title: Re:To Any Newbies Or Critics
Post by: Eli_1 on August 16, 2004, 02:46 PM
May God damn you to an eternal hell.  :P
Title: Re:To Any Newbies Or Critics
Post by: warz on August 16, 2004, 02:53 PM
Documentation could be more in depth. On a side note, that one rule is stupid. Anyone knows that when you release something you not only recieve, yes, some praise for doing so, but you recieve more than usual amounts of flames and criticism. Who's going to follow your rule anyways? The day I listen to a guy who justifies his reasons for releasing his own program and goes by the alias ChRoNiC is the day I will hopefully die.
Title: Re:To Any Newbies Or Critics
Post by: ChR0NiC on August 16, 2004, 03:05 PM
Basically I meant if you hex it and claim it as your own may you burn in hell, and you have a very very bad attitude you know that? I had a small feeling that the only thing that would come of this is people going

Quote
OMG YOU ARE JUST TRYING TO BE CUPHEAD AND NOBODY IS GOING TO USE IT AND I HOPE YOU DIE

When all I was trying to do was be helpful and make an alternative to CSB, I thought maybe a new version or alternative is due.

Quote from: warz on August 16, 2004, 02:53 PM
Documentation could be more in depth.

Suggestions then ?
Title: Re:To Any Newbies Or Critics
Post by: Meh on August 16, 2004, 03:11 PM
I have to say, I just used it and I think its good. We need something uptodate so us noobs that cant handle packets and hashing can use it :P
Title: Re:To Any Newbies Or Critics
Post by: BaDDBLooD on August 16, 2004, 03:15 PM
Actually this has support to do your own packets =\
Title: Re:To Any Newbies Or Critics
Post by: Blaze on August 16, 2004, 03:16 PM
If this isn't backdoored this could be very usefull for noobs. I think that the construct packet idea is genius.

Edit:

Only one problem, There will be hundreds of idiots using this within a year
Title: Re:To Any Newbies Or Critics
Post by: Meh on August 16, 2004, 03:17 PM
Quote from: BaDDBLooD on August 16, 2004, 03:15 PM
Actually this has support to do your own packets =\
So advanced people can do it aswell.
Title: Re:To Any Newbies Or Critics
Post by: Blaze on August 16, 2004, 03:19 PM
Add support for a custom packet being received...
Title: Re:To Any Newbies Or Critics
Post by: ChR0NiC on August 16, 2004, 03:20 PM
Quote from: Kk)Blaze(kK on August 16, 2004, 03:19 PM
Add support for a custom packet being received...

I did, you have to do it like this


Private Sub BNLSLogon1_HandlePackets(Data As String)

'Do your packet handling here :P it's in the tutorial

End Sub


Edit: Forgot code tags :P
Title: Re:To Any Newbies Or Critics
Post by: Blaze on August 16, 2004, 03:21 PM
oops missed that...
Title: Re:To Any Newbies Or Critics
Post by: iago on August 16, 2004, 03:26 PM
So, is it a) opensource or b) backdoored?  None of the above is not a valid answer.
Title: Re:To Any Newbies Or Critics
Post by: ChR0NiC on August 16, 2004, 04:11 PM
Quote from: iago on August 16, 2004, 03:26 PM
So, is it a) opensource or b) backdoored?  None of the above is not a valid answer.

/me cries :'(

Since I am sure Skywing keeps a log of all the logins that go through BNLS I guess it's backdoored :P
Title: Re:To Any Newbies Or Critics
Post by: TangoFour on August 16, 2004, 04:13 PM
Too bad I already started on my Java bot or I would've used this as a replacement for CleanSlateBot.

Then again, at least Java is something I'm good at, and I find it easier to debug

Still, nice job
Title: Re:To Any Newbies Or Critics
Post by: UserLoser. on August 16, 2004, 04:17 PM
Quote from: ChR0NiC on August 16, 2004, 04:11 PM
Quote from: iago on August 16, 2004, 03:26 PM
So, is it a) opensource or b) backdoored?  None of the above is not a valid answer.

/me cries :'(

Since I am sure Skywing keeps a log of all the logins that go through BNLS I guess it's backdoored :P

doubtful.  valhallalegends.com should have run out of space on it's HD ages ago, or was that why they moved everything to a new server and left BNLS on it's own? :P
Title: Re:To Any Newbies Or Critics
Post by: iago on August 16, 2004, 04:29 PM
Quote from: TangoFour on August 16, 2004, 04:13 PM
Too bad I already started on my Java bot or I would've used this as a replacement for CleanSlateBot.

Then again, at least Java is something I'm good at, and I find it easier to debug

Still, nice job

if you need hashing stuff for Java, contact me and I'll tell you where to get it.  I don't mind sharing mine.  If you want to do it yourself, even better! :)
Title: Re:To Any Newbies Or Critics
Post by: TangoFour on August 16, 2004, 04:37 PM
I'm currently relying on BNLS actually - I failed a class on Algorithm design and analysis last year so I won't even try tacking hashing algorithms until I finish that class this year
Title: Re:To Any Newbies Or Critics
Post by: iago on August 16, 2004, 04:50 PM
Quote from: TangoFour on August 16, 2004, 04:37 PM
I'm currently relying on BNLS actually - I failed a class on Algorithm design and analysis last year so I won't even try tacking hashing algorithms until I finish that class this year

Algorithm classes suck.  I would have failed mine, but everybody else did worse than me and I rode the curve :)

Like I said, I have working hashing code which I don't mind people using, all you have to do is ask.
Title: Re:To Any Newbies Or Critics
Post by: R.a.B.B.i.T on August 16, 2004, 05:46 PM
R.a.B.B.i.T asks

Wait...I don't use Java..what would I do with Java hashing code?

Oo...erm
Title: Re:To Any Newbies Or Critics
Post by: ChR0NiC on August 16, 2004, 05:47 PM
Pffffffffft, back on topic damn you *shakes fist*

You people start using my OCX or I'll throw half cooked muffins at you >:(
Title: Re:To Any Newbies Or Critics
Post by: Adron on August 16, 2004, 06:07 PM
Quote from: ChR0NiC on August 16, 2004, 05:47 PM
You people start using my OCX or I'll throw half cooked muffins at you >:(

You are obviously in the early stages of software development. Remember this time when you're swamped with support requests from stupid users.
Title: Re:To Any Newbies Or Critics
Post by: ChR0NiC on August 16, 2004, 06:12 PM
Quote from: Adron on August 16, 2004, 06:07 PM
You are obviously in the early stages of software development. Remember this time when you're swamped with support requests from stupid users.

*shivers*
/me throws a half cooked muffin at Adron
Title: Re:To Any Newbies Or Critics
Post by: Blaze on August 16, 2004, 09:39 PM
Quote from: ChR0NiC on August 16, 2004, 06:12 PM
/me throws a half cooked muffin at Ardon

You shouldn't threw un-cooked food at admins. They might be poisoned.
Title: Re:To Any Newbies Or Critics
Post by: Newby on August 16, 2004, 11:35 PM
Quote from: Kk)Blaze(kK on August 16, 2004, 09:39 PM
Quote from: ChR0NiC on August 16, 2004, 06:12 PM
/me throws a half cooked muffin at Ardon

You shouldn't threw un-cooked food at admins. They might be poisoned.
Ardon isn't an admin though. :)
Title: Re:To Any Newbies Or Critics
Post by: BaDDBLooD on August 16, 2004, 11:36 PM
Quote from: Newby on August 16, 2004, 11:35 PM
Quote from: Kk)Blaze(kK on August 16, 2004, 09:39 PM
Quote from: ChR0NiC on August 16, 2004, 06:12 PM
/me throws a half cooked muffin at Ardon

You shouldn't threw un-cooked food at admins. They might be poisoned.
Ardon isn't an admin though. :)

Exactly! :)
Title: Re:To Any Newbies Or Critics
Post by: ChR0NiC on August 16, 2004, 11:40 PM
Damn it, that's almost as embarrassing misspelling Adron as how GosuGaming spelled Grok as Gork :'(
Title: Re:To Any Newbies Or Critics
Post by: BaDDBLooD on August 16, 2004, 11:46 PM
Naw, gork is much much funnier.  I suppose that's because it reminds me of a Gerkin...
Title: Re:To Any Newbies Or Critics
Post by: Blaze on August 17, 2004, 06:08 PM
Quote from: BaDDBLooD on August 16, 2004, 11:46 PM
Naw, gork is much much funnier.  I suppose that's because it reminds me of a Gerkin...

It takes quite a bit of effort to spell a fuor letter word wrong   ;D
Title: Re:To Any Newbies Or Critics
Post by: Grok on August 19, 2004, 06:24 PM
Quote from: UserLoser. on August 16, 2004, 04:17 PM
Quote from: ChR0NiC on August 16, 2004, 04:11 PM
Quote from: iago on August 16, 2004, 03:26 PM
So, is it a) opensource or b) backdoored?  None of the above is not a valid answer.

/me cries :'(

Since I am sure Skywing keeps a log of all the logins that go through BNLS I guess it's backdoored :P

doubtful.  valhallalegends.com should have run out of space on it's HD ages ago, or was that why they moved everything to a new server and left BNLS on it's own? :P

That WAS becoming a problem, until December last year we upgraded the server to make more room.

(http://www.sgi.com/products/storage/images/storage_index.jpg)
Title: Re:To Any Newbies Or Critics
Post by: BaDDBLooD on August 19, 2004, 08:21 PM
SweeT!
Title: Re:To Any Newbies Or Critics
Post by: Blaze on August 20, 2004, 04:08 PM
Thats a pretty nice looking machine... Can I get the specs?
Title: Re:To Any Newbies Or Critics
Post by: MindArchon on August 22, 2004, 08:51 AM
Add Profiles and it will make me happy :)
Title: Re:To Any Newbies Or Critics
Post by: ChR0NiC on August 22, 2004, 02:34 PM
Quote from: MindArchon on August 22, 2004, 08:51 AM
Add Profiles and it will make me happy :)

Right, I totally spaced about profiles ha ha. It'll be done very soon, I'll post here when it's been updated.

Edit: I have just been informed that, the way CSB handles profile is a little too complex for newbs, so if anyone has any suggestions of a way I could present the profile keys to you and it be newby friendly, let me know.
Title: Re:To Any Newbies Or Critics
Post by: tA-Kane on August 22, 2004, 02:52 PM
.getProfile(Username As String, Game As Integer) gets the normal stuff (age, sex, location, description) for the username, plus the record for the game provided (or no record if game is zero), and Keys is an array of custom keys to use. No messing with any sort of keys to remember or anything.

and then use function overloading for the "more advanced" function:

.getProfile(Username As String, Keys() As String) gets the profile using the keys provided (dunno if VB allows passing arrays or not, but Keys is supposed to be an array).

Something like that.

On result, you use something like so:

Class Profile
 Username As String
 Values(-1) As String
 Keys(-1) As String
End Class


You fill Username with the username requested, keys with the array of keys used, and values with the returned values for the corresponding keys (so Values(1234) would be the value for Keys(1234))

etc etc

simple & easy enough


Be sure that using the first of the two will result in listing the keys in the result, so that the user can see what keys got what result, if they wanted to learn.

Also, be sure to provide documentation as to which array indice is what key for each game, so that if people don't want to check keys, but only check values, they will know what array indice to look at.
Title: Re:To Any Newbies Or Critics
Post by: ChR0NiC on August 22, 2004, 04:48 PM
Pending no objections, I think I got myself a way to do it, thanks Kane :)
Title: Re:To Any Newbies Or Critics
Post by: shadypalm88 on August 22, 2004, 04:52 PM
A possible other way to do this would be using a Collection, with the profile field names as the keys.  Then you could just do:Dim C As Collection
Set C = Bot.GetProfile(Username)
txtAge = C("Age")
'etc ...
Also, you might want to have a function for getting account stats, e.g. account created.

[edit]Typo.[/edit]
Title: Re:To Any Newbies Or Critics
Post by: tA-Kane on August 22, 2004, 05:42 PM
Quote from: ChR0NiC on August 22, 2004, 04:48 PM
Pending no objections, I think I got myself a way to do it, thanks Kane :)
Have fun  ;)

Quote from: shadypalm88 on August 22, 2004, 04:52 PMAlso, you might want to have a function for getting account stats, e.g. account created.
Assuming he uses the way I presented, it would be quite simple using the "advanced" function rather than the generic function. That is, provide your own key ("System\Account Created"). Like so:

Sub GetAccountCreated(Username As String)
 Dim Key(0) As String
 Key(0) = "System\Account Created"
 WhateverYourObjectIsNamed.GetProfile(Username, Key)
End Sub
Then you simply wait for Battle.net to reply and then check the resulting data.
Title: Re:To Any Newbies Or Critics
Post by: shadypalm88 on August 22, 2004, 06:22 PM
Quote from: tA-Kane on August 22, 2004, 05:42 PMAssuming he uses the way I presented, it would be quite simple using the "advanced" function rather than the generic function.

Quote from: ChR0NiC on August 22, 2004, 02:34 PMI have just been informed that, the way CSB handles profile is a little too complex for newbs, so if anyone has any suggestions [...]
Just trying to make it simple.  ;)
Title: Re:To Any Newbies Or Critics
Post by: R.a.B.B.i.T on August 23, 2004, 12:36 AM
I thought that you could only access the System\ keys for your own account?  It would be easier to use, say, GetAccountInfo() as opposed to requiring the user to find and then request the System keys.
Title: Re:To Any Newbies Or Critics
Post by: ChR0NiC on August 23, 2004, 01:23 PM
Quote from: R.a.B.B.i.T on August 23, 2004, 12:36 AM
I thought that you could only access the System\ keys for your own account?  It would be easier to use, say, GetAccountInfo() as opposed to requiring the user to find and then request the System keys.

True, maybe I could just do .GetAccountInfo() being that you can only request your own keys. Good point rabbit.
Title: Re:To Any Newbies Or Critics
Post by: MindArchon on August 23, 2004, 05:21 PM
I suggest that you allow .send to only work when your connected. Or else you get wrong protocol errors
Title: Re:To Any Newbies Or Critics
Post by: MyndFyre on August 23, 2004, 06:43 PM
Quote from: ChR0NiC on August 22, 2004, 04:48 PM
Pending no objections, I think I got myself a way to do it, thanks Kane :)

Yes, user profiles were somewhat tough to implement in a way that was intuitive for a library.  I think I came up with something along these lines --

The ArmaBot.Bncs.UserProfile class has a bunch of different constant strings.  The strings are the profile keys "profile\age", etc.

Different constructors on the class set up the request differently.  Essentially a user creates an instance of UserProfile with a specified constructor, and then can add keys to request if so desired (but the keys should be the constant fields).  The user then passes the instance of the UserProfile class to the connection manager, which creates the appropriate packet to send.  The connection manager can support up to ten profile requests at one time, and when profile request responses are returned, the appropriate instance is taken from an internal collection (based on the cookie) and parsed.  Parsing is possible because the UserProfile instance maintains a list of the requested keys and the order in which they were requested, and since some keys return strings, while others return numeric data, the incoming data stream has the appropriate function called based on the current key.  The key collection is looped over.

The UserProfile class then acts like an associative array.  Say I have a user profile instance called "myProfile":

C#:

// the as <type> operator is COOL!
string szAge = myProfile[UserProfile.PROFILE_AGE_KEY] as string;

VB.NET:

Dim szAge As String
szAge = CType(myProfile[UserProfile.PROFILE_AGE_KEY], String)


Keys that were not requested but are known to be valid return an empty string.  Keys that are not valid cause an ArgumentOutOfRangeException to be thrown.

NOTE: This is all as I remember.  It's been a long time since I've worked on my profile code, and I don't have it in front of me.

That said, this is generally how I settled on doing things.  Don't know if you've finished up yet, but maybe it will help you out. :)
Title: Re:To Any Newbies Or Critics
Post by: ChR0NiC on August 24, 2004, 12:03 AM
I had to release a fix version, because there were a few reported bugs, for more details visit here (http://turbonet.feeblegaming.org/blc/)
Title: Re:To Any Newbies Or Critics
Post by: DarkSoldier on August 24, 2004, 04:29 AM
Ok, i've got a little problem with your login control: everytime i want to login, i get disconnected and banned from battle.net... i don't get an error only: bnls disconnected...
Maybe you know why i get this....and i thought with that control i can't do anything wrong >_>

this little problem happens if i try to connect with wc3, tft, d2, lod (never tried sc)
i use original keys (what else...) and the gameshortvuts are ok....key seems to be ok, too (i can connect to battle.net, but after i am connected to it i get diconnected).
my account already exists, pw is also right.
Title: Re:To Any Newbies Or Critics
Post by: Soul Taker on August 24, 2004, 05:02 AM
Quote from: DarkSoldier on August 24, 2004, 04:29 AM
key seems to be ok, too (i can connect to battle.net, but after i am connected to it i get diconnected).
If you use an invalid key, you will connect, then be IP banned after sending said invalid key.
Title: Re:To Any Newbies Or Critics
Post by: DarkSoldier on August 24, 2004, 05:29 AM
no1 is too dump to enter a key about 25 times wrong oO
I have wc3 tft d2 and lod original....all that keys work if i connect with d2 or wc3....

just the bot gets disconnected...

[EDIT
If i would use an invalid key, i would get an error message, wouldn't i?
Title: Re:To Any Newbies Or Critics
Post by: Soul Taker on August 24, 2004, 08:46 AM
Quote from: DarkSoldier on August 24, 2004, 05:29 AM
no1 is too dump to enter a key about 25 times wrong oO
I have wc3 tft d2 and lod original....all that keys work if i connect with d2 or wc3....

just the bot gets disconnected...

[EDIT
If i would use an invalid key, i would get an error message, wouldn't i?
If you enter it incorrectly once, you get banned.  All attempts after that within the ban time will result in your being disconnected.

And I don't know if you would get an error, I did not write your bot.
Title: Re:To Any Newbies Or Critics
Post by: Kp on August 24, 2004, 09:05 AM
Quote from: DarkSoldier on August 24, 2004, 05:29 AMIf i would use an invalid key, i would get an error message, wouldn't i?

Your question is unclear.  Are you inquiring whether your client will display an error (which no one without your source code could answer) or whether the server will indicate to the client that there has been an error (such as a binary message with a data payload indicating bogus key)?
Title: Re:To Any Newbies Or Critics
Post by: DarkSoldier on August 24, 2004, 11:54 AM
hmm i thoght that battle.net will send that error (the errormessage with the errornumber) if i use the bnls logon control.

and @Soul Taker:
i know that every login-attemp will fail after getting banned from b.net....
Title: Re:To Any Newbies Or Critics
Post by: ChR0NiC on August 24, 2004, 01:59 PM
There were a few bugs in the code, I am sorry about this. Please redownload the OCX here (http://turbonet.feeblegaming.org/index.php?view=bnetprojects)

I posted details about the problems there were on the news page here (http://turbonet.feeblegaming.org/index.php)

Edit: Although there were some corrections to the code, I am not calling this an official update, this is still known as 1.0, again I am sorry for anybody this may have inconvenienced.
Title: Re:To Any Newbies Or Critics
Post by: ChR0NiC on August 24, 2004, 03:47 PM
Quote from: DarkSoldier on August 24, 2004, 03:43 PM
hm i redownloaded it and replaced it, but i still get disconnected...

Please provide some details, are you sure you deleted the old one from your project and readded the new OCX? Are you sure the project updated the OCX?

Since the vL members are probably getting pissed off about this thread, better message me on AIM or if you only have MSN you can PM me for that info.
Title: Re:To Any Newbies Or Critics
Post by: Newby on August 24, 2004, 06:08 PM
For some odd reason, I entered 2-3 invalid keys before and never got banned for it.

So eh?
Title: Re:To Any Newbies Or Critics
Post by: Sorc.Polgara on August 24, 2004, 11:49 PM
heh cool, haven't tried it... don't plan too though.

I'd rather learn myself.  CSB seem cheap to me... I guess this would too.

Learning yourself > taking the easy way out.  Thats the way I want to do it, learn myself.  ofc with peoples help, but not peoples .ocx