You can roll dice by using scripting. For example, if you had the variable YEAH and wanted to make a link have a one in six chance of leading to another page, you could use the following link script:
%YEAH := 1D6 #setting the variable YEAH to the value of 1 roll of a 6-sided die
IF %YEAH = 6 THEN #if the result of the die roll is 6
BEGIN
$DEST := @P15 #set the destination to page 15.
END
So essentially to have die roll, you just have to use the #D#, where the first # is the number of dice you are rolling and the second # is how many sides each of those dice have. If you want to let the reader know what they rolled, you can display the variable that is being changed for a dice roll on the page. Like, if you wanted to say you rolled a five, you could write:
You rolled a %%YEAH%%.
And that would show up as "You rolled a 5."
You can also do this without scripting by using variables. Solo wrote an article on it, which you can read here. Hope that helped! (Also, I've moved this from the Feature Wishing Well as we already have the feature you desire.)