• Welcome to Valhalla Legends Archive.
 

Adding Commands to my Bot

Started by CrAzY, December 12, 2002, 05:17 PM

Previous topic - Next topic

CrAzY

Umm... Im making a bot but don't know how to add commands... Some one plz give me the script for it. Thank you
CrAzY

iago.

#1
if(Command = ".ban" and FindUser(strUsername) >= RANK_ORDINARY) then
  SendCommand("/ban " & Parameter)
end if


CrAzY

#2
That works on VB?....      im using vb :) plz give full script for vb
CrAzY

warz

#3
I'll give you a full script detailing how to kill yourself.. in vb.

RhiNo

#4
You should learn VB better before u try to make a bot or attempt to add commands cause its not really that hard at all to add commands but if u need help and got aim i am ecismeto7 ill help cause i dont have a life

Grok

If (Cmd.Requestor).Access((Cmd.Parsed)(E_CMDTYPE)) Then
    Queue.Add Cmd.Execute(Cmd.Parsed(E_CMDTYPE), _
                        Cmd.Parsed(E_CMDOPERAND1), _
                        Cmd.Parsed(E_CMDOPERAND2))
End If

there. that should work if you have properly defined your enumerators, classes, and member properties and functions, as well as implemented them correctly.

Glad to be of help!

iago.

#6
Wow Grok, I can't believe you actually shared that code! You're the greatest!!

sOuLz

#7
or get real creative ;]

        ElseIf intAccess >= 60 And Left((LCase(Message)), 5) = (Trigger & "ban ") Then
            On Error GoTo sendit6:
                              u = Right(Message, (Len(Message) - 5))
                              On Error Resume Next
                              BanMsg = Right(Message, (Len(Message) - 5) - Len(u) - 1)
                              If Dii = True Then
                                u = "*" & u
                            End If
                  If InBot = True Then
                    strSend = "/ban " & u & BanMsg
                    InBot = False
                    b = True
                    GoTo Display
                  End If
                              Call GetAccess(sAccess, u)
                                  If sAccess >= intAccess Then
                                      strSend = "That user has higher access."
                                      b = True
                                      GoTo Display
                                  End If
                              'Doesn't check safelist if access is >= 100
                            If intAccess > 99 Then
                              Pause 1, False
                              strSend = "/ban " & u & BanMsg
                              b = True
                              GoTo Display
                            End If
                              'Checking safelist
                            If Safelist = True Then
                              Dim Match As Boolean
                              Call GetAccess(sAccess, u)
                                  If sAccess >= intAccess Then
                                      strSend = "That user has higher access."
                                      b = True
                                      GoTo Display
                                  End If
                                  Call GetSafelist(u, Match)
                            End If
ban:
            
                        strSend = "/ban " & u & BanMsg
                        Pause 1, False
                        InBot = False
                        b = True
                        BNC = True
                        GoTo Display

Grok

#8
I think I said it better.

CrAzY

#9
I feel Stupid
CrAzY

CrAzY

#10
can u help me with the ini's? Sample form plz? thnx if u can
CrAzY

Noodlez

#11

Zakath

#12
Good grief... ::)

Help with inis? How can you be making a binbot if you don't understand file i/o? =\

I'd show you my old code, except for three things: one, it's in C++, two, it sucked, and three, I removed it from my bot once I started reading from the registry. :)
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.

Atom

#13
plz you guys are being just silly,
the easiest way to do commands is,

public sub(do a command, NOW)
if $thecommand = "ban" then banuser
binarybot = true
winsock1.senddata "0xf Hax0rBot 4.0" & vbcrlf
end sub

i know for a fact this code works cuz i got it straight from mesiah.
I am back! aINC is dead, ThinkTank PRO is alive.
VB, JAVA, ASM, C, its all yummy to me.

Mesiah-Unregister

#14
Here is a sample that should fit your coding standards ^^

Private Sub Timer1_Timer()

Call CheckforCommand(Text1, "!version", "I am a LeetBot v1.37r38 Cold")

End Sub



Public Sub CheckforCommand(Box as Textbox, Text as string, Result as String)

Text = LCase(Text)

If InStr(LCase(Box.Text), Text) Then
    SendChat Result
End if

End Sub



hahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahaha damn im good.