select * from (select @n := @n + 1, uc.id_user as iduser,
(select u.login from users u where u.id = uc.id_user) as login,
(select up.level_mutagen from users_pancer up where up.id_user = uc.id_user) as level_mutagen,
(select up.level_pancers_1 from users_pancer up where up.id_user = uc.id_user) as lp1,
(select up.level_pancers_2 from users_pancer up where up.id_user = uc.id_user) as lp2,
(select up.level_pancers_3 from users_pancer up where up.id_user = uc.id_user) as lp3,
(select up.level_pancers_4 from users_pancer up where up.id_user = uc.id_user) as lp4,
round(uc.health / 4)
+ coalesce((select lpm.protect from _levels_pancer_mutagen lpm where lpm.level = level_mutagen), 0)
+ coalesce((select lpp1.protect from _levels_pancer_pancers lpp1 where lpp1.level = lp1), 0)
+ coalesce((select lpp2.protect from _levels_pancer_pancers lpp2 where lpp2.level = lp2), 0)
+ coalesce((select lpp3.protect from _levels_pancer_pancers lpp3 where lpp3.level = lp3), 0)
+ coalesce((select lpp4.protect from _levels_pancer_pancers lpp4 where lpp4.level = lp4), 0) as param_sum
from users_combat uc
order by param_sum desc, login asc) x where iduser = ? limit 1