fetch([ 'name', 'level', 'vocation', 'sex', 'looktype', 'lookhead', 'lookbody', 'looklegs', 'lookfeet', 'lookaddons', 'health', 'healthmax', 'mana', 'manamax', 'soul', 'cap', 'experience', 'maglevel', 'town_id', 'lastlogin', 'lastlogout', 'online', 'created', 'comment', ]); if ($data === false) { $response['error'] = 'Character not found.'; SendResponse($response); exit; } $data['vocation_name'] = vocation_id_to_name((int)($data['vocation'] ?? -1)); $townId = (int)($data['town_id'] ?? 0); $data['town_name'] = $config['towns'][$townId] ?? null; $guild = get_player_guild_data($id); if ($guild !== false) { $data['guild'] = [ 'name' => get_guild_name((int)$guild['guild_id']) ?: null, 'rank_name' => $guild['rank_name'] ?? null, ]; } $response['data'] = $data; SendResponse($response); ?>