• Welcome to Valhalla Legends Archive.
 

adding cmds

Started by Crim-Training, November 05, 2003, 01:36 PM

Previous topic - Next topic

Crim-Training

this will probably end up in me gettin called noob etc, but i was wondering how do i add basic cmd's to a bot that have only 1 user (user on cfg)
ive seen how its done with flags etc but i dont know how to modify

i just wanna add a few commands to a bot so when ingame i can change mp3's etc
thx,

CupHead

In wherever you receive whispers:

If Username = "WhateverYourUsernameIs" Then
 Select Case Command
   Case Whatever
      Do Stuff
 End Select
End If

Tuberload

Quote from: Crim-Training on November 05, 2003, 01:36 PM
this will probably end up in me gettin called noob etc, but i was wondering how do i add basic cmd's to a bot that have only 1 user (user on cfg)
ive seen how its done with flags etc but i dont know how to modify

i just wanna add a few commands to a bot so when ingame i can change mp3's etc
thx,

I'm not going to call you a newby, but I am going to say I think you are taking on the wrong projects. How were you capable of getting a bot connected and then parsing the incoming data, if you aren't yet capable of implementing what you asked? I already know the answer to my question, so why I asked it I don't know. I just don't understand why people who don't seem interested in even learning how to program, are so interested in creating bots. Why don't you just find an author who is actively implementing new features by request and use theirs?
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

iago

It's true that that's like an absolutely basic concept that you shouldnt' even have to ask about...
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


hismajesty

Quote from: Tuberload on November 05, 2003, 03:12 PM
Quote from: Crim-Training on November 05, 2003, 01:36 PM
this will probably end up in me gettin called noob etc, but i was wondering how do i add basic cmd's to a bot that have only 1 user (user on cfg)
ive seen how its done with flags etc but i dont know how to modify

i just wanna add a few commands to a bot so when ingame i can change mp3's etc
thx,

I'm not going to call you a newby, but I am going to say I think you are taking on the wrong projects. How were you capable of getting a bot connected and then parsing the incoming data, if you aren't yet capable of implementing what you asked? I already know the answer to my question, so why I asked it I don't know. I just don't understand why people who don't seem interested in even learning how to program, are so interested in creating bots. Why don't you just find an author who is actively implementing new features by request and use theirs?


I'm guessing you answered CSB.

Tuberload

Yes you are correct, well partially. There is plenty of source code available to bots to be stolen as well.
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

Freeware

Quote from: Crim-Training on November 05, 2003, 01:36 PM
this will probably end up in me gettin called noob etc, but i was wondering how do i add basic cmd's to a bot that have only 1 user (user on cfg)
ive seen how its done with flags etc but i dont know how to modify

i just wanna add a few commands to a bot so when ingame i can change mp3's etc
thx,

Ok, but if you cant even make command check code  you shouldnt be making bots.


Public Sub CheckForCommand(Username as String, Message as String)
          Dim strTrigger as String
          Dim strCommand as String
          Dim strParse() as String
          Dim strRestOf as String
On Error Resume Next

strTrigger = Mid(Message, 1, 1)
If strTrigger <> "." then Exit Sub

If ucase(Username) <> "CRIM-TRAINING" then exit sub
strParse = Split(Message, " ")
strCommand = strParse(0)
strCommand = Mid(strCommand, 2)
strRestOf = InStr(1, Message, strTrigger & strCommand) + Len(strTrigger & strCommand)

 Select Case ucase(strCommand)
       Case "SAY"
         Send strRestOf
       Case "BAN"
         Send "/ban " & strParse(1)
       Case "JOIN"
         Send "/join " & strRestOf
 End Select

End Sub

note i have not tested this actual code myself, i just wrote it right now