if ($_REQUEST['ET']){
$Threshold = $_REQUEST['txtTH'];$i=0;$x=0;$hit=0;$DicePool=$_REQUEST['txtDice'];
while($hit < $Threshold){
while($i < $DicePool){
$Roll = rand(1,6);
if ($Roll >= 5) $hit++;
$i++;
}
$x++;
}
$Output = '<b>'.$x. '</b> Iterations for <b>'.$hit.'</b> hits <br>Threshold='.$Threshold.'<br>Dice Pool='.$DicePool;
}
Edited by Steviepoofs, 07 October 2010 - 12:18 PM.


Sign In
Create Account

Back to top









