• Welcome to Valhalla Legends Archive.
 

-OnTalk Event-

Started by new.b, March 19, 2004, 12:10 AM

Previous topic - Next topic

new.b

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.

o.OV

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.
If the facts don't fit the theory, change the facts. - Albert Einstein

new.b

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

Eric

#3
You need to post more code, preferably the part where pA() is first used.

Eli_1

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?

o.OV

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.
If the facts don't fit the theory, change the facts. - Albert Einstein

Eric

#6
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.

iago

Those 3 numbers you posted are, in hex, 0xFFFF, 0xFFFF00, and 0xFFFFFF.  I find it hard to believe that that's a coincidence.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


MyndFyre

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
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.