Wednesday, October 6, 2010

Dice roller bot

I wrote a dice roller bot for GoogleTalk (or, really, any Jabber/XMPP chat server). Here's the README.txt, and here's the dicebot.rb script. It seems to work pretty well, but let me know if you find any bugs.

Screenshot of dice roller bot during chat


  1. Huzzah! You are a scholar and a gentleman, sir.

  2. Awesome! I suspect this may get a lot of use. :)

  3. We used it for our game last night, and it seemed to work pretty well. I did make a minor change, so that anything you type after the roll is repeated by the bot, like:

    :roll d6 poison damage

    would cause the bot to say

    Paul rolls d8 = 2 poison damage

  4. I'm a bit confused as to how you actually put the script into the place specified (home/whatever/andsoon)

    I'm kinda-sorta ok with programming, but I haven't done it in a while and only with Java script.

    Any help?

  5. The script doesn't care what folder you put it in, as long as you know where it is. Just copy the diceroller.rb file to a convenient folder.

    $ cp /MyDownloads/diceroller/diceroller.rb /MyStuff/whereever/

    $ ruby /MyStuff/whereever/diceroller.rb botAccountName botAccountPassword

    Let me know if you run into an snags. It's a Ruby script, and there are versions of Ruby for every major OS. I've tested it under Linux and Mac OS X. If you know how to get to the command line on your OS, you should have all the technical know-how necessary to run the bot.

  6. er... that is, the dicebot.rb file, not diceroller.rb.


Note: Only a member of this blog may post a comment.