23 lines
1.1 KiB
PHP
23 lines
1.1 KiB
PHP
<?
|
|
/*
|
|
Áàáóøêà ïîêîðìèëà
|
|
|
|
*/
|
|
$timetest=time()-24*60*60;
|
|
$check = mysql_fetch_array(mysql_query('SELECT * FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `vars`= "day_korm" AND `time` > "'.$timetest.'"'));
|
|
|
|
if(!isset($check['id']))
|
|
{
|
|
mysql_query('UPDATE `users` SET `room`= 9 WHERE `id` = "'.$u->info['id'].'"');
|
|
mysql_query('UPDATE `stats` SET `hpNow`= 0 WHERE `id` = "'.$u->info['id'].'"');
|
|
|
|
$rtxt='Íàêîðìèëà, ñïàòü óëîæèëà, âñþ æèçíåííóþ ýíåðãèþ âûïèëà è íà öï âûáðîñèëà '.$u->info['login'].'!';
|
|
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `ip`, `vals`, `val`) VALUES ("'.$u->info['id'].'","'.time().'","capitalcity","421","day_korm"," ","","'.$u->info['exp'].'")');
|
|
}
|
|
else
|
|
{
|
|
$txt .= '<br><b><font color=red>Ýõ øóñòðûé ìàëåö, òûæ ñúåë âñå ñåãîäíÿ! Çàâòðà ïðèõîäè íàêîðìëþ ÷åì íèáóäü âêóñíûì!</b></font>';
|
|
}
|
|
|
|
?>
|