} adr_previous(Adr_town_training_grounds_train_skill_done, adr_character_skills, ''); break; case 'train_charac': $template->assign_block_vars('training.train_charac', array()); $base = $adr_general['training_charac_cost']; if (!$board_config['Adr_character_sp_enable']) { $lang_points = $board_config['points_name']; } else { $lang_points = $lang['Adr_character_sp']; } $template->assign_vars(array('MINING' => $adr_user['character_might'], 'MINING_COST' => $adr_user['character_might'] * $base . ' ' . $lang_points, 'COOKING' => $adr_user['character_intelligence'], 'COOKING_COST' => $adr_user['character_intelligence'] * $base . ' ' . $lang_points, 'STONE' => $adr_user['character_dexterity'], 'STONE_COST' => $adr_user['character_dexterity'] * $base . ' ' . $lang_points, 'FORGE' => $adr_user['character_constitution'], 'FORGE_COST' => $adr_user['character_constitution'] * $base . ' ' . $lang_points, 'BREWING' => $adr_user['character_intelligence'], 'BREWING_COST' => $adr_user['character_intelligence'] * $base . ' ' . $lang_points, 'BLACKSMITHING' => $adr_user['character_intelligence'], 'BLACKSMITHING_COST' => $adr_user['character_intelligence'] * $base . ' ' . $lang_points, 'ENCHANTMENT' => $adr_user['character_intelligence'], 'ENCHANTMENT_COST' => $adr_user['character_intelligence'] * $base . ' ' . $lang_points, 'TRADING' => $adr_user['character_wisdom'], 'TRADING_COST' => $adr_user['character_wisdom'] * $base . ' ' . $lang_points, 'THIEF' => $adr_user['character_charisma'], 'THIEF_COST' => $adr_user['character_charisma'] * $base . ' ' . $lang_points, 'FISHING' => $adr_user['character_wisdom'], 'FISHING_COST' => $adr_user['character_wisdom'] * $base . ' ' . $lang_points, 'LUMBERJACK' => $adr_user['character_might'], 'LUMBERJACK_COST' => $adr_user['character_might'] * $base . ' ' . $lang_points, 'TAILORING' => $adr_user['character_wisdom'], 'TAILORING_COST' => $adr_user['character_wisdom'] * $base . ' ' . $lang_points, 'HERBALISM' => $adr_user['character_wisdom'], 'HERBALISM_COST' => $adr_user['character_wisdom'] * $base . ' ' . $lang_points, 'HUNTING' => $adr_user['character_might'], 'HUNTING_COST' => $adr_user['character_might'] * $base . ' ' . $lang_points, 'ALCHEMY' => $adr_user['character_intelligence'], 'ALCHEMY_COST' => $adr_user['character_intelligence'] * $base . ' ' . $lang_points, 'L_FISHING' => $lang['Adr_character_willpower'], 'L_LUMBERJACK' => $lang['Adr_character_power'], 'L_TAILORING' => $lang['Adr_character_willpower'], 'L_HERBALISM' => $lang['Adr_character_willpower'], 'L_HUNTING' => $lang['Adr_character_power'], 'L_ALCHEMY' => $lang['Adr_character_intelligence'], 'L_MINING' => $lang['Adr_character_power'], 'L_COOKING' => $lang['Adr_character_intelligence'], 'L_STONE' => $lang['Adr_character_agility'], 'L_FORGE' => $lang['Adr_character_endurance'], 'L_ENCHANTMENT' => $lang['Adr_character_intelligence'], 'L_TRADING' => $lang['Adr_character_willpower'], 'L_THIEF' => $lang['Adr_character_charm'], 'L_MA' => $lang['Adr_character_ma'], 'L_MD' => $lang['Adr_character_md'], 'L_NAME' => $lang['Adr_races_name'], 'L_LEVEL' => $lang['Adr_character_level'], 'L_COST' => $lang['Adr_town_training_grounds_train_skill_cost'], 'L_SELECT' => $lang['Select'], 'L_BREWING' => $lang['Adr_character_intelligence'], 'L_BLACKSMITHING' => $lang['Adr_character_intelligence'], 'L_SKILLS' => $lang['Adr_town_training_grounds_train_charac'], 'L_SKILLS_ACTION' => $lang['Adr_town_training_grounds_train_charac_action'])); break; case 'train_charac_action': $skill_id = intval($HTTP_POST_VARS['training_charac']); if (!$skill_id) { adr_previous(Adr_town_training_grounds_train_charac_must, adr_town, "mode=training&sub_mode=train_charac"); } $skill[1] = $adr_user['character_might']; $skill[2] = $adr_user['character_dexterity']; $skill[3] = $adr_user['character_constitution']; $skill[4] = $adr_user['character_intelligence']; $skill[5] = $adr_user['character_wisdom']; $skill[6] = $adr_user['character_charisma']; $skills = $skill[$skill_id]; $base = $adr_general['training_charac_cost']; $price = $skills * $base; if (!$board_config['Adr_character_sp_enable']) { adr_substract_points($user_id, $price, adr_town, "mode=training&sub_mode=train_charac"); } else { adr_substract_sp($user_id, $price, adr_town, "mode=training&sub_mode=train_charac");
if (!$skill_id) { adr_previous(Adr_town_training_grounds_train_charac_must, adr_TownMap_Entrainement, "mode=training&sub_mode=train_charac"); } $skill[1] = $adr_user['character_might']; $skill[2] = $adr_user['character_dexterity']; $skill[3] = $adr_user['character_constitution']; $skill[4] = $adr_user['character_intelligence']; $skill[5] = $adr_user['character_wisdom']; $skill[6] = $adr_user['character_charisma']; $skills = $skill[$skill_id]; $base = $adr_general['training_charac_cost']; $price = $skills * $base; if (!$board_config['Adr_character_sp_enable']) { adr_substract_points($user_id, $price, adr_TownMap_Entrainement, "mode=training&sub_mode=train_charac"); } else { adr_substract_sp($user_id, $price, adr_TownMap_Entrainement, "mode=training&sub_mode=train_charac"); } $skill[1] = 'character_might'; $skill[2] = 'character_dexterity'; $skill[3] = 'character_constitution'; $skill[4] = 'character_intelligence'; $skill[5] = 'character_wisdom'; $skill[6] = 'character_charisma'; $skills = $skill[$skill_id]; $sql = " UPDATE " . ADR_CHARACTERS_TABLE . "\r\n\t\t\t\t\t\t\tSET {$skills} = {$skills} + 1 \r\n\t\t\t\t\t\t\tWHERE character_id = {$user_id} "; if (!$db->sql_query($sql)) { message_die(CRITICAL_ERROR, 'Error updating ADR Classes!'); } adr_previous(Adr_town_training_grounds_train_charac_done, adr_character, ''); break; break;