• Welcome to Valhalla Legends Archive.
 

Help with code plz

Started by TeEhEiMaN, July 11, 2003, 01:03 AM

Previous topic - Next topic

TeEhEiMaN


For I = 0 To banned.ListCount
If Username = banned.List(I) Then
If Left((LCase(Message)), 5) = (Form2.txttrigger.Text & "say ") Then
Dim saymessage As String
saymessage = Right(Message, (Len(Message) - 5))
CleanSlateBot1.Send saymessage
AddChat "<" & Form2.txtUsername.Text & "> ", vbCyan, saymessage & vbNewLine, vbWhite
End If
End If
Next I


i add'd the names to the list and I try to Get it to do the @say command but just doesnt work.

Lobo

Quote from: TeEhEiMaN on July 11, 2003, 01:03 AM

For I = 0 To banned.ListCount
If Username = banned.List(I) Then
If Left((LCase(Message)), 5) = (Form2.txttrigger.Text & "say ") Then
Dim saymessage As String
saymessage = Right(Message, (Len(Message) - 5))
CleanSlateBot1.Send saymessage
AddChat "<" & Form2.txtUsername.Text & "> ", vbCyan, saymessage & vbNewLine, vbWhite
End If
End If
Next I


i add'd the names to the list and I try to Get it to do the @say command but just doesnt work.

You might wanna do
If LCase(left(message,5)) = (Form2.txttrigger.text & "say ") Then
Look it's a signature.

TeEhEiMaN


Ithien

You should make it support more than one characters trigger, and should support different capatilization, It could of not workes before because of wrong caps :)

Try this

For I = 0 To banned.ListCount
If LCase(Username) = LCase(banned.List(I)) Then
If LCase(Left(Right(Message, (Len(Message) - Len(Form2.txttrigger.Text))), 4)) = "say " Then
 Dim Cut As String
 Cut = Right(Message, (Len(Message) - Len(Form2.txttrigger.Text)) - 4)
 CleanSlateBot1.Send Cut
 AddChat "<" & Form2.txtUsername.Text & "> ", vbCyan, saymessage & vbNewLine, vbWhite
end if
End If
Next I

TeEhEiMaN

I made sure its right characters, so that cant be the problem