Forum

Results 1 to 9 of 9
  1. #1
    Join Date
    April 2012
    Location
    Germany
    Posts
    317

    How do I create a bot?

    Okay, I know a little about scripting, but I dont really know how or where to start creating a teamspeak bot.

    Where do I need to put the script file?
    Are there any documentations or guides (I didn't find any with forum or Google search)?

    Hope someone can help.

  2. #2
    Join Date
    December 2009
    Location
    Germany
    Posts
    2,354
    Quote Originally Posted by Istalantar View Post
    Okay, I know a little about scripting, but I dont really know how or where to start creating a teamspeak bot.

    Where do I need to put the script file?
    Are there any documentations or guides (I didn't find any with forum or Google search)?
    The script or program you create have to connect to the telnet interface of the TS3 server, called telnet query interface. By default on port 10011 on your TS3 server. Where you put your program or script don't matter, you just need a TCP/IP connection to that query port.

    But what do you need? For much things there are already TS3 bots, including my own.

  3. #3
    Join Date
    April 2012
    Location
    Germany
    Posts
    317
    It's nothing I need, I just want to understand how it works
    But it seems this is a little more complicate than I first thought, or I just can't figure it out myself.

  4. #4
    Join Date
    January 2014
    Location
    Sarah Land
    Posts
    15
    I would really like to know what i need to create my own teamspeak BOT or mod my own stuff for my teamspeak.

  5. #5
    Join Date
    April 2012
    Location
    Germany
    Posts
    317
    Okay, I know it's been some time since I created that thread, I tried to find a guide or something, but somehow I don't know where to start. As the start is most of the time the most difficult, I have some questions on how to start:
    (Let's focus on PHP with the answers, but if you like you can answer for other script languages, too.)

    - What's the command in php to connect to the Server Query? Is it socket_connect()?

    - When i am connected how do I execute query commands? Just echo the command?

    - How do I start the bot? On local Windows Server just double click (or execute in cmd) or starts the bot of its own, if it's placed in some special folder on serverstart?

    Probably some noob questions, but I really have no Idea how to begin. Hope someone answers, when I know how to start the rest isn't that difficult I guess.

    Thanks in advance.

  6. #6
    Join Date
    June 2012
    Location
    Portugal
    Posts
    317
    If you want to code a bot in PHP, take a look at the TS3 PHP Framework. Don't re-invent the wheel. It works very well and allows to do everything and beyond.

  7. #7
    Join Date
    May 2006
    Location
    Europe/Czech Rep.
    Posts
    1,616
    Quote Originally Posted by Istalantar View Post
    Okay, I know it's been some time since I created that thread, I tried to find a guide or something, but somehow I don't know where to start. As the start is most of the time the most difficult, I have some questions on how to start:
    (Let's focus on PHP with the answers, but if you like you can answer for other script languages, too.)

    - What's the command in php to connect to the Server Query? Is it socket_connect()?

    - When i am connected how do I execute query commands? Just echo the command?

    - How do I start the bot? On local Windows Server just double click (or execute in cmd) or starts the bot of its own, if it's placed in some special folder on serverstart?

    Probably some noob questions, but I really have no Idea how to begin. Hope someone answers, when I know how to start the rest isn't that difficult I guess.

    Thanks in advance.
    As extension of barricas reply with which I agree...
    connect query?: I suppose, or if you indeed don't want to use TS3 PHP framework you can at least try to understand it and dig what you need. After that you might realize why it was written in this way etc etc. It might help you advance your skills. Other good source that already contains most of the things on the backend part done is ts3admin class(http://addons.teamspeak.com/director...s-for-PHP.html)

    execute query?: no, definitely not echo. try fputs. Keep in mind that connecting writing,reading and closing in case of network connection to remote server is work with socket or resource. It is similar as to when you work with database in php.

    execution?: well no. There is no support from TeamSpeak3 client nor the server. So anyone who is running their bot are doing that completely separately after install of teamspeak3. Sometimes even installed on different machine/ip. What I mean is that those things are unrelated with exception of serverQuery interface/port.

    I do assume this obvious example:
    Code:
    require_once 'ts3admin.class.php';
    //require_once ts3phpframework...
    //open connection;
    //login-nick-configure connection;
    while (true){
      //operations();
    //  sleep ?;  depends whether operations are blocking/waiting or not.
    }
    //close connection;
    As far as your initial analysis perhaps if you find on addons page a bot that does most of the things you need, why not altering that one instead? Less work.

  8. #8
    Join Date
    April 2012
    Location
    Germany
    Posts
    317
    Thank you, I guess that is something I can start with. I look into that next week, when I have more time. And as I mentioned previously, I don't need any bot or plugin (at least not right now), I just want to understand how it works. =D

  9. #9
    Join Date
    June 2011
    Location
    Baghdad, Iraq
    Posts
    367
    currently working on a BOT for my servers PHP CLI based using ts PHP framework

    use this code
    its great just add your code in the onEvent function to interact with your servers events
    example:
    PHP Code:
    function onEvent(TeamSpeak3_Adapter_ServerQuery_Event $eventTeamSpeak3_Node_Host $host)
    {

        echo 
    "[SIG]\treceived notification " $event->getType() . "\n\t" $event->getMessage() . "\n";

        if(
    $event->getType()=='textmessage'){

                   
    // do sth with $event if its text message
                    
    print_r($event); // to output the $event info
        




Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to create a channel that create sup channel on join?
    By ThunderNRW in forum Server Support
    Replies: 0
    Last Post: June 1st, 2015, 11:00 PM
  2. Replies: 11
    Last Post: January 17th, 2011, 10:10 PM
  3. How to create?
    By RUMS18 in forum General Questions
    Replies: 3
    Last Post: July 9th, 2010, 09:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •