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.
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.
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
You need to post more code, preferably the part where pA() is first used.
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?
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.
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.
Those 3 numbers you posted are, in hex, 0xFFFF, 0xFFFF00, and 0xFFFFFF. I find it hard to believe that that's a coincidence.
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