Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: new.b on March 19, 2004, 12:10 AM

Title: -OnTalk Event-
Post by: new.b on March 19, 2004, 12:10 AM
hey there guys!

    I need help, with the OnTalk event.  Basically when another user from battle.net starts chatting I recieve numbers instead of there username and there message.

    e.g. 65535
           16776960
           16777215

    It Should Be something like ....

    <UserName>: Blah blah blah blah

    Basically that's all the problem and i've got everything working for me so far.

    Also I'm using the source code/bot from chaosx.net titled vbbot, I think the maker is here, but i'm not sure.  I'm modifying it and giving credits of course.

   Thanks for any help guys & thanks in advance.
Title: Re:-OnTalk Event-
Post by: o.OV on March 19, 2004, 12:25 AM
Quote from: new.b on March 19, 2004, 12:10 AM
hey there guys!

    I need help, with the OnTalk event.  Basically when another user from battle.net starts chatting I recieve numbers instead of there username and there message.

    e.g. 65535
           16776960
           16777215

    It Should Be something like ....

    <UserName>: Blah blah blah blah

    Basically that's all the problem and i've got everything working for me so far.

    Also I'm using the source code/bot from chaosx.net titled vbbot, I think the maker is here, but i'm not sure.  I'm modifying it and giving credits of course.

   Thanks for any help guys & thanks in advance.

Paste some code.
Title: Re:-OnTalk Event-
Post by: new.b on March 19, 2004, 12:35 AM
This is what I have in the main form...
Private Sub ChatBot_OnTalk(ByVal UserName As String, ByVal Flags As Long, ByVal Message As String)
   'get rid of leading and trailing quotes
   Message = Mid$(Message, 2)
   Message = Left$(Message, Len(Message) - 1)
   AddChat vbCyan, "<", _
           vbYellow, UserName, _
           vbCyan, ">", _
           RGB(&H8B, &H5E, &HA0), ": " & Message
End Sub


and this is on the class module ...

.....
Case ID_TALK
       pA = Split(pA(2), " ", 3)
       RaiseEvent OnTalk(pA(0), CLng("&H" & pA(1)), pA(2))
.....


i didn't paste the whole code of the class module since everything else is working except the ontalk event.

thanks again
Title: Re:-OnTalk Event-
Post by: Eric on March 19, 2004, 03:14 AM
You need to post more code, preferably the part where pA() is first used.
Title: Re:-OnTalk Event-
Post by: Eli_1 on March 19, 2004, 06:05 AM
Quote from: new.b on March 19, 2004, 12:35 AM
This is what I have in the main form...
Private Sub ChatBot_OnTalk(ByVal UserName As String, ByVal Flags As Long, ByVal Message As String)
   'get rid of leading and trailing quotes
   Message = Mid$(Message, 2)
   Message = Left$(Message, Len(Message) - 1)
   AddChat vbCyan, "<", _
           vbYellow, UserName, _
           vbCyan, ">", _
           RGB(&H8B, &H5E, &HA0), ": " & Message
End Sub


and this is on the class module ...

.....
Case ID_TALK
       pA = Split(pA(2), " ", 3)
       RaiseEvent OnTalk(pA(0), CLng("&H" & pA(1)), pA(2))
.....


i didn't paste the whole code of the class module since everything else is working except the ontalk event.

thanks again

this is a CHAT bot isn't it?
Title: Re:-OnTalk Event-
Post by: o.OV on March 19, 2004, 06:12 AM
the first PA is probably split(data," ",3)
and from the way he is parsing it..
you can rule out binary

I certainly don't have a clue as to
why he would be getting numbers
for name and message.
Title: Re:-OnTalk Event-
Post by: Eric on March 19, 2004, 10:00 AM
Quote from: o.OV on March 19, 2004, 06:12 AM
the first PA is probably split(data," ",3)
and from the way he is parsing it..
you can rule out binary

I certainly don't have a clue as to
why he would be getting numbers
for name and message.
Then he'd need to post what data was; no way to tell what he's doing until he posts all the required code.
Title: Re:-OnTalk Event-
Post by: iago on March 19, 2004, 10:13 AM
Those 3 numbers you posted are, in hex, 0xFFFF, 0xFFFF00, and 0xFFFFFF.  I find it hard to believe that that's a coincidence.
Title: Re:-OnTalk Event-
Post by: MyndFyre on March 22, 2004, 04:56 PM
Quote from: iago on March 19, 2004, 10:13 AM
Those 3 numbers you posted are, in hex, 0xFFFF, 0xFFFF00, and 0xFFFFFF.  I find it hard to believe that that's a coincidence.

My thoughts exactly.  Thanks for beating me to it yet again.  :P