Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: UnkNowN....Man. on July 01, 2003, 09:42 PM

Title: Cmd ScrewIn Up
Post by: UnkNowN....Man. on July 01, 2003, 09:42 PM
Ok Peoples can you please tell me why like 3 of my 8 cmds are working? they are like all the same except wit different shit for there cmds. like htis "des" one works

Access = RetrieveAccess("Access", UserName)
If Access = "M" Or Access = "O" Then
       If Left(LCase(Message), 5) = (strTrigger & "des ") Then
       Dim strDes As String
       strDes = Right(Message, (Len(Message) - 5))
       CleanSlateBot1.Send "/designate " & strDes
       End If
       End If

Now the one above it witch is "kick" wont work

Access = RetrieveAccess("Access", UserName)
If Access = "M" Or Access = "O" Then
       If Left(LCase(Message), 5) = (strTrigger & "kick ") Then
       Dim strKick As String
       strKick = Right(Message, (Len(Message) - 5))
       CleanSlateBot1.Send "/kick " & strKick
       End If
       End If

and its like that with lots of em to... so can someone tell me what the >< is wrong with this?. if you can thx  :'(
Title: Re:Cmd ScrewIn Up
Post by: DarkMinion on July 01, 2003, 10:09 PM

If Left(LCase(Message), 5) = (strTrigger & "kick ") Then

strKick = Right(Message, (Len(Message) - 5))


The 5's in those lines should be 6's.
Title: Re:Cmd ScrewIn Up
Post by: Yoni on July 02, 2003, 09:33 AM
That, and instead of Right(Message, Len(Message) - 6) you can just do Mid(Message, 7).