if (!defined('init_executes')) { 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'); $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) {
private function ProcessItemReward($entry) { global $CORE; //Make sure we have a selected realm //It's set to realm 1 by default but //it might be needed later on if ($this->realm === false) { $this->errors[] = 'The realm id is missing.'; return false; } //Make sure a character is selected if (!$this->character) { $this->errors[] = 'This code requires a character to be selected.'; return false; } //load the sendmail class if (!$CORE->isLoaded_ServerModule('commands')) { $CORE->load_ServerModule('commands'); } //prepare the sendmail class $command = new server_Commands(); //check if the realm is online if ($command->CheckConnection($this->realm) !== true) { $this->errors[] = 'The realm is currently unavailable. Please try again in few minutes.'; return false; } //load the characters handling class if (!$CORE->isLoaded_ServerModule('character')) { $CORE->load_ServerModule('character'); } //construct the characters handler $chars = new server_Character(); if (!$chars->setRealm($this->realm)) { $this->errors[] = 'The website failed to load realm database. Please contact the administration for more information.'; return false; } //check if the character belongs to this account if (!$chars->isMyCharacter(false, $this->character, (int) $this->account)) { $this->errors[] = 'The selected character does not belong to this account.'; return false; } //Send the item $sentMail = $command->sendItems($this->character, $entry, 'Promotion Code Reward', $this->realm); //make sure the mail was sent if ($sentMail !== true) { $this->errors[] = 'The website was unable to deliver your reward due to reason: ' . $sentMail; return false; } unset($chars, $command); return true; }
//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 $charData = $chars->getCharacterData(false, $charName, array('guid', 'level')); //find the map key by pointId
if (!defined('init_executes')) { 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'); $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."); }
if (!defined('init_executes')) { 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."); }
if (!defined('init_executes')) { header('HTTP/1.0 404 not found'); exit; } if (!$CURUSER->isOnline()) { echo 'Error: You must be logged in.'; die; } //load the character module $CORE->load_ServerModule('character'); $CORE->load_CoreModule('item.refund.system'); $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 characters class $chars = new server_Character(); //prepare multi errors $ERRORS->NewInstance('refund_item'); $RealmId = $CURUSER->GetRealm(); $refundId = isset($_POST['id']) ? (int) $_POST['id'] : false; if (!$RealmId) { echo 'There is no realm assigned to your account.'; die; } if (!$chars->setRealm($RealmId)) { echo 'The realm assigned to your account is invalid.'; die;
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'); //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) {
if (!defined('init_executes')) { 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'); $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) {
if (!defined('init_executes')) { 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'); $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_recustomization'); //bind the onsuccess message $ERRORS->onSuccess('Successfull character re-customization.', '/index.php?page=recustomization'); $character = isset($_POST['character']) ? $_POST['character'] : false; //assume the realm is 1 (for now) $RealmId = $CURUSER->GetRealm(); //define how much a faction change is going to cost $recustomizationPrice = 5; if (!$character) { $ERRORS->Add("Please select a character first.");