30 lines
975 B
PHP
30 lines
975 B
PHP
<?php
|
||
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'));
|
||
|
||
//Действие при клике
|
||
if( $titm==false ) {
|
||
$u->error = '<font color=red><b>У вас нет задержки, нет смысла использовать свиток.</b></font> ';
|
||
}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');
|
||
$u->error = '<font color=red><b>Свиток удачно использован</b></font> ';
|
||
}
|
||
|
||
//Отнимаем тактики
|
||
//$this->mintr($pl);
|
||
|
||
unset($pvr);
|
||
}
|
||
?>
|