Ejemplo n.º 1
0
function GetExpPercentage($level, $currentEXP)
{
    global $__exp_table;
    $neededEXP = GetNextLevelEXP($level);
    return $currentEXP / $neededEXP * 100;
}
Ejemplo n.º 2
0
        echo $optionName;
        ?>
" <?php 
        echo !$hidden ? 'checked' : '';
        ?>
 />
<?php 
    }
    // Some quick count queries
    $qcount = $__char_db->query("\nSELECT\n\t(SELECT COUNT(DISTINCT a.questid) FROM (SELECT questid FROM quests_done WHERE character_id = " . $internal_id . " UNION ALL SELECT questid FROM quests_done_party WHERE character_id = " . $internal_id . ") a) as `quests_done`,\n\t(SELECT COUNT(DISTINCT a.questid) FROM (SELECT questid FROM quests_running WHERE character_id = " . $internal_id . " UNION ALL SELECT questid FROM quests_running_party WHERE character_id = " . $internal_id . ") a) as `quests_left`,\n\t(SELECT COUNT(*) FROM skills WHERE character_id = " . $internal_id . ") as `skills`\n");
    $statistics = $qcount->fetch_assoc();
    $qcount->free();
    $avatarurl = 'http://' . $locale_domain . '/ignavatar/' . $character_info['name'] . '?size=big&flip';
    $expbar = array();
    $expbar['current'] = $character_info['exp'];
    $expbar['max'] = GetNextLevelEXP($character_info['level'], $character_info['exp']);
    $expbar['percentage'] = GetExpPercentage($character_info['level'], $character_info['exp']);
    $expbar['percentage'] = round($expbar['percentage'] * 100) / 100;
    ?>
<div class="row">
	<div class="span12">
	<?php 
    if ($character_info['account_id'] !== '2') {
        ?>
		<a href="//<?php 
        echo $account->GetUsername();
        ?>
.<?php 
        echo $domain;
        ?>
/" class="btn btn-mini pull-right" style="margin-bottom: 10px">Return to <?php 
Ejemplo n.º 3
0
        $row['mmp'] += (100 + CalculateSkillValue($data['mmpR'], $xvalue)) / 100;
    }
}
$row['str'] = round($row['str']);
$row['dex'] = round($row['dex']);
$row['int'] = round($row['int']);
$row['luk'] = round($row['luk']);
$row['mhp'] = round($row['mhp']);
$row['mmp'] = round($row['mmp']);
$row['str'] = $row['str'] . ' (' . $before['str'] . ' + ' . ($row['str'] - $before['str']) . ')';
$row['dex'] = $row['dex'] . ' (' . $before['dex'] . ' + ' . ($row['dex'] - $before['dex']) . ')';
$row['int'] = $row['int'] . ' (' . $before['int'] . ' + ' . ($row['int'] - $before['int']) . ')';
$row['luk'] = $row['luk'] . ' (' . $before['luk'] . ' + ' . ($row['luk'] - $before['luk']) . ')';
//$row['mhp'] = $row['mhp'].' ('.$before['mhp'].' + '.($row['mhp'] - $before['mhp']).')';
//$row['mmp'] = $row['mmp'].' ('.$before['mmp'].' + '.($row['mmp'] - $before['mmp']).')';
$nextlevelexp = GetNextLevelEXP($row['level']);
$nextlevelperc = $nextlevelexp == 0 ? 0 : round($row['exp'] / $nextlevelexp * 100);
$image = imagecreatetruecolor(192, 345);
imagealphablending($image, false);
imagesavealpha($image, true);
$bg_image = imagecreatefrompng("../inc/img/stat_window.png");
imagecopyresampled($image, $bg_image, 0, 0, 0, 0, 192, 345, 192, 345);
imagealphablending($image, true);
$base_x = 74;
$base_y = 38;
$step = 18;
$i = 0;
ImageTTFText($image, 9, 0, $base_x, $base_y + $step * $i++, imagecolorallocate($image, 0, 0, 0), $font, $row['name']);
ImageTTFText($image, 9, 0, $base_x, $base_y + $step * $i++, imagecolorallocate($image, 0, 0, 0), $font, GetJobname($row['job']));
ImageTTFText($image, 9, 0, $base_x, $base_y + $step * $i++, imagecolorallocate($image, 0, 0, 0), $font, $row['level']);
ImageTTFText($image, 9, 0, $base_x, $base_y + $step * $i++, imagecolorallocate($image, 0, 0, 0), $font, $row['exp'] . ' (' . $nextlevelperc . '%)');