Shoutbox

[release] Advanced Dice Roller - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [release] Advanced Dice Roller (/showthread.php?tid=75207)

[release] Advanced Dice Roller by aleXANder on 06-09-2007 at 03:33 PM

Advanced Dice Roller

----------------------

ADR is a Messenger Plus! Live script for performing virtual dice rolls following d20 "formulae" (like 1d6, 2d10+4 or even more complex) from within the chat window, either submitting the results to the chat or showing them secretly via "toast" popup.
Usage in a nutshell:
"/roll <formula>" for rolling, evaluation and printing results in chat window;
"/sroll <formula>" for the same except for showing results privately in a popup.

----------------------

Why did I do this script? (My first script with JScript and MP!L, actually) Browsing through this forum and MP!L scripts databe, I found several dice scripts, but they all were limited to rolling a set number of identical dice, often in a not-so-user-friendly syntax or in a separate window.

p&p RPG rules (and that's where dice are most needed, I think) often use modifiers and such, which requires to roll dice, and then do additional 9yet often simple) math. And, dice rolls are commonly fresented by what I called "d20-formulae", that is, expressions like 2d6 for sum of 2 six-sided dice, or 1d20+4 for a 20-sided die roll with a modifier. My script allows using such expressions directly [giving both final result and individual die rolls within it].

Example formulae: 1d6, 2d4, 1d20+2, 3*(5d10-25)-3, ((1d2*3d6-1)-2d4)*(7d8)
Example output: "/me rolls 2d6 + 2 -> [3+5]+2 -> 10" (for "/roll 2d6 + 2" command)

Script has 2 modes of operation, either "local", showing the results via a "toast" for making "secret" rolls, and "global", for posting the results in the chat window.

------------------------------------

You can get it from MP!L script database. Give it a try! If you find it somehow useful, let me know.
Further information is available in manual, included in the script distribution and here.