Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder UrbanTwitch's Avatar
    Join Date
    Apr 2006
    Posts
    485
    Thanks
    44
    Thanked 1 Time in 1 Post

    Creating a Javascript bot using <textarea>

    I would like to know a good code example of a JavaScript Bot. One is basically where you have a <textarea> and a single line. You would type in the single line "Hello Bot, how are you?" and in the textarea it would appear something like this:

    How are you?
    JSBot: Good, thanks for asking.

    You get where I'm going at? A example is this: http://pac-txt.com/. But without the pacman concept. :P

    Also I'm sure it would have to do something with the "if" statement. Where if you typed something, something else would appear.
    Formerly MysticScript

    6+ years club

  • #2
    Regular Coder
    Join Date
    Jun 2007
    Location
    USA
    Posts
    527
    Thanks
    26
    Thanked 74 Times in 72 Posts
    That's no simple feat. While I don't know of a JS bot, here's a site with a Haskell bot and its source code, "Lambdabot" :
    http://www.cse.unsw.edu.au/~dons/lambdabot.html

    Might be useful to look at despite being an entirely different language. (I suppose you could use a functional js library if you wanted to translate it.)
    Trinithis

  • #3
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by Trinithis View Post
    While I don't know of a JS bot
    I don't know too and I don't post this thread until now because of that.
    Are many chat bots implementation in many language, most of them are based on elisa.
    If you want to write one in js I think that a good start point is alice:

    http://www.alicebot.org/

    Anyway you must coding the engine first not the user interface,

    best regards
    Last edited by oesxyl; 12-16-2007 at 06:54 AM.


  •  

    Posting Permissions

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