2022-06-06 21:30:34 +00:00
< ?
if ( ! defined ( 'GAME' ))
{
die ();
}
if ( $itm [ 'magic_inci' ] == 'secondshans' ) {
$pvr = array ();
$titm = mysql_fetch_array ( mysql_query ( 'SELECT * FROM `actions` WHERE `uid` = "' . $u -> info [ 'id' ] . '" AND `vals` = "loto" AND `time` > ' . ( time () - 24 * 60 * 60 ) . ' ORDER BY `time` DESC LIMIT 1' ));
2023-01-10 16:29:32 +00:00
//Действие при клике
2022-06-06 21:30:34 +00:00
if ( $titm == false ) {
2023-01-10 16:29:32 +00:00
$u -> error = '<font color=red><b>У вас нет задержки, нет смысла использовать свиток.</b></font> ' ;
2022-06-06 21:30:34 +00:00
} else {
mysql_query ( 'DELETE FROM `actions` WHERE `uid` = "' . $u -> info [ 'id' ] . '" AND `vals` = "loto" ' );
mysql_query ( 'UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = ' . $itm [ 'id' ] . ' LIMIT 1' );
mysql_query ( 'DELETE FROM `items_users` WHERE `id` = ' . $itm [ 'id' ] . ' LIMIT 1' );
2023-01-10 16:29:32 +00:00
$u -> error = '<font color=red><b>Свиток удачно использован</b></font> ' ;
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Отнимаем тактики
2022-06-06 21:30:34 +00:00
//$this->mintr($pl);
unset ( $pvr );
}
?>