Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: R.a.B.B.i.T on July 17, 2003, 06:38 PM

Title: BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: R.a.B.B.i.T on July 17, 2003, 06:38 PM
im startin 2 get annoyed with my bot.
i made it in vb6 and it works in everyway.
im using VB6 btw
i load all the config info from the config file in Public Sub Form_Load(), and when the 'Connect' button on the menu is pushed, it does the CleanSlateBot1.Connect, and nothing happens. i followed the .txt and .htm documentations on connecting to BNLS using CleanSlateBot.OCX, and i cant figure out why my bot wont *@&#ing connect
><
any help is greaaaaaaaaaaaaaaaaaaaaaaaaaaatly appreciated in every way shape and/or form.

plz help...im desperate!

ps: it debug into, debug over, runs, runs with full compile, and makes with >>NO<< errors whatsoever
Title: Re:BNLS Problems
Post by: ______ on July 17, 2003, 07:59 PM
1.)  :P
2.) You using a Valid BNLS ID / Pass?
3.) Do u have the Correct Accept Value?  (579728)
4.) Does any Error's happen?
Title: Re:BNLS Problems
Post by: hismajesty on July 17, 2003, 08:51 PM
did you try this when bnet was down for maintence?
Title: Re:BNLS Problems
Post by: R.a.B.B.i.T on July 17, 2003, 09:26 PM
1)  :P
2) yes, either skywing or yoni gave it 2 my co-botmaker
3) maybe... ill check
4) no

i been tryin since it came online
its odd....
Title: Re:BNLS Problems
Post by: R.a.B.B.i.T on July 17, 2003, 09:30 PM
3) yes its correct
the problem is that once i hit connect, nothing happens, and i cant figure it out...its not like the bot freezes though...
Title: Re:BNLS Problems
Post by: drivehappy on July 17, 2003, 10:00 PM
Place a debug.print or msgbox under the CSB events.
Title: Re:BNLS Problems
Post by: ______ on July 17, 2003, 10:15 PM
Your account might not be active on bnls yet or you might of placed cleanslatebot1.connect under the wrong button/command. Did you add the addtext function to the procedures like  

addtext vbwhite, "connecting to battle.net."

Title: Re:BNLS Problems
Post by: R.a.B.B.i.T on July 17, 2003, 11:10 PM

Private Sub BnetConnected()
   AddChat vbGreen, "Connected to Battle.Net!" & vbNewLine
End Sub

Private Sub BnetConnecting()
   AddChat vbYellow, "Connecting to Battle.Net..." & vbNewLine
   rtbChat.Text = "Connecting, the damned bot don't even work!" 'i added this in to see if it would display, but ALAS!
End Sub

Private Sub BnetDisconnected()
   AddChat vbRed, "Disconnected from Battle.Net!" & vbNewLine
   Form1.lvChannel.ListItems.Clear
End Sub

Private Sub BnetError(ErrorNumber As Integer, Description As String)
   AddChat vbRed, "Battle.Net Error " & ErrorNumber & ":" & vbNewLine, _
           vbBlue, Description & vbNewLine
End Sub

and so on and so forth.....
Debug.Print isnt doing anything...is ther any special way i should set it up?
i dont think it has anything to do with BNLS itself though....i mean...my bot doesnt do the AddChat commands associated with BNLS...im really confused
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: drivehappy on July 17, 2003, 11:26 PM
Try adding them into BNLSConnect, Connecting, any error handling events, disconnects. What this will do is narrow it down to one problem and then you can find the solution.
Title: Re:BNLS Problems
Post by: Camel on July 17, 2003, 11:31 PM
Quote from: R.a.B.B.i.T on July 17, 2003, 11:10 PM

Private Sub BnetConnected()
   AddChat vbGreen, "Connected to Battle.Net!" & vbNewLine
End Sub

Private Sub BnetConnecting()
   AddChat vbYellow, "Connecting to Battle.Net..." & vbNewLine
   rtbChat.Text = "Connecting, the damned bot don't even work!" 'i added this in to see if it would display, but ALAS!
End Sub

Private Sub BnetDisconnected()
   AddChat vbRed, "Disconnected from Battle.Net!" & vbNewLine
   Form1.lvChannel.ListItems.Clear
End Sub

Private Sub BnetError(ErrorNumber As Integer, Description As String)
   AddChat vbRed, "Battle.Net Error " & ErrorNumber & ":" & vbNewLine, _
           vbBlue, Description & vbNewLine
End Sub

and so on and so forth.....
Debug.Print isnt doing anything...is ther any special way i should set it up?
i dont think it has anything to do with BNLS itself though....i mean...my bot doesnt do the AddChat commands associated with BNLS...im really confused

Why are those plain private subs? Shouldn't they be events of CSB?
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: ______ on July 17, 2003, 11:36 PM
You should put the addchat in the cleanslate bot events
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: R.a.B.B.i.T on July 18, 2003, 12:38 AM
i dont follow...
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: ______ on July 18, 2003, 01:06 AM
like

Private Sub CleanSlateBot1_BnetConnected()
   
