2022-06-06 21:30:34 +00:00
< ?
if ( ! defined ( 'GAME' ))
{
die ();
}
if ( $itm [ 'magic_inci' ] == 'dispell' ) {
//mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1');
/* mysql_query ( 'UPDATE `eff_users` SET `delete` = "' . time () . '" WHERE `uid` = "' . $u -> info [ 'id' ] . ' " AND (
`id_eff` = 320 OR `id_eff` = 319 OR `id_eff` = 318 OR `id_eff` = 317 OR `id_eff` = 316
) ' ); */
/*
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
//Действие при клике
2022-06-06 21:30:34 +00:00
if ( isset ( $btl -> info [ 'id' ]) ) {
$btl -> priemAddLog ( $id , 1 , 2 , $usr [ 'id' ], $u -> info [ 'enemy' ],
'' ,
2023-01-10 16:29:32 +00:00
'{tm1} {u1} использовал заклятие "<b>' . $itm [ 'name' ] . '</b>".' ,
2022-06-06 21:30:34 +00:00
( $btl -> hodID )
);
}
$pvr [ 'nego' ] = '' ;
$pvr [ 'nego' ] .= ' `id_eff` = 320
OR `id_eff` = 319
OR `id_eff` = 318
OR `id_eff` = 317
OR `id_eff` = 316
OR `id_eff` = 460
OR `id_eff` = 461
OR `id_eff` = 462
OR `id_eff` = 463
OR `id_eff` = 464
OR `id_eff` = 465 ' ;
$pvr [ 'no' ] = ' AND `a`.`v2` != 201' ;
$pvr [ 'no' ] = ' AND `a`.`v2` != 31' ;
$pvr [ 'no' ] .= ' AND `a`.`v2` != 260' ;
$pvr [ 'no' ] .= ' AND `a`.`v2` != 191' ;
$pvr [ 'no' ] .= ' AND `a`.`v2` != 280' ;
$pvr [ 'no' ] .= ' AND `a`.`v2` != 201' ;
$pvr [ 'no' ] .= ' AND `a`.`v2` != 42 AND `a`.`v2` != 121 AND `a`.`v2` != 122 AND `a`.`v2` != 123 AND `a`.`v2` != 124 AND `a`.`v2` != 125' ;
$pvr [ 'no' ] .= ' AND `a`.`v2` != 186 AND `a`.`v2` != 246 AND `a`.`v2` != 257 AND `a`.`v2` != 281' ;
$pvr [ 'no' ] .= ' AND `a`.`v2` != 282' ;
$pvr [ 'no' ] .= ' AND `a`.`v2` != 21 AND `a`.`v2` != 73 AND `a`.`v2` != 74 AND `a`.`v2` != 75 AND `a`.`v2` != 76 AND `a`.`v2` != 77 AND `a`.`v2` != 78 AND `a`.`v2` != 79' ;
2023-01-10 16:29:32 +00:00
$pvr [ 'no' ] .= ' AND `a`.`name` NOT LIKE "Цель%" ' ;
2022-06-06 21:30:34 +00:00
$pvr [ 'sp' ] = mysql_query ( 'SELECT `a`.* FROM `eff_users` AS `a` LEFT JOIN `priems` AS `b` ON `b`.`id` = `a`.`v2` WHERE `a`.`uid` = "' . $usr [ 'id' ] . '" AND `a`.`delete` = 0 AND ( `a`.`v1` = "priem" ' . $pvr [ 'no' ] . ' OR ( `a`.`v1` = 0 AND (' . $pvr [ 'nego' ] . ') ) OR ( `a`.`id_eff` = 0 AND (' . $pvr [ 'nego' ] . ') ) ) AND ( `b`.`neg` > 0 OR `a`.`v2` = 191 OR `a`.`v2` = 0 ) ORDER BY `a`.`id` DESC LIMIT 1' );
$pvr [ 'pl' ] = mysql_fetch_array ( $pvr [ 'sp' ]);
if ( ! isset ( $pvr [ 'pl' ][ 'id' ])) {
2023-01-10 16:29:32 +00:00
$u -> error = '<font color=red><b>Н е удалось использовать "' . $itm [ 'name' ] . '", на вас нет проклятий!</b></font>' ;
2022-06-06 21:30:34 +00:00
} elseif ( isset ( $btl -> info [ 'id' ]) ) {
$pvr [ 'pl' ][ 'priem' ] = mysql_fetch_array ( mysql_query ( 'SELECT * FROM `priems` WHERE `id` = "' . $pvr [ 'pl' ][ 'v2' ] . '" LIMIT 1' ));
//if( isset($pvr['pl']['priem']) ) {
// $btl->delPriem($pvr['pl'],$btl->users[$btl->uids[$u->info['id']]],100);
2023-01-10 16:29:32 +00:00
$u -> error = '<font color=red><b>Вы успешно использовали "' . $itm [ 'name' ] . '" и сняли эффект "' . $pvr [ 'pl' ][ 'name' ] . '".</b></font>' ;
2022-06-06 21:30:34 +00:00
mysql_query ( 'UPDATE `eff_users` SET `timeUse` = 1224562000 WHERE `id` = "' . $pvr [ 'pl' ][ 'id' ] . '" LIMIT 1' );
mysql_query ( 'UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = ' . $itm [ 'id' ] . ' LIMIT 1' );
//}
} else {
mysql_query ( 'UPDATE `eff_users` SET `timeUse` = 1224562000 WHERE `id` = "' . $pvr [ 'pl' ][ 'id' ] . '" LIMIT 1' );
2023-01-10 16:29:32 +00:00
$u -> error = '<font color=red><b>Вы успешно использовали "' . $itm [ 'name' ] . '"</b></font>' ;
2022-06-06 21:30:34 +00:00
mysql_query ( 'UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = ' . $itm [ 'id' ] . ' LIMIT 1' );
}
2023-01-10 16:29:32 +00:00
//Отнимаем тактики
2022-06-06 21:30:34 +00:00
//$this->mintr($pl);
unset ( $pvr );
}
?>