game/_incl_data/class/Priem/253.php

34 lines
1.4 KiB
PHP
Raw Normal View History

2023-03-31 18:42:06 +00:00
<?php
2022-06-06 21:30:34 +00:00
if(!defined('GAME')) {
die();
}
/*
2023-01-10 16:29:32 +00:00
Прием: Каменный страж
2022-06-06 21:30:34 +00:00
*/
$pvr = array();
2023-01-10 16:29:32 +00:00
//Действие при клике
$pvr['id'] = mysql_fetch_array(mysql_query('SELECT `id` FROM `test_bot` WHERE `login` = "Каменный Страж (Прием)" AND `level` = "'.$u->info['level'].'" LIMIT 1'));
2022-06-06 21:30:34 +00:00
if( isset($pvr['id']['id']) ) {
$pvr['bot'] = $u->addNewbot($pvr['id']['id'],NULL,NULL);
//
2024-01-06 15:30:34 +00:00
$pvr['xznm'] = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `users` WHERE `battle` = "'.$btl->i->id.'" AND `login` LIKE "Каменный Страж%" LIMIT 1'));
2022-06-06 21:30:34 +00:00
if($pvr['xznm'][0] > 0) {
$pvr['xznm'] = ' ('.($pvr['xznm'][0]).')';
}else{
$pvr['xznm'] = '';
}
//
2024-01-06 15:30:34 +00:00
mysql_query('UPDATE `users` SET `login` = "Каменный Страж'.$pvr['xznm'].'",`obraz` = "0.gif",`battle` = "'.$btl->i->id.'" WHERE `id` = "'.$pvr['bot']['id'].'" LIMIT 1');
2022-06-06 21:30:34 +00:00
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'],
2023-01-10 16:29:32 +00:00
'Каменный Страж',
2022-06-06 21:30:34 +00:00
'{tm1} '.$btl->addlt(1 , 21 , $btl->users[$btl->uids[$u->info['id']]]['sex'] , NULL).'.',
($btl->hodID)
);
//
2023-01-10 16:29:32 +00:00
$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']));
2022-06-06 21:30:34 +00:00
}
unset($pvr);
?>