<?php if (verif_connect()) { load_css('guild.css', 'guild'); if (has_guild()) { if (has_guild_acces('recrutement')) { if (request_confirm('guild-engage') || request_confirm('guild-refuse')) { if (verifier_token(60, get_link('Recrutement', 'Guild'), 'guild-candidat-' . $_POST['Account_ID'])) { $Account_Query = get_db("candidat_guild_confirm", array('Guild_ID' => guild_data('Guild_ID'), 'Account_ID' => request_post('Account_ID'))); if (!empty($Account_Query)) { if (request_confirm('guild-engage')) { update_db('Caranille_Accounts', stripslashes_r($_POST)); $message = "Vous avez été accepté dans la guilde " . guild_data('Guild_Name') . "."; } else { update_db('Caranille_Accounts', array('Account_ID' => $Account_Query['Account_ID'], 'Account_Guild_ID' => 0, 'Account_Guild_Accept' => 0)); $message = "Votre candidature dans la guilde " . guild_data('Guild_Name') . " a été refusé."; } add_diary($message, $Account_Query['Account_ID']); insert_db('Caranille_Private_Messages', array('Private_Message_Transmitter' => logged_data('Account_ID'), 'Private_Message_Receiver' => $Account_Query['Account_Pseudo'], 'Private_Message_Subject' => "Votre candidature dans la guilde " . guild_data('Guild_Name'), 'Private_Message_Message' => $message, 'Private_Message_Conversation' => null)); } } } } } }
$Player_ID = monster_data('ID'); exec_db("UPDATE Caranille_Accounts SET Account_Notoriety= Account_Notoriety + 1 WHERE Account_ID= {$Player_ID}"); } if ($_SESSION['Dungeon_Battle'] == 1) { $Town_Price_INN = htmlspecialchars(addslashes($information_Town['Town_Price_INN'])); $message = 'Vous êtes morts...<br />Vous avez été emmené d\'urgence à l\'auberge et les soins vous ont été facturé ' . $Town_Price_INN . ' Pièce d\'or<br />'; $HP_recup = $full_life; } if ($_SESSION['Chapter_Battle'] == 1) { $HP_recup = $full_life * ($percent_life_restore_chapter / 100); debug_log("HP_recup::{$HP_recup} = {$full_life}*({$percent_life_restore_chapter}/100)"); $_final .= $Chapter_Level['Chapter_Defeate']; } if ($_SESSION['Mission_Battle'] == 1) { $Town_Price_INN = htmlspecialchars(addslashes($information_Town['Town_Price_INN'])); $_final .= $Mission['Mission_Defeate']; $_final .= '<br />Vous avez été emmené d\'urgence à l\'auberge et les soins vous ont été facturé ' . $Town_Price_INN . ' Pièce d\'or<br />'; } if (isset($message)) { add_diary($message); $_final .= $message; } user_set('Account_HP_Remaining', $HP_recup); $_final .= '<br /><br /><form method="POST" action="' . $return . '">'; $_final .= '<input type="submit" name="End" value="Continuer">'; $_final .= '</form>'; } user_record(); // mise à jour en base du joueur } }
<?php include_once $_path . "Sources/Register/Modules/Register.php"; if (request_confirm('Classe')) { if (verifier_token(600, get_link('Classe', 'Register'), 'Register-step-classe')) { extract(stripslashes_r($_POST)); update_db('Caranille_Accounts', array('Account_Classe' => $Classe_ID, 'Account_ID' => $Account_ID, 'Account_Step' => 5)); $message = 'Vous venez de rejoindre une classe'; add_diary($message, $Account_ID); //echo '<br /><br />'.$message; $baseline = 'Inscription effectuée, vous allez recevoir le mail de validation'; $_SESSION['Account_Register']['step'] = 5; header('location:' . get_link('Bonus', 'Register')); //$bonus = true ; } } else { $classe = true; }
/** * Vérification pour savoir si le joueur monte de niveau */ function get_new_level() { global $Account_Data; $Next_Level = 2; $Account_Level = 1; $Experience = 0; $Level_Experience_Required = 0; if (empty($Account_Data)) { get_perso(logged_data('Account_Pseudo')); } if (verif_connect(true)) { if (user_has('Account_Experience')) { $Experience = user_data('Account_Experience'); } if (user_has('Level_Experience_Required')) { $Level_Experience_Required = user_data('Level_Experience_Required'); } if (user_has('Account_Level')) { $Account_Level = user_data('Account_Level'); } if ($Experience < 0) { $Experience = 0; } $gain = 0; if ($Experience >= $Level_Experience_Required) { while ($Experience >= $Level_Experience_Required) { $Level_Data = get_db('get_level_exp_req', array('Account_Level' => $Account_Level + 1)); if (!empty($Level_Data)) { $Level_Experience_Required = $Level_Data['Level_Experience_Required']; $gain++; debug_log("theorical calcul level :: (" . ($Account_Level + $gain)); if ($Experience < $Level_Experience_Required) { break; } } else { debug_log("level max"); break; } } user_set('Level_Experience_Required', $Level_Experience_Required); $message = "Votre personnage vient de gagner [" . $gain . "] niveau\\nIl est maintenant au niveau : {$Account_Level}"; add_diary($message); } update_db('Caranille_Accounts', array('Account_Level' => $Account_Level + $gain, 'Account_Experience' => $Experience, 'Account_ID' => user_data('Account_ID'))); $Next_Level = user_data('Level_Experience_Required') - $Experience; if (isset($message) && !empty($message)) { echo "<script type=\"text/javascript\"> alert(\"{$message}\"); </script>"; } } return $Next_Level; }
<?php // l'utilisateur peut ajouter un titre pour chaque module different de Caranille -Accueil //$title =""; $baseline = LanguageValidation::iMsg("welcome.game.order"); //"Bienvenue sur la page des ordres"; if (verif_connect()) { load_css('corps.css', 'corps'); load_css('order.css', 'order'); if (!has_order()) { if (request_confirm('Accept')) { $Order_ID = htmlspecialchars(addslashes($_POST['Order_ID'])); update_db('Caranille_Accounts', array('Account_Order' => $Order_ID, 'Account_ID' => $ID)); $baseline = 'Vous venez de rejoindre un ordre'; add_diary($baseline); //echo '<br /><br />'.$message; } } }
<?php if (verif_battle()) { if (request_confirm('Continue')) { if (has_roaster()) { if (monster_data('HP') <= 0) { if ($_SESSION['Arena_Battle'] !== 1) { $recrus = get_roaster(); if (!empty($recrus)) { foreach ($recrus as $Account) { $new_expe = $Account['Account_Experience'] + monster_data('Experience'); $new_gold = $Account['Account_Golds'] + monster_data('Golds'); update_db('Caranille_Accounts', array('Account_Experience' => $new_expe, 'Account_Golds' => $new_gold, 'Account_ID' => $Account['Account_ID'])); $diary_message = "Vous avez remporté le combat !!!<br />"; $diary_message .= "Pièces d'or (PO) + " . monster_data('Golds') . " <br />"; $diary_message .= "Experience (XP) + " . monster_data('Experience') . " <br />"; add_diary($diary_message, $Account['Account_ID']); } } } } } } }
if (!empty($quest)) { // first we need to check if the user has the appropriate item for the quest to be completed $find = get_db('item_quest_inventaire', $quest + user_data()); // print_r($find); if (!empty($find)) { // now lets first remove the item from the inventory, give the reward, and mark the quest as completed. use_item($quest['Quest_Item'], $find['inventory_ID']); if ($quest['Quest_Gold_Gift'] > 0) { // update with the new gold in the database update_db('Caranille_Account', array('Account_ID' => user_data('Account_ID'), 'Account_Golds' => user_data('Account_Golds') + $quest['Quest_Gold_Gift'])); } if ($quest['Quest_Item_Gift'] > 0) { gain_item($quest['Quest_Item_Gift']); } // mark the quest as complete update_db('Caranille_Inventory_Quests', array('Inventory_Quest_Account_ID' => user_data('Account_ID'), 'Inventory_Quest_Quest_ID' => $quest['Quest_ID'], 'Inventory_Quest_Status' => 'complete')); add_diary("Vous avez rendu une quete : " . $quest['Quest_Name']); } } } } if (request_confirm('accept_quest')) { if (verifier_token(600, get_link('QuestBoard', 'Game'), 'accept_quest-' . $_POST['Quest_ID'])) { // need to assign the quest $quest = get_db('request_quest', $_POST); insert_db('Caranille_Inventory_Quests', array('Inventory_Quest_Account_ID' => user_data('Account_ID'), 'Inventory_Quest_Quest_ID' => $quest['Quest_ID'], 'Inventory_Quest_Status' => 'incomplete')); add_diary("Vous avez accepté une quete : " . $quest['Quest_Name']); } } } }