game/_incl_data/class/magic/secondshans.php
2023-01-10 18:30:35 +02:00

30 lines
972 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?
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);
}
?>