Ejemplo n.º 1
0
        mysql_query("UPDATE characters SET position_x = " . $x . ", position_y= " . $y . ", position_z = " . $z . ", map = " . $map . " WHERE account = " . $acct_id . " AND guid = '" . $character . "'");
        if ($GLOBALS['service']['teleport']['currency'] == "vp") {
            echo $GLOBALS['service']['teleport']['price'] . " Vote Points was taken from your account.";
        } elseif ($GLOBALS['service']['teleport']['currency'] == "dp") {
            echo $GLOBALS['service']['teleport']['price'] . " " . $GLOBALS['donation']['coins_name'] . " was taken from your account.";
        }
        account::logThis("Teleported " . $char_name . " from " . $from . " to " . $location, 'Teleport', $realm_id);
        echo true;
    }
}
if ($_POST['action'] == 'service') {
    $guid = (int) $_POST['guid'];
    $realm_id = (int) $_POST['realm_id'];
    $serviceX = mysql_real_escape_string($_POST['service']);
    connect::connectToRealmDB($realm_id);
    if (character::isAccountCharacter($guid, $acct_id) == FALSE) {
        die('<b class="red_text">This character does not belong to you!');
    }
    if (character::isOnline($guid) == TRUE) {
        die('<b class="red_text">Please log out your character before proceeding.');
    }
    if ($GLOBALS['service'][$serviceX]['currency'] == 'vp') {
        if (account::hasVP($_SESSION['cw_user'], $GLOBALS['service'][$serviceX]['price']) == FALSE) {
            die('<b class="red_text">Not enough Vote Points!</b>');
        }
    }
    if ($GLOBALS['service'][$serviceX]['currency'] == 'dp') {
        if (account::hasDP($_SESSION['cw_user'], $GLOBALS['service'][$serviceX]['price']) == FALSE) {
            die('<b class="red_text">Not enough ' . $GLOBALS['donation']['coins_name'] . '</b>');
        }
    }