[RELEASE] MagParam Decrypter

09/14/2014 02:00 ​Exo#1
Hello there...
I coded some shit that will help you Decrypt MagParams..

Requirements

-You need a database with SHARD, why?, i was lazy to write the whole thing so i just used a query to make it easier.

Theory
#####
Example
######

A Look From the Code
Code:
string.Format("{###}", Dec);
Convert.ToInt64(MagP, 16);
The whole thing works on those 2[converters] other lines are just sqlcon/texts and shit
Thanks Syloxx for making some shits clear.



Code:
Tomorrow i will check if someone made something for variance if not i will try to make it
I know it's decrypted already
09/14/2014 02:40 Justin1337*#2
Thanks dude. =)
09/14/2014 03:17 ledgervera#3
Thanks for sharing, keep it up :awesome:
09/14/2014 04:10 Justin1337*#4
Quote:
Originally Posted by xExorcist View Post
Go get your own avatar you &&&&&leecher xD
haha. :P
09/14/2014 12:19 CallM3B1tch#5
Keep going ..
09/14/2014 14:09 Snow*#6
yas yas

item_stats.class.php
PHP Code:
<?php

class CItemInfo
{
    private 
$m_ItemType 0;
    private 
$m_nCurParam 0;
    private 
$m_CurStatParams = array();
    
    static 
$s_WeaponStatNames 
        array(
'Durability''PhyReinforce''MagReinforce''HitRatio''PhyAttack''MagAttack''CriticalRatio');
    
    static 
$s_EquipmentStatNames 
        array(
'Durability''PhyReinforce''MagReinforce''PhyDefense''MagDefense''ParryRatio');
    
    static 
$s_ShieldStatNames =
        array(
'Durability''PhyReinforce''MagReinforce''BlockRatio''PhyDefense''MagDefense');
    
    static 
$s_AccessoryStatNames =
        array(
'PhyAbsorb''MagAbsorb');
        

    
    public function 
__construct($item_type)
    {
        if(
$item_type || $item_type 0) die("Item with type > 4 or < 0 !!1 (CItemInfo)!!");
        
$this -> m_ItemType $item_type;
    }
    
    public function 
AddParam($param_value)
    {
        
$this -> m_CurStatParams[$this -> m_nCurParam++] = $param_value;
    }
    
    
    public function 
GetParams()
    {
        
$result = array(array());
        switch(
$this -> m_ItemType)
        {
            case 
0:
            {
                for(
$i 0$i count (self::$s_WeaponStatNames); $i++)
                {
                    
$result[$i] = 
                        array(
self::$s_WeaponStatNames[$i] => $this -> m_CurStatParams[$i]);
                }
            }
            break;
            case 
1:
            {
                for(
$i 0$i count (self::$s_EquipmentStatNames); $i++)
                {
                    
$result[$i] = 
                        array(
self::$s_EquipmentStatNames[$i] => $this -> m_CurStatParams[$i]);
                }
            }
            break;
            case 
2:
            {
                for(
$i 0$i count (self::$s_ShieldStatNames); $i++)
                {
                    
$result[$i] = 
                        array(
self::$s_ShieldStatNames[$i] => $this -> m_CurStatParams[$i]);
                }
            }
            break;
            case 
3:
            {
                for(
$i 0$i count (self::$s_AccessoryStatNames); $i++)
                {
                    
$result[$i] = 
                        array(
self::$s_AccessoryStatNames[$i] => $this -> m_CurStatParams[$i]);
                }
            }
            break;
        }
        return 
$result;
    }
}

class 
CItemClass
{
    
    static 
$s_Instance;
    
    static 
$s_ItemTypes 
        array(
'Weapon''Equipment''Shield''Accessory');
    
    private function 
__construct()
    {
    
    }
    
    protected function 
__clone()
    {
    
    }
    
    static public function 
Instance()
    {
        if(
is_null(self::$s_Instance))
        {
            
self::$s_Instance = new self();
        }
        return 
self::$s_Instance;
    }
    
    
//extract percentage from 32 bits
    
public function PercentageFromBitvalue($bitvalue)
    {
        return 
round(($bitvalue 100 31) - 0.5 0);
    }
    
    public function 
GetVarianceDump($variance$item_type_id)
    {
        
$result null;
        
$nCounter 0
        
//$variance = (ulong) $variance;
        
$g_Item = new CItemInfo($item_type_id);
        
    
        while(
$variance 0)
        {
                
$cur_stat $variance 0x1F;
                
$g_Item -> AddParam($this -> PercentageFromBitvalue($cur_stat));
                
$variance >>= 5;
        }

        
print_r($g_Item -> GetParams());
        return 
$g_Item -> GetParams();
    }
}
?>
get_whitestats.php
PHP Code:
<html>
<head>
    <title>squirrel</title>
</head>

<body>
    <center>
    <table border = '1' cellspacing = '2' cellpadding = '2'>
    <form method='post'>
    <td>Variance</td><td><input type='text' name='variance'></td><tr/>
    <td>ItemType</td>
    <td>
        <select name = 'item_type'>
        <option value='0'>Weapon</option>
        <option value='1'>Armor</option>
        <option value='2'>Shield</option>
        <option value='3'>Accessory</option>
        </select>
    </td>
    <td></td><td><input type='submit' value='GIV'></td>
    </form>
    </table>
    </center>
</body>

</html>

<?php


if(!empty($_POST['variance']))
{
    include(
'item_stats.class.php');

    
$instance CItemClass::Instance();
    
    
//$a = (long) ($_POST['variance']);
    
$instance -> GetVarianceDump((float)($_POST['variance']), $_POST['item_type']);
    
    
    
}

?>
credits goes to the squirrel
09/16/2014 08:54 kingman77778#7
Keep going :)
05/23/2015 21:15 where_love2003#8
why you not char sql ?
05/24/2015 11:08 Syloxx#9
Quote:
Originally Posted by where_love2003 View Post
why you not char sql ?
because i didnt told him how 2 do that in sql