game/_incl_data/class/priem/253.php
2022-06-07 00:30:34 +03:00

34 lines
1.3 KiB
PHP

<?
if(!defined('GAME')) {
die();
}
/*
Ïðèåì: Êàìåííûé ñòðàæ
*/
$pvr = array();
//Äåéñòâèå ïðè êëèêå
$pvr['id'] = mysql_fetch_array(mysql_query('SELECT `id` FROM `test_bot` WHERE `login` = "Êàìåííûé Ñòðàæ (Ïðèåì)" AND `level` = "'.$u->info['level'].'" LIMIT 1'));
if( isset($pvr['id']['id']) ) {
$pvr['bot'] = $u->addNewbot($pvr['id']['id'],NULL,NULL);
//
$pvr['xznm'] = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `users` WHERE `battle` = "'.$btl->info['id'].'" AND `login` LIKE "Êàìåííûé Ñòðàæ%" LIMIT 1'));
if($pvr['xznm'][0] > 0) {
$pvr['xznm'] = ' ('.($pvr['xznm'][0]).')';
}else{
$pvr['xznm'] = '';
}
//
mysql_query('UPDATE `users` SET `login` = "Êàìåííûé Ñòðàæ'.$pvr['xznm'].'",`obraz` = "0.gif",`battle` = "'.$btl->info['id'].'" WHERE `id` = "'.$pvr['bot']['id'].'" LIMIT 1');
mysql_query('UPDATE `stats` SET `team` = "'.$u->info['team'].'" WHERE `id` = "'.$pvr['bot']['id'].'" LIMIT 1');
//
$btl->priemAddLog( $id, 1, 2, $u->info['id'], $u->info['enemy'],
'Êàìåííûé Ñòðàæ',
'{tm1} '.$btl->addlt(1 , 21 , $btl->users[$btl->uids[$u->info['id']]]['sex'] , NULL).'.',
($btl->hodID)
);
//
$this->addPriem($u->info['id'],254,'add_yhod='.floor($pvr['bot']['id']).'',2,77,-2,$u->info['id'],1,'êàìåííûéñòðàæçàùèòèòü',0,0,1,floor($pvr['bot']['id']));
}
unset($pvr);
?>