Ejemplo n.º 1
0
        echo "an error has occured";
        exit;
    }
    $clear = 1;
}
if ($con_add == "add" and $character->stat_points > 0) {
    if (!$character->level_up("constitution")) {
        echo "an error has occured";
        exit;
    }
    $clear = 1;
}
// end Deploying Points to Stats
//$overtake=($character->level()+1);
//$next_lev = ($overtake);
if ($character->level() < 1000) {
    $needed_xp = mysql_query("SELECT * FROM phaos_level_chart WHERE level = '" . ($character->level() + 1) . "'");
    if ($row = mysql_fetch_array($needed_xp)) {
        $char_next_lev_xp = $row["xp_needed"];
    }
    if ($character->xp > $char_next_lev_xp) {
        $query = "UPDATE phaos_characters SET stat_points = '" . (1 + $character->stat_points) . "', level = '" . (1 + $character->level()) . "' WHERE username = '******'";
        $req = mysql_query($query);
        if (!$req) {
            echo "<B>Error " . mysql_errno() . " :</B> " . mysql_error() . "";
            exit;
        }
        $clear = 1;
    }
}
//}