Post
Topic
Board Gambling
Re: Primedice | Most Popular Bitcoin Game |1% Edge | PVP | Jackpot | Faucet
by
rfisher1968
on 25/09/2014, 22:41:45 UTC
I have made a PHP script that helps validate the rolls on PD3.

Code:
$clientseed = "Your Client Seed";
$serverseed = "Your Server Seed";
$nonce = your nonce your checking;

// DO NOT EDIT BELOW THIS LINE

$c = $clientseed . "-" . $nonce;
$result = strtoupper(hash_hmac('sha512', $c, $serverseed));

$tmp2 = 0;
$resultnum = 0;
$flag = 0;
do
{
    $hexnum = substr($result,(5*$tmp2),5);
    $resultnum = hexdec($hexnum);
    $tmp2++;
    if ( $tmp2 * 5 + 5 > 128 )
    {
        $flag = 1;
    }
}
while ( $resultnum >= 1000000 && $flag == 0 );

if ( $flag == 1 )
{
    $lucky = 99.99;
}
else
{
    $lucky = substr($resultnum,-4,2) . "." . substr($resultnum,-2);
}
    
echo "nonce(" . $nonce . ") = " . $lucky;
  

Copy the code to a online PHP executer like http://writecodeonline.com/php/