Valhalla Legends Forums Archive | Battle.net Bot Development | help with Kick and Ban

AuthorMessageTime
DeSigN
I need a code to do Ban and Kick This is what i have
[code]If LCase(Left(What, 5)) = Trigger & "ban " Then SendChat "/ban & Mid(What, 6, Len(What) - 5)"
If LCase(Left(What, 6)) = Trigger & "kick " Then SendChat "/kick & Mid(What, 7, Len(What) - 6)"
[/code]

Can someone please fix that or give me a new working one?
February 9, 2003, 9:47 PM
Noodlez
what's the value of What ?
February 9, 2003, 9:50 PM
MesiaH


Code:
If LCase(Left(What, 5)) = Trigger & "ban " Then SendChat "/ban & Mid(What, 6, Len(What) - 5)"

If LCase(Left(What, 6)) = Trigger & "kick " Then SendChat "/kick & Mid(What, 7, Len(What) - 6)"

*buzz*
[code]
if mid(lcase(what), 5) = trigger & "ban " then sendchat "/ban & mid(what, 6)[/code]

fixed.


February 9, 2003, 10:34 PM
Yoni
Doesn't seem to me like it would work
February 9, 2003, 10:37 PM
DeSigN
Doesn't

Sub is
[code]Public Sub ChatIn(who, What)[/code]
February 9, 2003, 10:44 PM
MesiaH
it would work, but he parsed things a tad bit weird, but we got it.
February 9, 2003, 10:54 PM
DeSigN
Thanks Mesiah, everything is working now
February 9, 2003, 10:54 PM
ILurker
Dim what2say As String
[code]
If Username = csetup.master.Text And LCase(Left(Message, 6)) = csetup.trigger.Text + "kick " Then
what2say = Mid(Message, InStr(Message, " ") + 1)
CleanSlateBot1.Send "/kick " & what2say
end if[/code]
February 9, 2003, 11:32 PM

Search