Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: DoMVc on November 10, 2003, 02:02 PM

Title: Show What I typed Using AddChat
Post by: DoMVc on November 10, 2003, 02:02 PM
Hey, on my bot I'm using CSB and it shows what other users typed, but It won't show what I typed..I tryed using Addchat to show it but it still won't work, anybody know what I'm doing wrong? :-\
Title: Re:Show What I typed Using AddChat
Post by: iago on November 10, 2003, 04:48 PM
And if you don't know how to do THAT, I would recommend re-thinking your career choice :P
Title: Re:Show What I typed Using AddChat
Post by: CrAz3D on November 10, 2003, 05:14 PM
Making a bot doesn't have to be a career, he might just program for fun.  I have no intentions of going into programming as a career.
Title: Re:Show What I typed Using AddChat
Post by: Freeware on November 10, 2003, 06:49 PM
Quote from: DoMVc on November 10, 2003, 02:02 PM
Hey, on my bot I'm using CSB and it shows what other users typed, but It won't show what I typed..I tryed using Addchat to show it but it still won't work, anybody know what I'm doing wrong? :-\

Before using CleanSlateBot1.Send txtSend.text
put this:


AddChat "<" & MyUsername & ">: " & txtSend.text


Like stated above, If you cant do this you really shouldnt be making a bot. Thank CupHead for yet another person that lives of CSB
Title: Re:Show What I typed Using AddChat
Post by: iago on November 10, 2003, 07:00 PM
Quote from: Freeware on November 10, 2003, 06:49 PM
Quote from: DoMVc on November 10, 2003, 02:02 PM
Hey, on my bot I'm using CSB and it shows what other users typed, but It won't show what I typed..I tryed using Addchat to show it but it still won't work, anybody know what I'm doing wrong? :-\

Before using CleanSlateBot1.Send txtSend.text
put this:


AddChat "<" & MyUsername & ">: " & txtSend.text


Like stated above, If you cant do this you really shouldnt be making a bot. Thank CupHead for yet another person that lives of CSB

Yes, and you giving him the exact code he needs is much better!
Title: Re:Show What I typed Using AddChat
Post by: Hitmen on November 10, 2003, 07:53 PM
Quote from: iago on November 10, 2003, 07:00 PM
Quote from: Freeware on November 10, 2003, 06:49 PM
Quote from: DoMVc on November 10, 2003, 02:02 PM
Hey, on my bot I'm using CSB and it shows what other users typed, but It won't show what I typed..I tryed using Addchat to show it but it still won't work, anybody know what I'm doing wrong? :-\

Before using CleanSlateBot1.Send txtSend.text
put this:


AddChat "<" & MyUsername & ">: " & txtSend.text


Like stated above, If you cant do this you really shouldnt be making a bot. Thank CupHead for yet another person that lives of CSB

Yes, and you giving him the exact code he needs is much better!
Nuh uh, he needs to add the pretty colors himself. :P
Title: Re:Show What I typed Using AddChat
Post by: CrAz3D on November 10, 2003, 10:59 PM
Acutally, I suggest making a Send sub/function.  That way you can encorporate a queue, lockchat, AddChat when you speak, & any other thing that may be related to that area.

IE:Public Sub Send(ByVal data as string, Unhide as boolean)
If Unhide=true then
    AddChat vbyellow, "<" & CurrentUsername & "> " & VBCrLf & vbwhite, data
end if
CleanSlateBot1.Send data
End Sub


Something like that.  I'm not sure that I have the vbcrlf in the right order, I can't remember this late @ night.
Title: Re:Show What I typed Using AddChat
Post by: hismajesty on November 10, 2003, 11:53 PM
Quote from: CrAz3D on November 10, 2003, 10:59 PM
Acutally, I suggest making a Send sub/function.  That way you can encorporate a queue, lockchat, AddChat when you speak, & any other thing that may be related to that area.

IE:Public Sub Send(ByVal data as string, Unhide as boolean)
If Unhide=true then
    AddChat vbyellow, "<" & CurrentUsername & "> " & VBCrLf & vbwhite, data
end if
CleanSlateBot1.Send data
End Sub


Something like that.  I'm not sure that I have the vbcrlf in the right order, I can't remember this late @ night.

Nothing against DoMVc but, I'm not entirely positive that he would understand the concept of a seperate Send sub. Oh yeah and pretty colors are so pretty Hitmen.

Private Sub cmdSend_Click() 'Send Button
'Variable Shit
Dim strSend As String   ' Not Really A Needed String :p
strSend = txtSend.text   'Assign A Value
'Transmit Data
    CleanSlateBot1.Send strSend 'Send Initial Text
AddChat "<" & strCurrentUsername & "> ", vbCyan, strSend & vbNewLine, vbWhite 'Add The Text Being Send
txtSend.Text = vbNullString 'Clear The Text Box


Edit: Indented
Title: Re:Show What I typed Using AddChat
Post by: CrAz3D on November 11, 2003, 08:36 AM
Oh, I guess that could hold him back some but it sure would make it alot easier in the long run.
Title: Re:Show What I typed Using AddChat
Post by: hismajesty on November 11, 2003, 09:29 AM
Quote from: CrAz3D on November 11, 2003, 08:36 AM
Oh, I guess that could hold him back some but it sure would make it alot easier in the long run.

Yes it would, from experience I can say that it is really a pain to do it each time you send something (be it a command or such.)

Title: Re:Show What I typed Using AddChat
Post by: CrAz3D on November 11, 2003, 10:20 AM
Yes ma'am.  Little functions make thing so much cleaner also.