$vip=mysql_fetch_array(mysql_query('SELECT `id`, `klan`, `unclone` FROM `abils_klan` WHERE `klan` = "'.$user['klan'].'" LIMIT 1'));
if($user['battle']==0){
echo"Это боевая магия...";
}else{
if($vip['unclone']>=1){
$bot=mysql_fetch_array(mysql_query("SELECT * FROM `bots` WHERE `name` = '".mysql_real_escape_string($_POST['target'])."' AND `battle` = '".$user['battle']."' LIMIT 1"));
if($bot){
$prototype=mysql_fetch_array(mysql_query('SELECT `id`, `intel` FROM `users` WHERE `id` = "'.$bot['prototype'].'" LIMIT 1'));
}
if($prototype['intel']>$user['intel']){
echo'Ваш противник имеет более высокий интелект ...';
}elseif($bot&&strpos($_POST['target'],"клон")){
$bot=$bot[0];
$bd=mysql_fetch_array(mysql_query('SELECT * FROM `battle` WHERE `id` = "'.$user['battle'].'" LIMIT 1'));
addlog($user['battle'],'<span class=date>'.date("H:i").'</span> '.Nick::id($user['id'])->short().' переманил клона '.Nick::id($bot)->short().' на свою сторону<BR>');