$CORE->loggedInOrReturn(); //load the coin activity handler $CORE->load_CoreModule('coin.activity'); //load the characters handling class $CORE->load_ServerModule('character'); //load the log class $CORE->load_CoreModule('purchaseLog'); //load the sendmail class $CORE->load_ServerModule('commands'); $CORE->load_CoreModule('accounts.finances'); //prepare the sendmail class $command = new server_Commands(); //Setup the finances class $finance = new AccountFinances(); //prepare the log $logs = new purchaseLog(); //prepare multi errors $ERRORS->NewInstance('pStore_faction'); //bind the onsuccess message $ERRORS->onSuccess('Successfull character faction change.', '/index.php?page=factionchange'); $character = isset($_POST['character']) ? $_POST['character'] : false; $RealmId = $CURUSER->GetRealm(); //define how much a faction change is going to cost $factionChangePrice = 5; if (!$character) { $ERRORS->Add("Please select a character first."); } //Set the currency and price $finance->SetCurrency(CURRENCY_GOLD); $finance->SetAmount($factionChangePrice); //check if the user has enough balance
exit; } $CORE->loggedInOrReturn(); //load the coin activity handler $CORE->load_CoreModule('coin.activity'); //load the characters handling class $CORE->load_ServerModule('character'); //load the log class $CORE->load_CoreModule('purchaseLog'); //load the sendmail class $CORE->load_ServerModule('commands'); $CORE->load_CoreModule('accounts.finances'); //prepare the sendmail class $command = new server_Commands(); //prepare the log $logs = new purchaseLog(); //levels data $LevelsData = new LevelsData(); //Setup the finances class $finance = new AccountFinances(); //prepare multi errors $ERRORS->NewInstance('pStore_gold'); //bind the onsuccess message $ERRORS->onSuccess('Your purchase has been successfully delivered.', '/index.php?page=purchase_gold'); $character = isset($_POST['character']) ? $_POST['character'] : false; $GoldAmount = isset($_POST['amount']) ? (int) $_POST['amount'] : false; //assume the realm is 1 (for now) $RealmId = $CURUSER->GetRealm(); if (!$character) { $ERRORS->Add("Please select a character first."); }
$CORE->load_CoreModule('accounts.finances'); $CORE->load_CoreModule('purchaseLog'); //setup new instance of multiple errors $ERRORS->NewInstance('changedname'); //bind the onsuccess message $ERRORS->onSuccess('Your Display Name was successfuly changed.', '/index.php?page=changedname'); //Define the variables $displayName = isset($_POST['displayName']) ? $_POST['displayName'] : false; $currency = isset($_POST['currency']) ? (int) $_POST['currency'] : false; //Define the cost of display name change $PurchaseCost_Silver = 100; $PurchaseCost_Gold = 10; //Setup the finances class $finance = new AccountFinances(); //prepare the log $logs = new purchaseLog(); ###################################### ############### CHECKs ############### if (!$displayName) { //no new password $ERRORS->Add('Please enter your new Display Name.'); } else { if ($displaynameError = AccountsRegister::checkDisplayname($displayName)) { $ERRORS->Add($displaynameError); } } if (!$currency) { //no currency is selected $ERRORS->Add('Please select a currency for the purchase.'); } else { if (!$finance->IsValidCurrency($currency)) {
$ERRORS->Add("There is no realm assigned to your account."); } //check the cooldown if (time() < $cooldown) { $ERRORS->Add('This tool is on a cooldown, please try again later.'); } ######################################################################################### $ERRORS->Check('/index.php?page=teleporter'); #################################################################### ## The actual unstuck script begins here //load the character module $CORE->load_ServerModule('character'); $CORE->load_ServerModule('commands'); $CORE->load_CoreModule('purchaseLog'); //prepare the log $logs = new purchaseLog(); //prepare the commands class $command = new server_Commands(); //prepare the character handler $chars = new server_Character(); //setup the maps data class $MD = new MapsData(); //setup the map points data class $MP = new MapPoints(); //start logging $logs->add('TELEPORTER', 'Starting log session. Teleporting player: ' . $charName . ', to point: ' . $pointId . ', selected realm: ' . $RealmId . '.', 'pending'); //connect to the database if ($chars->setRealm($RealmId)) { ################################################ #### check if the character is valid ###### //get some character data
header('HTTP/1.0 404 not found'); exit; } $CORE->loggedInOrReturn(); //load the coin activity handler $CORE->load_CoreModule('coin.activity'); //load the characters handling class $CORE->load_ServerModule('character'); //load the log class $CORE->load_CoreModule('purchaseLog'); //load the sendmail class $CORE->load_ServerModule('commands'); //prepare the sendmail class $command = new server_Commands(); //prepare the log $logs = new purchaseLog(); //prepare multi errors $ERRORS->NewInstance('pStore_armorsets'); //bind the onsuccess message $ERRORS->onSuccess('The armor set was successfully sent.', '/index.php?page=itemsets'); $character = isset($_POST['character']) ? $_POST['character'] : false; $armorset = isset($_POST['armorset']) ? (int) $_POST['armorset'] : false; //Get the user selected realm $RealmId = $CURUSER->GetRealm(); //get the account gold $accountGold = (int) $CURUSER->get('gold'); if (!$character) { $ERRORS->Add("Please select a character first."); } //find the armorset record $res = $DB->prepare("SELECT id, price, realm, items FROM `armorsets` WHERE `id` = :id LIMIT 1;");
unset($allowedStats); //check if it needs updating if ($CURUSER->getSocial($app) === $status) { //already set exit; } ############################################################### ############### Update the Social Status ###################### //Im going to limit the status update to positive only because //we are going to reward users who give us positives if ($CURUSER->getSocial($app) === STATUS_POSITIVE) { exit; } $CORE->load_CoreModule('purchaseLog'); //prepare the log $logs = new purchaseLog(); //start logging $logs->add('SOCIAL_BUTTONS', 'Starting log session. Application: ' . $app . ', status variable: ' . $status . '.', 'pending'); //Update the user social button status if ($CURUSER->setSocial($app, $status)) { //If the status was update reward the user //log successful status update $logs->update(false, 'The user status was update.', 'pending'); //Load the most important module $CORE->load_CoreModule('accounts.finances'); //Setup the finances class $finance = new AccountFinances(); //Set the account id $finance->SetAccount($CURUSER->get('id')); //Set the currency to gold $finance->SetCurrency(CURRENCY_SILVER);
} $CORE->loggedInOrReturn(); //load the coin activity handler $CORE->load_CoreModule('coin.activity'); //load the characters handling class $CORE->load_ServerModule('character'); //load the log class $CORE->load_CoreModule('purchaseLog'); //load the sendmail class $CORE->load_ServerModule('commands'); //load the refund system $CORE->load_CoreModule('item.refund.system'); //prepare the sendmail class $command = new server_Commands(); //prepare the log $logs = new purchaseLog(); //prepare multi errors $ERRORS->NewInstance('store'); $items = isset($_POST['items']) ? $_POST['items'] : false; $charName = isset($_POST['character']) ? $_POST['character'] : false; $RealmId = $CURUSER->GetRealm(); //check if the realm is online if ($command->CheckConnection($RealmId) !== true) { $ERRORS->Add("The realm is currently unavailable. Please try again in few minutes."); } if (!$charName) { $ERRORS->Add("Please select a character first."); } if (!$items) { $ERRORS->Add("There ware no items to send."); }
exit; } $CORE->loggedInOrReturn(); //load the coin activity handler $CORE->load_CoreModule('coin.activity'); //load the characters handling class $CORE->load_ServerModule('character'); //load the log class $CORE->load_CoreModule('purchaseLog'); //load the sendmail class $CORE->load_ServerModule('commands'); $CORE->load_CoreModule('accounts.finances'); //prepare the sendmail class $command = new server_Commands(); //prepare the log $logs = new purchaseLog(); //levels data $LevelsData = new LevelsData(); //Setup the finances class $finance = new AccountFinances(); //prepare multi errors $ERRORS->NewInstance('pStore_levels'); //bind the onsuccess message $ERRORS->onSuccess('Your purchase has been successfully delivered.', '/index.php?page=levels'); $level = isset($_POST['levels']) ? (int) $_POST['levels'] : false; $character = isset($_POST['character']) ? $_POST['character'] : false; //assume the realm is 1 (for now) $RealmId = $CURUSER->GetRealm(); if (!$character) { $ERRORS->Add("Please select a character first."); }
//load the register module $CORE->load_CoreModule('accounts.finances'); $CORE->load_CoreModule('purchaseLog'); //setup new instance of multiple errors $ERRORS->NewInstance('purchase_boost'); //bind the onsuccess message $ERRORS->onSuccess('Your Boosts have been successfuly applied, please re-log.', '/index.php?page=boosts'); //Define the variables $RealmId = $CURUSER->GetRealm(); $BoostId = isset($_POST['boost']) ? (int) $_POST['boost'] : false; $currency = isset($_POST['currency']) ? (int) $_POST['currency'] : false; $DurationId = isset($_POST['duration']) ? (int) $_POST['duration'] : false; //Setup the finances class $finance = new AccountFinances(); //prepare the log $logs = new purchaseLog(); //The boosts storage $BoostsStorage = new BoostsData(); ###################################### ############### CHECKs ############### if (!$BoostId) { //no boost selected $ERRORS->Add('Please select boost first.'); } else { if (!($BoostDetails = $BoostsStorage->get($BoostId))) { //Verify the boost id $ERRORS->Add('The selected boost is invalid.'); } } if (!$currency) { //no currency is selected