1. You will need php 5.6+
2. You need to run on x64 php
3. The script don't take 5 lines awake, only 3.
The script was originaly made by Sedrika.
2. You need to run on x64 php
3. The script don't take 5 lines awake, only 3.
Code:
<?php
define( 'MAX_RANDOM_OPTION', 3 );
define( '_AWAKE_SAFE_FLAG', 0x2000000000000000 );
class CRandomOptionProperty
{
static function GetRandomOptionSize( $nRandomOptItemId )
{
$nSize = 0;
$bCheckedSafeFlag = false;
$bCheckedSafeFlag = CRandomOptionProperty::IsCheckedSafeFlag( $nRandomOptItemId );
if( $bCheckedSafeFlag )
return nSize;
$i = 0x3FFFF << 8;
for( $j = 0; $j < MAX_RANDOM_OPTION; $j++ )
{
if( $nRandomOptItemId & $i )
$nSize++;
else
return $nSize;
$i = $i << 18;
}
return $nSize;
}
static function IsCheckedSafeFlag( $n64RandomeOption )
{
if( ( $n64RandomeOption & _AWAKE_SAFE_FLAG ) == _AWAKE_SAFE_FLAG )
return true;
return false;
}
static function GetParam( $nRandomOptItemId, $i, &$nDst, &$nAdj )
{
if ( $i > MAX_RANDOM_OPTION )
return false;
$nRandomOption = ( $nRandomOptItemId >> ( 8 + $i * 18 ) );
$nAdj = $nRandomOption & 0x000001FF;
if( $nRandomOption & 0x00000200 )
$nAdj = -$nAdj;
$nRandomOption = $nRandomOption >> 10;
$nDst = $nRandomOption & 0x0000007F;
return ( $nDst > 0 );
}
}
function GetAwakes( $nRandomOptItemId )
{
$nDst;
$nAdj;
$nStr = '';
$str = '';
if( CRandomOptionProperty::GetRandomOptionSize( $nRandomOptItemId ) > 1 )
$nStr = ', ';
for( $i = 0; $i < CRandomOptionProperty::GetRandomOptionSize( $nRandomOptItemId ); $i++ )
{
if( !CRandomOptionProperty::GetParam( $nRandomOptItemId, $i, $nDst, $nAdj ) )
continue;
if( $nAdj >= 0 )
$str .= $nDst.' +'.$nAdj.$nStr;
else
$str .= $nDst.' -'.$nAdj.$nStr;
}
return $str;
}
?>
<h2>Decrypt Flyff Awake</h2>
</div>
<form method="post">
<strong><p style="color:red">Awake Encrypt :</br></strong>
<input type="text" name="awake">
<input type="submit" name="push" />
</form>
</p></br>
<?php
if(isset($_POST['push']))
{
?>
<div class="title">
<h2>Awake Decrypt :</h2>
<span class="byline">Awake : <?php echo GetAwakes($_POST['awake']); ?></span>
</div>
<?php
}
?>