• Welcome to Valhalla Legends Archive.
 

How can i add a say command and a Ban command.

Started by OuTLawZGoSu, June 27, 2003, 04:35 PM

Previous topic - Next topic

OuTLawZGoSu


TeEhEiMaN

first set a master, make a text box for a master

Then your gonna need a trigger, make a text box for a trigger

Then

If Username = Form5.txtMaster.Text Then
If Left((LCase(Message)), 5) = (Form5.txtTrigger.Text & "say ") Then  'The number represends the number or words, ?triggerSay = 5, u must count the space as long with the trugger
Dim saymessage As String
saymessage = Right(Message, (Len(Message) - 5))
CleanSlateBot1.Send saymessage  'or how ever your bot sends messages
AddChat "<" & Form2.txtUsername.Text & "> ", vbCyan, saymessage & vbNewLine, vbWhite
End If
End If

OuTLawZ-GoSu

Well my bot uses the "Send" message to send to bnet.

This is how I modifyed that code:

If username = Form1.txtMaster.Text Then
If Left((LCase(message)), 5) = (Form1.txtTrigger.Text & "say ") Then  'The number represends the number or words, ?triggerSay = 5, u must count the space as long with the trugger
Dim send As String
send = Right(message, (Len(message) - 5))
CleanSlateBot1.send send 'or how ever your bot sends messages
AddC , "<" & Form1.txtUsername.Text & "> ", vbCyan, send & vbNewLine, vbWhite
End If
End If


I added 3 text boxes on form1 called txtUsername, txtTrigger, txtMaster.

But when i type .say Test, it tells me " Duplicate Declorations in curent scope"

Help?

Yoni

TeEhEiMaN: Please read a VB reference on "variables".

______

#4
Quote from: OuTLawZ-GoSu on June 28, 2003, 11:53 AM
Well my bot uses the "Send" message to send to bnet.

This is how I modifyed that code:

If username = Form1.txtMaster.Text Then
If Left((LCase(message)), 5) = (Form1.txtTrigger.Text & "say ") Then  'The number represends the number or words, ?triggerSay = 5, u must count the space as long with the trugger
Dim send As String
send = Right(message, (Len(message) - 5))
CleanSlateBot1.send send 'or how ever your bot sends messages
AddC , "<" & Form1.txtUsername.Text & "> ", vbCyan, send & vbNewLine, vbWhite
End If
End If



But when i type .say Test, it tells me " Duplicate Declorations in curent scope"

Help?

well you said it uses the "Send" process, then where it says cleanslatebot1.send   just replace this with send
(ex. send sendmsg)

and
" Duplicate Declorations in curent scope"
means you declared something twice"

TeEhEiMaN

i was asumeing he had a send section in his bot. Thats where the Varuables would be.