Addtext vbGreen, "Connected to Battle.net"
End Sub

if you dont know how to go under events on an object , go away
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: Eternal on July 18, 2003, 10:38 AM
+1 for the directness of that comment.
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: R.a.B.B.i.T on July 18, 2003, 04:22 PM
ahhh a stupid oversight of me...i didnt read some of the posts...or maybe it was the lack of sleep...
:O ill try the CleanSlateBot1_event thing now...

oooo thers an error:
Procedure declaration does not match description of event or procedure having the same name

:O
it highlights:
Private Sub CleanSlateBot1_FlagsUpdate(Username, Flags, Message, Ping, SimulatedEvent)
imma try workin on it but plz feel free to lend me some advice
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: R.a.B.B.i.T on July 18, 2003, 04:27 PM
bah...it says that error message for a lot of the stuff i changed to CleanSlateBot1_
:\  im really confused now..
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: ______ on July 18, 2003, 04:32 PM
Quote from: R.a.B.B.i.T on July 18, 2003, 04:22 PM
ahhh a stupid oversight of me...i didnt read some of the posts...or maybe it was the lack of sleep...
:O ill try the CleanSlateBot1_event thing now...

oooo thers an error:
Procedure declaration does not match description of event or procedure having the same name

:O
it highlights:
Private Sub CleanSlateBot1_FlagsUpdate(Username, Flags, Message, Ping, SimulatedEvent)
imma try workin on it but plz feel free to lend me some advice
First Double click on cleanslatebot  object
then under events go to flagsupdate
put this under flags update.
try this


AddChat vbYellow, Username & " " & Flags & " " & message & " " & ping & vbNewLine
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: R.a.B.B.i.T on July 18, 2003, 06:03 PM
one of my co-programmers got the login from skywing or yoni, im not sure which, he didnt tell me..
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: hismajesty on July 18, 2003, 06:07 PM
lol his post got deleted....thats posted all over the forum..in fact i was just looking for the direct link to the 1st topic or so about it.
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: R.a.B.B.i.T on July 18, 2003, 06:08 PM
ok..just to make sure its right and i dont screw up, when i double click the object it should say:
Private Sub CleanSlateBot1_BNLSAuthEvent(Success As Boolean)

End Sub

right?
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: R.a.B.B.i.T on July 18, 2003, 06:09 PM
Quotelol his post got deleted....thats posted all over the forum..in fact i was just looking for the direct link to the 1st topic or so about it.
might i ask what ur talkin about?

------------------------------------------

Private Sub CleanSlateBot1_BNLSConnected()
   AddChat vbGreen, "Connected to BNLS." & vbNewLine
End Sub

i get a mismatch now :O
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: hismajesty on July 18, 2003, 06:36 PM
Quote from: R.a.B.B.i.T on July 18, 2003, 06:09 PM
Quotemight i ask what ur talkin about?
The guy that posted 'How Do You Obtain A BNLS ID' ...
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: ______ on July 18, 2003, 10:45 PM
Quote from: R.a.B.B.i.T on July 18, 2003, 06:09 PM
Quotelol his post got deleted....thats posted all over the forum..in fact i was just looking for the direct link to the 1st topic or so about it.
might i ask what ur talkin about?

------------------------------------------

Private Sub CleanSlateBot1_BNLSConnected()
   AddChat vbGreen, "Connected to BNLS." & vbNewLine
End Sub

i get a mismatch now :O
maybe its your addchat function thats getting a mismatch?
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: R.a.B.B.i.T on July 19, 2003, 12:45 AM
its always worked before.....
heres the code for my addchat

Public Function AddChat(ByVal txtOne As String, ByVal clrOne As Long, Optional ByVal txtTwo As String, Optional ByVal clrTwo As Long, Optional ww As Integer)
   Dim rtbchat1 As RichTextBox
    On Error Resume Next
   'Lock Screen If frmSetup.checklock = vbUnchecked Then
   If ww = 1 Then
       Set rtbchat1 = Form1.rtbChat
   Else
       Set rtbchat1 = Form1.rtbChat
   End If
   
   With rtbchat1
       .SelStart = Len(.Text)
       .SelLength = 0
       .SelColor = vbWhite
       .SelText = "[" & Format$(Time, "Hh:Nn:Ss") & "] "
       .SelColor = clrOne
       .SelText = txtOne
   End With

   If Len(txtTwo) > 0 Then
      With rtbchat1
          .SelStart = Len(.Text)
          .SelLength = 0
          .SelColor = clrTwo
          .SelText = txtTwo
      End With
   End If
   
