Char calculation happening in function calculate_points.
$calc = array("level","potions_brewed","monsters_killed","gathers","fish_totalweight");
foreach($calc as $calc){
if(isset($char[$calc])){
if($base = $char[$calc]){
$char['points']+= round($base/$playtime*10000);
}
}
}
$char['extra'] = 0;
$char['extra']+= $char['levels_past_30']*2;
$char['extra']+= $char['number_dungeons_completed']*2;
$char['extra']+= $char['bosskills_cngiant']*2;
$char['extra']+= $char['shard_highest_level']*2;
$char['extra']+= $char['bosskills_shgiant']*2;
if(isset($char['number_shards_completed'])){
$sds = $char['number_shards_completed'];
foreach($sds as $sds){
$char['extra']+= $sds['shardLevel'] * 2;
}
}
$char['points']+=$char['extra'];