Ejemplo n.º 1
0
$current_time = time();
$clear = 0;
// ensure post data has to be sent!
// use $clear=1 if $_POST Data has been used
//getting Character Data (one Time at all!)
$character = new character($PHP_PHAOS_CHARID);
//if(!$character->name == "N/A") {
$character->auto_heal();
$character->auto_stamina();
$character->auto_reputation();
//echo "<br>:".$character->time_since_regen;
// start Drink Potion Code
$drink_potion = @$_POST["drink_potion"];
if ($drink_potion) {
    $clear = 1;
    $character->drink_potion();
}
// end Drink Poption Code
// start Deploying Points to Stats
$str_add = @$_POST['strength'];
$dex_add = @$_POST['dexterity'];
$wis_add = @$_POST['wisdom'];
$con_add = @$_POST['constitution'];
if ($str_add == "add" and $character->stat_points > 0) {
    if (!$character->level_up("strength")) {
        echo "an error has occured";
        exit;
    }
    $clear = 1;
}
if ($dex_add == "add" and $character->stat_points > 0) {