End Function
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: ______ on July 19, 2003, 03:05 AM
It is your addchat fuction that is causeing the type mismatch.
Use Groks addtext function.
http://www.valhallalegends.com/docs/rtbox.htm
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: R.a.B.B.i.T on July 19, 2003, 12:49 PM
with groks it gives me a subor function not defined, but only for CleanSlateBot1_BnetConnected()
:O
but thx for the link, i dont get mismatch now :)
---------------------------------------------------------------------------------------------------------------
oO...how do i have -5?
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: zeronx on July 20, 2003, 08:38 AM
I have a problem with where i open the program then close it then the properties i gave to the program are erased :-S any idea what the hell is wrong? is the proper accept -65  , cause thats what the dcoument says...
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: Grok on July 20, 2003, 09:51 AM
Set the properties when you load the form containing the control.  Save the properties to a text file or the registry.  Next time the program loads, use those values to set the control properties.
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: zeronx on July 20, 2003, 11:17 AM
how do you do that??? :-S lol sorry if this is a stupid question but im not sure how to save properties a to a txt then load them
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: Yoni on July 20, 2003, 01:07 PM
Maybe you should learn the language you're programming in, then
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: Camel on July 20, 2003, 01:37 PM
In the future, don't ever type out the event subs. Instead, use the dropdown boxes at the top of the code window.
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: zeronx on July 20, 2003, 06:19 PM
someone mind telling me how to import export properties using a txt file???!
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: CrAz3D on July 20, 2003, 08:07 PM
GetINI & WriteINI?  Did you try that?
http://botdev.valhallalegends.com/documents.asp (http://botdev.valhallalegends.com/documents.asp)
http://www.valhallalegends.com/pub/CINIFile.cls (http://www.valhallalegends.com/pub/CINIFile.cls)
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: R.a.B.B.i.T on July 22, 2003, 01:57 PM
ok i redid all the CSB events and stuff.  now my bot *kinda* works.  but i get this when i try to connect:
[15:03:43] Connectiong to BNLS....
[15:03:43] Connected to BNLS!
[15:03:44] DEBUG: BNLS In:  07 00 0E 35 87 17 51
HType=0/spass=False/cb=0
[15:03:44] DEBUG: BNLS In:  07 00 0F 00 00 00 00
HType=0/spass=False/cb=0
[15:03:45] BNLS Authorization Passed.
[15:03:45] DEBUG: BNLS In:  07 00 10 00 00 00 00
HType=0/spass=False/cb=0
[15:03:45] Version Byte: 7471104

and im not sure what the DEBUGs mean but i think maybe my bnls botid/password?
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: Camel on July 22, 2003, 04:44 PM
Those look like BNLS packets -- if you dont understand what they mean, I suggest you don't display the debug messages. They help to figgure out what a problem is if something isnt working by displaying the exact response BNLS sent. You really only need to see it if something isn't working, but it looks like your "BNLS Authorization Passed."
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: R.a.B.B.i.T on July 22, 2003, 07:59 PM
but my bot gives the error "Invalid version." and displays the Version Byte
:\
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: DarkMinion on July 22, 2003, 08:29 PM
There is no "version" checking with BNLS...unless you're trying to do the b.net version check, in which case, your version "byte" is completely wrong...
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: R.a.B.B.i.T on July 22, 2003, 09:00 PM
arg.......that probably it..but i still dun understand those packets..

wait.......then..how the hell do i change the byte..and what to?
Title: Don't change the byte.
Post by: Kp on July 22, 2003, 09:07 PM
Quote from: R.a.B.B.i.T on July 22, 2003, 09:00 PM
arg.......that probably it..but i still dun understand those packets..
wait.......then..how the hell do i change the byte..and what to?
Request it from BNLS and use what BNLS tells you to use.  Then you won't have to go change things when a new version comes out.
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: R.a.B.B.i.T on July 22, 2003, 10:25 PM
lol..i might sound kinda like a newb about this but..how would i call for the byte from bnls?
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: Camel on July 23, 2003, 06:01 PM
Shouldn't CSB do that automaticly?
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: R.a.B.B.i.T on July 23, 2003, 07:56 PM
i dont kno..but i think it might......if it does my CleanSlateBot is screwed up....
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: R.a.B.B.i.T on July 23, 2003, 11:35 PM
*chirp* *chirp*

well i took out the addchat for VersionByte and DEBUG and now my bot just stops after its auth on bnls.....i have no idea y tho..

........o yeah..wher all my neg karma comin from?
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: hismajesty on July 24, 2003, 12:15 AM
Quote from: R.a.B.B.i.T on July 23, 2003, 11:35 PM
........o yeah..wher all my neg karma comin from?

people clicking roast under your name...
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: Camel on July 24, 2003, 01:30 AM
Quote from: R.a.B.B.i.T on July 23, 2003, 11:35 PMwell i took out the addchat for VersionByte and DEBUG and now my bot just stops after its auth on bnls.....i have no idea y tho..

Did you tell CSB to connect to battle.net?
Title: Re:BNLS Problems >>CUPHEAD I NEED UR HELP!!<<
Post by: R.a.B.B.i.T on July 24, 2003, 02:11 AM
Quote from: Camel on July 24, 2003, 01:30 AM
Quote from: R.a.B.B.i.T on July 23, 2003, 11:35 PMwell i took out the addchat for VersionByte and DEBUG and now my bot just stops after its auth on bnls.....i have no idea y tho..

Did you tell CSB to connect to battle.net?

well..if connecting 2 bnet needs more then just CleanSlateBot1.connect (after all the declarations of username,pass,etc...) then no i havent

-----------------------------------------------
damn roast link..