if ($info['robot_game'] != $temp_optgroup_token) { $temp_optgroup_token = $info['robot_game']; if ($temp_optgroup_token == 'MM20') { $temp_optgroup_name = 'Mega Man Killers'; } elseif (preg_match('/^MM([0-9]+)$/', $temp_optgroup_token)) { $temp_optgroup_name = 'Mega Man ' . ltrim(str_replace('MM', '', $temp_optgroup_token), '0') . ' Robots'; } else { $temp_optgroup_name = 'Mega Man ' . str_replace('MM', '', $temp_optgroup_token) . ' Robots'; } $html_avatar_options[] = '</optgroup>'; $html_avatar_options[] = '<optgroup label="' . $temp_optgroup_name . '">'; } $size = isset($info['robot_image_size']) ? $info['robot_image_size'] : 40; $html_avatar_options[] = '<option value="robots/' . $token . '/' . $size . '">' . $info['robot_number'] . ' : ' . $info['robot_name'] . '</option>'; // Collect the summon count for this robot $temp_summon_count = rpg_prototype::database_summoned($token); // If this is a copy core, add it's type alts if (isset($info['robot_core']) && $info['robot_core'] == 'copy') { foreach ($mmrpg_index['types'] as $type_token => $type_info) { if ($type_token == 'none' || $type_token == 'copy' || isset($type_info['type_class']) && $type_info['type_class'] == 'special') { continue; } if (!isset($_SESSION['GAME']['values']['battle_items']['item-core-' . $type_token]) && $this_userinfo['role_id'] != 1) { continue; } $html_avatar_options[] = '<option value="robots/' . $token . '_' . $type_token . '/' . $size . '">' . $info['robot_number'] . ' : ' . $info['robot_name'] . ' (' . $type_info['type_name'] . ' Core)' . '</option>'; } } elseif (!empty($info['robot_image_alts'])) { //die('<pre>$info = '.print_r($info, true).'</pre>'); // Loop through each of the available alts and print if unlocked foreach ($info['robot_image_alts'] as $key => $this_altinfo) {