function mmorpg_init() { global $bdd; if (request_confirm('Start_Installation')) { $Level = 1; $Experience = 0; $HP = 100; $MP = 10; $Strength = 10; $Magic = 10; $Agility = 10; $Defense = 10; do { insert_db('Caranille_Levels', array('Level_ID' => $Level, 'Level_Number' => $Level, 'Level_Experience_Required' => $Experience, 'Level_HP' => $HP, 'Level_MP' => $MP, 'Level_Strength' => $Strength, 'Level_Magic' => $Magic, 'Level_Agility' => $Agility, 'Level_Defense' => $Defense)); $HP += $_POST['HP_Level']; $MP += $_POST['MP_Level']; $Strength += $_POST['Strength_Level']; $Magic += $_POST['Magic_Level']; $Agility += $_POST['Agility_Level']; $Defense += $_POST['Defense_Level']; $Experience += $_POST['Experience_Level']; $Level++; } while ($Level < 200); record_curve(); } if (request_confirm('MMORPG_Name') && $_POST['MMORPG_Presentation'] && $_POST['Pseudo'] && $_POST['Password'] && $_POST['Email']) { if (register_admin() && register_config()) { $Pseudo = htmlspecialchars(addslashes($_POST['Pseudo'])); $Date = date('Y-m-d H:i:s'); config_forum(); install_forum(); config_ville(); config_invocation(); config_magic(); config_order(); config_monsters(); config_chapter(); config_mission(); config_items(); config_race(); config_classe(); init_news($Pseudo, $Date); return true; } } }
function mmorpg_init() { global $bdd; if (request_confirm('Start_Installation')) { $Level = 1; $Experience = 0; $HP = 100; $MP = 10; $Strength = 10; $Magic = 10; $Agility = 10; $Defense = 10; do { insert_db('Caranille_Levels', array('Level_ID' => $Level, 'Level_Number' => $Level, 'Level_Experience_Required' => $Experience, 'Level_HP' => $HP, 'Level_MP' => $MP, 'Level_Strength' => $Strength, 'Level_Magic' => $Magic, 'Level_Agility' => $Agility, 'Level_Defense' => $Defense)); $HP += $_POST['HP_Level']; $MP += $_POST['MP_Level']; $Strength += $_POST['Strength_Level']; $Magic += $_POST['Magic_Level']; $Agility += $_POST['Agility_Level']; $Defense += $_POST['Defense_Level']; $Experience += $_POST['Experience_Level']; $Level++; } while ($Level < 200); record_curve(); } if (request_confirm('MMORPG_Name') && request_confirm('MMORPG_Presentation') && request_confirm('Pseudo') && request_confirm('Password') && request_confirm('Email')) { if (register_admin() && register_config()) { $Pseudo = htmlspecialchars(addslashes($_POST['Pseudo'])); $Date = date('Y-m-d H:i:s'); insert_db('Caranille_Towns', array('Town_ID' => 1, 'Town_Name' => 'Indicia', 'Town_Description' => 'Petite ville cotière', 'Town_Price_INN' => 10, 'Town_Chapter' => 1, 'Town_PosX' => -1, 'Town_PosY' => 3, 'Town_Landing' => 'sand')); insert_db('Caranille_Invocations', array('Invocation_ID' => 1, 'Invocation_Name' => 'Trident', 'Invocation_Description' => 'Chimère qui provient du fond des océans', 'Invocation_Damage' => 10, 'Invocation_Town' => 1, 'Invocation_Price' => 200)); insert_db('Caranille_Magics', array('Magic_ID' => 1, 'Magic_Image' => 'http://localhost', 'Magic_Name' => 'Feu', 'Magic_Description' => 'Petite boule de feu', 'Magic_Type' => 'Attack', 'Magic_Effect' => 5, 'Magic_MP_Cost' => 10, 'Magic_Town' => 1, 'Magic_Price' => 50)); insert_db('Caranille_Magics', array('Magic_ID' => 2, 'Magic_Image' => 'http://localhost', 'Magic_Name' => 'Soin', 'Magic_Description' => 'Un peu de HP en plus', 'Magic_Type' => 'Health', 'Magic_Effect' => 10, 'Magic_MP_Cost' => 5, 'Magic_Town' => 1, 'Magic_Price' => 50)); insert_db('Caranille_Orders', array('Order_ID' => 1, 'Order_Name' => 'Neutre', 'Order_Description' => 'Ordre par défaut')); insert_db('Caranille_Orders', array('Order_ID' => 2, 'Order_Name' => 'Ange', 'Order_Description' => 'Les anges sont des gens qui vivent pour aider les autres au prix de leur vie')); insert_db('Caranille_Orders', array('Order_ID' => 3, 'Order_Name' => 'Demon', 'Order_Description' => 'Les démons sont des gens peut scrupuleux et qui ont une soif de pouvoir')); insert_db('Caranille_Monsters', array('Monster_ID' => 1, 'Monster_Image' => 'http://localhost', 'Monster_Name' => 'Plop', 'Monster_Description' => 'Petit monstre vert', 'Monster_Level' => 1, 'Monster_Strength' => 15, 'Monster_Defense' => 5, 'Monster_HP' => 40, 'Monster_MP' => 30, 'Monster_Golds' => 5, 'Monster_Experience' => 5, 'Monster_Town' => 1, 'Monster_Access' => 'Battle')); insert_db('Caranille_Monsters', array('Monster_ID' => 2, 'Monster_Image' => 'http://localhost', 'Monster_Name' => 'Dragon', 'Monster_Description' => 'Monstre qui crache du feu', 'Monster_Level' => 1, 'Monster_Strength' => 50, 'Monster_Defense' => 30, 'Monster_HP' => 1000, 'Monster_MP' => 100, 'Monster_Golds' => 100, 'Monster_Experience' => 100, 'Monster_Town' => 1, 'Monster_Access' => 'Mission')); insert_db('Caranille_Monsters', array('Monster_ID' => 3, 'Monster_Image' => 'http://localhost', 'Monster_Name' => 'Plop doree', 'Monster_Description' => 'Petit monstre en or', 'Monster_Level' => 1, 'Monster_Strength' => 75, 'Monster_Defense' => 10, 'Monster_HP' => 300, 'Monster_MP' => 30, 'Monster_Golds' => 5, 'Monster_Experience' => 5, 'Monster_Town' => 1, 'Monster_Access' => 'Chapter')); insert_db('Caranille_Chapters', array('Chapter_ID' => 1, 'Chapter_Number' => 1, 'Chapter_Name' => 'Chapitre 1 - Le commencement', 'Chapter_Opening' => 'Bienvenue dans Indicia, une ville d\'habitude très agréable, malheureusement un monstre bloque l\'accé à la ville', 'Chapter_Ending' => 'Vous avez sauvé la ville', 'Chapter_Defeate' => 'Vous êtes morts en héros', 'Chapter_Monster' => 3)); insert_db('Caranille_Missions', array('Mission_ID' => 1, 'Mission_Town' => 1, 'Mission_Number' => 1, 'Mission_Name' => 'Mission 01 - Affronter un dragon', 'Mission_Introduction' => 'Un dragon menace le village de Indicia, aller l\'affronter pour sauver le village', 'Mission_Victory' => 'Vous avez sauvé le village', 'Mission_Defeate' => 'Le dragon vient de détruire le village', 'Mission_Monster' => 2)); insert_db('Caranille_Items', array('Item_ID' => 1, 'Item_Image' => 'http://localhost', 'Item_Type' => 'Weapon', 'Item_Level_Required' => 1, 'Item_Name' => 'Epée de cuivre', 'Item_Description' => 'Une petite Epée', 'Item_Town' => 1, 'Item_Purchase_Price' => 10, 'Item_Sale_Price' => 5)); insert_db('Caranille_Items', array('Item_ID' => 2, 'Item_Image' => 'http://localhost', 'Item_Type' => 'Armor', 'Item_Level_Required' => 1, 'Item_Name' => 'Armure de cuivre', 'Item_Description' => 'Une petite armure', 'Item_Town' => 1, 'Item_Purchase_Price' => 10, 'Item_Sale_Price' => 5)); insert_db('Caranille_Items', array('Item_ID' => 3, 'Item_Image' => 'http://localhost', 'Item_Type' => 'Boots', 'Item_Level_Required' => 1, 'Item_Name' => 'Bottes de cuivre', 'Item_Description' => 'Des petites bottes', 'Item_Town' => 1, 'Item_Purchase_Price' => 10, 'Item_Sale_Price' => 5)); insert_db('Caranille_Items', array('Item_ID' => 4, 'Item_Image' => 'http://localhost', 'Item_Type' => 'Gloves', 'Item_Level_Required' => 1, 'Item_Name' => 'Gants de cuivre', 'Item_Description' => 'Des petits gants', 'Item_Town' => 1, 'Item_Purchase_Price' => 10, 'Item_Sale_Price' => 5)); insert_db('Caranille_Items', array('Item_ID' => 5, 'Item_Image' => 'http://localhost', 'Item_Type' => 'Helmet', 'Item_Level_Required' => 1, 'Item_Name' => 'Casque de cuivre', 'Item_Description' => 'Un petit casque', 'Item_Town' => 1, 'Item_Purchase_Price' => 10, 'Item_Sale_Price' => 5)); insert_db('Caranille_Items', array('Item_ID' => 6, 'Item_Image' => 'http://localhost', 'Item_Type' => 'Parchment', 'Item_Level_Required' => 1, 'Item_Name' => 'Parchemin vide', 'Item_Description' => 'Un parchemin vide', 'Item_Town' => 1, 'Item_Purchase_Price' => 10, 'Item_Sale_Price' => 5)); insert_db('Caranille_Items', array('Item_ID' => 7, 'Item_Image' => 'http://localhost', 'Item_Type' => 'Health', 'Item_Level_Required' => 1, 'Item_Name' => 'Potion', 'Item_Description' => 'Redonne 50 HP', 'Item_Town' => 1, 'Item_Purchase_Price' => 10, 'Item_Sale_Price' => 5)); insert_db('Caranille_Items', array('Item_ID' => 8, 'Item_Image' => 'http://localhost', 'Item_Type' => 'Magic', 'Item_Level_Required' => 1, 'Item_Name' => 'Ether', 'Item_Description' => 'Redonne 5 MP', 'Item_Town' => 1, 'Item_Purchase_Price' => 10, 'Item_Sale_Price' => 5)); //$bdd->exec("INSERT into Caranille_Guilds_competences VALUES('1', '1', '1', '1', '1')"); for ($i = 1; $i <= 5; $i++) { insert_db('Caranille_Inventory', array('Inventory_ID' => $i, 'Inventory_Account_ID' => 1, 'Inventory_Item_ID' => $i, 'Inventory_Item_Quantity' => 1, 'Inventory_Item_Equipped' => 'No')); } insert_db('Caranille_Inventory_Invocations', array('Inventory_Invocation_Account_ID' => 1, 'Inventory_Invocation_Invocation_ID' => 1)); insert_db('Caranille_Inventory_Magics', array('Inventory_Magic_Account_ID' => 1, 'Inventory_Magic_Magic_ID' => 1)); insert_db('Caranille_News', array('News_ID' => 1, 'News_Title' => 'Installation de Caranille', 'News_Intro' => 'Félicitation Caranille est bien installé,', 'News_Message' => ' vous pouvez éditer cette news ou la supprimer', 'News_Account_Pseudo' => $Pseudo, 'News_Date' => $Date)); return true; } } }