Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: DeSigN on February 09, 2003, 03:47 PM

Title: help with Kick and Ban
Post by: DeSigN on February 09, 2003, 03:47 PM
I need a code to do Ban and Kick This is what i have
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)"

Can someone please fix that or give me a new working one?
Title: Re: help with Kick and Ban
Post by: Noodlez on February 09, 2003, 03:50 PM
what's the value of What ?
Title: Re: help with Kick and Ban
Post by: Mesiah / haiseM on February 09, 2003, 04:34 PM


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*
if mid(lcase(what), 5) = trigger & "ban " then sendchat "/ban & mid(what, 6)
fixed.
 

Title: Re: help with Kick and Ban
Post by: Yoni on February 09, 2003, 04:37 PM
Doesn't seem to me like it would work
Title: Re: help with Kick and Ban
Post by: DeSigN on February 09, 2003, 04:44 PM
Doesn't

Sub is
Public Sub ChatIn(who, What)
Title: Re: help with Kick and Ban
Post by: Mesiah / haiseM on February 09, 2003, 04:54 PM
it would work, but he parsed things a tad bit weird, but we got it.
Title: Re: help with Kick and Ban
Post by: DeSigN on February 09, 2003, 04:54 PM
Thanks Mesiah, everything is working now
Title: Re: help with Kick and Ban
Post by: ILurker on February 09, 2003, 05:32 PM
Dim what2say As String
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