. . . wherein Paul Gorman plays with ideas for old-school fantasy roleplaying games
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.
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:
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.
Good times. :)
ReplyDeleteNice.
ReplyDeleteHuzzah! You are a scholar and a gentleman, sir.
ReplyDeleteAwesome! I suspect this may get a lot of use. :)
ReplyDeleteWe 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:
ReplyDelete:roll d6 poison damage
would cause the bot to say
Paul rolls d8 = 2 poison damage
I'm a bit confused as to how you actually put the script into the place specified (home/whatever/andsoon)
ReplyDeleteI'm kinda-sorta ok with programming, but I haven't done it in a while and only with Java script.
Any help?
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.
ReplyDelete$ cp /MyDownloads/diceroller/diceroller.rb /MyStuff/whereever/
$ ruby /MyStuff/whereever/diceroller.rb botAccountName botAccountPassword private-chat-room-number@example.com/botNickNameWhatever
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.
er... that is, the dicebot.rb file, not diceroller.rb.
ReplyDelete